Ieva
bc9b5325a0
update docs, simplify actions and scopes ( #47067 )
2022-04-04 13:53:58 +01:00
Marcus Efraimsson
659cf17e10
Logging: Fix syslog messages should be sent with correct severity ( #47209 )
2022-04-04 12:51:14 +02:00
Marcus Efraimsson
b4346a5613
Logging: Fixes filtering logs based on gokitlog levels ( #47195 )
2022-04-04 12:36:17 +02:00
Sergey Kostrukov
5675496f6b
Migrate to Grafana Azure SDK ( #47232 )
2022-04-04 11:23:13 +02:00
Yuriy Tseretyan
e94d0c1b96
Alerting: update rule test endpoints to respect data source permissions ( #47169 )
...
* make eval.Evaluator an interface
* inject Evaluator to TestingApiSrv
* move conditionEval to RouteTestGrafanaRuleConfig because it is the only place where it is used
* update rule test api to check data source permissions
2022-04-02 02:00:23 +02:00
Yuriy Tseretyan
51114527dc
Alerting: handle folder permissions when fine-grained access enabled ( #47035 )
...
* Use alert:create action for folder search with edit permissions. This matches the action that is used to query dashboards (the update will be addressed later)
* Update rule store to use FindDashboards instead of folder service to list folders the user has access to view alerts. Folder service does not support query type and additional filters.
* Do not check whether the user can save to folder if FGAC is enabled because it is checked on API level.
2022-04-01 19:33:26 -04:00
Yuriy Tseretyan
8a2c368031
check that user is authorized to create\update silences ( #47163 )
2022-04-01 09:39:59 -04:00
Sergey Kostrukov
656ade9884
Shared Azure middleware between Azure Monitor and Prometheus datasources ( #46002 )
...
* Scopes in Azure middleware
* Enable Azure middleware without feature flag
* Use common Azure middleware in Azure Monitor
* Apply feature flag to JsonData configuration of Azure auth
* Enforce feature flag in Prometheus datasource
* Prometheus provider tests
* Datasource service tests
* Fix http client provider tests
* Pass sdkhttpclient.Options by reference
* Add middleware to httpclient.Options
* Remove dependency on Grafana settings
* Unit-tests updated
* Fix ds_proxy_test
* Fix service_test
2022-04-01 13:26:49 +02:00
Marcus Efraimsson
16db1ad46d
API: Fixes request logging middleware to include userId, orgId, uname ( #47183 )
...
Fixes #47006
2022-04-01 13:24:39 +02:00
Alexander Weaver
b8e277ee4c
Alerting: Create feature toggle for provisioning ( #47167 )
...
* Create feature flag for alerting provisioning
* Fix tabs for golint compliance
2022-04-01 08:32:00 +02:00
Santiago
4b1af6fb06
Fix empty contact point URLs when template parsing fails ( #47029 )
...
* fix empty URLs
* leave URL templating, use fallback
* better fix, new tests cases
* fix linting errors
2022-03-31 15:57:48 -03:00
Gábor Farkas
a246381879
loki: backend-mode: add stats support ( #46526 )
...
* loki: backend-mode: add stats support
* refactor: rename variable
2022-03-31 17:50:27 +02:00
Kevin Yu
1a4b1184bd
Azure Monitor: allow metrics call to use resource uri ( #46858 )
...
* Azure Monitor: allow metrics call to use resource uri
* test case when only resource uri is provided
* remove logs
* Rename json field name from resource to resourceUri
* Group legacy URL builder params test cases
* move comment to the correct position
* Add clarifications in comments
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2022-03-31 08:20:29 -07:00
felixdoerre
f5a790e291
Fix postgresql host-v6 literals ( #46876 )
...
Ipv6 literals in postgresql hosts previously worked and were subsequently
broken. This change fixes the parsing and adds additional test cases.
2022-03-31 11:45:49 +01:00
Gabriel MABILLE
0d87de153a
AccessControl: Add a feature flag for the builtin role simplification ( #47062 )
...
* AccessControl: Add a feature flag for the builtin role simplification
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Update standardDeatureFlags instead
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-03-31 11:40:57 +02:00
George Robinson
79769132c0
Alerting: Alert rule should wait For duration when execution error state is Alerting ( #47052 )
...
Alerting: Alert rule should wait For duration when execution error state is Alerting
2022-03-31 09:57:58 +01:00
Alexander Weaver
502cf8b37f
Alerting: Unify Swagger/OpenAPI generation tooling ( #46928 )
...
* Unify makefiles
* Improve documentation
2022-03-31 09:34:46 +02:00
Ryan McKinley
edf384c730
DashboardSave: use a feature flag for drawer behavior ( #46972 )
2022-03-30 10:07:41 -07:00
Nathan Marrs
4449439a41
Search: Implement basic improved UI ( #46758 )
2022-03-30 09:50:32 -07:00
Will Browne
572ca553b6
Plugins: Add deprecation notice for /api/tsdb/query endpoint ( #45238 )
...
* add deprecation notice for /api/tsdb/query
* fix linking
* regenerate after gen-go
* add newline
* add API docs for ds/query
* regenerate spec
* pr feedback
* add helpful tip
* make sub heading
* add more data
* update spec
* update wording
* mention both from/to
* add suggestions
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* docs feedback
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-03-30 17:46:06 +02:00
Selene
8e52dbb87b
Chore: Remove bus from authproxy ( #46936 )
...
* Make authproxy injectable
* Fix import
* Provide function was in wrong place
* Fixing tests
* More imports and rollback a change
* Fix lint
2022-03-30 17:01:24 +02:00
Dirkco du Plessis
b52794601d
mssql: explicit disable encryption when its disabled ( #46546 )
2022-03-30 15:14:04 +01:00
Karl Persson
a5e4a533fa
Access control: use uid for dashboard and folder scopes ( #46807 )
...
* use uid:s for folder and dashboard permissions
* evaluate folder and dashboard permissions based on uids
* add dashboard.uid to accept list
* Check for exact suffix
* Check parent folder on create
* update test
* drop dashboard:create actions with dashboard scope
* fix typo
* AccessControl: test id 0 scope conversion
* AccessControl: store only parent folder UID
* AccessControl: extract general as a constant
* FolderServices: Prevent creation of a folder uid'd general
* FolderServices: Test folder creation prevention
* Update pkg/services/guardian/accesscontrol_guardian.go
* FolderServices: fix mock call expect
* FolderServices: remove uneeded mocks
Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-03-30 15:14:26 +02:00
Will Browne
56e9c24f08
Plugins: Include decommissioned plugins when ignoring plugins during re-loading ( #46958 )
2022-03-30 15:05:12 +02:00
Will Browne
23dde457ef
Plugins: Don't start runner ticker for Core plugins ( #46964 )
...
* Plugins: Don't start runner ticker for Core plugins
* add test
* correct start check in test
2022-03-30 14:48:49 +02:00
Will Browne
42533dc973
Plugins: split manager.go into areas of responsibility ( #46957 )
2022-03-30 12:46:31 +02:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data ( #45322 )
...
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
gotjosh
84e5f336fe
Alerting: Classic conditions can now display multiple values ( #46971 )
...
* Alerting: Extract classic condition values by RefID
* uncapitalise function
* update documentation
* Update pkg/services/ngalert/eval/extract_md.go
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Update pkg/services/ngalert/state/state.go
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Update pkg/services/ngalert/state/state.go
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Update pkg/services/ngalert/eval/extract_md.go
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Update docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Update pkg/services/ngalert/eval/extract_md.go
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Run prettier
Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 20:33:03 +01:00
Cameron Waterman
8426cfe400
Profile/Help: Expose option to disable profile section and help menu ( #46308 )
...
* Expose option to disable help menu
* Expose option to disable profile menu
* Add Profile FeatureTogglePage
* Update public/app/features/profile/FeatureTogglePage.tsx
Uptake PR wording suggestion.
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Fix front end lint issue
* Fix back end lint issue
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 16:27:53 +01:00
Matthew Jacobson
932f43b220
Alerting: Add resolved count to notification title when both firing and resolved present ( #46697 )
...
* Alerting: Add resolved count to notification title when both firing and resolved are present
* Fix test case default_template_test.go
2022-03-29 11:22:28 -04:00
Andres Martinez Gotor
48113beeeb
AzureMonitor: Fix missing top parameter when dimensions are set ( #47010 )
2022-03-29 16:27:09 +02:00
Yuriy Tseretyan
c1dbe7617c
fix scope for datasource:query action ( #46973 )
2022-03-29 09:58:59 -04:00
Artur Wierzbicki
60984881ec
Previews: fix crawler in multi-org deployments ( #46967 )
...
* Previews: fix crawler in multi-org deployments
* Previews: fix statement ordering
2022-03-29 13:40:11 +01:00
Marcus Efraimsson
9eb2cd537d
Plugins: Make backend plugin metrics endpoints available with optional authentication ( #46467 )
...
* add new endpoint without auth+config
* add cfg check
* fit lint issue
* Add basic auth support
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* WIP docs
* Update docs/sources/administration/view-server/internal-metrics.md
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
* update instructions
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
2022-03-29 11:18:26 +02:00
Tania B
8c622c1ef6
Datemath: Fix weekstart calculation ( #46962 )
...
* Update go-datemath version
* Remove unnecessary bits
* fixup! Remove unnecessary bits
2022-03-26 19:57:29 +01:00
Julien NOEL
f4b6c4019c
PostgreSQL: __unixEpochGroup to support arithmetic expression as argument ( #46764 )
...
* __unixEpochGroup to support arithmetic argument
Following call generates wrong expression :
$__unixEpochGroupAlias(height+42,$__interval)
=> floor(height+42/60)*60 AS "time"
instead of
=> floor((height+42)/60)*60 AS "time"
* Update test of __unixEpochGroup related to issue #46764
2022-03-26 18:44:14 +01:00
Emil Tullstedt
7bc821baf2
Logger: Use specified format for file logger ( #46970 )
...
Fixes #45941
2022-03-26 11:40:08 +01:00
Kat Yang
e6726681a9
Chore: Remove x from annotation test ( #46935 )
2022-03-25 13:23:21 -04:00
Kat Yang
90f2233ea9
Chore: Remove global database engine variable from annotation ( #46940 )
...
* Chore: Remove global database engine variable from annotation
* 💩
2022-03-25 13:23:09 -04:00
Kat Yang
19be0b4170
Chore: Remove x from org users ( #46848 )
...
* Chore: Remove x from org users
* Chore: Remove x.Dialect() from org users
2022-03-25 17:19:01 +00:00
Yuriy Tseretyan
e20d157a9b
Alerting: rules delete API to check data source authorization ( #46906 )
...
* merge RuleSrv rule delete methods
* remove unused store methods
* implement delete by uid for fake store
* add scheduler mock
* implement tests for RouteDeleteAlertRules
2022-03-25 12:39:24 -04:00
Gabriel MABILLE
53e7f8405f
AccessControl: Permission Migrator, clean unused arguments ( #46937 )
2022-03-25 14:04:10 +01:00
Andres Martinez Gotor
3c5e68a349
CloudWatch: Fix metric names ( #46929 )
2022-03-25 09:17:15 +01:00
Yuriy Tseretyan
6610adf090
Alerting: remove UpdateRuleGroup from fake rule store ( #46941 )
...
* remove UpdateRuleGroup from fake rule store because It is not part of interface anymore
2022-03-24 19:29:19 -04:00
Yuriy Tseretyan
15e4556c2f
Alerting: update authorization logic to use proper legacy roles when fine-grained access is disabled ( #46931 )
...
* require legacy Editor for post, put, delete endpoints
* require user to be signed in on group level because handler that checks that user has role Editor does not check it is signed in
2022-03-24 17:13:47 -04:00
Yuriy Tseretyan
8868848e93
Alerting: rule group update API to ignore deletes of rules user is not authorized to access ( #46905 )
...
* verify that the user has access to all data sources used by the rule that needs to be deleted from the group
* if a user is not authorized to access the rule, the rule is removed from the list to delete
2022-03-24 16:53:00 -04:00
Yuriy Tseretyan
84001fe6be
log to console when run integration tests ( #46934 )
2022-03-24 13:08:12 -04:00
Gabriel MABILLE
9dc06cd21f
simplify bulkAssignRoles ( #46891 )
2022-03-24 18:06:44 +01:00
Kat Yang
39f14a2ec2
Chore: Remove x from login attempt ( #46853 )
2022-03-24 17:00:41 +00:00
kay delaney
8329cd59f6
LibraryPanels: Increase max description length to 2048 chars ( #46601 )
2022-03-24 12:14:56 +00:00