Commit Graph

590 Commits

Author SHA1 Message Date
Gilles De Mey
55ec05b560
Alerting: remove dead code (#43956) 2022-01-13 16:23:49 +01:00
Konrad Lalik
c829535f14
Alerting: Fix the silence url's matcher parameters (#43898)
* Split silence matchers parameter into a separate entry for each label

* Unify the silence link creation

* Remove duplicated matchers when parsing to/from query params

* Add tests for matchers

* Add a comment with a duplication removal explanation

* Improve label duplication comment

* Remove redundant code

* Use uniqBy to simplify the code. Rename matchers parameter

* Fix Silence test data
2022-01-13 10:48:13 +01:00
Peter Holmberg
fc037e1798
Alerting: Add delete to rule edit (#43673) 2022-01-11 09:46:21 +01:00
Gilles De Mey
7b841c7947
Alerting: run validation before testing contact point (#43721) 2022-01-10 13:28:36 +01:00
Gilles De Mey
be61f192c8
Alerting: add support for absolute URLs in ActionIcon (#43367) 2022-01-10 13:11:43 +01:00
Nathan Rodman
0dd88d9480
only show datasources that support alerting in query editor (#43776) 2022-01-07 09:27:20 -08:00
kay delaney
36e4a871f2
UI/ClipboardButton: Remove ClipboardJS in favor of native Clipboard API (#42996)
* UI/ClipboardButton: Remove ClipboardJS in favor of native Clipboard API
Closes #42365

* Add backwards compatibility
2022-01-07 13:41:09 +00:00
kay delaney
890c43adf1
UI/Card: Refactor Card component for improved accessibility (#41890)
* UI/Card: Improve accessibility of Card component

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-01-06 15:48:12 +00:00
Nathan Rodman
825edddfb6
Alerting: UI for mute timings (#41578)
* wip: add form inputs for creating mute timing

* form for mute timings

* add action for submitting config

* fix bug in payload

* add table for viewing mute timings

* remove mute timing from routes when deleted

* attach mute timing to route

* edit a mute timing

* use field array for multiple intervals

* Add confirmation modal for deleting mute timing

* add default values to form inputs

* fetch am config prior to renderring form

* validation for mute timing fields

* fix tests

* tests for mute timing form

* small ui fixes for the form and table

* pass mute name as query param

* make time fields inline

* fix validation for an existing alert and overwrite on edit

* rename mute timing in routes on edit

* fix validation for time inputs

* make time interval its own component

* add descriptions for mute timings

* refactor time interval parsing functions

* fix linting and tests

* refactor makeAmLink

* docs for mute timings

* reorganize docs and add intro for mute timings

* doc review edits

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* run prettier

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-01-05 10:16:43 -08:00
Alexander Weaver
fd583a0e3b
Alerting: Allow customization of Google chat message (#43568)
* Allow customizable googlechat message via optional setting

* Add optional message field in googlechat contact point configurator

* Fix strange error message on send if template fails to fully evaluate

* Elevate template evaluation failure logs to Warn level

* Extract default.title template embed from all channels to shared constant
2022-01-05 09:47:08 -06:00
Gilles De Mey
7de5d5fbd1
Alerting: adds missing type info to the FieldConfigSource (#43619) 2022-01-03 17:16:43 +01:00
Gilles De Mey
d7273c1158
Alerting: fix error dismiss tooltip placement (#43616) 2022-01-03 16:09:08 +01:00
Gilles De Mey
43c81ddd23
Alerting: persist error dismissal to localstorage (#43406) 2021-12-28 20:56:43 +01:00
Peter Holmberg
5db03cf91a
Alerting: Fix remaining a11y issues (#43420)
* add aria labels

* reverting

* chore: revert yarn.lock

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2021-12-21 16:06:23 +01:00
Travis Patterson
d52a6e3d3b
Change 'grafana-expression' to ExpressionDatasourceRef.type so isExpr… (#43379)
* Change 'grafana-expression' to ExpressionDatasourceRef.type so isExpressionReference works

* use constant ref in tests

* import from package
2021-12-21 07:11:11 -07:00
Gilles De Mey
dc163a958d
Alerting: update response text assertion (#43291) 2021-12-20 16:45:29 +01:00
Gilles De Mey
db3cc738d6
Alerting: fixes rewiring unrelated reduce and resample expressions (#43174) 2021-12-17 14:46:55 +01:00
Nathan Rodman
187a8703c8
Alerting: Add filters for AlertList panel (#43130)
* add state filters for prom alerts

* combine state filters

* add datasource filter for panel

* remove duplicate state check

* show only prom, loki, and grafana datasources
2021-12-16 10:17:24 -08:00
Gilles De Mey
02039d7532
Alerting: show state history (#42362) 2021-12-14 16:36:54 +01:00
Gilles De Mey
3eae0db7ce
fix: make state duration column wider (#43044) 2021-12-13 16:57:15 +01:00
Matthew Jacobson
62c20ebd77
Alerting: Add label and state filters to alert instance components (#42550) 2021-12-13 11:54:36 +01:00
Gilles De Mey
db6b71a27b
Alerting: fix broken datasource link (#42468) 2021-11-29 17:57:58 +01:00
Peter Holmberg
8bf6011450
Alerting: Show full preview value in tooltip (#42445)
* use JSONCell for value

* remove console log and usememo
2021-11-29 16:39:58 +01:00
George Robinson
1b26d4d88e
Alerting: Create DatasourceError alert if evaluation returns error (#41869)
* Alerting: Create DatasourceError alert if evaluation returns error

* Alerting: Add docs for DatasourceError alert

* Alerting: Fix DatasourceError alert does not have dashboard_uid label

* Alerting: Add break when datasource_uid found

* Alerting: Update TestProcessEvalResults
2021-11-25 11:46:47 +01:00
Gilles De Mey
ca7a62682e
fix: use better type assertion for initialAsyncRequestState (#42087) 2021-11-23 15:14:59 +01:00
renovate[bot]
035e676cad
Update dependency react-select to v5 (#41604)
* Update dependency react-select to v5

* Remove @types/react-select and update types accordingly

* Fix all unit tests

* Add @ts-expect-error to individual errors, remove prefix as it doesn't seem to exist?

* Another minor typescript fix

* Apply fixes from torkel's PR

* Fix last typescript error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 12:11:26 +00:00
Nathan Rodman
81155e2d55
Alerting: increase timeout for silences tests (#41918) 2021-11-19 13:07:28 +02:00
Gilles De Mey
1bd43bae2d
Alerting: fix e2e testing selectors (#41829) 2021-11-17 19:23:30 +01:00
Gilles De Mey
b611d54349
Alerting: adds Unified Alerting promotion (#41551) 2021-11-17 16:46:44 +01:00
Torkel Ödegaard
78888158ca
Alerting: Fixing threshold handle color (#41813)
* Alerting: Fixing color of threshold handles

* Use theme colors test
2021-11-17 16:15:41 +01:00
Hugo Häggmark
5498203507
Chore: Reduce pa11y-ci errors (#41787)
* Chore: moves alert to test-id

* Chore: moves Dashboard navigation to test-id

* Chore: moves Bar gauge value to data-testid

* Chore move Folder picker select container to data-testid

* Chore: moves Time zone picker select container to data-testid

* Chore: moves Choose starting day of the week to data-testid

* Chore: change tabIndex on search input

* Chore: moves various search related aria-lables to data-testid

* Chore: connects label to select input on alerting page

* Chore: connects TimeZonePicker and WeekStartPicker with labels

* Chore: moves CallToActionButton to data-testid

* Chore: move user home preferences select to data-testid

* Chore: lower all thresholds
2021-11-17 14:45:45 +01:00
Gilles De Mey
9199a8b800
Alerting: rewire expression references when queries are updated (#41478) 2021-11-17 12:56:37 +01:00
Peter Holmberg
4a31dfd903
Alerting: Fix issue after AzureMonitor fix (#41746)
* check if filterquery exists

* update tests

* test: re-run CI

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2021-11-16 17:45:55 +01:00
Domas
c60933b49b
Alerting: Fix rule editor issues with Azure Monitor data source (#41317)
* properly set query type

* set default unit from data when found

* make AlertQueryRunner take into account ds.filterQuery

* fix tests

* feedback after pr

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-11-16 14:02:32 +01:00
Peter Holmberg
b2d7162168
Alerting: Add external Alertmanagers (#39183)
* building ui

* saving alertmanager urls

* add actions and api call to get external ams

* add list to add modal

* add validation and edit/delete

* work on merging results

* merging results

* get color for status heart

* adding tests

* tests added

* rename

* add pollin and status

* fix list sync

* fix polling

* add info icon with actual tooltip

* fix test

* Accessibility things

* fix strict error

* delete public/dist files

* Add API tests for invalid URL

* start redo admin test

* Fix for empty configuration and test

* remove admin test

* text updates after review

* suppress appevent error

* fix tests

* update description

Co-authored-by: gotjosh <josue@grafana.com>

* fix text plus go lint

* updates after pr review

* Adding docs

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* prettier

* updates after docs feedback

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue@grafana.com>
2021-11-12 22:19:16 +01:00
Ivana Huckova
9b9e41e036
Prometheus: Disable exemplar queries for alerting (#41607)
* Prometheus: Dont include empty exempalr frame in results

* Prometheus: Never run exemplar queries for alerting

* Remove exemplar field from alerting and set exemplar to false

* Add tests for frontend

* Add test for backend
2021-11-12 12:49:06 +01:00
Gilles De Mey
2bc30daa49
Alerting: allows clearing the datasource selection in rule list (#41264) 2021-11-09 18:20:36 +01:00
Domas
345af8374c
Alerting: Remove CTA button from read-only notification policy page (#41096)
* don't show cta button for read-only prometheus alertmanager

* grammar fix

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-11-09 13:52:49 +01:00
Peter Holmberg
fd7dd6edf1
Alerting: Fix accessibility issues for alert rule list (#40816)
* accessibility attributes for rulelist

* change label text
2021-11-09 10:35:12 +01:00
Torkel Ödegaard
27f66a6df9
Angular: Move coreModule to app/angular and isolate angular usage more (#41433)
* moving coreModule to app/angular and isolating it more

* fixed ts issue
2021-11-09 08:37:16 +01:00
Torkel Ödegaard
d07fa0ce5e
AngularJS: Move angular stuff into app/angular (#41415)
* Moving more angular parts

* Moving more angular stuff

* Moving components

* Move more things
2021-11-08 18:41:04 +01:00
Nathan Rodman
e8e84f9c23
Alerting: UI for contact point testing with custom annotations and labels (#40491)
* Support custom annotations and labels when testing contact points

* Add modal for testing contact point

* add option for custom notification type

* use annotation and labels fields from rule editor

* update receivers test for new contact point testing method

* rename modal and remove reserved keys for annotations

* add docs for testing contact points

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-03 09:57:59 -07:00
kay delaney
3c5003373c
A11y: Fix various fastpass accessibility issues (#41154) 2021-11-02 15:27:07 +00:00
Domas
69fe2def89
Alerting: Fix duplicating queries in rule editor (#41091) 2021-11-02 15:18:35 +01:00
Luis Filipe Pessoa
0599b6180f
Changing 'Save' button style to primary (#41144)
Changing 'Save' button style to primary according to Figma design.
2021-11-02 11:08:16 +02:00
Ryan McKinley
7319efe077
Dashboard: replace datasource name with a reference object (#33817)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-10-29 10:57:24 -07:00
Domas
05f22e5c7d
remove explicit timeouts on receiver tests (#41032) 2021-10-28 14:55:43 +03:00
Peter Holmberg
57750639cd
Alerting: Prevent alerting routes from working if alerting is not enabled (#40521)
* show alerting not enabled when not enabled

* correct navmodel index

* use correct config values
2021-10-25 14:40:45 +02:00
Domas
51a152456f
fix unified alerting enabled checks (#40693) 2021-10-20 15:45:26 +03:00
Nathan Rodman
4fc86594c0
Alerting: Link prometheus and loki datasources to an alertmanager (#39887)
* add config option for alertmanager linking

* Add button for silencing a rule

* use uid for alertmanager

* move alertmanager link to separate function
2021-10-14 16:01:01 -07:00