Commit Graph

62 Commits

Author SHA1 Message Date
Paul Marbach
63bfc1596c Gauge: Updates to the design of the panel edit (#115097)
* Gauge: Updates to the design of the panel edit

* i18n

* remove unused const

* i18n

* fix gdev and migration tests

* reduce bar gauge glow factor
2025-12-10 21:03:44 +00:00
Ivan Ortega Alba
40fb421556 Schema: Implement v2beta1 → v2alpha1 conversion (#113876) 2025-11-19 15:56:33 +01:00
Ivan Ortega Alba
e463781077 Schema: convert dashboards from v1beta1 to v2beta1 (#109037)
- Implement full conversion pipeline from v1beta1 → v2beta1
- Ensure frontend–backend parity for all dashboard serialization paths
- Add automatic data loss detection for conversions (panels, queries, annotations, links, variables)
- Extract atomic conversion functions for v0 → v1beta1 → v2alpha1 → v2beta1
- Introduce conversion metrics and detailed logging for loss tracking
- Normalize datasource resolution, defaults, and annotation processing
- Improve panel layout serialization and y-coordinate normalization
- Fix inconsistencies in nested panels and collapsed row behavior
- Refine variable handling:
  - Filter refId from variable query specs
  - Default variable refresh to 'never' (matches frontend)
  - Fix constant and interval variable handling for missing queries
- Unify schema defaults (enable, hide, iconColor, editable, liveNow)
- Fix pluginId usage (UID vs type) and datasource references
- Fix metrics.go bug swallowing errors (return nil → return err)
- Add tests for version-specific conversion error handling
- Add data loss detection tests using source/target version comparison
- Clean up lint issues, legacy code, and redundant files
- Update OpenAPI snapshots and migrated dashboards
- Improve backend migrator to reuse datasource provider and match frontend logic

Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-11-12 11:43:46 +01:00
Galen Kistler
8149f586b3 Annotations: Multi-lane annotations rendering (lane per frame) (#111559)
* feat: support multi-lane annotations panel option

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-11-05 09:00:28 -06:00
Paul Marbach
867e8bb98f StatusHistory: Add e2e suite to confirm standard cases (#113358)
* StatusHistory: Add e2e suite to confirm standard cases

* update dev dashbord tests

* update CODEOWNERS
2025-11-04 16:21:30 -04:00
Paul Marbach
64da716a2e Heatmap: Fix runtime error when no data is present, add e2e test (#113242)
* Heatmap: Fix runtime error when no xAxis is present, add e2e test

* update migration test fixture

* updates from review
2025-10-31 18:17:30 +00:00
Paul Marbach
c487952279 Table: Support DataLinks and Actions in SparklineCell (#112244)
* Table: Support DataLinks in SparklineCell

* add data links to sparkline gdev

* fix migrator test

* Clean up single action use case
2025-10-30 10:04:08 -04:00
Paul Marbach
2a5ce2f031 Gauge: Fix migration version targeting and gdev dashboard (#112974) 2025-10-28 09:31:20 -04:00
Paul Marbach
3f02f50cf9 StateTimeline: Complete E2E tests and add simple StateTimelineTooltip unit tests (#112901)
* StateTimeline: E2E tests for basic rendering, no data, and tooltip interactions

* Add tests for StateTimelineTooltip sub-component

* Remove unused import from state-timeline.spec.ts

* updates from PR review
2025-10-24 10:45:48 -04:00
Torkel Ödegaard
27ac08dd51 NewGauge: Fix segmented gauge with min value != 0 (#112697)
* NewGauge: Fix segmented gauge with min value != 0

* update gdev dashboard to exercise case

* update gdev dashboard with panel to exercise

* update

---------

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
2025-10-21 17:49:04 +02:00
Torkel Ödegaard
7df537c9fc NewGauge: Adds new feature toggle named newGauge (#112593)
* NewGauge: Feature toggle and fixes

* Gauge: New migration test dashboard

* Update

* Updates

* Tweaked default barWidth

* Fix multi data links

* remove sizing options

* merge fix

* Update

* Restore

* Update

* Tweaked name font size logic

* use file snapshots instead of inline

---------

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
2025-10-20 18:33:19 +02:00
Torkel Ödegaard
e014f1ba0c NewGauge: Adds scale labels (threshold labels) (#112517)
* Progress on scale label

* Progress

* Progress on labels

* Progress

* fix for segments

* Update

* Fix

* Update

* Some basic unit tests

* fixes

* fixes
2025-10-17 13:51:54 +02:00
Todd Treece
30d79476cd App SDK: Update to v0.47.0 (#112519) 2025-10-16 15:41:41 +00:00
Torkel Ödegaard
77e571b079 RadialGauge: (#111841)
* Radial gauge

* Update

* Update

* Update

* Updated

* Progress

* Spotlight

* Glow

* More effects

* Update

* Update

* Update

* Update

* Fix overflow

* Progress

* Progress

* Barwidth factor

* Update

* segmemnted

* Update

* Update

* Update

* Display processor

* Progress

* Updated

* Update

* rounded bars option

* added option for rounded

* Fixed gauge shape and segments

* Updated text and sparkline placmeent

* progress

* New spotlight effect is working

* refactorings

* Update

* hue working in gauge mode

* Update

* Update

* Progress

* Refactorings and sizing improvements

* Refactorings

* Progress

* Unify arc path

* Thresholdsbar

* Update

* Progress

* Update

* Close to mergable

* Unit tests

* Update

* Update

* Fix

* Update

* update

* simple test

* Fix

* Minor tweak

* added icon to shape

* Progress on color simplification

* progress on new color system

* Simplify color gradient modes around a single auto mode

* Progress on text sizing

* Fixes

* Update

* Update

* Hook up manual font size

* Restore old behavior in old panel
2025-10-16 15:53:38 +02:00
Ivan Ortega Alba
ebd0d334bc Dashboards: Fix preload field not being persisted via /v1beta1 (#112475) 2025-10-16 12:45:29 +02:00
Haris Rozajac
d9067b27eb Dashboard Migrations: V2 - legacy services.filter and graphite panel type (#112282)
* migrate to v2

* Fix tests

* graphite panels should be auto-migrated

* lint

* Provisioning: Fix dashboard export to preserve original API version

* Add error handling for the edge case where conversion fails but no
storedVersion is available.
2025-10-15 10:34:12 -06:00
Haris Rozajac
e5ef29c202 Dashboard Migrations: V3 - no-op; remove v3 from DashboardMigrator.ts (#112239) 2025-10-14 18:39:24 -06:00
Haris Rozajac
01c4cb1fac Dashboard Migrations: V4 - no-op and clean up dead code from DashboardMigrator.ts (#112225) 2025-10-14 14:38:31 -06:00
Haris Rozajac
f27900702c Dashboard Migrations: V5 - no-op (#112224)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* migrate to v8

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* snapshots

* wip

* fix test

* remove nav when cleaning up defaults

* migrate to v6

* update comments

* migrate to v5

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

* update snapshot

* update snapshot

* update snapshot

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-14 07:53:13 -06:00
Haris Rozajac
394922c4c8 Dashboard Migrations: V6 pulldowns to annotations; variables (#112221)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* migrate to v8

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* snapshots

* wip

* fix test

* remove nav when cleaning up defaults

* migrate to v6

* update comments

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

* update snapshot

* update snapshot

* remove test

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-14 07:16:34 -06:00
Haris Rozajac
58915bd384 Dashboard Migrations: V7 - nav to timepicker (#112140)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* migrate to v8

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* snapshots

* wip

* fix test

* remove nav when cleaning up defaults

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

* update snapshot

* lint

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-10 13:46:52 -06:00
Haris Rozajac
b232a812ab Dashboard Migrations: V8 - update old influxdb schema (#111423)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* migrate to v8

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* snapshots

* fix test

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

* update snapshot

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-10 12:47:26 -06:00
Haris Rozajac
c67974251d Dashboard Migrations: V9 - singlestat panel thresholds (#111422)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* migrate to v9

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* update

* fix test

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

* update snapshot

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-10 10:39:21 -06:00
Haris Rozajac
01ec8e3a4a Dashboard Migrations: V10 - table panel styles.thresholds (#111420)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* migrate to v10

* add test files

* update

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* add context

* snapshots

* generate snapshots

* fix test

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* update snapshot

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-09 16:36:24 -06:00
Haris Rozajac
bba720557c Dashboard Migrations: v11 - no-op (#111273)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* migrate to v11

* add test files

* update

* add context and fix latest version

* add context

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* snapshots

* fix test

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* update snapshot

* es lint

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-09 14:58:47 -06:00
Haris Rozajac
5c815a1733 Dashboard Migrations: v12 - template variables (#110253)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* migrate to v12

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* update

* add context and fix latest version

* add context

* generate snapshots

* v13 should be no-op

* clean up

* fix tests

* fix test

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

* es int

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-09 13:29:06 -06:00
Haris Rozajac
4d3c5d1550 Dashboard Migrations: V13 no-op, remove 28 and v24 as they are autoMigrations; and remove dead code from DashboardMigrator (#110008)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

* wip

* complete migration

* fix lint issues

* refactor and test with minimal graph config

* update tests

* extract defaults outside the func

* lint

* lint

* add missing showValues prop

* add context and fix latest version

* generate snapshots

* v13 should be no-op

* clean up

* remove v28

* remove singlestat migraiton from frontend migrator because this is an automigration

* remove unused function

* Remove v24 table plugin logic

* cleanup

* remove plugin version for automigrate as it was used only in v24 and v28 that have been removed

* cleanup

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-10-09 11:14:02 -06:00
Dominik Prokop
825f8fc7ff Dashboard migrations: Fix span: 0 bug and panel ordering in v16 dashboard migration (#112051)
Fix span: 0 bug and panel ordering in v16 dashboard migration

Fix span: 0 handling to match frontend behavior by defaulting to DEFAULT_PANEL_SPAN.
Fix panel ordering issue by using stable sort instead of unstable sort.
Fix collapsed property handling to only set when input row has collapse property.
Add comprehensive test cases for span: 0 bug and collapsed property behavior.
Add sanitized test input file for span: 0 demo dashboard with generic values instead of internal Grafana infrastructure references.

All backend migration tests and frontend comparison tests pass.
2025-10-06 13:29:33 +02:00
Ivan Ortega Alba
6d2fa6c583 Dashboard: Backend always set metricEditorMode: 0 regardless metricQueryType and expression (#111613)
- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration

* Fix v34 CloudWatch migration backend-frontend inconsistencies

- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration

* Improve v34 CloudWatch migration test coverage

- Add targeted tests for hasOwnProperty logic coverage
- Add comprehensive getSuffixForStat coverage (all data types)
- Add generateNextRefId double letter generation tests
- Simplify test cases while maintaining full coverage
- Achieve 93%+ coverage on all critical v34 functions
- Remove redundant test cases for better maintainability

* Clean up v34 CloudWatch migration code

- Remove unnecessary comments and documentation
- Simplify function signatures and logic
- Maintain functionality while improving readability
- Keep essential logic intact with cleaner code

* Only remove unnecessary comments
2025-09-29 11:35:58 +02:00
Ivan Ortega Alba
a72e02f88a Fix dashboard migration discrepancies between backend and frontend implementations (use toEqual) (#110268)
**Highlights**

* **Single-version migrations**: add `targetVersion` to migrator & model, separate outputs, enforce exact version.
* **Datasource fixes**: include `apiVersion` in tests, empty-string → `{}`, preserve `{}` refs, drop unwanted defaults.
* **Panel defaults & nesting**: only top-level panels get defaults; preserve empty `transformations` context-aware; filter repeated panels.

* **Migration parity**

  * V16: collapsed rows, grid height parsing (`px`).
  * V17: omit `maxPerRow` when `minSpan=1`.
  * V19–V20: cleanup defaults (`targetBlank`, style).
  * V23–V24: template vars + table panel consistency.
  * V28: full singlestat/stat parity, mappings & color.
  * V30–V36: threshold logic, empty refs, nested targets.
* **Save-model cleanup**: replicate frontend defaults/filtering, drop null IDs, metadata, unused props.
* **Testing**: unified suites, dev dashboards (v42), full unit coverage for major migrations.

Co-authored-by: Ivan Ortega [ivanortegaalba@gmail.com](mailto:ivanortegaalba@gmail.com)
Co-authored-by: Dominik Prokop [dominik.prokop@grafana.com](mailto:dominik.prokop@grafana.com)
2025-09-24 12:20:25 +02:00
Dominik Prokop
b4e63c36c3 Migration v42: HideFrom tooltip consistency migration (#110517)
* Migration to be verified: v42 HideFrom tooltip migration

* snap update

* make gen cue

* Add comments of 42 being the final version
2025-09-05 15:07:30 +02:00
Ryan McKinley
8052ecb3ba Dashboards: Remove panel plugin provider from migrations (#110477) 2025-09-04 14:17:22 +03:00
Alex Spencer
6c9faa7595 TableNG: Footer enhancements (#102948)
* Table: Footer support for multiple reducers

* fix migrator test output due to required default value

* fix go migration test

* more go test fixes

* fix go tests for footer

* Merge #110062

* update migration dashboard

* Small docs fixes

* Small docs fix

* remove migration method in Go, update js unit test

* add migration dashboard for footer and clean up some issues with countAll

* Footer should always use og rows for calcs

* update footer to be unaffected by filtering and sorting

* more e2es

* add more complex footer to kitchen sink, migrate panel all the way up

* update codeowners for e2e

* relocate footer migration panels and e2es to main 12.2 migration dashboard

* go further with the migration; kill unused fields, rename reducer to reducers

* get the go code up to date, move enablePagination to its own option as well

* add a unit to one of the numeric columns with a footer in kitchen sink

* fix reducers override in kitchen sink migration table

---------

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-09-03 18:03:33 -04:00
Dominik Prokop
7324087273 Dashboard migration: v14 Broken dash repro (#110405)
* Broken dash repro

* Fix V16 migration to preserve panels when rows array is empty

- Fixed bug where panels were deleted when migrating dashboards with empty rows array
- Updated v16.go to match frontend implementation behavior
- Added test case for empty rows scenario in v16_test.go
- Renamed test files to v16.empty-rows-and-panels-array.json for clarity
- All migration tests passing (419 test cases)
2025-09-01 13:02:59 +00:00
Paul Marbach
76b1e5e389 Table: Migrate to field-level wrapText toggle, use standard hideFrom.viz for hidden fields (#109297)
* Added wrap text to table options and removed from multiple cell options

* Removed wrap text from cell options shared file

* Edited

* Edited

* Table: Migrate to field-level wrapText toggle

* migrate hidden -> hideFrom.viz as well

* more cleanup from rebase

* restore options that got killed in the rebase

* when wrap text is enabled for the whole table, exclude columns that do not make sense

* fix TableNG unit tests

* fix i18n

* unit tests for the migrations

* sort out e2e issue

* fix migration unit test

* fix backend migration test as well

* add a dashboard for the v12.2 table migrations

* update dev-dashboards.lisonnet

* make gen-jsonnet

* one of the panel versions didnt get updated

---------

Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
2025-08-27 16:37:02 -04:00
Paul Marbach
ec38e0bd58 Table: Enable tableNextGen by default (#109832)
* Table: Enable tableNextGen by default

* kill off tableNextGen feature flag

* i18n

* i18n

* i18n

* remove state beta from table panel

* fix migration for 0 decimals migration

* add explicit auto option bacjk

* match impl from previous migrations code

* try changing some selectors

* remove timezone test from Cypress

* fix PlaylistForm unit test

* fix some selectors

* clean up i18n, are these gridcells somehow?

* return a couple of selectors caught in the dragnet to being cell instead of gridcell

* fix i18n for en-US

* clean up gdevs now that wrapHeaderText has no default

* update role in e2e for when it is re-enabled
2025-08-26 17:25:16 -04:00
Ivan Ortega Alba
a7e4447d0e DashboardMigration: V16 was removing panels when repeatInteration is null (#110151) 2025-08-26 14:20:22 +02:00
Dominik Prokop
86aa5dca11 Migration v14: Shared crosshair to graph tooltip migration (#109606)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Migration to be verified: 14 Shared crosshair to graph tooltip migration

* cleanup

---------

Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-08-21 16:44:14 -06:00
Dominik Prokop
af1b878cb7 Migration v15: No-op migration for schema consistency (#109604)
* migrate to v19

* migrate to v18

* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Migration to be verified: 15 No-op migration for schema consistency

* Update v27.go

* Update v16.go

* cleanup

---------

Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-08-20 19:01:45 +00:00
Dominik Prokop
49739618fa Dashboard Migrations v16: Grid layout migration (#109603)
* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Address review comments: use Go idiom for variable naming and sort.Ints for sorting

* Migration to be verified: 16 Grid layout migration

* Refactor v17 and v19 migrations to use shared helper functions

* Address reviews comments

---------

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-08-20 17:31:32 +00:00
Dominik Prokop
4e5a51968f Dashboard Migrations v17: Convert minSpan to maxPerRow in panels (#109592)
* Migration to be verified: v17 Convert minSpan to maxPerRow in panels

* Address review comments: use Go idiom for variable naming and sort.Ints for sorting
2025-08-18 08:02:37 -06:00
Haris Rozajac
4a3b8a567f Dashboard Migrations: v18 - gauge options (#109496)
* migrate to v19

* migrate to v18

* Update v19.go
2025-08-13 15:01:50 -06:00
Haris Rozajac
d84408e52d Dashboard Migrations: v19 - panel links (#109495)
* migrate to v19

* clean up

* apply feedback
2025-08-13 13:51:19 -06:00
Ivan Ortega Alba
63bab8076d Dashboards Migrations: V24 set defaults when no thresholds are defined (#109402) 2025-08-11 11:55:19 +02:00
Dominik Prokop
09d6d97535 Dashboard Migrations: V20 variable syntax migration for data links and field options (#109203)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-08-08 09:46:34 +00:00
Haris Rozajac
8f2d27044d Dashboard Migrations: V21 data links (#108950)
---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-08-08 08:55:32 +00:00
Haris Rozajac
abdf1943b9 Dashboard Migrations: V22 table panel styles - set property to 'auto' (#108949)
* 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

* wip

* Fix tests

* fix output

* wip

* fix min version issue

* fix wire

* ignore gauge logic as it never get's executed

* add panel migration to test

* improvements

* update

* cleanup

* address mappings inconsistencies

* cleanup

* fix lint issues

* add cfg when initializing

* v27 migration

* migrate to v26

* preallocate array

* remove logic for grafana-singlestat because it's shared with stat logic; improve error handling and testing

* fix go lint

* don't preallocate; cleanup comments

* cleanup

* wip

* run internal provider function when getting a single panel

* clean up; add tests

* add tests for panel plugin service

* remove obsolete mock for getting panel plugin

* add tests for the whole pipeline

* fix test and lint

* migrate to v23

* migrate to v22

* refactor

* fix test

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-08-08 08:03:02 +00:00
Haris Rozajac
4b78e54304 Dashboard Migrations: V23 handle variable multi and current properties (#108937)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-08-07 22:41:42 +00:00
Haris Rozajac
6ca8c6c6da Dashboard Migrations: v25 & v24; migrate angular table (#108826)
* 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

* wip

* Fix tests

* fix output

* wip

* fix min version issue

* fix wire

* ignore gauge logic as it never get's executed

* add panel migration to test

* improvements

* update

* cleanup

* address mappings inconsistencies

* cleanup

* fix lint issues

* add cfg when initializing

* v27 migration

* migrate to v26

* preallocate array

* remove logic for grafana-singlestat because it's shared with stat logic; improve error handling and testing

* fix go lint

* don't preallocate; cleanup comments

* cleanup

* wip

* run internal provider function when getting a single panel

* clean up; add tests

* add tests for panel plugin service

* remove obsolete mock for getting panel plugin

* add tests for the whole pipeline

* fix test and lint

* fix test

* Fix missing scenarios

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-08-07 14:14:39 -06:00
Ivan Ortega Alba
d1cff535d2 Schema V2: Snapshot testing for migrations should fail when output doesn't match (#109278)
* Schema v2: Snapshot testing for migration fails when doesn't match

* Update snapshot
2025-08-06 19:50:21 +00:00