prometheus/web
Giedrius Statkevičius ad58fc4765 ui: handle null response properly (#6071)
* 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>
2019-10-08 19:52:12 -06:00
..
api cleanup redundant code of TestEndpoints (#6022) 2019-09-18 11:40:50 +01:00
ui ui: handle null response properly (#6071) 2019-10-08 19:52:12 -06:00
federate_test.go Fix staticcheck errors 2019-04-17 01:40:10 +02:00
federate.go *: enable all default linters (#5504) 2019-05-03 15:11:28 +02:00
web_test.go Cleanup after merging tsdb into prometheus 2019-08-13 14:04:14 +05:30
web.go Improve message when Lifecycle API is not enabled 2019-09-25 10:57:21 +01:00