Files
grafana/pkg/schema/testdata/trimapplydefaults/nestedList.txtar
ying-jeanne 227c8403b5 Fix the disjuction of panels (#39412)
[As code] Correct trim apply defaults when import/export dashboards
2021-10-06 11:39:23 +02:00

46 lines
857 B
Plaintext

Verifies common usecases for trimdefault/applydefault functions:
* Nested struct
* Simple array
-- CUE --
{
annotations?: list: [...{
builtIn: number | *0
datasource: string
enable?: bool | *true
hide?: bool | *false
iconColor?: string
name?: string
type: string | *"dashboard"
rawQuery?: string
showIn: number | *0
}]
}
-- Full --
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
}
]
}
}
-- Trimmed --
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"name": "Annotations & Alerts"
}
]
}
}