Send annotation tags as array.
Merge pull request #221 from prometheus/fix-GET-annotation-tags-array

Send annotation tags as array.
Show "null" values as gaps instead of zero.

Rickshaw uses D3 scales to scale data on the Y-axis. When these
predefined linear and log scales encounter a "null" value in the source
data, they scale the resulting data point to a Y value of 0. This change
wraps the D3 scales in such a way that "null" values are intercepted and
left unchanged, while all other values are passed through to the D3
scale transparently. Since D3 scales are both an object and a function
at the same time (yeah, JavaScript, you crazy, crazy language), this
needs some protoypical inheritance trickery to override the function
part of the scale.
Merge pull request #226 from prometheus/support-null-values

Show "null" values as gaps instead of zero.
Zero-pad first time series to force user entered range.
Merge pull request #227 from prometheus/zero-pad-time-range

Zero-pad first time series to force user entered range.
Fix annotationTags markup
Use open-uri for pulling annotation data.
Add support for formating numbers for the computer data they represent.
Merge pull request #228 from prometheus/computer-formatted-numbers

Format numbers for the computer data they represent.
Support for uploading dashboard definitions.

This enables JSON-schema-validated PUT-ing and GET-ing of full dashboard
definitions through /<slug>.json. In the external part of this API, the
'dashboards_json' database field is converted from a JSON-encoded string
to a native JSON subobject of the Rails Dashboard model JSON
representation. The full externally exposed JSON for a dashboard looks
like this:

{
  "name": "Test Dashboard",
  "created_at": "2014-11-07T00:25:57.000Z",
  "updated_at": "2014-11-07T00:38:23.000Z",
  "dashboard_json": {
    "globalConfig": {
      // ...global configuration...
    },
    "widgets": [
      // ...widget definitions...
    ]
  }
}

Upon PUT, the 'dashboards_json' field is validated against the
JSON-schema definition in the file 'dashboard_schema.json' and then
saved again as a serialized string in a single database field.

Since Rails converts empty JSON arrays to "nil" values by default, this
also upgrades PromDash to Rails 4.1.1, which supports an option to turn
off this automatic conversion. See the following issues about this
regarding security implications (which for now we shouldn't need to
worry about in PromDash):

https://github.com/rails/rails/issues/8832
https://github.com/rails/rails/issues/13420

Further, as we're exposing the dashboard_json as an external API for the
first time, this also includes a lot of naming cleanups in the JSON
fields and the related code.
Merge pull request #229 from prometheus/validate-json

Support for uploading dashboard definitions.
Fix route on back button on dashboard#new.
Assign default empty array to new graph for tags.
Update function arguments for toggleTab.
Remove unused WidgetAlignment dependency from FrameCtrl.
Merge pull request #236 from prometheus/fix-toggle-tab-function-arguments

Fix toggle tab function arguments
Merge pull request #235 from prometheus/fix-error-on-new-graph-add

Assign default empty array to new graph for tags.
Merge pull request #234 from prometheus/fix-dashboard-create-back

Fix route on back button on dashboard#new.
Allow specifying servers by URL in dashboard_json.

This allows users who upload their dashboard_json via HTTP put to
specify a "serverURL" property for expressions in place of specifying
the server via its ID in the "serverID" property (in case a URL is
specified, any supplied ID is ignored). The URL has to exactly match the
URL of an existing server in PromDash's database (instead of creating a
new server ad-hoc for new URLs). We want to err on the side of caution
here so that people notice immediately if they don't happen to specify
the right server.

Since this feature is kind of dirty, I wanted to keep any code for it
out of the model and the JSON schema, and immediately transform any
incoming JSON into the (existing) expected format in the controller.