* 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>
126 lines
2.5 KiB
JSON
126 lines
2.5 KiB
JSON
{
|
|
"title": "V37 Legend Normalization Test Dashboard",
|
|
"schemaVersion": 36,
|
|
"panels": [
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Panel with Boolean Legend True",
|
|
"id": 1,
|
|
"options": {
|
|
"legend": true
|
|
}
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Panel with Boolean Legend False",
|
|
"id": 2,
|
|
"options": {
|
|
"legend": false
|
|
}
|
|
},
|
|
{
|
|
"type": "graph",
|
|
"title": "Panel with Hidden DisplayMode",
|
|
"id": 3,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "hidden",
|
|
"showLegend": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Panel with ShowLegend False",
|
|
"id": 4,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "table",
|
|
"showLegend": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "barchart",
|
|
"title": "Panel with Table Legend",
|
|
"id": 5,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "table",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "histogram",
|
|
"title": "Panel with List Legend",
|
|
"id": 6,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "right"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"title": "Panel with No Options",
|
|
"id": 7
|
|
},
|
|
{
|
|
"type": "gauge",
|
|
"title": "Panel with No Legend Config",
|
|
"id": 8,
|
|
"options": {
|
|
"reduceOptions": {
|
|
"fields": "/.*temperature.*/"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "piechart",
|
|
"title": "Panel with Null Legend",
|
|
"id": 9,
|
|
"options": {
|
|
"legend": null
|
|
}
|
|
},
|
|
{
|
|
"type": "row",
|
|
"title": "Row with Nested Panels Having Various Legend Configs",
|
|
"id": 10,
|
|
"collapsed": false,
|
|
"panels": [
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Nested Panel with Boolean Legend",
|
|
"id": 11,
|
|
"options": {
|
|
"legend": true
|
|
}
|
|
},
|
|
{
|
|
"type": "graph",
|
|
"title": "Nested Panel with Hidden DisplayMode",
|
|
"id": 12,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "hidden"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Nested Panel with Conflicting Properties",
|
|
"id": 13,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "table",
|
|
"showLegend": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |