Commit Graph

581 Commits

Author SHA1 Message Date
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
renovate[bot]
4565fcd0df
Update dependency @testing-library/user-event to v13 (#40394)
* Update dependency @testing-library/user-event to v13

* Changes needed for userEvent v13

* Ignore pointer-event checks until jsdom issue is fixed

* Remove unused act imports

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-14 13:29:41 +01:00
Domas
c43b82d44b
make alert tab create alert button work with default datasource (#40334) 2021-10-14 09:40:43 +03:00
Torkel Ödegaard
d62ca1283c
PanelState: Introduce a new separate redux panel state not keyed by panel.id (#40302)
* Initial pass to move panel state to it's own, and make it by key not panel.id

* Progress

* Not making much progress, having panel.key be mutable is causing a lot of issues

* Think this is starting to work

* Began fixing tests

* Add selector

* Bug fixes and changes to cleanup, and fixing all flicking when switching library panels

* Removed console.log

* fixes after merge

* fixing tests

* fixing tests

* Added new test for changePlugin thunk
2021-10-13 08:53:36 +02:00
Domas
b1f56b4863
fix rule form crashing when extra query editor actions are provided (#40319) 2021-10-12 13:49:30 +03:00
Domas
571257226e
Alerting: make alert state indicator in panel header work with Grafana 8 alerts (#38713) 2021-10-11 16:55:45 +03:00
kay delaney
b2e94d0733
Chore: Migrate yarn from v1 to v2 (#39082)
* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-08 15:19:10 +01:00
gotjosh
6572017ec7
Alerting: Allow more characters in label names so notifications are sent (#38629)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels.

Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager.

This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream.

The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers".

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-10-04 15:06:40 +02:00
Nathan Rodman
427f75d9b0
Alerting: UI standardization and fixes (#38770)
* Add expand all button for rule list group view

* filter out recording rules by default

* Create rule type filter

* Add placeholder text for inputs

* WIP move Silences to use DynamicTable

* Use dynamic table for silences page

* hide expand all for state list view

* Add placeholders for inputs

* Update selector in receivers test

* Fix strict error for ruleType

* remove redundant placeholder text and cleanup hooks

* add fixed width for schedule

* Rebase with dynamic table for silences

* only show expand/collapse when filters are active
2021-10-01 15:15:55 -07:00
Domas
a1d4be0700
Alerting: Alertmanager datasource support for upstream Prometheus AM implementation (#39775) 2021-10-01 16:24:56 +03:00