Commit Graph

15456 Commits

Author SHA1 Message Date
Sriram
f9d1d8370f
Plugins: Fix Azure Devops plugin link and plugins list order (#49394)
* Plugins: Fix Azure Devops plugin link and plugins list order

* tests added for plugins sorting
2022-05-23 17:37:19 +01:00
Ashley Harrison
fe16680c6d
Notification history: Use Card instead of reusing alert (#49418)
* Use Card instead of reusing alert

* only need clearSelectedNotifications now
2022-05-23 16:48:17 +01:00
Ashley Harrison
ce86b4ebe7
Navigation: Show starred items in the NavBar (#49219)
* switch saved items to starred items

* hook up redux properly

* Better query + hook up DashList

* update initial state so it's never undefined

* update GetDashboard call

* use new star service

* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically

* increase height, revert changes to CustomScrollbar

* ellipsis!

* update starred dashboard name in navtree

* sort after renaming

* limit to first 50 starred dashboards found
2022-05-23 16:45:46 +01:00
Alex Khomenko
18727f0bf5
TeamGroupSync: Refactor tests to use RTL (#49417) 2022-05-23 16:45:36 +02:00
Brian Gann
5fc5899462
Access Control: Add rolepicker when Fine Grained Access Control is enabled (#48347) 2022-05-23 16:13:55 +02:00
Sofia Papagiannaki
060af782df
Docs: Add deprecation notices for datasource endpoints (#49411)
* Update markdown

* Update swagger
2022-05-23 16:11:47 +02:00
Yuriy Tseretyan
3dfafbadef
Alerting: Fix access to alerts for viewer with editor permissions when RBAC is disabled (#49270)
* Add folder edit permission for users with Viewer role
* relax permissions required to create an alert when RBAC is disabled
2022-05-23 09:58:20 -04:00
Torkel Ödegaard
c29e6fcb3a
Prometheus/Loki: Improve metric search highlight contrast (#49384)
* Prometheus/Loki: Improve metric search highlight contrast

* Update other places, and add reusable variables
2022-05-23 15:53:45 +02:00
Kristina
a9cc3225ba
Explore: Remove support for legacy, compact format URLs (#49350)
* Remove function, start changing tests

* Fix tests

* Remove deprecated parameter from function
2022-05-23 15:18:49 +02:00
Sofia Papagiannaki
be0d043673
API: Add endpoint for updating a data source by its UID (#49396)
* API: Add endpoint for updating a data source by UID

* Update docs markdown

* Update swagger

* Apply suggestions from code review

Co-authored-by: Selene <selenepinillos@gmail.com>
2022-05-23 15:13:13 +02:00
Piotr Jamróz
8f4c3e94b0
Query History: Implement star, comment and delete methods (#49330)
* Implement star, comment and delete methods

* Remove redundant await
2022-05-23 15:07:37 +02:00
Maria Alexandra
84a8a1aaa6
Search: Add ManageDashboardNew to integrate new search (#49266)
* Search: created ManageDashboardNew to integrate new search

* hide pseudo folders in ManageDashboardNew

* ManageDashboardNew - Fix overflow table

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-23 15:03:05 +02:00
Piotr Jamróz
060f0e5633
Query History: Results pagination (#49217)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Basic pagination

* Show load more only if there are items to load

* Post-merge fixes

* Change initial page limit to 100

* Fix unit tests

* Fix linting errors

* Test pagination

* Fix query migration

* Fix unit tests

* Fix prettier

* Remove full stop

* Do not show number of queries with partial results to avoid confusion

* Show number of displayed results when partial results are shown
2022-05-23 14:43:38 +02:00
Ashley Harrison
349d9973de
Notification history: Add checkboxes for multiple selection (#49392)
* Add checkboxes for selection

* className is optional...

* review comments
2022-05-23 12:50:26 +01:00
Piotr Jamróz
16a948fc88
Query History: Implement RemoteStorage methods: settings (#49320)
* Implement methods to get an update user preferences

* Update integration test

* Update label

* Remove unused type

* Simplify async code
2022-05-23 13:42:12 +02:00
Josh Hunt
5b8bc3e44c
Limit persisted notifications to 25 (#49393) 2022-05-23 12:32:31 +01:00
Ashley Harrison
ae8c11bfa4
Tweak name + add description (#49387) 2022-05-23 10:52:52 +01:00
Peter Holmberg
1402c85ce1
Alerting: change from cta to secondary (#49321) 2022-05-23 11:15:46 +02:00
Laura
ebc6d3a63c
Laura/chore/refactor styling of explore container (#49324)
* Chore: convert styling from sass to emotion

* Chore: delete sass styling
2022-05-23 10:55:04 +02:00
Joe Blubaugh
1cc034d960
Alerting: Add a "Reason" to Alert Instances to show underlying cause of state. (#49259)
This change adds a field to state.State and models.AlertInstance
that indicate the "Reason" that an instance has its current state. This
helps us account for cases where the state is "Normal" but the
underlying evaluation returned "NoData" or "Error", for example.

Fixes #42606

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-23 16:49:49 +08:00
Piotr Jamróz
c78b1fb304
Skip Angular error handling when Angular support is disabled (#49311) 2022-05-23 08:33:05 +02:00
Joey Tawadrous
f06d9164a6
Jaeger: Update operations dropdown (#49329)
* Fix issue where no values would load in operations dropdown

* Better naming

* Updated tests
2022-05-22 10:29:25 +01:00
Leon Sorokin
4f46c2f75f
HeatmapNG: render exemplars (#49287)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-21 19:13:28 -07:00
Gábor Farkas
0caeaaafe3
loki: add back frontend-mode metadata queries (#49297) 2022-05-21 16:46:39 +02:00
Gábor Farkas
93e299305c
loki: backend-mode: apply default max-lines if not set in the UI (#48859) 2022-05-21 16:39:21 +02:00
Adela Almasan
b3b650be1f
Canvas: Context menu (#48909)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-05-20 12:30:29 -07:00
Torkel Ödegaard
6fe28854bc
DashboardExport: Fixes issues sharing dashboards where query data source was set wrong (#48410) 2022-05-20 19:52:46 +02:00
Torkel Ödegaard
c3a5ff1eeb
Transforms: Labels to fields, fix label picker layout (#49304) 2022-05-20 19:50:30 +02:00
Gábor Farkas
c980655f08
elastic: config: hide access-mode selector when not needed (#49246) 2022-05-20 17:42:12 +02:00
Andreas Christou
34fa7b493c
AzureMonitor: Fixes metric definition for Azure Storage queue/file/blob/table resources. (#49101)
* Appropriately set metric definition

- Nested storage account resources (queues/blobs/tables/files) require metric definition of Microsoft.Storage/storageAccounts
- Update tests accordingly

* Restructure getResourceNames test

- Add expect on getResource args

* Update to fix issue for new query editor

- Reconstruct resourceUri if the resource is a storage account
- Correctly push storage namespaces as options for metric namespaces
- Filter options appropriately

* Fix duplicate options

* Fix lint issues

* Add comment explaining URI modification
2022-05-20 16:36:42 +01:00
Gábor Farkas
061055fac9
loki: dataframes: do not set field.config.DisplayName (#49317) 2022-05-20 17:27:49 +02:00
Yuriy Tseretyan
258b3ab18b
Alerting: Fix RBAC actions for notification policies (#49185)
* squash actions "alert.notifications:update", "alert.notifications:create", "alert.notifications:delete" to "alert.notifications:write"
* add migration
* update UI to use the write action
* update docs
* changelog
2022-05-20 10:55:07 -04:00
Andreas Christou
2780651ea8
AzureMonitor: Fix auto-selection of time-grain for metrics. (#49278)
* Update query editor to fix auto time-grain selection

* Update new query editor to fix auto time-grain selection

* Remove log and fix lint issues

* Add test for useMetricMetadata

- Add necessary types

* More test updates

- Update old dataHooks test
- Ensure query changes

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-20 15:45:54 +01:00
Erik Sundell
bd320ee0b3
Auth: Remove grafana ui dependency to the aws sdk (#43559)
* remove grafana ui dependency to the aws sdk

* wip

* cleanup

* add tests

* point to real version of aws-sdk
2022-05-20 16:04:20 +02:00
renovate[bot]
be7de1041a
Update Monthly patch updates (#49257)
* Update Monthly patch updates

* remove @types/slate update and run prettier

* fix @types/slate resolution

* lockfile update

* more fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 13:07:07 +01:00
Alex Khomenko
f1f5f01309
CreateTeam: Refactor test to RTL (#49306) 2022-05-20 13:28:59 +03:00
Kristina
e5864f76b0
Add command palette to keyboard shortcuts help modal (#49186) 2022-05-20 09:11:19 +02:00
Nathan Marrs
646dcfccf9
Canvas: Implement minimum element size + center constraint UX (#49294) 2022-05-20 00:04:34 -07:00
Gabriel MABILLE
689f51599a
AccessControl: Use RBACBuiltInRoleAssignmentEnabled in the frontend instead of FeatureToggle (#49261)
* AccessControl: Frontend changes to basic role enablement
2022-05-20 06:53:28 +00:00
Maria Alexandra
59c8c0d56b
Search (Playground) - Fix minor css paddings inside table (#49263)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-20 07:03:19 +02:00
kay delaney
64aedb78ba
Search: Support filtering by tag in folder view (#49221) 2022-05-19 14:16:25 -07:00
Kevin Yu
0a95d493e3
Cloud Monitoring: Use new annotation API (#49026)
* remove angular code

* format annotation on backend

* format time with time type instead of string

* update annotation query tests

* update get alignment data function

* update annotation query editor

* add annotation query editor test

* update struct

* add tests

* remove extracted function

* remove non-null assertion

* remove stray commented out console.log

* fix jest haste map warning

* add alignment period

* add AnnotationMetricQuery type
2022-05-19 13:52:52 -07:00
Sofia Papagiannaki
6bb843bd0e
API: Introduce health and resources data source endpoints using the data source UID (#48676)
* API: introduce health and resources datasource endpoints with UID

* Document endpoints

* Update swagger
2022-05-19 19:27:59 +03:00
Vardan Torosyan
36663c093c
Rename built-in roles to basic roles in the role picker (#49258) 2022-05-19 17:58:18 +02:00
Isabella Siu
66220758b3
CloudWatch: migrate old variable queries with empty array (#49197) 2022-05-19 10:43:26 -04:00
Alex Khomenko
dacfdc0cde
DashboardPickerByID: Add option to exclude dashboards (#49211) 2022-05-19 16:47:55 +03:00
Yuriy Tseretyan
f7f2253072
Alerting: Fix anonymous access to alerting (#49203)
* introduce a fallback handler that checks that role is Viewer.
* update UI nav links to allow alerting tabs for anonymous user
* update rule api to check for Viewer role instead of SignedIn when RBAC is disabled
2022-05-19 09:22:26 -04:00
Gábor Farkas
0355772e36
loki: do not use backend-mode when keepCookies is used (#49222) 2022-05-19 14:26:54 +02:00
Piotr Jamróz
c6c79a9360
Query History: Migrate local storage to remote storage (#48572)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Add migration for local storage query history

* Test query history migration

* Simplify testing DataSourceSettings

* Skip redundant migrations

* Revert error logging test

* Fix tests

* Update betterer results

* Change notification message after migration

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Post-merge fixes

* Fix intergration tests

* Fix incorrect filtering
2022-05-19 13:45:32 +02:00
Maria Alexandra
d592d4dd73
Search(Playground) Action Row: Fix disabled option folder layout when sorting (#49182)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-19 10:05:04 +02:00