Commit Graph

34128 Commits

Author SHA1 Message Date
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
Jack Westbrook
a06329d988 Chore: Bump node-forge to 1.3.0 (#46953) 2022-03-25 15:22:59 +00:00
Gabriel MABILLE
53e7f8405f AccessControl: Permission Migrator, clean unused arguments (#46937) 2022-03-25 14:04:10 +01:00
Andrej Ocenas
20b4112b3b Prometheus: Report error when parens are used and switching to visual builder (#46899) 2022-03-25 14:03:30 +01:00
Torkel Ödegaard
1c648cb52c Loki: Adds options to the new query builder (#46783)
* Initial commit for loki builder options

* Loki query options

* Added some basic tests

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.test.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Updated options

* All option changes should trigger query

* Fixed ts issue

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-03-25 13:13:55 +01:00
Torkel Ödegaard
3516821012 Dashboard: Fixes save modal rendered ontop of save drawer (#46916)
* Dashboard: Fixes save modal rendered ontop of save drawer

* removed commented line

* Simplified dismiss -> hideModal mapping

* Fixed issue with new dashboard

* Fixing issues
2022-03-25 13:08:42 +01:00
Yaelle Chaudy
c00f488f89 Azure Monitor : Add support for the resource picker to be configurable to only select some entry types (#46735)
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2022-03-25 12:22:28 +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
Jack Westbrook
36483eb6bf Chore: Remove prismjs@1.25.0 from yarn.lock (#46244) 2022-03-24 17:26:55 +01:00
Ashley Harrison
c13f4542d8 Dashboard: Template variables are now correctly persisted when clicking breadcrumb links (#46790)
* Add history listener to update titleHref/parentHref when location changes

* Convert to functional component and use useLocation

* Wrap component in React.memo

* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
2022-03-24 16:01:43 +00:00
Dimitris Sotirakis
0e682397ab Add GH token when referring to remote - add --quite when running git push (#46926) 2022-03-24 15:01:49 +00:00
achatterjee-grafana
c42b0d7498 Docs: Reorganize Dashboards and add note for escalations issue 2013 (#46902)
* Initial commit.

* Update version number

* Initial commit.

* More formatting changes. Also added URL links.

* Ran prettier.
2022-03-24 09:46:08 -04:00
kay delaney
8329cd59f6 LibraryPanels: Increase max description length to 2048 chars (#46601) 2022-03-24 12:14:56 +00:00
Dimitris Sotirakis
9bf82c37e3 Fetch tags after cloning (#46921) 2022-03-24 11:54:58 +00:00
Karl Persson
cac6936015 Access control: Change data source permissions to be based on UID (#46741)
* Add ResourceAttribute

* Add ResourceAttribute option

* Set ResourceAttribute option

* Change resolvers to return uid based scopes

* update swagger to correct scope

* use ResourceAttribute for endpoint scope

* bump role version

* Add support for different attributes for access control metadata

* evaluate data source metadata based on uid

* Fix test

* uncomment benchmarks

* Use resourceID

* use evaluator for access control metadata

* update comment

* Set default permissions based on uid

* Add attribute to accesscontrol filter

* validate that scopes has correct attribute

* lint

* Update comment

* remove attribute parameter and extend prefix

* refactor to use scope prefix

* Get metadata with prefix

* fix test

* fix comparision

* remove unused type

* fix attribute index

* fix typo

* restructure logic

* Get metadata by uid

* fix imports

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-03-24 12:21:26 +01:00
Dimitris Sotirakis
758ccfb69e CI: Trigger release build upon drone yaml changes (#46882)
* Add trigger-test-release step

* Change cd command

* Add failure:ignore

* Add depth when cloning

* Fix wrong secret
2022-03-24 10:59:15 +00:00
Josh Hunt
89757cf58f ManageDashboards: Fix error when deleting all dashboards from folder view (#46877)
* user essentials mob! 🔱

* draft tests

* tests!

* better default ids for test data
2022-03-24 09:43:25 +00:00
Andres Martinez Gotor
987afeee38 Chore: Cover CloudMonitoring function utils with tests (#46878) 2022-03-24 09:47:59 +01:00
Gabriel MABILLE
3440e7c8f7 AccessControl: Fix locked role picker in orgs/edit page (#46539)
* AccessControl: Fix locked role picker in orgs/edit page

* Use correct org when computing metadata
2022-03-24 08:58:10 +01:00
Santiago
a9b55f7905 Fix InfluxDB tag variables parsing (#46862)
* regex bug fixed

* remove unnecessary test
2022-03-23 21:13:17 -06:00
Ezequiel Victorero
c5f295b5b3 Access Control: adding FGAC validation to mass delete annotation endpoint (#46846)
* Access Control: adding FGAC validation to mass delete annotation endpoint
2022-03-23 18:39:00 -03:00
Yuriy Tseretyan
60d4cd80bf Alerting: update DeleteAlertRuleByUID to accept many UID (#46890) 2022-03-23 16:09:53 -04:00
Selene
d57c94fb6a Chore: Remove bus from folder service (#46840)
* Remove bus from folder service

* Fix tests
2022-03-23 19:40:22 +01:00
Ivana Huckova
7839fadf00 Loki: Fix fetching of second label set for the streams selector (#46898)
* Fix fetching of labels

* Add test
2022-03-23 17:59:48 +00:00
achatterjee-grafana
9f16644476 Updated content based on feedback. (#46896) 2022-03-23 13:59:24 -04:00
Yuriy Tseretyan
4ee48c2e77 Alerting: Update GetRuleGroupAlertRules to accept optional rule group (#46889)
* rename GetRuleGroupAlertRules to GetAlertRules
* make rule group optional in GetAlertRulesQuery
* simplify FakeStore. the current structure did not support optional rule group
2022-03-23 17:36:25 +00:00
matt abrams
562a25ad99 increase label width on TLS info (#46816) 2022-03-23 17:22:08 +00:00
Yuriy Tseretyan
acd7be1cb4 Alerting: Change getEvaluatorForAlertRule to checkDatasourcePermissionsForRule (#46887)
update method getEvaluatorForAlertRule to accept permissions evaluator and exit on the first negative result, which is more effective than returning an evaluator that in fact is a bunch of slices.
2022-03-23 17:11:30 +00:00
Connor Lindsey
78c23d8dab Tracing: Prevent createSpanLink from returning an invalid Loki query (#46864) 2022-03-23 09:48:11 -07:00
Joey Tawadrous
aabafee90a InfluxDB: annotations migration to backend (#45635)
* Annotations backend migration

* Response parser checks

* Moved parse to response parser

* Removed unused imports

* Update type

* response_parser test

* response_parser test for text

* Removed from ctx

* Use vars in annotationQuery

* Tags and tests

* Removed import
2022-03-23 16:02:29 +00:00
renovate[bot]
7b23c7fe1e Update Monthly patch updates (#46875)
* Update Monthly patch updates

* Remove 3 packages...

* Fix type error

* undo cypress upgrade

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-23 14:56:44 +00:00
Garrett Guillotte
b2f33b2a53 Docs: Revert move of "Config from query" options (#46865)
Refactoring in 449c608 / PR #43569 moved the "Options" subsection
of the "Config from query" transformation to be a subsection of
the "Apply transformation to data" doc, but those options are not
relevant to that content.

Move this content to be a subsection of the "Config from query"
transformation in the transformation functions reference doc.
2022-03-23 10:37:12 -04:00
Joe Blubaugh
481a68cbf5 Unified Alerting: Make log message follow codebase convention. (#46881)
1. Keep log lines lower case.
2. The key-value pair arguments are not format argument for the string.
3. Always use the "err" key.
2022-03-23 15:07:07 +01:00
idafurjes
77976ea810 Add fakes for db interface (#46885) 2022-03-23 15:06:47 +01:00
Torkel Ödegaard
72b6f64df9 Theme: Increase contrast for overlays and drawers (#46630) 2022-03-23 14:47:33 +01:00
renovate[bot]
87a883ec62 Update dependency stylelint to v14.6.0 (#46626)
* Update dependency stylelint to v14.6.0

* remove old rule that wasn't working properly

* Revert "remove old rule that wasn't working properly"

This reverts commit 41a96ebad2.

* allow any border values

* fix typo

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-23 13:40:54 +00:00
Sarah Zinger
dd49f9d182 Azure Monitor: Small bug fixes for Resource Picker (#46665)
- fixes issue with checkbox styling
- fixes issue with selecting subscriptions
2022-03-23 09:38:46 -04:00
renovate[bot]
721c3207e9 Update dependency prettier to v2.6.0 (#46612)
* Update dependency prettier to v2.6.0

* Keep toolkit in sync

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-23 11:34:45 +00:00
Will Browne
5e18293f88 Plugins: Make plugin loading from file system deterministic (#46842)
* Plugins: Make plugin loading from file system deterministic

* fix test name

* flip assertion arg order
2022-03-23 11:58:00 +01:00
Agnès Toulet
c31428128a Docs: improve Redis configuration doc for query caching (#46834)
* Docs: improve Redis configuration doc for query caching

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* fix small typo

* Update docs/sources/enterprise/enterprise-configuration.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-23 11:04:45 +01:00
Joe Blubaugh
c5b39dd3cd Unified Alerting, Issue 41156: Clean up expired silences. (#46740)
Expired silences older than the retention period were not being cleaned up. The root problem was that notifier.Alertmanager overrides the Prometheus alert manager's silence maintenance function and was not calling Silences.GC() in the overriden function.
2022-03-23 09:49:02 +01:00
Jean-Philippe Quéméner
a80f04c949 Alerting: add collision safe update function for alertmanager configurations (#46692)
* Alerting: add collision safe update function for alertmanager configurations

* fix typo

* use bootstrap func for tests

* move hash calculation to store

* remove icons lol

* remove removed field
2022-03-23 09:31:46 +01:00
Gabriel MABILLE
ff3c1e3144 AccessControl: Handle ':' in attribute resolution (#46742)
* AccessControl: Handle ':' in attribute resolution

* Simplify based on assumption that prefixes will have maximum 2 parts
2022-03-23 08:48:32 +01:00