Commit Graph

12 Commits

Author SHA1 Message Date
George Robinson 5979dff9dc
Show muted alerts in Alert Groups API (#3797)
This commit updates /api/v2/alerts/groups to show if an alert is
suppressed from one or more active or mute time intervals. While
the muted by field can be found in /api/v2/alerts, it is not
used here because /api/v2/alerts does not take aggregation
or routing into consideration.

It also updates the UI to support filtering muted alerts via the
Muted checkbox.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-10-23 16:42:21 +01:00
gotjosh aaf9490576
API: Allow the Silences API to use their own 400 response (#3610)
There's no change to the logic here - it just stroke me as odd that we were reusing the response from alerting groups in the silences call when it's pretty simple to add a new one in the API description.

This is more accurate as well, as this will be used to power the documentation.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-11-22 10:25:27 +00:00
gotjosh 2ec6b89aa7
Bump: go-swagger to latest stable
Bumps the API spec/client generation util of `go-swagger` from 0.30.2 to 0.30.5 which is the latest stable.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-10-19 12:11:29 +01:00
Emmanuel Lodovice 263ca5c943
api/v2: Delete silence respond with 404 when silence is not found (#3352)
Signed-off-by: Emmanuel Lodovice <lodovice@amazon.com>
2023-05-05 14:06:26 +01:00
Ben Kochie 432ee01c8c
Update Go to 1.19 (#3150)
* Update Go to 1.19

* Update Go.
* Update some Go modules.
* Update Swagger to the latest for Go 1.19 compatibility.
* api/v2: regenerate
* Accommodate to the changes in the client package
* asset/assets_vfsdata.go: regenerate

Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2022-11-30 17:06:57 +01:00
Danny Kopping 143fd46467 Preferring the use of the basePath attribute
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Danny Kopping 97e5779c3f Regenerated OpenAPI client code
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Goutham Veeramachaneni e26425473c
Update go-openapi to latest
go-swagger 0.25.0+ are failing though :/

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2021-03-10 19:00:22 +01:00
Simon Pasquier d5f6f88928
*: bump Open API dependencies (#2024)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-09 10:57:38 +02:00
stuart nelson 2fa210d0e3 add groups endpoint to v2 api
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2019-04-17 11:32:21 +02:00
Paul Gier 89b0ff0574 api/v2: Respond with 404 when silence ID is not found (#1816)
When the client attempts to update a silence with a non-existent
ID, respond with a 404 (Not Found) instead of a 400 (Bad Request).

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-29 12:29:00 +01:00
Paul Gier 8688c7b9ad api/v2: move generated client code from test to api/v2 (#1792)
- Move the generated api/v2 client code out of the test directory
and into the api/v2 directory with models and restapi.
- Remove duplicate models directory
- Update tests to use api/v2 package for models and client

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-03-12 17:11:23 +01:00