RETIRED, OpenStack Health Dashboard
Go to file
Matthew Treinish 4cc00e8999 Add REST API endpoint for second page view
This commit adds a rest api endpoint for the second page view. It
takes in a key value pair from the url and returns a time series dict
of all the runs which had that key value pair in it's respective run
metadata. The datetime resolution, start date and stop date are all
adjustable with url parameters.

The second page view will use this with the key being project and the
value being whatever project the page is being generated for.

Co-Authored-By: Glauco Oliveira <gvinici@thoughtworks.com>
Co-Authored-By: Moises Trovó <mtrovo@thoughtworks.com>

Change-Id: I7837073c9029014e03b2faca642f77f997ebdf82
2015-10-06 16:52:15 -03:00
app Add build failure rate chart on homepage 2015-10-06 15:13:39 +00:00
doc/source Change small graphs per job to sparklines 2015-09-23 16:01:19 -03:00
etc Update README for api dev process 2015-09-17 13:31:07 -04:00
gulp Remove unused Node dependencies. 2015-09-18 11:41:00 -06:00
openstack_health Add REST API endpoint for second page view 2015-10-06 16:52:15 -03:00
test Add Angular boilerplate from `angularjs-gulp-browserify-boilerplate` 2015-08-31 15:18:45 -06:00
.gitignore Add charts from mockup to home view. 2015-09-16 17:25:45 +00:00
.gitreview Add .gitreview file 2015-09-14 15:58:27 -06:00
.jshintrc Add jshint configuration. 2015-09-02 15:49:18 -06:00
.testr.conf Add python bits to the repo 2015-09-14 19:06:08 -04:00
CONTRIBUTING.rst Rename to openstack-health 2015-09-14 14:16:34 -06:00
HACKING.rst Remove all remaining references to stackviz template. 2015-09-14 16:43:16 -06:00
LICENSE Add some missing base files from cookiecutter (LICENSE, manifest, setuptools config) 2015-08-03 09:11:51 -06:00
README.rst Update README for api dev process 2015-09-17 13:31:07 -04:00
gulpfile.js Add Angular boilerplate from `angularjs-gulp-browserify-boilerplate` 2015-08-31 15:18:45 -06:00
package.json Replace Highcharts with d3 and Nvd3 charts. 2015-10-02 15:29:40 -06:00
requirements.txt Add REST API endpoint for second page view 2015-10-06 16:52:15 -03:00
setup.cfg Update README for api dev process 2015-09-17 13:31:07 -04:00
setup.py Add python bits to the repo 2015-09-14 19:06:08 -04:00
test-requirements.txt Add unit tests for rest api and fix docs 2015-09-15 23:39:20 -04:00
tox.ini Update flake8 path in tox.ini 2015-10-02 15:24:13 -04:00

README.rst

openstack-health

webclient for visualizing test results of OpenStack CI jobs.

Installation

API

Frontend

Installation of the frontend requires Node.js and Gulp. On Ubuntu:

sudo apt-get install nodejs npm nodejs-legacy
sudo npm install -g gulp

Then, install the Node modules by running, from the project directory:

npm install

Usage - Development

API

To run the REST API for development you either install the openstack_health python package and run:

$ openstack_health_api config_file

or alternatively just can just run the api.py file manually. For example, from the top of the repo you would run:

$ python2 openstack_health/api.py config_file

This will start up a local webserver listening on the localhost. You can then send requests to the specified port on stdout to see the response.

Frontend

A development server can be run as follows:

gulp dev

This will open a web browser and reload code automatically as it changes on the filesystem.

Usage - Production

API

The rest api is a flask application so any of the methods for deploying a flask application can be used. The standalone entrypoint used for development isn't suitable for production because it's single threaded. For example you can use something like uwsgi or mod_wsgi to deploy it for real.

Frontend

The production application can be build using:

gulp prod

The result will be written to ./build and should be appropriate for distribution. Note that all files are not required:

  • Directory structure (js/, css/, fonts/, images/): required.
  • Static resources (fonts/, images/): required.
  • Core files (index.html, js/main.js, css/main.css): required unless gzipped versions are used.
  • Gzipped versions of core files (*.gz): not required, but preferred. Use instead of plain core files to save on disk usage and bandwidth.
  • Source maps (js/main.js.map, js/main.js.map.gz): only required for debugging purposes.