55686 Commits

Author SHA1 Message Date
e6a6fc6f74 Tests: Require GrafanaOpts when creating Grafana dir (#97825)
I don't see a reason to accept a variable amount here, as we never use it. The only use I can see is optionally
including the opts, which isn't necessary and only complicates matters when an empty struct would do just as well: the
options are all created to be assumed zero-values already, in case a test doesn't need that option set.
2024-12-12 15:13:06 +01:00
47e58d5903 Update dependency @grafana/experimental to v2.1.5 (#97846)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 14:07:38 +00:00
6a4db1742b Docs: Clarify environment variable usage in provisioning (#97848) 2024-12-12 15:05:47 +01:00
b34fd6b6a1 Chore: update react-inlinesvg and use new icon caching mechanism (#97725)
* Update dependency react-inlinesvg to v4

* attempt to use new icon caching

* remove unicons chunk

* fix layout shift

* update snapshot

* parameterise cache by commit hash and clear old caches

* remove icon caching in storybook

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 13:35:28 +00:00
0a390cc069 Chore: Bump dependency golang.org/x/crypto to v0.31.0 - fix: CVE-2024-45337 (#97823)
* Update dependency golang.org/x/crypto to v0.31.0

* Update dependency golang.org/x/crypto to v0.31.0 - based on Trivy Scan

* Chore: go mod tidy

* Chore: make update-workspace

* Chore: manually update more sum files

---------

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2024-12-12 14:21:46 +01:00
8055d69ad2 Alerting: Alert list - pagination and filtering part 1 (#96423)
* Add basic token-based paginated fetching

* Add 1:many relation between UI and API pages

* Fix pagination arrows

* Add pagination  to hierarchical view

* Add multidatasource filtering

* Improve flushing filtered rules, add better identifiers

* Fix pagination for data sources not supporting server side pagination

* Use alert rule loader on the filter view

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

* use useTransition and update loader

* types

* Update ruleGruopIdentifier. Add actions and location to recording rules

* Update to the new API parameters

* Refactor iterator code

* Use ix to merge iterators

* Improve perf

* use AbortController to cancel loading pages

* remove iterops for now

* add comments

* add application and rulesource information to list view

* update test

* update list view functionality

* add emptystate

* automatically load more items when we get to the bottom of the page

* reduce number of loaders

* separate hook for useFilteredRulesIteratorProvider

* use useDeepCompareEffect to track filter state changes

* fix weird no results loading glitch

* fix rare case where changing filters wouldn't update the list

* add number of results to component

* Simplify FilterView rerendering

* add filter for dashboard

* Add tests for filtered view, use data source UID instead of names in the interator code

* Improve HTML semantics, extract a separate GroupedView component

* Split RuleList.v2 into multiple files

* Split tests into Filtered and Grouped view files

* PR feedback

* Improve error handling, add tests for GroupedView

* Improve types, small refactoring

* Improve rules setup

* Small improvements, v1 and v2 versions of the view type selector

* Remove yarn cache changes

* Import from test-utils

* Move groupIdentifiers, improve state param parsing

* reorder imports

* reorder imports

* update yarn resolution

* i18n

* Improve API mock, increase timeout limit

* Add tests for RuleList.v2

* Update tests

* Fix mocks in test

* Fix lint

* Fix data sources mock

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-12-12 14:18:52 +01:00
65dfbd7731 go.mod: Update authlib (#97833)
* go.mod: Update authlib

* No clue why it was removed by my computer but not by CI
2024-12-12 13:56:01 +01:00
c47aed0db5 SCIM: Clean removes old swagger documentation (#97786)
* remove open swagger references
2024-12-12 12:42:09 +01:00
27a54e8c73 I18n: Download translations from Crowdin (#97787) 2024-12-12 11:29:52 +00:00
8009af54be DefaultGridLayoutManager: Add itemHeight to DashboardGridItem when duplicating panel (#97648)
* add itemHeight to DashboardGridItem when duplicating panel

* adjust test to include itemHeight check
2024-12-12 12:57:42 +02:00
32554c78a8 Direct DB perm checks: check that the namespaces match (#97828)
check that the namespace of the caller matches the namespace in the request
2024-12-12 12:57:16 +02:00
f710573b37 Use searcher GetStats to count for folders and dashboards under a folder to be deleted (#97708)
* get stats from index

* fix logging

* fix logging

* actually counting

* Use searcher to check for resources referencing a folder

* Add tests when deleting a folder

* Lint

* merge/fix test

* will delegate to SQL

* get stats from index

* fix logging

* actually counting

* merge/fix test

* will delegate to SQL

* Uncomment test

* Add tests for checking stats before deleting a folder

* Change base branch to main

* Lint

* [REVIEW] remove logs

* Check for type assertion success

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-12 11:53:01 +01:00
afd0699c85 Alerting: Fix not being able to remove a reducer when using range query (#97757)
* Fix not being able to remove a reducer when using range query

* use useEffectOnce
2024-12-12 11:38:12 +01:00
8f628a0695 Cloudwatch: Change deprecated errorsource references (#97827)
This has been failing to compile, bringing down a _lot_ of tests along with it (notably the entire pkg/tests dir).
The `experimental/errorsource` package was deprecated, so the recommended replacement was used.
2024-12-12 11:37:11 +01:00
5be8a9b3c3 Alerting/chore: Deprecate MockDataSourceSrv and remove from Alerting tests (#97267)
* Mark MockDataSourceSrv as deprecated

* Add `module` into necessary existing mock datasources

* Remove config mock

* Update helper method for test datasources to more accurately reflect real behaviour

* Update alerting/unified tests to remove mock datasource srv

* Lint fix

* Remove some unused re-exports

* Make mock mimir use correct module

Ⓜ️

* Add necessary handlers for mimir query editor responses

* Lint fix

* Add implementation to mock mimir data source
2024-12-12 09:50:36 +00:00
d85353926d Metrics: Export multi registry (#97662)
* export multi registry

* fixup
2024-12-12 09:48:27 +00:00
7ad004236e Alerting: Change the description for the 'Message' field in webhooks (#96153) 2024-12-12 10:30:23 +01:00
e3e7086a91 GrafanaData: Add now parameter to dateMath.parse to subsitute now string (#97151)
* Add now parameter to dateMath.parse to subsitute now string

* Create new function, deprecate the old

* Add docstring

* Typo
2024-12-12 11:22:49 +02:00
7de65b39b5 Elasticsearch and Cloudwatch: Replace deprecated experimental/errorsource (#97363)
* Update elasticsearch

* Update azure monitor

* Update test

* Revert "Update azure monitor"

This reverts commit 21b53845b85c3a43d679d729c33879fdc3e9f027.

* Update cloudwatch
2024-12-12 10:12:03 +01:00
ded90fa28d App platform: Implement perm check with direct db access (#97579)
* implement perm check with direct db access

* add tests

* more tests

* Update pkg/services/authz/rbac/service.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/authz/rbac/service.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* allow fetching permissions for a user who is not a member of the org

* linting

* fix typo

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-12-12 08:52:14 +00:00
3c78fb1aa4 Dashboards: Add option to specify explicit percent change text size for stat panels (#96952)
Add option to change percent change text size
2024-12-12 08:15:29 +02:00
19cc2efaf2 Chore: Fix unnecessary nullish-coalescing (#97555)
* Fix unnecessary nullish-coalescing

* Fix nullish use as per code review

* Fix other incorrect use of nullish coalescing
2024-12-11 17:34:06 +00:00
084aad0b84 Chore: Add no-duplicate-case eslint rule and fix violations (#97537)
* Add `no-duplicate-case` rule

* Fix basic duplicated cases

* Fix duplicated translations case

* Fix alerting case
2024-12-11 17:33:31 +00:00
c5e8e71ee3 K8s: Add APIGroupPostStartHookProvider (#97801) 2024-12-11 19:13:42 +02:00
5d326b90ac Docs: Added clarification to Azure monitor config doc (#97807)
clarified that managed identity not for cloud
2024-12-11 16:57:06 +00:00
585cb43b0b Alerting: Add option to show inactive alerts in alert list panel (#96888)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-11 11:38:32 -05:00
4e10507c84 Chore: Remove global mock of plugin_loader (#97351)
* Remove global mock of `plugin_loader`

Removing this means we can get more accurate datasources behaviour in tests

* Fix circular dependency/undefined method when plugin_loader is unmocked

* Use optional chaining for trusted policies to stop tests failing when `bootData` is partially set

* Add plugin_loader mock back into single test that is still broken

* Revert trusted type policies changes

* Fix tests that break with trusted type policies
2024-12-11 14:50:49 +00:00
1a22575613 MetricCombobox: Fix overflowing parents (#97049) 2024-12-11 15:45:20 +01:00
def3632a3a Clarifies documentation around what the annotations.tags_length setting does (#97790)
Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>
2024-12-11 15:17:36 +01:00
9c396b74f9 Alerting: AlertingQueryRunner should skip descendant nodes of invalid queries (#97528) 2024-12-11 16:00:11 +02:00
3c2c5610bd Alerting: Fix updating condition when refId changes (#97753)
fix updating condition when refid changes
2024-12-11 14:31:58 +01:00
32155b22d6 Theme: increase debug theme gridSize and fix some obvious mistakes (#97661)
* increase debug theme gridSize and fix some obvious mistakes

* better switch styling

* fix checkbox

* fix tabs

* also fix editable title height
2024-12-11 13:27:54 +00:00
d48e9afd5d Datasources: Improved network health check error messages (sql datasources) (#97783)
remove unique identifiers from common network error messages
2024-12-11 13:05:06 +00:00
d176076078 Azure Monitor: Add safety around usage of frame.Meta.Custom struct (#97766) 2024-12-11 15:02:51 +02:00
bb673fc8ed Explore: Show links to queryless apps (#96625)
* Extract basic extensions to a separate files

* Add simple queryless apps links

* Move links for queryless apps next to the datasource picker

* Update tests

* Add translations

* Add tracking

* Update translations

* Fix tests and betterer

* Fix the mock for the test (the hook may be called twice now)

* Add a todo
2024-12-11 13:53:28 +01:00
8bb24bc7b3 Unified: Add client-side stats federation to support folders (#97778) 2024-12-11 13:46:31 +02:00
f51b58488c EmptyState: Add event tracking to CommandPalette and BrowseDashboards (#97780) 2024-12-11 12:24:19 +01:00
61d71ec5b1 Zanzana: Handle anonymous users (#97171)
* add anonymous users to schema

* sync anonymous user role

* remove unused

* fix linter

* only add anonymous reconciler if feature is enabled
2024-12-11 12:22:42 +01:00
e8e0649ebd Tempo: Update AggregateBy notice (#97630)
* Update notice

* Update link

* Remove extra import

* Update notice
2024-12-11 11:17:47 +00:00
09b51947f3 I18n: Download translations from Crowdin (#97311) 2024-12-11 13:17:31 +02:00
2149c75e22 Zipkin: Run queries through backend (#97754)
* Zipkin: Run queries through backend

* ;2DUpdate e2e

* Update e2e
2024-12-11 12:31:24 +02:00
cdc7c1cae2 AutoSizeInput: fix inconsistent input value state (#97575)
* Revert "GrafanaUI: Revert: Fix inconsistent controlled/uncontrolled state in AutoSizeInput (#97551)"

This reverts commit 9f3073fd174d440693377233a25736d4ae236819.

* Fix defaultValue being used if the user cleared the inputy
2024-12-11 11:04:03 +01:00
8d69abc3b4 E2E Selectors: Add backwards compatibility for apply button selector (#97762)
add more backwards compatibility
2024-12-11 07:43:52 +01:00
60f093e3d3 MSSQL: Bump go-mssqldb to v1.8.0 (#97773) 2024-12-10 21:51:38 +00:00
f05d016ae7 Chore: Remove mysqlParseTime feature toggle (#97761) 2024-12-10 15:13:13 -06:00
db8ece3167 Chore: fix CODEOWNERS (#97763) 2024-12-10 20:40:08 +02:00
ea17b79c09 Search: Return counts for values within an folder/repository (#97534) 2024-12-10 20:37:37 +02:00
b05d60e5b5 k8s: dashboards: remove FT (#97758) 2024-12-10 12:35:36 -06:00
4f7ffafe98 Alerting: Consistently order member imports in alerting code (#97688)
* Lint import member orders within alerting

* Consistently order member imports in alerting code
2024-12-10 17:42:33 +00:00
e2365ce1c5 Chore: Update codeowners for gdev dashboards (#97709) 2024-12-10 10:32:35 -06:00