prometheus/promdash — pull request #243 by juliusv (2014-12-04 11:38:26+00:00)
Title: 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.