Ivana Huckova
d7d6c10664
Prometheus: Fill missing steps with null values ( #43622 )
...
* Prometheus: Add empty points when data points missing
* Remove newline
* Add comments
* Improve/Fix test
* Remove unused variable
2022-01-05 11:40:32 +01:00
Gilles De Mey
837925390f
fix: pass OrgId to alertNotification model ( #43678 )
...
fixes #43214
2022-01-05 10:19:45 +01:00
J Guerreiro
056e143664
AccessControl: Present user edit actions according to AC metadata ( #43602 )
...
* AccessControl: Add user metadata to user detail view
* AccessControl: Do not present delete or disable buttons based on ac metadata in admin/users
* AccessControl: do not allow password changing or user editing without permission
* AccessControl: Fetch global:users scope for admin
* AccessControl: optimize org.user metadata fetch
* Chore: early return if ac metadata is not available
2022-01-05 09:59:17 +01:00
Ryan McKinley
b09d498484
Import: fix dashboard imports with expressions ( #43630 )
2022-01-04 08:42:18 -08:00
Jeremy Price
42ccc44eca
Accesscontrol: Apply FGAC to APIKey endpoints ( #42659 )
...
* Move definitions to serviceaccounts
* Use constant names, add scope to delete
* Add descriptions to roles
* Rename roles
2022-01-04 15:37:40 +01:00
Travis Patterson
c4c05a5b71
refactor promethueus package into sub packages ( #43634 )
2022-01-04 07:22:33 -07:00
Emil Tullstedt
df4e9ca12b
Datemath: Support fiscal years ( #43558 )
2022-01-04 13:56:34 +01:00
Karl Persson
2425828a0b
quote reserved keyword ( #43652 )
2022-01-04 13:35:52 +01:00
Selene
bdbd199910
Remove unnecesary joins from queries ( #43626 )
2022-01-04 13:04:02 +01:00
Karl Persson
ee690a7bb0
Add org_id in join ( #43648 )
2022-01-04 11:13:45 +01:00
idafurjes
65e60759fb
Rename AddEventListenerCtx to AddEventListener and PublishCtx to Publish ( #43566 )
2022-01-04 09:36:01 +01:00
J Guerreiro
a0cf57b5b8
AccessControl: Reduce tone of access error ( #43601 )
2022-01-04 09:28:55 +01:00
Kyle Brandt
f17fb76b5e
SSE: Add is_nan() and other like functions and allow '_' in func names ( #43555 )
...
* SSE: Add is_nan() and allow '_' in func names
is_null() infn(), is_inf(), is_number()
2021-12-29 11:40:52 -05:00
idafurjes
8e6d6af744
Rename DispatchCtx to Dispatch ( #43563 )
2021-12-28 17:36:22 +01:00
idafurjes
7936c4c522
Rename AddHandlerCtx to AddHandler ( #43557 )
2021-12-28 16:08:07 +01:00
Joan López de la Franca Beltran
80e0dd74d2
Encryption: Increase context timeout on flaky test ( #43553 )
2021-12-28 13:34:45 +01:00
idafurjes
56c3875bb9
Chore: Remove context.TODO ( #43458 )
...
* Remove context.TODO() from services
* Fix live test
2021-12-28 10:26:18 +01:00
Alexander Weaver
56b3dc5445
Alerting: Allow configuration of non-ready alertmanagers ( #43063 )
...
* Create API test for overwriting invalid alertmanager config
* Avoid requiring alertmanager readiness for config changes
* AlertmanagerSrv depends on functionality rather than concrete types
* Add test for non-ready alertmanagers
* Additional cleanup and polish
* Back out previous integration test changes
* Refactor of tests incorrectly caused a test to become redundant
* Use pre-existing fake secret service
* Drop unused interface
* Test against concrete MultiOrgAlertmanager re-using fake infra from other tests
* Fix linter error
* Empty commit to rerun checks
2021-12-27 17:01:17 -06:00
Alexander Weaver
9abdaf251f
Alerting: Fix global state sensitivity in notifier channel tests ( #43508 )
2021-12-27 11:58:17 -06:00
Joan López de la Franca Beltran
83bc445d3e
Encryption: Fix DEKs cache ( #43129 )
...
* Encryption: Fix DEKs cache
* Clarify tests
2021-12-27 18:04:47 +01:00
Alex Khomenko
3b4a4be3c6
Feature highlights: add setting toggle ( #43394 )
...
* Feature highlights: add toggle setting
* Settings: Use provider for 'feature_highlights' section
* Fix frontendsettings API tests
* Document the toggle
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
2021-12-24 10:49:52 +02:00
Ryan McKinley
4233a62aeb
DashboardPreviews: add dashboard previews behind feature flag ( #43226 )
...
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2021-12-23 09:43:53 -08:00
Karl Persson
0ace9695a6
Access control: Add optional hooks ( #43372 )
...
* Add optional OnSet hooks
2021-12-23 10:10:06 +01:00
J Guerreiro
3d4fafcf70
AccessControl: Add access control metadata to org user DTOs ( #43362 )
...
* AccessControl: Add access control metadata to OrgUserDTO
* AccessControl: get User AC metadata
* AccessControl: return User Access Control metadata when requested
2021-12-22 18:46:33 +01:00
Marcus Efraimsson
7d3bdb6d1b
Plugins: Set backend metadata property for core plugins ( #43349 )
...
Ref #42648
Ref #42781
2021-12-22 17:59:26 +01:00
J Guerreiro
a1b8b5d123
Usage stats: Count API keys ( #42883 )
...
* Stats: add api key count to usage stats
* Chore: correctly capitalize struct member
2021-12-22 17:37:45 +01:00
David Henderson
575eb68828
CloudWatch: Add Missing Elasticache Host-level metrics ( #43455 )
...
Add missing host-level Elasticache metrics from https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.HostLevel.html
Follows from https://github.com/grafana/grafana/pull/43336#issuecomment-999367311
2021-12-22 14:02:52 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() ( #43409 )
...
* Remove context.TODO() from services
* Fix live test
* Remove context.TODO
2021-12-22 11:02:42 +01:00
Karl Persson
2409d8dc1f
check the value of the feature toggle ( #43433 )
2021-12-22 10:05:53 +01:00
Jean-Philippe Quéméner
ffc72aa255
Alerting: fix gosec warning that is not valid ( #43425 )
2021-12-21 19:47:47 +01:00
Daniel Lee
93de61f690
fix for CWE-89 ( #43407 )
...
The sqlOrArgs unpacking seems to confuse CodeQL. Trying something simpler
2021-12-21 19:04:56 +01:00
Karl Persson
b3d5a607d4
Access Control: Add option to filter only managed permissions ( #43371 )
...
* Add option to filter only managed permissions
2021-12-21 14:22:54 +01:00
Tania B
c1be17bec7
Chore: Add Google Cloud KMS dependency ( #43211 )
...
* Encryption: Add Google Cloud KMS dependency
* Change version
2021-12-21 14:15:27 +02:00
Siavash Safi
4c4322f717
CloudWatch: Add all ElastiCache Redis Metrics ( #43336 )
...
Add all missing Redis ElastiCache metrics.
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html
Signed-off-by: Siavash Safi <siavash.safi@gmail.com>
2021-12-21 09:13:41 +01:00
idafurjes
ff3cf94b56
Chore: Remove context.TODO() from services ( #42555 )
...
* Remove context.TODO() from services
* Fix live test
2021-12-20 17:05:33 +01:00
Carl Bergquist
f373588810
setting: configure toggles as true/false instead of array ( #43326 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-12-20 15:33:11 +01:00
Tania B
0dc86bf7f4
Chore: Move default encryption provider to kmsproviders package ( #43331 )
2021-12-20 12:47:49 +02:00
Gábor Farkas
1879a6855e
prometheus: respect the http-method data source setting ( #42753 )
...
* prometheus: respect the http-method data source setting
* removed forgotten if-true section
* refactored json-check
2021-12-20 11:27:18 +01:00
Karl Persson
c3ca2d214d
Access control: Refactor managed permission system to create api and frontend components ( #42540 )
...
* Refactor resource permissions
* Add frondend components for resource permissions
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2021-12-20 09:52:24 +01:00
Ilya Stoliar
9cf5623918
CloudWatch: Add Data Lifecycle Manager metrics and dimension ( #43310 )
2021-12-20 09:48:07 +01:00
Artur Wierzbicki
197f4f81f2
#41993 : make it possible to create N random60hz channels ( #43295 )
2021-12-17 23:42:37 +04:00
Sofia Papagiannaki
c4aaf5f9d1
API: prevent provisioned dashboard from being updated ( #41894 )
2021-12-17 10:31:52 -05:00
Alexander Zobnin
2c0f961c59
OAuth: Fix forwarding id token to the data source ( #43204 )
2021-12-17 03:34:16 -05:00
Yuriy Tseretyan
1a762083d7
Alerting: make alert rule routine evaluation control be thread-safe ( #41220 )
...
* change registry.delete to return deleted struct
* use pointer to alertRuleInfo instead copying.
* do not access evaluation channel when routine is stopped
* remove stopCh and use context cancellation
* do not return ctx.Err when channel is cancelled because it cancels all other routines
* make alertRuleInfo fields and functions package private
2021-12-16 14:52:47 -05:00
Ryan McKinley
2754e4fdf0
Expressions: use datasource model from the query ( #41376 )
...
* refactor datasource loading
* refactor datasource loading
* pass uid
* use dscache in alerting to get DS
* remove expr/translate pacakge
* remove dup injection entry
* fix DS type on metrics endpoint, remove SQL DS lookup inside SSE
* update test and adapter
* comment fix
* Make eval run as admin when getting datasource info
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* fmt and comment
* remove unncessary/redundant code
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-12-16 13:51:46 -03:00
Jeremy Price
13fdc5231d
AccessControl: upgrade apikeys by adding service accounts ( #42425 )
...
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Change default options for cloned service account
* Run in background
* Add endpoint to upgrade api keys to service accounts
2021-12-16 14:28:16 +01:00
Jean-Philippe Quéméner
b605340668
Alerting: log errors happening in the API on server side ( #43192 )
...
* Alerting: log errors happening in the API on server side
* adapt tests to reflect changed payload
2021-12-16 13:33:10 +01:00
Gilles De Mey
bb3b5c10e7
Alerting: fix WeCom channel notifier test assertion ( #43173 )
2021-12-15 19:45:12 +01:00
Gilles De Mey
cbbbb505b4
Alerting: use HTML-safe characters for the default template ( #43148 )
2021-12-15 17:57:08 +01:00
smallpath
aec14cba42
Alerting: Support WeCom as a contact point type ( #40975 )
...
* add wecom notifier
* fix backend lint
* fix alerting channel test
* update wecom doc
* update notifiers
* update wecom notifier test
* Apply suggestions from code review
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* unify wecom alerting
* fix backend lint
* fix front lint
* fix wecom test
* update docs
* Update pkg/services/ngalert/notifier/channels/wecom.go
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Update docs/sources/alerting/old-alerting/notifications.md
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Update docs/sources/alerting/old-alerting/notifications.md
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Update docs/sources/alerting/old-alerting/notifications.md
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* remove old wecom notifier
* remove old notifier doc
* fix backend test
* Update docs/sources/alerting/unified-alerting/contact-points.md
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* fix doc style
Co-authored-by: gotjosh <josue.abreu@gmail.com>
2021-12-15 16:42:03 +00:00