2021-04-28 19:38:33 +08:00
|
|
|
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": {
|
2021-10-06 11:39:23 +02:00
|
|
|
"list": [
|
|
|
|
{
|
|
|
|
"builtIn": 1,
|
|
|
|
"datasource": "-- Grafana --",
|
|
|
|
"name": "Annotations & Alerts",
|
|
|
|
"showIn": 0,
|
|
|
|
"type": "dashboard"
|
|
|
|
}
|
|
|
|
]
|
2021-04-28 19:38:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-06 11:39:23 +02:00
|
|
|
-- Trimmed --
|
2021-04-28 19:38:33 +08:00
|
|
|
{
|
|
|
|
"annotations": {
|
2021-10-06 11:39:23 +02:00
|
|
|
"list": [
|
|
|
|
{
|
|
|
|
"builtIn": 1,
|
|
|
|
"datasource": "-- Grafana --",
|
|
|
|
"name": "Annotations & Alerts"
|
|
|
|
}
|
|
|
|
]
|
2021-04-28 19:38:33 +08:00
|
|
|
}
|
|
|
|
}
|