Scuemata: Simplify grafana-cli cue validation tests (#33913)
* Simplify tests * Make PanelFieldConfig optional in missing panel scenario
This commit is contained in:
Vendored
+1
@@ -9,6 +9,7 @@ package scuemata
|
||||
#PanelSchema: {
|
||||
PanelOptions: {...}
|
||||
PanelFieldConfig: {...}
|
||||
...
|
||||
}
|
||||
|
||||
// A lineage of panel schema
|
||||
|
||||
Vendored
+2
-1
@@ -8,7 +8,8 @@ package scuemata
|
||||
// the larger Dashboard schema.
|
||||
#PanelSchema: {
|
||||
PanelOptions: {...}
|
||||
PanelFieldConfig: {...}
|
||||
PanelFieldConfig?: {...}
|
||||
...
|
||||
}
|
||||
|
||||
// A lineage of panel schema
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package grafanaschema
|
||||
|
||||
Family: {
|
||||
lineages: [
|
||||
[
|
||||
{
|
||||
PanelOptions: {
|
||||
showStarred: bool | *true
|
||||
showRecentlyViewed: bool | *false
|
||||
showSearch: bool | *false
|
||||
showHeadings: bool | *true
|
||||
maxItems: int | *10
|
||||
query: string | *""
|
||||
folderId?: int
|
||||
tags: [...string] | *[]
|
||||
},
|
||||
PanelFieldConfig: {}
|
||||
}
|
||||
]
|
||||
]
|
||||
migrations: []
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"type": "panel",
|
||||
"name": "Dashboard list",
|
||||
"id": "dashlist",
|
||||
"skipDataQuery": true,
|
||||
"info": {
|
||||
"description": "List of dynamic links to other dashboards",
|
||||
"author": {
|
||||
"name": "Grafana Labs",
|
||||
"url": "https://grafana.com"
|
||||
},
|
||||
"logos": {
|
||||
"small": "img/icn-dashlist-panel.svg",
|
||||
"large": "img/icn-dashlist-panel.svg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ Family: scuemata.#Family & {
|
||||
// TODO must isolate or remove identifiers local to a Grafana instance...?
|
||||
id?: number
|
||||
// Unique dashboard identifier that can be generated by anyone. string (8-40)
|
||||
uid?: string
|
||||
uid: string
|
||||
// Title of dashboard.
|
||||
title?: string
|
||||
// Description of dashboard.
|
||||
|
||||
+5
-4
@@ -7,8 +7,9 @@ package scuemata
|
||||
// rather, they are composed into panel structures as they are defined within
|
||||
// the larger Dashboard schema.
|
||||
#PanelSchema: {
|
||||
PanelOptions: {...}
|
||||
PanelFieldConfig: {...}
|
||||
PanelOptions: {...}
|
||||
PanelFieldConfig?: {...}
|
||||
...
|
||||
}
|
||||
|
||||
// A lineage of panel schema
|
||||
@@ -16,6 +17,6 @@ package scuemata
|
||||
|
||||
// Panel plugin-specific Family
|
||||
#PanelFamily: {
|
||||
lineages: [#PanelLineage, ...#PanelLineage]
|
||||
migrations: [...#Migration]
|
||||
lineages: [#PanelLineage, ...#PanelLineage]
|
||||
migrations: [...#Migration]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user