mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
ad58fc4765
* web/ui: handle null case The call might sometimes return /api/v1/label/__name__/values the following: ``` {"status":"success","data":null} ``` Then the `index.js` file assumes that `data` is not `null`. However, that assumption fails and then we get this error in the console: ``` graph.js?v=foo:317 Uncaught TypeError: Cannot read property 'length' of null at Object.success (graph.js?v=foo:317) ... ``` Then it becomes impossible to, for example, send a simple query like `time()` and graph the results. Fix it by using an empty array as the result if it is `null`. Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> * ui: update static assets data Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> |
||
---|---|---|
.. | ||
static | ||
templates | ||
assets_generate.go | ||
assets_vfsdata.go | ||
doc.go | ||
README.md | ||
ui.go |
The ui
directory contains static files and templates used in the web UI. For
easier distribution they are statically compiled into the Prometheus binary
using the vfsgen library (c.f. Makefile).
During development it is more convenient to always use the files on disk to
directly see changes without recompiling.
To make this work, add -tags dev
to the flags
entry in .promu.yml
, and then make build
.
This will serve all files from your local filesystem. This is for development purposes only.
After making changes to any file, run make assets
before committing to update
the generated inline version of the file.