Commit Graph

71 Commits

Author SHA1 Message Date
Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global (#31866)
* PluginManager: Make Plugins and DataSources non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Replace outdated command

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* DashboardService: Ensure it gets constructed with necessary parameters

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* DashboardService: Ensure it gets constructed with necessary parameters

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove dead code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove FocusConvey

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove dead code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo interface changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Rename to DataSourceCount

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Consolidate dashboard interfaces into one

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix dashboard integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Hugo Häggmark
466462de37
LibraryPanels: Adds permissions to getAllHandler (#31416)
* LibraryPanels: Adds permissions to getAllHandler

* Chore: adds a test to verify the permissions

* Chore: tests refactor
2021-02-24 14:06:22 +01:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming (#28887)
* Chore: Fix variable naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
Arve Knudsen
7897c6b7d5
Chore: Fix staticcheck issues (#28854)
* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:57:20 +01:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues (#27704)
* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Carl Bergquist
f9962eabff
chore: avoid aliasing imports in services (#22499) 2020-02-29 13:35:15 +01:00
Arve Knudsen
2a78d2a61c
pkg/services: Check errors (#19712)
* pkg/services: Check errors
* pkg/services: Don't treat context.Canceled|context.DeadlineExceeded as error
2019-10-22 14:08:18 +02:00
Ben Patterson
9904e14f8e Alerting: Fix dates stored in local time when pausing alerts (#19525)
* Make tests more sensitive to timezone.

* Time stamps should use UTC for consistency.

* Test: Assert state is paused after pauseAllAlerts call.
2019-10-08 17:25:15 +03:00
Kyle Brandt
172464e91e
alerting: return err when SetAlertState fails to save to sql (#18216)
fix duplicate alert states when the alert fails to save to the database.
fixes #18176
2019-07-22 07:23:27 -04:00
Thibault Chataigner
e06abb30aa Alerting: Add tags to alert rules (#10989)
Ref #6552
2019-06-06 13:29:30 +02:00
Marcus Efraimsson
f845a3b841
upgrade xorm packages to latest versions 2019-03-05 21:11:23 +01:00
bergquist
2fb78a50d6 minor fixes based on code review 2018-11-12 10:50:56 +01:00
bergquist
d25284a364 introduce state unknown for rules that have not been evaluated yet 2018-11-05 10:50:28 +01:00
bergquist
4526660cb2 wire up debounce setting in the ui 2018-11-05 10:50:28 +01:00
bergquist
75f832cda8 use alert state changes counter as secondary version 2018-10-01 15:58:30 +02:00
Marcus Efraimsson
1be8fb76b8
cleanup alert_notification_state when deleting alert rules and channels 2018-09-30 21:57:15 +02:00
Mario Trangoni
e85d0e8d6b pkg/services/sqlstore: Fix sess.Id is deprecated: use ID instead. (megacheck)
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... | grep ID
alert.go:193:15⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
alert.go:252:18⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
annotation.go:113:12⚠️ sess.Table("annotation").Id is deprecated: use ID instead  (SA1019) (megacheck)
org.go:136:24⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org.go:169:16⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:24:21⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:88:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
org_users.go:141:21⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
plugin_setting.go:103:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
preferences.go:97:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
quota.go:119:17⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
quota.go:221:17⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
team.go:77:24⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:243:16⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:267:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:282:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:313:12⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:475:3⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:479:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
user.go:493:13⚠️ sess.Id is deprecated: use ID instead  (SA1019) (megacheck)
2018-09-16 12:37:08 +02:00
Mario Trangoni
f73236f8f4 pkg/services/sqlstore: Fix x.Sql is deprecated: use SQL instead. (megacheck)
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... | grep SQL
alert.go:43:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
alert_notification.go:122:12⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
annotation.go:226:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:228:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:302:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:416:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
dashboard.go:635:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
migrations/user_mig.go:137:9⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
plugin_setting.go:29:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:41:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:84:13⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:143:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:186:13⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
quota.go:234:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:172:12⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:199:17⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
team.go:223:9⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
temp_user.go:99:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
temp_user.go:124:10⚠️ x.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:375:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:377:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
user.go:379:3⚠️ sess.Sql is deprecated: use SQL instead.  (SA1019) (megacheck)
2018-09-16 12:26:05 +02:00
Caleb Tote
10aaf7b506
Adding eval_data to alerts query results 2018-07-16 12:38:42 -04:00
Alexander Zobnin
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
Patrick O'Carroll
0c269d64d0 Alert panel filters (#11712)
alert list panel: filter alerts by name, dashboard, folder, tags
2018-06-01 14:36:40 +02:00
Dan Cech
1dfff74da9 move database-specific code into dialects (#11884) 2018-05-10 16:54:21 +02:00
Daniel Lee
5a3ba68a9c database: fixes after xorm update 2018-03-16 00:09:29 +01:00
bergquist
061a418f0f style: dont expose func outside package 2018-03-13 11:24:10 +01:00
Carl Bergquist
3f6e525755
Merge pull request #10942 from grafana/pausing_alerts_updates_timestamp
Pausing/un alerts now updates new_state_date
2018-03-07 15:40:12 +01:00
Leonard Gram
c5226a945b alerting: pausing alerts modifies updated.
When pausing an alert the updated field is
modified to the current time.

Closes #10191
2018-02-16 14:24:52 +01:00
Torkel Ödegaard
5323971c21
refactoring: alert rule query refactoring (#10941) 2018-02-16 13:56:04 +01:00
Daniel Lee
f5107d5023 alerting: add permission check in api for pausing alerts 2018-01-30 14:41:25 +01:00
bergquist
5a1cf2c793 style: minor code style changes 2018-01-23 22:28:47 +01:00
Torkel Ödegaard
029317ed18 tech: alert list react migration progress 2017-12-31 14:16:19 +01:00
Torkel Ödegaard
ba8c02f594 refactor: changed string slicing to strings.TrimPrefix, #9862 2017-11-15 10:48:03 +01:00
Patrick O'Carroll
9ad186bcc9 not ok option to alert list, fixes: #9754 2017-11-13 10:30:11 +01:00
Torkel Ödegaard
81a4df1372 fix: alert api limit param did not work and caused SQL syntax error, fixes #9492 2017-10-12 10:22:53 +02:00
Torkel Ödegaard
359421b5e8 refactor: sqlstore inTransaction consolidated to one version, fixes #8376 2017-05-23 10:56:23 +02:00
Torkel Ödegaard
0384eecf5c fix: minor fix for bug when saving alert with empty message, fixes #7927 2017-04-10 15:26:05 +02:00
bergquist
00dddca26a alerting: dedupe alert notifications when running multiple servers
alert notifications will only be sent if the database value
is updated.

ref #6957
2017-02-21 16:54:49 +01:00
bergquist
46e4a54a6e style: go fmt with simplify 2017-01-27 15:21:02 +01:00
bergquist
e78da57e4d feat(alerting): shows when no_data triggered alerts
closes #7035
ref #7257
2017-01-17 09:49:25 +01:00
bergquist
6c2c3c7e24 Revert "fix(alerting): pause dto can only pause one"
This reverts commit b2c5a6a037.
2016-12-19 16:07:55 +01:00
bergquist
b2c5a6a037 fix(alerting): pause dto can only pause one 2016-12-19 16:05:24 +01:00
bergquist
a2257ec3d0 tech(alerting): renames pause all method 2016-12-19 15:17:49 +01:00
bergquist
ecdf1888c4 feat(alerting): removes pause per datasource 2016-12-19 13:24:45 +01:00
bergquist
6b9db0c0c5 style(alerting): simplify support for pausing multiple alerts 2016-12-19 08:18:42 +01:00
bergquist
fb6aa0e026 feat(api): adds endpoint for mass pausing alerts
ref #6589
2016-12-16 15:00:58 +01:00
utkarshcmu
7490c49f60 Alert un paused to pending state 2016-11-01 07:58:38 -07:00
utkarshcmu
d9f2519916 Renamed Initialized to Pending 2016-11-01 07:30:55 -07:00
utkarshcmu
4c64e45a59 Added initalized state to alerts 2016-10-28 14:44:45 -07:00
Torkel Ödegaard
4c26c55fea fix(api): minor change to how pause alert was done 2016-10-14 09:58:22 +02:00
Torkel Ödegaard
46bab0bb37 feat(alerting): remove annotations when deleting alert, closes #6244 2016-10-14 09:43:30 +02:00
bergquist
264590a9c2 feat(alerting): add paused api endpoint 2016-10-10 14:26:09 +02:00