new endpoint to post/get trimmed dashboard json (#33465)

* new endpoint to post/get trimed dashboard json

* add isdisabled check in dashboard.go
This commit is contained in:
ying-jeanne
2021-04-28 19:38:33 +08:00
committed by GitHub
parent 076e2ce06a
commit 748778fff0
19 changed files with 572 additions and 14 deletions
@@ -0,0 +1,35 @@
Verifies common usecases for trimdefault/applydefault functions:
* Basic cases
* Real dashboard
-- CUE --
{
id?: number
uid: string
gnetId?: string
style: *"light" | "dark"
timezone?: *"browser" | "utc"
editable: bool | *true
schemaVersion: number | *25
version?: number
graphTooltip: >=0 & <=2 | *0
}
-- Full --
{
"id": 42,
"uid": "emal8gQMz",
"style": "light",
"editable": true,
"schemaVersion": 27,
"version": 2,
"graphTooltip": 0
}
-- Trimed --
{
"id": 42,
"uid": "emal8gQMz",
"schemaVersion": 27,
"version": 2
}