Commit Graph

1388 Commits

Author SHA1 Message Date
Gilles De Mey
c41b0a71cf
Alerting: Add state history polling interval (#84837) 2024-04-04 14:06:15 +02:00
Tobias Skarhed
f387cff836
Accessibility: Default Icon to aria-hidden (#84362)
* Icon: aria hide icon, unless a label is set

* Update doc

* Remove weird auto import

* Fix fialing tests

* Add recommendation for Tooltip

* Consider more aria attributes to support Tooltip

* Handle tabIndex and aria-hidden case

* Add comment about aria-label
2024-04-04 12:07:50 +02:00
Tom Ratcliffe
0ec48cfdbd Add success toast for rule update back in 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
d585a5bc88 Rename tag for combined alert rules 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
1fcb264c87 Add InfoPausedRule back to alert detail view 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
20a1955026 Reuse StateTag for Paused state 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
0e87adbc97 Remove await from dispatch 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
ff8203a6cf Forward ref to StateTag so it can work with Tooltip 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
fb40c09eaf Reuse existing mock user method 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
2ca5e43a65 Remove superfluous alert from pause text 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
30471c340a Use verbose mutation from RTKQ for better IDE experience 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
28572102cf Use produce for pause payload generation and return early 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
12eeda5b7d Hide alert update success toast 2024-04-03 18:38:49 +01:00
Gilles De Mey
fbe43100aa add paused badge 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
30699dabec Move repeated Paused message into component 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
31fb80b29a Move MenuItemPaused to components folder 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
1e54899c6d Remove unneeded type 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
b037236b9c Add tag invalidation to updateRule mutation
...so the alert detail view updates appropriately
2024-04-03 18:38:49 +01:00
Tom Ratcliffe
9ca2f7bece Add pause/resume logic to menu items on Alert detail view 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
7d80373b5e Move repeated menu item logic for pausing rules into separate component 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
b84962ef3f Update tests to use existing mock server approach 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
5fbca0962e Fix import/export messing with Policy tests 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
bd06607a51 Fix typing check for paused rules in table 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
820f4f0ef5 Remove console logs, fix aggregate errors and add missing endpoint 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
8c313add00 Add test for resuming a paused alert rule 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
fef481efc3 Add mock data for paused rules 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
5505b72998 Add first pass of basic mock server for alerting usage 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
72a3142c3b Add pause/resume button with mutation for saving alert rule changes 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
9a416b8241 Fix potential display of "0" on rule details tab
When looking at the details tab of an alert rule, the last evaluation could potentially display as `0` due to falsy checks on React rendering
2024-04-03 18:38:49 +01:00
Tom Ratcliffe
a94c3d63cc Update utils for determining paused state of a rule 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
7fd9cbbfb5 Export alerts limit for reuse when re-fetching rules list 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
1a5d227e05 Hide "firing for time" if a rule is paused 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
93fd11fe86 Update alert state tag to display Paused as its own "state" 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
a881e7e404 Display info message on rule detail view when a rule is paused 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
31be1231cf Move max width from rule editor parent 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
d0dcb72683 Display info message on rule form when a rule is paused 2024-04-03 18:38:49 +01:00
Tom Ratcliffe
e5a6dff801 Add mutation method to update a rule 2024-04-03 18:38:49 +01:00
Leon Sorokin
d601acac3a
VizTooltips: Remove old tooltips and annotations (#84420)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-04-02 15:32:46 -05:00
Torkel Ödegaard
e90b87589f
ModalsContext: Unify modals context and manager (#84916)
* ModalsContext: Unify modals context and manager

* Clear on location change

* fixes

* Update

* use generics to avoid anys

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-03-28 13:26:57 +01:00
Gilles De Mey
a574db6f64
Alerting: Fix removing nested policy (#85242) 2024-03-27 13:58:59 +02:00
Gilles De Mey
90a1e8a82f
Alerting: Make hovercard accessible (#85195) 2024-03-27 10:05:30 +01:00
Torkel Ödegaard
b20da139ad
DashboardScene: Show insights icon (#84877)
* DashboardScene: Show insights icon

* Update

* Create separate group for precence indicators

* fix

* Update

* fix tests
2024-03-22 09:46:29 +01:00
Gilles De Mey
8c9ba97642
Alerting: Support PromQL-style matchers (#84672) 2024-03-21 14:11:18 +01:00
Gilles De Mey
4c247f959b
Alerting: Fix broken panelId links (#84839) 2024-03-21 13:58:34 +01:00
Erik Sundell
29d4f6a217
Datasource: Change query filtering (#84656)
* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
2024-03-21 13:39:39 +01:00
Alex Khomenko
b41ad688f2
Alerting: Remove deprecated InputControl (#84793) 2024-03-21 12:59:41 +02:00
Laura Benz
d8a116e696
ReturnToPrevious: Add e2e test (#83115)
* feat: add incomplete unit test

* refactor: add idea for unit test

* feat: create new e2e test

* feat: add some steps

* feat: add comment

* feat: complete prep work

* feat: complete clean up

* rebase

* feat: add more steps to test flow

* refactor: remove unit test

* refactor: clean up

* refactor: create a provisioned alert rule

* refactor: change location and content

* refactor: e2e test

* refactor: betterer

* refactor: move provisioned alert rule

* refactor: make provisioning file available remote

* refactor: clean up test

* refactor: move provisioned alert rule

* refactor: remove wait()

* feat: restructure first test and add more tests

* feat: add another provisioned alert rule

* feat: add a new test

* feat: complete new test

* refactor: replace data-testid in alert rules

* refactor: replace data-testid

* refactor: fix tests for drone

* refactor: fix third test after review

* refactor: fix last test

* temp

* refactor: improve some things

* refactor: adjust unit tests

* refactor: remove assertions for alert rule details view

* refactor: remove assertions

* refactor: add check for button text

* refactor: remove session storage

* refactor: apply changes from code review

* refactor: add codeowner

* refactor

* refactor

* refactor: clean up

* refactor: clean up

* refactor: clean up

* refactor: increase pa11y threshold for /alerting/list
2024-03-21 09:05:51 +01:00
Gilles De Mey
5a57ff1307
Alerting: Preserve newlines and whitespace for Prometheus and Loki queries (#84755) 2024-03-19 19:38:04 +02:00
Sonia Aguilar
b38436eeb0
Alerting: Fix used badge in contact points list (#84714)
Fix used badge in contact points list
2024-03-19 13:30:06 +01:00
Ashley Harrison
15194b41b4
Dropdown: Fix keyboard accessibility (#84683)
* fix dropdown keyboard a11y

* remove unnecessary css

* restore tabIndex to keep linting happy

* use Box in Menu

* fix unit test
2024-03-19 10:22:17 +00:00