92 Commits

Author SHA1 Message Date
8def73ba13 Fix Error 500 on unexisting /api/alert-notification/<id> 2019-01-13 21:30:20 +02:00
6049855dc7 Merge pull request #13947 from bergquist/alerting_for
Introduce alert debouncing
2018-11-19 10:38:02 +01:00
9e0da02b6a refactor dashboard alert extractor 2018-11-05 14:25:19 +01:00
d25284a364 introduce state unknown for rules that have not been evaluated yet 2018-11-05 10:50:28 +01:00
93124f38fa alerting: only check frequency when not send once 2018-06-04 22:19:27 +02:00
0e647db485 Merge branch 'master' into alerting_reminder
* master: (30 commits)
  changelog: add notes about closing #11882
  renamed variable in tests
  added comment, variableChange -> variableValueChange
  added a test
  added if to check if new variable has been added
  Gravatar fallback does not respect 'AppSubUrl'-setting (#12149)
  change admin password after first login
  changelog: adds note about closing #11958
  revert: reverted singlestat panel position change PR #12004
  Revert "provisioning: turn relative symlinked path into absolut paths"
  provisioning: turn relative symlinked path into absolut paths
  changelog: adds note about closing #11670
  elasticsearch: sort bucket keys to fix issue wth response parser tests
  docs: what's new in v5.2
  changelog: add notes about closing #11167
  docs: docker secrets support. (#12141)
  alerting: show alerts for user with Viewer role
  datasource: added option no-direct-access to ds-http-settings diretive, closes #12138
  provisioning: adds fallback if evalsymlink/abs fails
  tests: uses different paths depending on os
  ...
2018-06-04 17:44:18 +02:00
fca97535d1 Fix multiple bugs 2018-06-04 13:19:14 +02:00
13c6f37ea5 alerting: show alerts for user with Viewer role
changelog: add notes about closing #11167

remove changelog note

reformat alert_test.go
2018-06-04 12:34:30 +03:00
0c269d64d0 Alert panel filters (#11712)
alert list panel: filter alerts by name, dashboard, folder, tags
2018-06-01 14:36:40 +02:00
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
c0ecdee375 rename Context to ReqContext 2018-03-07 11:54:50 -05:00
338655dd37 move Context and session out of middleware 2018-03-06 18:16:49 -05:00
53cd39fde5 Shouldn't be able to overwrite a dashboard if you don't have permissions (#10900)
* dashboards: new command for validating dashboard before update

Removes validation logic from saveDashboard and later on use the new command for validating
dashboard before saving a dashboard. This due to the fact that we need to validate permissions
for overwriting other dashboards by uid and title.

* dashboards: use the new command for validating dashboard before saving

Had to refactor dashboard provisioning a bit to be able to sidetrack the permission validation
in a somewhat reasonable way.
Adds some initial tests of the dashboard repository, but needs to be extended later. At least
now you can mock the dashboard guardian

* dashboards: removes validation logic in the save dashboard api layer

Use the dashboard repository solely for create/update dashboards and let it do all
the validation. One exception regarding quota validation which still is in api layer
since that logic is in a macaron middleware.
Need to move out-commented api tests later.

* dashboards: fix database tests for validate and saving dashboards

* dashboards: rename dashboard repository to dashboard service

Split the old dashboard repository interface in two new interfaces, IDashboardService and
IDashboardProvisioningService. Makes it more explicit when using it from the provisioning package
and there's no possibility of calling an incorrect method for saving a dashboard.

* database: make the InitTestDB function available to use from other packages

* dashboards: rename ValidateDashboardForUpdateCommand and some refactoring

* dashboards: integration tests of dashboard service

* dashboard: fix sqlstore test due to folder exist validation

* dashboards: move dashboard service integration tests to sqlstore package

Had to move it to the sqlstore package due to concurrency problems when running
against mysql and postgres. Using InitTestDB from two packages added conflicts
when clearing and running migrations on the test database

* dashboards: refactor how to find id to be used for save permission check

* dashboards: remove duplicated dashboard tests

* dashboards: cleanup dashboard service integration tests

* dashboards: handle save dashboard errors and return correct http status

* fix: remove log statement

* dashboards: import dashboard should use dashboard service

Had to move alerting commands to models package due to problems with import cycles of packages.

* dashboards: cleanup dashboard api tests and add some tests for post dashboard

* dashboards: rename dashboard service interfaces

* dashboards: rename dashboard guardian interface
2018-02-19 11:12:56 +01:00
5323971c21 refactoring: alert rule query refactoring (#10941) 2018-02-16 13:56:04 +01:00
07fa2f1722 fix: alert list links did not work, changed dashboardUri to Url, this is breaking api change in alert api (#10756) 2018-02-05 09:42:41 +01:00
fcd86fb24f make it easier for dashboards to generate ur; 2018-02-01 14:08:51 +01:00
74ca6f6dbf changes dashboard url in alertlist 2018-02-01 14:08:51 +01:00
79fe01959b alerting: small refactoring 2018-01-31 10:47:31 +01:00
eb765d288c alertlist: disable pause button when user does not have permission 2018-01-30 23:35:27 +01:00
f5107d5023 alerting: add permission check in api for pausing alerts 2018-01-30 14:41:25 +01:00
029317ed18 tech: alert list react migration progress 2017-12-31 14:16:19 +01:00
9cce5217d0 build: fixed gofmt issue and addd mock response feature 2017-10-23 09:57:28 +02:00
1fd2270a93 build: split circle test shell scripts 2017-10-23 09:06:50 +02:00
87c978ebc9 fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093 2017-04-25 13:16:41 +02:00
e78da57e4d feat(alerting): shows when no_data triggered alerts
closes #7035
ref #7257
2017-01-17 09:49:25 +01:00
0873d493c2 feat(alerting): moves getNewState to evalHandler
closes #7149
2017-01-13 11:02:24 +01:00
b8f559aecb feat(plugins): made notifiers more pluggable and easier to support many of them, new ones can now be added without modifying any existing file, #7162 2017-01-06 12:04:25 +01:00
9a3e51894b tech(alerting): remove unused property 2017-01-03 08:11:17 +01:00
a230ff65a9 fix(alerting): typo 2016-12-19 16:44:59 +01:00
6c2c3c7e24 Revert "fix(alerting): pause dto can only pause one"
This reverts commit b2c5a6a037c975390b8f0986d09b5013c5ce2b1b.
2016-12-19 16:07:55 +01:00
b2c5a6a037 fix(alerting): pause dto can only pause one 2016-12-19 16:05:24 +01:00
a2257ec3d0 tech(alerting): renames pause all method 2016-12-19 15:17:49 +01:00
ecdf1888c4 feat(alerting): removes pause per datasource 2016-12-19 13:24:45 +01:00
4ef95cfd31 style(api): reduce code complexity 2016-12-16 16:07:23 +01:00
1f8f3ed038 style(api): extracts filter logic for mass pause 2016-12-16 15:19:13 +01:00
fb6aa0e026 feat(api): adds endpoint for mass pausing alerts
ref #6589
2016-12-16 15:00:58 +01:00
773fb5d1ae fix(alerting): check if dashboard is saved before testing alert rule, fixes #6549 2016-11-23 14:55:10 +01:00
62e8a039a1 refactor(alerting): refactoring PR for OR conditions, #6579 2016-11-17 15:48:15 +01:00
690868c837 Added firingEvalution to Rule test 2016-11-17 01:28:17 -08:00
2d19af601a fix(alerting): various alerting fixes 2016-11-06 15:40:02 +01:00
7490c49f60 Alert un paused to pending state 2016-11-01 07:58:38 -07:00
30645a6d3d refactor(alerting): initial step for seperating alerting and dash model, #6273 2016-10-14 13:06:29 +02:00
c6cf7647ff feat(alerting): pausing alerts requires alert id 2016-10-11 10:53:24 +02:00
4bbc2108f9 feat(alerting): add pause button to alert list 2016-10-11 09:45:38 +02:00
804797245d feat(alerting): make it possible to pause from alert tab 2016-10-11 08:40:38 +02:00
f3825263d4 feat(alerting): add pause button in alert list 2016-10-10 15:17:14 +02:00
264590a9c2 feat(alerting): add paused api endpoint 2016-10-10 14:26:09 +02:00
7c339f0794 feat(alerting): show alertin state in panel header, closes #6136 2016-09-30 17:37:47 +02:00
9dd8b3b408 wip 2016-09-14 14:12:19 +02:00