33 Commits

Author SHA1 Message Date
09bbdfe8ab Dashboard Migrations: V35 ensures X-axis visibility in timeseries (#106633)
* Add datasource info provider

* Dashboards: Support schemaVersion v35 migration in backend

* update go mods

---------

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-17 10:38:48 +02: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
4ac248a512 Internationalisation: Mark up panel plugins for translations (#106068)
* config for panel plugin translations

* markup

* tweaks

* prettier

* use data-testid

* rename disable rule now it's been moved

* final markup
2025-05-29 18:13:25 +01:00
10f2b76156 Chore: Update apps codegen to v0.38.2 (#106111) 2025-05-28 12:35:44 +03:00
d4c446f42c Chore: Update k8s.io to v0.33.1 (#105307) 2025-05-28 00:13:18 +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
5cee301e75 GroupByVariable: Add support for default values in schema (#105518)
* update schema

* update schema

* refactor property to singular naming

* bump scenes

* leave scenes to caret version

* add defaultValue to groupBy model

* typo
2025-05-23 01:13:52 +03:00
b1a6860f52 Dashboards: Schema V2 - Rename Annotations 'options' to 'legacyOptions' and Fix stale props (#105266)
* Rename Annotations 'Options' to 'legacyOptions'

* use new legacyOptions in StandardAnnotationQueryEditor

* use new legacyOptions in transformSaveModelSchemaToScene

* use legacyOptions in transformSceneToSaveModelSchemaV2

* Fix bug with ds query editors not taking the latest state

* update snapshot
2025-05-20 17:55:30 +02: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
441fa18590 Chore: Update golang.org/x/ and do not omitempty Items (#105371)
* deps and omitempty Items

* update apis
2025-05-14 14:31:45 +03:00
43d0053c80 K8s: Dashboards: Fix transformation between v1 and v2 (#104502) 2025-04-25 05:06:49 -06:00
73c018b298 Bootdata: Expose grafanaBootData under /bootdata URL (#104258) 2025-04-25 10:50:03 +01:00
faa33e30a9 Schema: Add origin property to AdHocFilterWithLabels (#104320)
* add origin to AdHocFilterWithLabels

* typo

* fix

* use singular for FilterOrigin

* run ./hack/update-codegen.sh

* add canary scenes to verify typechecks

* update dashboard schema json snapshot

* fix

* fix

* update canaries

* fix

* bump scenes version
2025-04-24 11:13:17 +03:00
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
c47ab101d1 Dashboards: Add Dashboard Schema validation (2) (#103844)
* Activate schema validation and align underlying systems

* update to save as v0 if not the right schema version

* Resolve merge conflicts

* Move RequireApiErrorStatus to tests package

* Add mutation tests

* Fix lint

* Only do min version check if dashboard is v1

* Fix lint and disable provisioning test

* Revert provisioning changes

* Revert more tests and add schema test

* Reran gen

* SQL Dashboard save

* Adjust APIVERSION

* Fixed mutation test

* Add logging on downgrade

---------

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-04-11 23:05:41 +02:00
95f04c79cd Dashboards: Add Dashboard Schema validation (1) (#103662) 2025-04-11 16:52:46 +00:00
35e78feffa Dynamic Dashboards: Add repeats for tabs (#103348) 2025-04-11 13:50:44 +03:00
2f60d54648 Dashboard: Schema V2 - Fix annotations losing queries (#102951)
* Fix annotations losing queries when saving v1 with dynamic dashboards enabled

* Add extra options property to the DashboardAnnotationQuerySpec to catch all field datasource-specific properties

* Add options to the v2Alpha1 schema and run make gen-apps

* Add unit test and clean up console.logs

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2025-04-09 18:51:51 +02:00
0e1cb44ad9 Dynamic Dashboard: Redesign conditional rendering [2] (#103112) 2025-04-02 20:50:36 +03:00
9094c73e33 Chore: Rename responsive grid -> AutoGrid (#102959)
* Rename ResponsiveGrid -> AutoGrid in schema

* Rename responsive grid in code

* fix accidental removal of generation

* fix i18n

* fix backend conversion

* run ./hack/update-codegen.sh
2025-03-27 12:16:47 +01:00
3d1497b56a Schema V2: Replace resourceVersion usage with generation (#100080)
* Schema V2: Replace resourceVersion usage with generation

* revert auto generated files

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-03-26 12:47:24 -06:00
e95cd04b25 Dynamic dashboards: Add missing row props to schema (#102859)
* Add missing row props to schema

* Fix test, add tests

* Fix renaming that was done by auto refactoring
2025-03-26 14:49:28 +02:00
c68234f7e7 Add Makefile targets for generating dashboard app code and update it to SDK v0.35.0 (#102796)
* Update dashboard app to use app SDK v0.35.0

What

This change updates dashboard app to use app SDK v0.35.0 and adds new
Makefile target for running codegen for all apps, in opt-in manner.
Currently only dashboards app is opted in.

Additionally, this changes dashboard app Makefile to properly install
and update app SDK versions when generating code, with app SDK version
pinned in the Makefile itself.

Why

The upgrade addresses issues with `DeepCopy` methods, while the Makefile
targets ensure that codegen is easy to run and uses reproducible
environments.

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

* Run make update-workspace

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

* Fix deepcopy methods

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

* Re-run CUE codegen to satisfy the CI

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

* Run make update-workspace

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

* Update to v0.35.1

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

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-26 10:49:52 +02:00
dc922717dc Dashboard: Auto grid options (#102374)
* Dashboard: Auto grid options

* Update

* Fix

* update trans

* Update cue

* Fix persisting auto grid options (#102744)

* Fix persisting auto grid options

* Update i18n

* fix serializer test

* update schema

* reset dashboard_object_gen.go files, run update-codegen.sh

* rename in code

* rename height fill in schema

* rename heightFill fillScreen in code

* fix test

---------

Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
2025-03-25 16:40:28 +01:00
57889a43a7 Dashboards: Update OpenAPI codegen from schema (#102620)
* Dashboards: Update OpenAPI codegen from schema

* GHA: Run the K8s Codegen Check workflow with changes in apps/ folder
2025-03-21 16:49:39 +02:00
8a8b1a0743 DashboardScene: Take selected object into account when adding objects (#102423)
* Dashboard: Add object to selected object

* Try not to nest rows

* Update

* Update

* rows in rows, tabs in tabs

* Update schema to allow nested rows and nested tabs

* fix lint issue

* reset v2alpha1 types from main

* reset dashboard_object_gen.go to main

---------

Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
2025-03-21 14:28:44 +01:00
f2770b0984 Dashboard schema: Add comment about deep copy really being deep copy. (#102586)
help future me
2025-03-21 11:53:29 +02:00
3f270d1de0 K8s/Dashboards: Fix panics in Dashboards v2alpha1 API (#102123)
* K8s/Dashboards: Fix panics in Dashboards v2alpha1 API

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

* Update generated code to use the `MappingType` properly

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

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-17 15:04:11 +02:00
c46565f652 K8s/Dashboard: DeepCopy should deep copy (#102258) 2025-03-17 14:29:18 +03:00
16ca230898 Plugins: Fix better UX for disabled Angular plugins (#101333)
* Feat: better UX for Angular plugins

* Chore: fix i18n

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Chore: fixes after PR feedback

* Test: testing uninstall in cloud

* Chore: fix weird merge

* Chore: fix test import

* Chore: comment out an expec

* Chore: revert test of uninstall on cloud

* Chore: adds tooltip and removes admin message

* Trigger build

* Chore: fix for cloud

* Trigger build

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2025-03-17 06:26:49 +01:00
4420ff9202 SecretsManager: Merge codegen portion so that we can use the dependency elsewhere (#102152)
* copy changes over from feature branch

* update codegen
2025-03-13 18:10:46 -04:00
d07b1851c7 Dynamic dashboards: Persist conditional rendering (#102022)
* Dashboards: Add conditional rendering

* Updates

* Fixes

* Code improvements

* Code improvements

* limit condition choices, add delete and clean up ui

* add basic variable condition

* add conditional rendering based on time range interval

* adjust failing test

* remove deprecated pseudo locale file

* extract conditional rendering from behaviour to state property

* clean up behaviour initialisation

* clean up ts errors

* adjust data condition to account for RowItem

* persist-conditional-rendering

* fix group value name and kind type

* Fix types in base

* minor style fix

* Fix subscribes

* notify change when deleting condition

* fix hidden row item error

* Remove option to have groups in groups

* fix merge issue

* address comments

* subscribe to panel data change in data condition

* Remove loop labels

* only persist conditional rendering if root group has items

* update backend types

* Serialize variable conditional rendering operator as equals notEquals

---------

Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2025-03-13 11:56:20 +01:00
5d2ba10113 K8s/Dashboards: Extract Dashboard APIs to an app submodule (#102029)
* Move dashboard k8s APIs to a separate app

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

* Copy dashboard code in Dockerfile

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

* Fix conversion generation

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

* Update OpenAPI snapshot for dashboard/v0alpha1

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

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-13 11:05:01 +02:00