Home - sdurbin1/safe-rest GitHub Wiki

Release Notes 8/18/2016

CAUTION! Currently, SSL auth isn't working through the browser (likely a cloud9 issue). I'm getting the error "ECONNRESET: Request could not be proxied!". If you pull the latest version and get an error, this is probably why. To bypass ssl, set sslmode=false in config.js. (Although note, you won't be able to create, update, or delete dashboards without ssl enabled)

safe-rest now performs ssl authentication on all requests. In order to interact with rest through the command-line, pass in certs like so:

curl https://localhost:8080/dashboards --cacert ssl/ca.pem --cert ssl/client.pem --key ssl/client.key

In order to authenticate through a browser, load the file ssl/client.p12 into your browser. The password is "password" (This isn't working in c9 right now!)

In order to create, update, or delete dashboards, you must be an admin. To grant admin to the "client.p12" user, run the script:

./scripts/grantAdmin.sh client

Release Notes 5/26/2016

Unit tests have been added. Before issuing a pull request, please make sure the unit tests still pass. Also, get in the habit of adding a unit test anytime new functionality is added. To run unit tests:

sudo mocha

Release Notes 5/9/2016

IMPORTANT: From now on, instead of starting safe-rest by running npm start, you will run:

node app.js

Also, this release contains minor updates to the source data model (added a type attribute and a metadata attribute). I added a "type" to each of our sources in the canned dataset. To update, you can run the db-fill script.

Release Notes 4/26/2016

Pushed to master on 4/26/2016. Updates contains two changes to the data models which will require you to do some database cleanup. Do the following after pulling:

  • Go into the mongo shell
  • Run: use safe
  • Run: db.analyticparams.drop()
  • Run: db.fields.drop()
  • Exit from the mongo shell
  • Run: npm run-script db-fill

If you haven't added extra things to the safe-rest mongodb, or you don't mind any added data to be deleted, it's probably best to just drop the entire safe database instead of individually dropping collections:

  • use safe
  • db.runCommand( { dropDatabase: 1 } )

This release may break the current functionality related to "fields". To get fields for a datasource, you will now have to query that datasource, and grab the fields. Instead of doing GET /sources/:sourceId/fields, you will have to do GET /sources/:sourceId, which will return json that contains a "fields" array. If this doesn't work, and the GET /sources/:sourceId/fields method is needed, I'm open to adding that route back in (but left it out for consistency purposes)

Release Notes 4/25/2016

Pushed to master on 4/25/2016. The latest commit (bd45350), contains code to close Issue #21, Rename Charts to Visualizations. In order to ensure the data in your mongodb instance is clean, perform the following steps after pulling the latest commit. Note: If you have added additional data to the visualizations collection or the analytics collection, you will have to manually re-add. If you have never ran the "npm db-fill" script before, you can skip all of this, and just run the npm db-fill script.

  • Go into the mongo shell
  • Run: use safe
  • Run: db.visualizations.remove({})
  • Run: db.analytics.remove({})
  • Exit from the mongo shell
  • Run: npm run-script db-fill