4160 Commits

Author SHA1 Message Date
c94f930950 Update dependency prettier to v3.6.2 (#108689)
* Update dependency prettier to v3.6.2

* run prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-25 17:47:44 +01:00
f69f25be5d Chore: Don't show a "Not found" for public-dashboard fetches if the service is disabled via config (#108650)
don't show 404 toast if pubdash is completely disabled
2025-07-25 15:55:10 +00:00
a30c0aaaae Dashboard: SchemaV2 - Inline Library Panel during Export (#107201)
* Basic implementation of inline library panel

* modify the warning message, we support the export partially by converting regular panels the library panels

* Improve message around the conversion, keep it concise

* Fix linting

* Refactor conversion, extract existing logic into new funcition and reuse it

* remove unnecesary comment

* show error notification when library panel does not load

* Apply PR feedback, remove unnecesary try catch and return json with error, don't throw

* Add unit tests

* Fix monitoring report, add case when v2 is loaded originally or when transformed from v1

* Add unit tests for detect libraryPanels, relevant for ensure monitoring is correct
2025-07-18 15:06:55 +02:00
9c15662cf6 Alerting: Add AI buttons in some alerting workflows (#107754)
* Add alerting ai buttons for cloud

* add tracking for ai buttons usage

* Empty commit to trigger GitHub Actions

* add FrontendOnly in ff

* update analytics folder

* prettier

* revert ff being frontend only

* review comments

* address some review comments

* refactor

* revert change and remove comment

* prettier

* update betterer

* remove unused property

* prettier

* address review comments

* prettier

* update test

* fix linter errors

* add translations

* prettier

* update workspace

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2025-07-16 18:42:42 +02:00
5b0ebb1693 Dashboard: Add Monitoring to v1 and v2 export flow (#107899)
* Dashboard: Add Monitoring to v1 and v2 export flow, including library panels interaction

* fix error with v2 transformed dashboard not having haslibraryPanels

* apply PR suggestions, extract as const and refactor for readability

* Add unit test for the new functions
2025-07-16 11:53:44 +02:00
b691b3288d Sharing: Export dashboard as image (#104207)
Co-authored-by: AgnesToulet <35176601+AgnesToulet@users.noreply.github.com>
2025-07-15 21:07:39 +00:00
2f8ec01c6c Dashboard Migrations: V29 query variable refresh property and options (#108088)
* Dashboard Migrations: V31 LabelsToFields-Merge Migration

* Dashboard Migrations: V32 No-op migration

* simplify

* Refactor to reduce nesting

* Dashboard Migrations: V30 value mappings and tooltip options

* Do not automigrate since graph is migrated in v27

* Refactor to reduce nesting

* Add test case for invalid mapping

* migrate to v29

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-07-15 17:27:04 +00:00
98995922f9 Transformations: Import images with webpack (#107795)
* Transformations: Import images with webpack

* fix mock registry

* use mockTransformationsRegistry in more places
2025-07-11 15:48:27 +01:00
e4f78c462e Update dependency react-virtualized-auto-sizer to v1.0.26 (#105005)
* Update dependency react-virtualized-auto-sizer to v1.0.26

* fix unit tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-11 14:04:04 +00:00
66b79fb221 Internationalisation: Mark up transformations (#107910)
* CalculateFieldTransformerEditor

* more CalculateFieldTransformer

* ConcatenateTransformerEditor

* ConfigFromQueryTransformerEditor

* mark up other transformations

* few things spotted manually
2025-07-11 11:13:35 +01:00
453a791db1 Internationalisation: More mark up following manual review (#107709)
* mark up variable types

* mark up annotation stuff

* mark up TagsInput placeholder

* mark up validation messages

* mark up required error

* Mark up metrics explorer modal
2025-07-11 10:34:24 +01:00
a01b4c31a1 Transformations: Allow queries without dataframe results to be selectable as filters (#107152)
* Add mention of external type to correlations docs

* 🆗

* Merge request targets in with results

* Ensure we do not mutate result set
2025-07-10 18:47:18 -05:00
13a89d4ae3 Revert: Future-proofing query and data source model in Dashboard Sche… (#107985)
* Revert: Future-proofing query and data source model in Dashboard Schema v2

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-07-10 18:58:33 +00:00
2b8c5bea1a Revert "Schema V2: Simplify annotations v1<->v2 conversions" (#107984)
Revert "Schema V2: Simplify annotations v1<->v2 conversions (#107390)"

This reverts commit d5a1781fb6149eb443dc3f11de23d6dcc2f6f50e.
2025-07-10 17:29:15 +00:00
a027575435 Transformations: Prototype search tags (#105797)
* feat: init

* chore: i18n + improve formatting/style generally

* fix: i18n syntax...

* chore: i18n extract

* chore: some cleanup

* chore: cleanup

* chore: i18n
2025-07-10 08:28:51 -07:00
20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00
d5a1781fb6 Schema V2: Simplify annotations v1<->v2 conversions (#107390)
* Initial migration pending to test

* Update tests

* apply feedback

* Remove unnecessary types

* Fix types

* Update tests

* fixing tests

* Default DS for transformer

* Update the default DS

* Update the generated sdk files

* Restore commented tests

* Update tests

* Updating snapshots

* fix

* Do not preserve empty datasource in panel spec

* update provisioning v2 sample dashboard

* Fix test

* Prettier

* Fix import e2e

* Prettier

* restore commented tests

* Update to support annotations

* Lint

* Make gen apps

* Make the build pass

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update grafana-app-sdk to 0.39.2

* Workspace update

* make gen-cue

* Runtime error fix

* Update dashboard spec

* Update go workspaces

* Schema V2: Simplify annotations v1<->v2 conversions

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Cleanup and some more tests

* test improvement

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Update go.sum

* make generate

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* ts

* make gen-apps

* Update response transformers to correctly handle v2->v1 annotations

* Update dashboards openapi snapshot

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-07-08 14:42:30 +02:00
feedb5c0a6 PublicDashboardsBadge: Fix react warning (#107768) 2025-07-08 14:40:13 +02:00
365234c2fe PublicDashboards: Use API to render public dashboard badge (#107638)
* PublicDashboards: Use API to render public dashboard badge

* i18n

* Keine console bitte

* Update public/app/features/dashboard-scene/scene/NavToolbarActions.tsx

* Update tests
2025-07-08 13:11:25 +02:00
31b71f79dd Internationalisation: Manual mark up following review (#107625)
* mark up and add confirmText to lint rule

* mark up and add ariaLabel to lint rule

* add confirmText to propertiesToCheck

* mark up and add body to propsToCheck

* mark up latest

* mark up 'Dashboard saved'

* mark up filterbyvalue options

* mark up tooltip options

* mark up and add lint rules for noOptionsMessage/loadingMessage

* mark up 'Convert field type'

* mark up placeholderText/noOptionsMessage

* mark up run query

* mark up variable editor fields

* mark up week start options

* mark up dashboard link options

* mark up prom options

* mark up builder/code toggles

* make CI happy

* kick CI
2025-07-07 16:43:19 +01:00
075770070e Future-proofing query and data source model in Dashboard Schema v2 (#104194)
---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
2025-07-07 15:31:25 +02:00
b9fba95849 Dashboard: Fix cache validation to prevent stale cache (#105918)
* compare dashboard updated at while fetching

* test added

* added created field in dashboard dto meta object for k8s api. fixed cache updation check

* code refactor

* code formatting with prettier

* added created at field in DashboardPageProxy.test.tsx
2025-07-07 14:06:01 +02:00
68cbd23916 Chore: reduces barrel files (#107512)
* Chore: reduce barrel files

* chore: fixes unit test

* chore: fix broken path
2025-07-07 09:23:27 +02:00
17ecd4c051 Update dependency typescript to v5.8.3 (#101501)
* Update dependency typescript to v5.8.3

* get correct window type

* fix @grafana/data

* update lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-07-04 14:43:01 +01:00
93c14c52da Migrations: Compare backend and frontend outputs to ensure feature parity (#106851)
* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Dashboards: Support schemaVersion v33 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

* Refactor to follow Go patterns

* Update logic

* Only write final migration result as output

* Compare backend and frontend results

* Improve snapshots to cover all possible use cases

* Linter

* wip make it consistent v33

* apply feedback

* Return default when the ref cannot be found

* Update apps/dashboard/pkg/migration/schemaversion/v33.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* apply feedback

* Use same mocks backend/frontend

* restore migrations

* update snapshots

* Adapt migration tests to use min versions

* Ensure v40-v41 works

* Ensure v39-v40 works

* Simplify the naming of the files

* adjust jest to new input convention

* Ensure every migration v36-v41 works

* Improve v38 naming

* Ensure v36 migrates correctly

* Skip v36 refs migrations on rows

* Treat rows as frontend and ensure same results for v36

* Ensure v34 runs with the same logic than the frontend

* Leave empty stadistics as valid option

* ensure v33 is working as the frontend

* Update tests

* Undo frontend changes for legend handling

* Remove filtering by version in the frontend

* linter

* Clean up v33 input JSON

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-07-03 12:23:51 +02:00
bfd33467fb Tests: removes jest duplicate manual mock warning (#107459)
* Tests: removes jest duplicate manual mock warning

* Trigger build

* Trigger build
2025-07-02 09:25:25 +02:00
4738957360 Querying: Pass dashboard and panel title as headers (#107032)
* WIP dashboard titile

* Add tests

* Fix tests

* Fix tests

* Remove redundant imports
2025-06-25 13:51:23 +02:00
38fc06a6ff Internationalisation: Mark up panel edit options (#107051)
* markup timeseries panel edit

* mark up matchers ui

* mark up bar chart

* mark up stat panel

* mark up gauge

* mark up bar gauge

* mark up table component

* mark up pie chart

* mark up state timeline

* mark up heatmap

* mark up status history

* mark up histogram

* mark up text panel

* mark up alert list

* mark up dashboard list

* mark up news panel

* mark up annolist

* mark up logs panel

* mark up node-graph

* mark up traces

* mark up trend

* mark up xychart

* fix build
2025-06-24 12:55:55 +01:00
b30f501bff backendsrv: Implement optional URL path fetch sanitize (#106540)
* feat: Implement optional URL path sanitization in BackendSrv methods

* add comment

* revert

* remove namespace import from backendsrv

* change method to validatePath, remove query params and fragments

* Moved validatePath call into fetch and make it throw an error instead

* update pluginSettings tests

* prettier

* Update public/app/features/plugins/pluginSettings.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* change name to validatePath

* fix other tests

* rename property in backend_srv tests

* rename to validatePath in backend_srv, add extra tests

* Move path validation into parseUrlFromOptions

* fix

* Add additional check

* Add test

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-06-20 11:27:53 +01:00
238cff5e8a Dashboard Migrations: V34 CloudWatch Multi-Statistics Migration (#106656)
* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-19 07:03:14 +00:00
b89d52329b Dashboard: Add missing translations save drawer (#106736) 2025-06-16 09:47:11 -03:00
ffc16ee072 Schema: Change how origin filters are added to AdHocVariable (#106086)
* refactor origin filters schema

* add canary version

* update schema

* fix failing tests

* refactor

* remove autogenerated import

* tests

* maintain only dashboard originated filters

* refactor

* refactor

* Schema: Persist defaultValue for groupBy in schema (#106542)

* persist defaultValue for groupBy in schema

* fix

* type

* refactor

* refactor

* bump scenes
2025-06-16 11:15:00 +03:00
f9fb9d268f Restore dashboards: Add API client endpoints (#106435)
* Dashboards: Add restore endpoints to the API

* Fix unified api

* Fix resource version

* Add tests

* Update api

* Update type guards

* Update comments

* Add missing type

* Cleanup

* Move spec checking logic to v1 client

* Handle mixed versions in deleted dbs list

* Update tests

* comment

* type
2025-06-12 15:49:55 +03:00
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
1c6e08fa24 RepeatRowSelect2: Use Combobox instead of deprecated Select component (#106170)
* RepeatRowSelect: Use Combobox instead of deprecated Select component

* Add test (broken)

* Don't disable combobox if repeat is set

* Run i18n-extract

* add mockGetBoundingClientRect to combobox test

---------

Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2025-06-10 16:11:20 +01:00
cbb828202a FolderPicker: Remove old folder picker (#105374)
* Remove newFolderPicker toggle

* Remove usage of the old folder picker

* fix some tests

* remove old test
2025-06-10 16:01:48 +02:00
1564e1bac9 URLParams: Stringify true values as key=true always (fixes issues with variables with true value) (#106440)
* Restore prev fix

* added one more test

* Fix linkUrl issue
2025-06-10 12:08:08 +02:00
c30765bbea Dashboards: A11y improvements for edit experience (#106321)
* Dashboards: A11y improvements for edit experience

* Pass descriptor to render function
2025-06-05 16:15:31 +02:00
e7103dc1f5 Dashboard: Fixes issue with dashboard links that include all variables (#106356)
Revert "URLParams: Stringify true values as key=true always (#97346)"

This reverts commit 437f3ff93667b0b0e7dfb41b2875541de5c77e97.
2025-06-05 14:11:14 +02:00
edf5f9fc7c Dashboards: Improve a11y for dashboard title/description inputs (#106294) 2025-06-04 10:58:11 +01:00
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
7bfa78c6e6 I18n: Update eslint rule to catch some untranslated object properties (#105072) 2025-05-28 21:14:43 +01:00
84ddf7b320 Public Dashboard: Updated list of plugins that support public dashboard (#104910) 2025-05-27 17:19:28 -03:00
4f18ad30c9 SchemaV2: Remove legacy rows from schema v2. (#105238)
* save transparent setting

* make sure we test both transparent and non transparent

* no more legacy rows

* schema changes

* Add testing, fix first row offset

* Remove legacy row from transform test

* Remove panel that's not present in layout

* Remove expects after removing the row, fix lint issues

* Remove unused commit

* update codegen

* update openapi snapshot

* Fix snapshot

* add missing default prop

* Fix repeating, fix first row, fix not flushing last row

* Use correct repeater

* fix lint, remove unused empty check

* update codegen

* update openapi test snapshot
2025-05-26 14:33:30 +02:00
0cb6f9584b Restore dashboards: Re-enable FE feature toggle (#105820)
* Add dashboardRestore toggle

* Restore the toggle on FE

* Add navtree item

* Fix lint

* Rename feature toggle

* Use the renamed toggle
2025-05-23 17:35:54 +03:00
d11d8ec111 Dashboards: Make serializer a single source of truth for passing k8s props on save (#105576)
* make serializer a single source of truth for passing k8s props on save

* remove resourceVersion when updating

* don't pass result.version to resourceVersion

* remove k8s update on saveCompleted from dash scene
2025-05-21 07:24:41 -06:00
437f3ff936 URLParams: Stringify true values as key=true always (#97346) 2025-05-21 07:57:33 +03:00
03f1bb950b DashboardSchemaV2: add missing allowCustomValue property in variables (#105416)
* add missing allowCustomValue property to variables in schema V2

* fix K8s Codegen Check

* updade snapshots for backend tests
2025-05-20 11:50:46 +01:00
8cb9f0a36c Dashboard: Use metadata.generation for dash version in v1 (#105499) 2025-05-16 10:00:34 +03:00
da24ad06bd Provisioning: Hide full path for classic provisioing resources (#105440) 2025-05-15 16:01:12 +00:00