Templating: Introduce macros to simplify and optimize some scopedVars (#65317)

* Templating: Introduce macros to simplify and optimize some scopedVars

* Fixing tests

* fix test

* minor fix

* refactoring so macros work with formatting

* remove breaking change and keep current inconsistency

* Rename valueIndex to rowIndex

* Minor fixes

* Added test dashboard

* Added tags to dashboard

* Update

* Added test to check it returns match

* Update

* Fixed dashboard

* fix
This commit is contained in:
Torkel Ödegaard
2023-03-28 19:22:34 +02:00
committed by GitHub
parent 2b73f8cfd5
commit b7b608418d
30 changed files with 1390 additions and 327 deletions
+7
View File
@@ -149,6 +149,13 @@ local dashboard = grafana.dashboard;
id: 0,
}
},
dashboard.new('datadata-macros', import '../dev-dashboards/feature-templating/datadata-macros.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('demo1', import '../dev-dashboards/datasource-testdata/demo1.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{