Commit Graph

22 Commits

Author SHA1 Message Date
James Ritchie a6bdc73fa4 added icon to show inhibited status
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
2019-05-01 08:22:41 +00:00
stuart nelson 0a7e227549 Merge branch 'master' into default-grouping-in-ui
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-04-30 15:09:56 +02:00
stuart nelson 1f41731881 Correctly construct filter query string for api
Updating the api in
bc373f562f
resulted in the UI sending query strings for the
filter that no longer match what the backend
expects. This brings that in to line.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-04-29 16:50:56 +02:00
Andrey Kuzmin 461a6e5450 Update assets_vfsdata.go
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
2019-04-27 12:21:53 +02:00
Simon Pasquier badb5c51aa asset: fix when outside of $GOPATH
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-15 11:41:50 +02:00
beorn7 f2345d7c8e Make the silence preview show also muted alerts
Even if an alert is already silenced and/or muted, I still want to
know that my newly created silence will affect it.

Signed-off-by: beorn7 <beorn@soundcloud.com>
2019-03-01 14:15:53 +01:00
Max Leonard Inden 8e157b3af5
api/v2: Make cluster status peers and name optional
If a users chooses to disable the Alertmanager cluster feature, there is
no cluster name nor cluster peers. Hence these should be optional. Only
cluster status is set to "disabled".

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2019-02-04 11:40:30 +01:00
Max Leonard Inden 2f055d9966
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-31 16:56:59 +01:00
stuart nelson dba283edd0
respect regex matchers when recreating silences (#1697)
* Respect regexes when recreating silences
* Generate assets

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-01-09 10:33:43 +01:00
stuart nelson b437240bd9
Stn/update alert compact view (#1698)
* Remove inhibited/silenced text

In the alert list, this is already seen via the
icons. In the silence preview, since it's in the
silence preview, clearly it's affected by the
silence.

* Generate assets

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-01-08 16:26:12 +01:00
Max Leonard Inden 2b697aaa6b
api/v2: Extract shared properties of gettable and postable alert
With issue 1465 on openapi-generator [1] being fixed, we can not extract
shared properties of the gettable and postable alert definition into a
shared object (`alert`) like we do for silence, gettable silence and
postable silence.

In addition this patch does the following changes to the UI:

- Use `List GettableAlert` instead of plural type definition like
`GettableAlerts` because the plural definitions are not generated.

- Fix openapi-generator-cli docker image to specific hash.

[1] https://github.com/OpenAPITools/openapi-generator/issues/1465

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-28 14:35:39 +01:00
Max Inden 218b8fb1f4 ui: Pass parameterized api url down to status logic (#1637)
Previously the api url was hardcoded in the elm logic fetching the
status of an Alertmanager. Instead it is now being passed down like we
already did for /alerts, /silences and /receivers.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-27 15:33:19 +01:00
Max Leonard Inden f504f953c1
ui: Move /alerts to API v2
Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-23 12:53:48 +01:00
Max Leonard Inden 8c19b96bd6
Revert "ui: Patch /alerts and /receivers to use api v1"
This reverts commit fb86df6add.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-21 17:10:17 +01:00
Max Leonard Inden b4b8b750df
api/v2/openapi.yaml: Differentiate between post and get silence
Instead of having one general silence, differentiate between postable
and gettable silence, hence making more fields required.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 16:21:07 +01:00
Max Leonard Inden fb86df6add
ui: Patch /alerts and /receivers to use api v1
With the previous patch /status and /silences were requested from api
v2. Requesting alerts from api v1 is done in a separate commit to be
able to revert it once alerts also come from api v2.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 13:25:41 +01:00
Max Leonard Inden e4e053b18e
ui: Move /status & /silences to API v2
This patch makes the Alertmanager UI (/status & /silences) use the
api/v2 endpoint. In addition it adds logic to generate the elm side data
model based on the OpenAPI specification.

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-11-15 13:24:26 +01:00
stuart nelson 72e6720bea
Fixes #1615 (#1620)
Support `w` duration when making silences. Remove
`y` as a supported duration, silences are for
short term notification prevention.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-11-13 15:08:37 +01:00
stuart nelson 625604df90
Show more alert information on silence form/ silence view pages (#1601)
* Display same alert info as available in alert list

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-11-07 17:08:22 +01:00
Arno Uhlig c38ac84a6d Slack notifier missing callback_id parameter (#1592)
* fix callback id in slack attachments

Signed-off-by: Arno Uhlig <arno.uhlig@sap.com>
2018-10-23 11:22:23 +02:00
Simon Pasquier a19404238b *: move to go1.11 (#1580)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-10 11:12:15 +02:00
Simon Pasquier 3558e6fd9e Migrate from go-bindata to vfsgen (#1532)
* Migrate from go-bindata to vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Ensure idempotent generation for vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* asset: update generated files

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix asset paths for Windows platforms

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Regenerate assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Add vfs wrapper that returns constant mod time

This is identical to what we had with go-bindata and avoids the extra
step of storing the identity of the complete file system in another
location.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Additional cleanup

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-24 15:12:40 +02:00