https://github.com/closer-cohorts/dashboard

A dashboard for viewing CLOSER data

https://github.com/closer-cohorts/dashboard

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

A dashboard for viewing CLOSER data

Basic Info
  • Host: GitHub
  • Owner: CLOSER-Cohorts
  • License: mit
  • Language: JavaScript
  • Default Branch: main
  • Size: 2.7 MB
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created over 2 years ago · Last pushed 9 months ago
Metadata Files
Readme License

README.md

Dashboard

There are several dashboards in this application, which are used to perform different types of checks on the data and identify the following issues before deploying to production:

  • Item types which contain incorrectly entered 'free text' for some field values

  • Ingested content related issues as described in https://wiki.ucl.ac.uk/display/CTTEAM/Dashboard+-+Content+checks

Installation

  • Rename ecosystem.config.dist to ecosystem.config.js.
  • Update the value of the COLECTICAREPOSITORYHOSTNAME environment variable with the name of a server that hosts the Colectica Repository. This environment variable is used to construct the URL for the REST API that the dashboard queries in order to retrieve data from the Colectica Repository.

Running the application locally

Before running either a dev or production instance of the Dashboard, type: npm i

To run a dev instance of the Dashboard, modify package.json by setting the value of the COLECTICAREPOSITORYHOSTNAME environment variable set in the 'dev' entry under the 'scripts' section to the hostname of the Colectica repository your Dashboard instance will be querying (e.g. type the following in the root directory of the dashboard application code:

npm run dev

To run a production instance of the Dashboard, type the following in the root directory of the dashboard application code: npm run build npm run start Note that Node.js has different option settings for development and production instances; running a production instance in the above fashion just means running a local instance of the Dashboard with the Node.js options settings for a production environment. It does not deploy and run the Dashboard on a remote production environment.

Whether running a dev or production instance locally, the application can be viewed at http://localhost:3000. Note that this is not the same URL path for accessing the dashboard on the staging environment (which has /dashboard at the end).

Running the dashboard as a service on a Windows server

startDashboard.bat contains commands used to run the dashboard as a service on a Windows server. The details for how to set up a Windows server to host a NodeJS based application like the Dashboard are on the CLOSER Discovery Team wiki.

Using the application

Login to the application using your discovery.closer.ac.uk username and password.

Setting up data collection scripts for dashboards

Some dashboards don't query the Colectica repository and display the results on loading, but instead display information contained in files that are periodically updated. The dashboard pages for missing/incomplete relationships between items (pages/missingIncorrectRelationships) and for items with topic-related issues (pages/topicIssues) are populated with data from files in the data directory. The files in this directory are generated by lib/pollRepository.mjs and lib/findItemsWithTopicIssues.mjs. These files need to be created in advance of users looking at pages/topicIssues and pages/missingIncorrectRelationships because the queries that retrieve this data are long-running (at the time of writing, up to a couple of hours), and can't be executed dynamically whenever a user views these dashboards.

In order for the code that generates the files in the data directory to function, the lib/pollRepository.mjs, lib/findItemsWithTopicIssues.mjs and package.json files need to be modified after they are checked out. The login credentials for an account with the 'Guest' (i.e. read-only) role on a Colectica repository and the hostname of that repository need to be manually entered in the code; these details are too sensitive to store in a public repository.

The 'poll' and 'findTopicIssues' entries in the 'scripts' section of the package.json file need to be modified so the COLECTICAREPOSITORYHOSTNAME environment variable is set to the hostname of the Colectica repository that is being polled. The following line at the top of the lib/pollRepository.mjs and lib/findItemsWithTopicIssues.mjs files needs to be updated with the login details of a user with the 'Guest' role on the Colectica repository that is being polled:

const tokenObject = await getToken("user", "password", process.env.COLECTICA_REPOSITORY_HOSTNAME)

Running the jest tests

npm i npm run test

Owner

  • Name: CLOSER
  • Login: CLOSER-Cohorts
  • Kind: organization
  • Location: London, UK

CLOSER is funded by the Economic and Social Research Council (ESRC)

GitHub Events

Total
  • Issues event: 37
  • Delete event: 86
  • Issue comment event: 26
  • Push event: 276
  • Pull request review event: 83
  • Pull request event: 217
  • Create event: 101
Last Year
  • Issues event: 37
  • Delete event: 86
  • Issue comment event: 26
  • Push event: 276
  • Pull request review event: 83
  • Pull request event: 217
  • Create event: 101

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 35
  • Total pull requests: 211
  • Average time to close issues: 22 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 0.43
  • Average comments per pull request: 0.07
  • Merged pull requests: 151
  • Bot issues: 1
  • Bot pull requests: 171
Past Year
  • Issues: 19
  • Pull requests: 121
  • Average time to close issues: 30 days
  • Average time to close pull requests: 2 days
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.47
  • Average comments per pull request: 0.09
  • Merged pull requests: 82
  • Bot issues: 0
  • Bot pull requests: 101
Top Authors
Issue Authors
  • ollylucl (30)
  • spuddybike (3)
  • HayleyMills (1)
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (171)
  • ollylucl (40)
Top Labels
Issue Labels
dependencies (1)
Pull Request Labels
dependencies (171) javascript (42)

Dependencies

package-lock.json npm
  • 124 dependencies
package.json npm
  • @emotion/react ^11.11.1
  • @emotion/styled ^11.11.0
  • @mui/material ^5.14.14
  • fast-xml-parser ^4.3.2
  • gray-matter ^4.0.3
  • next latest
  • react 18.2.0
  • react-dom 18.2.0
  • swr ^2.2.4