Commit Graph

35314 Commits

Author SHA1 Message Date
renovate[bot]
f0b6a39ad6
Update dependency eslint-plugin-jest to v26.2.2 (#49079)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 15:05:37 +01:00
renovate[bot]
c8ca28bbea
Update dependency fs-extra to v10.1.0 (#49081)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 14:58:01 +01:00
Karl Persson
34be8f28b9
AccessControl: Add metadata to search result (#48879)
* Add access control metadata to search hits if access control query string is passed
2022-05-17 15:51:44 +02:00
Gabriel MABILLE
7cb7290a3e
AccessControl: Enforce user check when enterprise accesscontrol is on (#49003)
* AccessControl: Enforce user check when enterprise accesscontrol is on

* Update the test not to fail enterprise build

* Adding a log as suggested by Kalle

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* Update log message

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-05-17 09:47:31 -04:00
Gabriel MABILLE
83e234d4f6
AccessControl: Document basic roles changes and provisioning V2 (#48910)
* AccessControl: Document basic roles simplifying

* Add sample file for provisioning v2

* WIP

* Update provisioning example from docs

* Fix wrong permission in docs

* Nits on about-rbas.md

* Manage rbac roles

* Nit.

* Nit.

* Rephrase

* Comment

* Add version to the role

* Update role

* Update role

* Spell

* Final touch on about-rbac

* Add basic role UID mapping about-rbac

* Team assignments

* assign rbac roles

* move for more info

* enable rbac and provisioning

* spell

* plan rbac rollout strategy

* Cover factory reset

* remove builtin assignment permissions from docs

* to -> from

* Custom role actions scopes

* spell

* Update docs/sources/enterprise/access-control/about-rbac.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/about-rbac.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/custom-role-actions-scopes.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/custom-role-actions-scopes.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/enable-rbac-and-provisioning.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Remove factory as much as possible

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Have -> Must

 Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Have -> Must

 Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Replace factory by hard reset

* Replace LINK

* Update docs/sources/enterprise/access-control/about-rbac.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Suggestion on example descriptions

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Remove comment on permissions escalate

* Prettier.

* add a sentence to explain the type:escalate

* add a sentence to explain the type:escalate

* Rephrase

* Remove TODOs as discussed with jguer

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Implement vardan's suggestion to have only one mapping:

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

* Document that you cannot delete basic roles

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-05-17 15:46:43 +02:00
renovate[bot]
e3c1faad56
Update dependency jest-fail-on-console to v2.4.1 (#49082)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 14:24:23 +01:00
renovate[bot]
54f167dc2d
Update dependency core-js to v3.22.5 (#49071)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 13:57:22 +01:00
renovate[bot]
b342c53acd
Update dependency csstype to v3.1.0 (#49072)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 13:32:38 +01:00
Ashley Harrison
bddbed4e21
Convert FormField tests to RTL (#49068) 2022-05-17 13:26:48 +01:00
kay delaney
e5925b2e91
Search: Constrain folder view (#49069) 2022-05-17 12:36:34 +01:00
sam boyer
44956aea66
Incremental improvements to dashboard schema (#48977)
* Change default of style to dark

* Separate cursor into standalone def

* Docs on timepicker and templating fields

Also add what appear to be timepicker-related fields

* Separate out AnnotationQuery definition

* Add memberNames for DashboardCursorSync

* Add sketch of VariableModel for templating field

Also changes label field from frontend from null to optional.

* Use constraints to enforce non-empty panel type

Negation (!="")  was breaking openapi exporter

* Add types and fields for links

* Remove panelVersion fields

These weren't right anyway, and they revealed a bug in the CUE openapi
generator

* Remove null label value from test

* Narrow type and set bounds on month field

* Adapt Go dashboard schema to lineage changes
2022-05-17 12:11:09 +01:00
Sofia Papagiannaki
925784f514
Alerting: Modify endpoint for testing a datasource rule using the UID (#48070)
* Modify testing endpoint to expect the datasource UID

* Update docs
2022-05-17 14:10:20 +03:00
kay delaney
de3e981985
Chore: Upgrade typescript to 4.6.4 (#49016) 2022-05-17 12:08:10 +01:00
Piotr Jamróz
f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* 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

* Simplify testing DataSourceSettings

* Update betterer results

* 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

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
Kat Yang
9a0f2ec449
Refactor: Add UID endpoint for get dashboard version (#48600)
* Refactor: Add UID endpoint for get dashboard version

* Add initial docs language

* Add new endpoint in swagger

* Change access control to dashboards

* Add parameters to swagger endpoint

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/api.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Rename UID to DashboardUID for clarity; use dashUID in method

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:59:02 +02:00
dependabot[bot]
ce6a5694ff
Bump actions/download-artifact from 2 to 3 (#47543)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:58:46 +01:00
dependabot[bot]
e5ae3b9762
Bump actions/setup-node from 2.5.1 to 3.2.0 (#49040)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:56:14 +01:00
dependabot[bot]
c5f5cbe438
Bump actions/stale from 4 to 5 (#47542)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:55:05 +01:00
renovate[bot]
9bc4a27238
Update dependency axios to v0.27.2 (#49066)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:47:21 +01:00
renovate[bot]
92ff880cbc
Update dependency @visx/tooltip to v2.10.0 (#49065)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:42:09 +01:00
Ashley Harrison
3b0cd8b6f1
Convert NamedColorsPalette tests to RTL (#49064) 2022-05-17 11:34:15 +01:00
renovate[bot]
d477394d6c
Update dependency @testing-library/user-event to v14.2.0 (#49060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:25:40 +01:00
renovate[bot]
1be8f9686d
Update dependency @rushstack/ts-command-line to v4.11.0 (#49059)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:19:43 +01:00
Ashley Harrison
a3e68eef17
IconButton: IconButtons are now correctly aligned in Safari (#48759)
* fix icon alignment in safari

* add comment
2022-05-17 11:03:35 +01:00
Josh Hunt
18cbea84b1
prevent generated files from being prettiered (#49061) 2022-05-17 12:01:07 +02:00
renovate[bot]
a59200fac4
Update dependency @microsoft/api-extractor to v7.24.0 (#49057)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 10:47:45 +01:00
renovate[bot]
7a0610f0f4
Update dependency @visx/group to v2.10.0 (#48712)
* Update dependency @visx/group to v2.10.0

* commit yarn lock changes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-17 10:32:45 +01:00
renovate[bot]
075dca1b34
Update babel monorepo to v7.17.12 (#49056)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:54:30 +01:00
renovate[bot]
fe91b9d706
Update dependency @visx/shape to v2.10.0 (#48803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:49:24 +01:00
renovate[bot]
cb1b101a9c
Update dependency @visx/gradient to v2.10.0 (#48647)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:45:15 +01:00
Maria Alexandra
a3233c6ac3
Search(Playground)- Manage Actions: Disable delete button when folder is General (#49021)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-17 10:31:19 +02:00
renovate[bot]
0ea04ac64d
Update dependency @opentelemetry/semantic-conventions to v1.2.0 (#48640)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:24:55 +01:00
Jess
8fcca7f700
Create issue template for UX design issues (#48742)
This will help the UX team create issues for their work faster. That way we can be more open about our work and help both Grafanistas and community members see what we're doing.
2022-05-17 10:10:48 +02:00
renovate[bot]
15034702c6
Update dependency jest-canvas-mock to v2.4.0 (#48691)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:02:01 +03:00
Chrysa Dikonimaki
b33c1bf4fd
Convert packages/grafana-ui/src/components/Logs/LogRows.test.tsx to RTL (#48982)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests

* convert LogRows tests to RTL

* Delete LogRow import
2022-05-17 08:56:14 +01:00
Selene
43e34f3086
Dashboards: Allow to retrieve dashboards by uid (#48522)
* Add the possibility to get the dashboards by uid

* Fix
2022-05-17 09:37:44 +02:00
Leon Sorokin
84d4ce51ad
TimeSeries: Fix detection & rendering of sparse datapoints (#48841) 2022-05-16 23:24:41 -05:00
Leon Sorokin
eecdbebf75
TimeSeries: insert null values at each missing interval (#49036) 2022-05-16 22:13:27 -05:00
Adela Almasan
14c2f4f3da
Geomap: Legend threshold style update (#49020) 2022-05-16 19:54:10 -07:00
Artur Wierzbicki
7a05941ea0
Previews: improve logging, add time measurements to the crawler (#49043)
* #44449: log times taken for various things in previews service / crawler

* #44449: remove stale log
2022-05-16 18:09:46 -07:00
Alexander Emelin
baa50c58d0
Search: use only bluge-based search (#48968) 2022-05-16 16:22:45 -07:00
Ryan McKinley
68757cfa73
Search: a few minor improvements (#48989) 2022-05-17 00:38:27 +02:00
Jeff Levin
2691872c7a
remove validatedQueries feature toggle (#48381)
* remove validatedQueries feature toggle
2022-05-16 13:17:05 -08:00
Yuriy Tseretyan
952cb4fc0b
Alerting: introduce AlertRuleGroupKey and use it in API handlers (#48945)
* create AlertGroupKey structure
* update PrometheusSrv.
  - extract creation of RuleGroup to a separate method. Use group key for grouping
* update RuleSrv 
 - update calculateChanges to use groupKey
 - authorize to use groupkey
2022-05-16 15:45:45 -04:00
Jesse Weaver
85af8ce2ec
[Public Dashboards] Extract queries from dashboards (#48602) 2022-05-16 13:08:42 -06:00
Nathan Marrs
3fbda0f35b
Canvas: Improve constraint selection ux (#48837) 2022-05-16 10:28:19 -07:00
Artur Wierzbicki
5c321599c8
Storage: enable SQL backend (#48095)
* #45498: add String util to ListResponse for better UX

* #45498: refactor db_filestorage FS API backend - use path_hash in DB schema

* #45498: enable DB backend fs api tests

* #45498: add comment

* #45498: enable Storage feature flag during integration tests

* remove fmt.println

* #45498: reduce sizes of hash columns

* separate conditions

* #45498: make it easy to ignore backends when running fs api integration tests

* #45498: quote `key` column name

* #45498: reduce path_hash size

* #45498: verify `/{orgId}/{storageName}/` prefix convention in integration tests

* #45498: add etag to the sql table

* #45498: add etag to the sql table

* remove feature flag check (storage isn't dev-mode only)

* add cacheControl and content disposition

* add comments

* add path_hash comment

* explicitly set `path` column collation in `file` table for postgres
2022-05-16 10:26:40 -07:00
Ryan McKinley
ff844f0599
DashboardAPI: convert internal ids to uids (#48990) 2022-05-16 09:59:02 -07:00
Connor Lindsey
ea1001f1f5
Tempo: Trim whitespace from trace id query (#49008) 2022-05-16 10:50:02 -06:00
Karl Persson
2dc45e3e72
AccessControl: Add enterprise only setting for rbac permission cache (#49006)
* Add enterprise only setting for RBAC permission cache

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-05-16 17:52:10 +02:00