Web interface for RADAR
JavaScript HTML CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
extra/screenshots
src
.babelrc
.editorconfig
.eslintrc.js
.gitignore
.travis.yml
LICENSE.md
README.md
build.sh
fabfile.py
karma.conf.js
package-lock.json
package.json
sauce-labs.conf.js
webpack.config.js

README.md

RADAR Client

This repository is the home of the RADAR (Rare Disease Registry) web interface. The application is built using the AngularJS framework and bundled for browsers using webpack. The application communicates with the RADAR API.

Build Status

Travis Coveralls David

Sauce Labs

Getting Started

Make sure you have Node.js and npm installed (npm is included with Node.js).

Clone the repository:

git clone https://github.com/renalreg/radar-client.git
cd radar-client

Install the dependencies:

npm install

Start the development server:

npm start

The development server is available at http://localhost:8080/ and with live reloading at http://localhost:8080/webpack-dev-server/.

npm scripts

  • start - start the development server.
  • clean - remove build output.
  • build - build the client in the dist folder.
  • lint - lint the source code with ESLint.
  • test - run the tests with Karma.
  • sauce-labs - run the tests on all supported browsers using Sauce Labs.

Development Guide

Run the development server with the npm start command. This will start a development server listening on http://localhost:8080/. If you are using a VM you might want to listen on all interfaces with the --host 0.0.0.0 argument. You can pass extra arguments to npm start using the -- separator. For example npm start -- --host 0.0.0.0.

The development server proxies requests to /api to the API running on localhost:5000.

The code is automatically linted and tested by Travis CI. Lint errors or test failures will prevent a package being built with ./build.sh.

Lint

The JavaScript code can be linted with the ESLint tool. The coding style is two-spaces for indentation, single-quotes, and semi-colons.

Lint the code with:

npm run lint

Test

The tests are written using the Jasmine framework and run using Karma. Test files have the .test.js extension and are normally named after the file they are testing.

Run the tests with:

npm test

A HTML coverage report is saved to the coverage/html directory.

Deployment Guide

Bump the version in package.json and git tag the commit.

Build a .tar.gz:

./build.sh

This will lint the code, run the tests, build the client and create an archive ready for distribution. The client will be built in production mode (NODE_ENV=production) which will minify the output.

Deploy the .tar.gz to servers:

virtualenv venv
. venv/bin/activate
pip install fabric

fab -H nww.radar.nhs.uk -u root deploy

The --gateway option is useful for tunneling through another server.

Supported Browsers

RADAR supports the following browsers:

  • Chrome
  • Firefox
  • Internet Explorer 8+ (we recommend using Internet Explorer 11)

Browser usage on RADAR in August 2016 was:

Browser Usage %
Chrome 41.1%
Internet Explorer 11 27.8%
Internet Explorer 8 13.9%
Internet Explorer 9 7.3%
Firefox 6.6%
Internet Explorer 10 3.3%

Screenshots

Patients

Results

Stats

License

Copyright (c) 2016 UK Renal Registry.

Licensed under the AGPL license.