Code Monkey home page Code Monkey logo

radar-dashboard's Introduction

RADAR-base Frontend Dashboard App

Build Status Codacy Badge Codacy Badge Coverage Status

An Angular and D3 web application to manage and monitor research data from the RADAR-base Platform.

Install

Install Node.js and Yarn.

We use angular-cli so you can use all of it's commands, like the generator. Please read its documentation for further information.

If want to use angular-cli's commands you need to install it globally:

$ yarn global add @angular/cli

In the project folder install npm dependencies:

$ yarn

To run the application use:

$ yarn start

Guidelines

Use the following command before commiting to fix common styling problems.

$ yarn fix:all

Contributing

Read /docs/CONTRIBUTING.md

Code of Conduct

Read /docs/CODE_OF_CONDUCT.md

Docker

Create docker image:

$ docker build -t radarbase/radar-dashboard ./

Or pull from dockerhub:

$ docker pull radarbase/radar-dashboard:latest

Run docker image locally:

$ docker run -d -p 3030:80 --name radar-dashboard radarbase/radar-dashboard:latest

The dashboard will be running at http://localhost:3030

Docker environment parameters

The environment parameters are set in docker run so they can be overridden by docker-compose. More information in https://docs.docker.com.

Change BASE_HREF if the application is running under a subfolder, e.g., https://radar-base.org/dashboard

BASE_HREF='/dashboard/'

Change API_URI to set the API endpoint of the application

API_URI='https://radar-backend.co.uk/api/'

Supporting Partners

We thank our supporting partners who have been a tremendous help in streamlining our development process.

Browserstack_logo

radar-dashboard's People

Contributors

blootsvoets avatar dependabot-preview[bot] avatar greenkeeperio-bot avatar herkulano avatar kerzmaximilian avatar mpgxvii avatar nivemaham avatar petcupaula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radar-dashboard's Issues

Study view: compliance plot

Currently we do not have a REST API implementation for this. However, the data will look like the /stats/RECEIVED_MESSAGES call. I suggest you create a mock data file with the schema of the latter call and work off that.

Heart Rate Chart v1.0

  • add chart structure for heart-rate data
  • add service and store for heart-rate data
  • plot [avg, median] data values to chart-heart-rate
  • plot [min, max] data values to chart-heart-rate

Dashboard does not work in Safari

The Dashboard does not work in Safari and Safari Technology Preview: it does not show any grid. Errors in the developer console:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (user, line 0)
[Error] EXCEPTION: Response with status: 404 Not Found for URL: http://radar-restapi.eu-west-1.elasticbeanstalk.com/api/HeartRate/avg/user
	handleError (main.0e356cc5de3e1e044091.bundle.js:1220:244)
	next (main.0e356cc5de3e1e044091.bundle.js:739:1976)
	(anonymous function) (main.0e356cc5de3e1e044091.bundle.js:788:562)
	__tryOrUnsub (main.0e356cc5de3e1e044091.bundle.js:1:7384)
	next (main.0e356cc5de3e1e044091.bundle.js:1:6738)
	_next (main.0e356cc5de3e1e044091.bundle.js:1:6049)
	next (main.0e356cc5de3e1e044091.bundle.js:1:5721)
	next (main.0e356cc5de3e1e044091.bundle.js:22:18324)
	emit (main.0e356cc5de3e1e044091.bundle.js:788:336)
	triggerError (main.0e356cc5de3e1e044091.bundle.js:839:3342)
	onHandleError (main.0e356cc5de3e1e044091.bundle.js:839:2932)
	runTask (main.0e356cc5de3e1e044091.bundle.js:2107:4493)
	invoke (main.0e356cc5de3e1e044091.bundle.js:2107:8195)
[Error] Response with status: 404 Not Found for URL: http://radar-restapi.eu-west-1.elasticbeanstalk.com/api/HeartRate/avg/user
	__tryOrUnsub (main.0e356cc5de3e1e044091.bundle.js:1:7437)
	next (main.0e356cc5de3e1e044091.bundle.js:1:6738)
	_next (main.0e356cc5de3e1e044091.bundle.js:1:6049)
	next (main.0e356cc5de3e1e044091.bundle.js:1:5721)
	next (main.0e356cc5de3e1e044091.bundle.js:22:18324)
	emit (main.0e356cc5de3e1e044091.bundle.js:788:336)
	triggerError (main.0e356cc5de3e1e044091.bundle.js:839:3342)
	onHandleError (main.0e356cc5de3e1e044091.bundle.js:839:2932)
	runTask (main.0e356cc5de3e1e044091.bundle.js:2107:4493)
	invoke (main.0e356cc5de3e1e044091.bundle.js:2107:8195)

It does work in the latest versions of Firefox and Chrome. They give similar errors though (in Chrome):

Failed to load resource: the server responded with a status of 404 (Not Found)
error_handler.js:50EXCEPTION: Response with status: 404 Not Found for URL: http://radar-restapi.eu-west-1.elasticbeanstalk.com/api/HeartRate/avg/usert.handleError @ error_handler.js:50
Subscriber.js:227Uncaught e_body: "<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.36 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 404 - Not Found</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Not Found</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.0.36</h3></body></html>"headers: tok: falsestatus: 404statusText: "Not Found"type: 2url: "http://radar-restapi.eu-west-1.elasticbeanstalk.com/api/HeartRate/avg/user"__proto__: t

PlatformHealth Service

  • Forward to platform health view
  • Get response from RADAR REST enpoint

Containing information:
Device Status

  • A list of connected devices (and potentially recently disconnected devices) with:
  • Battery level
  • Temperature (indicator if watch is worn or not)
  • Hearth rate (e.g. mean over last 10 seconds)
  • Android device name (of RPi/UDOO device to which device is connected over Bluetooth) [not shown in mock]

Server status/health

  • Connection status (connected, disconnected or connecting)
  • Cold storage status (raw data stored to HDFS)
  • Hot storage status (aggregated to MongoDB)
  • Log of recent database activies (e.g. what activities were written)
  • Server connection name [not shown in mock]
  • Number of active topics [not shown in mock]
  • Records written per topic [not shown in mock]

Subject: Chart tooltip, axis labels, and legend

  • Show tooltip with actual value on mouse-over (maybe also show a vertical line)
  • Show labels on axis (for example: on vertical axis average bpm and on horizontal axis datetime)
  • Add legend (will be useful especially for multi line chart or for categorical data shown in a bar chart)

Heart Rate Chart v1.1

  • add config for plot and data
  • add time interval config and component
  • plot [min, max] data values to chart-heart-rate

Implement workbook component

Proposing that we need to define a new type of component that is able to handle multiple tabs/pages of grids.

If charts are part of tiles, tiles are configured in a grid, and a grid is added in a dashboard, then multiple dashboards (i.e. multiple tabs with the same general focus and audience) could be grouped in a workbook.

Duplicate header in table and missing row

When you press on a subject on the table and then go back the table shows a duplicate header and the last row has no content.

In PR: #231

screen shot 2017-08-03 at 13 18 23

ERROR in console:

CompliancePlotTableComponent.html:2 
ERROR TypeError: Cannot read property 'unsubscribe' of undefined
    at ChartBaseMultiBarTableComponent.webpackJsonp.../../../../../src/app/components/charts/chart-base/chart-base.component.ts.ChartBaseComponent.ngOnDestroy (chart-base.component.ts:65)
    at callProviderLifecycles (core.es5.js:11188)
    at callElementProvidersLifecycles (core.es5.js:11157)
    at callLifecycleHooksChildrenFirst (core.es5.js:11141)
    at destroyView (core.es5.js:12477)
    at callViewAction (core.es5.js:12623)
    at execComponentViewsAction (core.es5.js:12535)
    at destroyView (core.es5.js:12476)
    at callViewAction (core.es5.js:12623)
    at execEmbeddedViewsAction (core.es5.js:12561)

Subject: Implement time filter/zoom

Implement time filter/zoom based on the sketch mockups for patient view.

Also, we will have event markers for some of the data (start and stop datetimestamp for tasks performed during visits), so we need to think how to represent these.

Study view: Patient Cohort Table

To be implemented:

  • Pull paginator-bar to the bottom of tile.

  • Instead of intra-row scroll to display multiple sources, implement tip-box (hovering over row) to display individual connectedness. Within row, show summary connectedness status (see sketch file).

Alerts based on n consecutive days without data

It may be useful to the study teams to have email alerts if there is substantial loss of data. The information to make such an alert is possible already is provided to the Dashboard (it might be better to even make this window days a configurable length and include logic like ">= 3 days"). The platform already can send emails.

It may also be good to be able to filter the list view of participants in the Dashboard based on some criteria (e.g. no data for 3 days or more). We'll have to add it to the post v1.0 features.

Restructure project

Restructure the project to create modules that carry their component dependencies inside them, so that we can better lazy load and separate not only the pages but also the store reducers and effects.

A good example of this idea that we can use as a guide:
https://github.com/ngrx/platform/tree/master/example-app

Notice that the store reducers and effects are also nicely separated:
https://github.com/ngrx/platform/blob/5573ec0d1d13a90c217227313ff57dc287d9e777/example-app/app/books/books.module.ts#L35-L51

Implement Study view

We need to finalise the table implementation (#14, #85, #86) and the status component (#15).

Also to consider:

  • showing demographics data (gender, year of birth)
  • handling user access to multiple studies

Settings: Configure Questionnaires

Administrators of the questionnaires should be able to allocate groups of questionnaires to distinct subsets of patients via the platform administration

Participant Management Dashboard

We will need an interface to manage participants that are sending data into the platform.

The platform dashboard(s) should initially include participant:

  • enrolment
  • device remote configuration
  • removal
  • monitoring data upload compliance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.