chronograf/ui
Kevin Fitzpatrick 0c1e89ac1e Merge branch 'feature/handle-empty-alert-set' 2016-11-07 12:02:14 -08:00
..
assets/images Adding favicon 2016-10-10 14:11:49 -07:00
spec Add alerts to kapacitor rule 2016-11-03 15:54:03 -07:00
src Merge branch 'feature/handle-empty-alert-set' 2016-11-07 12:02:14 -08:00
webpack Add "I" and "Name" to cells on backend 2016-10-28 18:01:14 -04:00
.babelrc Set up action and reducer 2016-10-20 13:32:09 -07:00
.eslintignore Bring over enterprise ui and configuration 2016-09-19 13:45:05 -07:00
.eslintrc Update eslint rules 2016-09-20 11:49:57 -07:00
.gitignore Bring over enterprise ui and configuration 2016-09-19 13:45:05 -07:00
.npmrc Bring over enterprise ui and configuration 2016-09-19 13:45:05 -07:00
Dockerfile Bring over enterprise ui and configuration 2016-09-19 13:45:05 -07:00
README.md Bring over enterprise ui and configuration 2016-09-19 13:45:05 -07:00
karma.conf.js Add karma config 2016-09-20 11:50:15 -07:00
package.json Pin ESLint to 3.5.x 2016-11-02 13:43:59 -04:00

README.md

Enterprise UI

Here lies a collection of React components used in the Enterprise web app.

Currently they're organized per "page", with each separate directly having it's own components/containers folders, index.js, etc. For example:

/ui /overview /components /containers index.js /chronograf /components /containers index.js

Getting started

This project uses Node v5.

It depends on at least one private Node module. In order to successfully npm install, you'll need an npm authentication token.

There are two ways to get an npm token.

  1. You can copy someone else's token (have them give you a copy of their ~/.npmrc). This is fine for most cases, and it's probably necessary for CI machines.
  2. You can create an npm account and coordinate with Mark R to join the influxdata npm org. You probably don't need this if you aren't ever going to create/publish a private Node module.

Development

First, in the ui/ folder run npm install.

run npm run build:dev to start the webpack process which bundles the JS into assets/javascripts/generated/.

Tests

We use mocha, sinon, chai, and React's TestUtils library.

Run tests against jsdom from the command line:

npm run test       # single run
npm run test:watch # re-run tests on file changes

Run tests in the browser:

# This starts a webpack process that you'll need to leave running.
# It rebuilds your tests on each file change.
npm run test:browser
# open http://localhost:7357/spec/test.html

Production

As before, npm install first. Then npm run build to generate a production build into the assets/javascripts/generated/ folder.

If you want to run tests against the production build, npm run test will build the test files and run the tests in a headless Phantom browser.