alertmanager/ui/app/src
Max Leonard Inden 2223da2c30
api/v2: Do not populate cluster info if clustering is disabled
When users start Alertmanager with `--cluster.listen-address=`, the
cluster will not be initialized, hence api.peer will be `nil`. So far
this would result in a nil pointer dereference by the API v2 accessing
the api.peer field.

With this patch, api v2 skips populating the peers array, sets the name
to an empty string and the status to "disabled" in case `api.peer` is
nil.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-01-28 11:19:47 +01:00
..
Alerts api/v2: Extract shared properties of gettable and postable alert 2018-11-28 14:35:39 +01:00
Data api/v2: Do not populate cluster info if clustering is disabled 2019-01-28 11:19:47 +01:00
Silences api/v2: Extract shared properties of gettable and postable alert 2018-11-28 14:35:39 +01:00
Status api/v2: Do not populate cluster info if clustering is disabled 2019-01-28 11:19:47 +01:00
Utils api/v2: Extract shared properties of gettable and postable alert 2018-11-28 14:35:39 +01:00
Views api/v2: Do not populate cluster info if clustering is disabled 2019-01-28 11:19:47 +01:00
DateTime.elm ui: Move /status & /silences to API v2 2018-11-15 13:24:26 +01:00
Main.elm Upgrade Alertmanager UI to Elm 0.19 (#1539) 2018-09-06 18:08:51 +02:00
Parsing.elm Upgrade Alertmanager UI to Elm 0.19 (#1539) 2018-09-06 18:08:51 +02:00
Types.elm Upgrade Alertmanager UI to Elm 0.19 (#1539) 2018-09-06 18:08:51 +02:00
Updates.elm ui: Pass parameterized api url down to status logic (#1637) 2018-11-27 15:33:19 +01:00
Views.elm Upgrade Alertmanager UI to Elm 0.19 (#1539) 2018-09-06 18:08:51 +02:00