@ -9,7 +9,7 @@ import (
Family: scuemata.#Family & {
lineages: [
[
{ // 0.0
{// 0.0
// Unique numeric identifier for the dashboard.
// TODO must isolate or remove identifiers local to a Grafana instance...?
id?: number
@ -55,7 +55,10 @@ Family: scuemata.#Family & {
annotations?: list: [...{
builtIn: number | *0
// Datasource to use for annotation.
datasource: string
datasource: {
type?: string
uid?: string
}
// Whether annotation is enabled.
enable: bool | *true
// Whether to hide annotation.
@ -305,7 +308,7 @@ Family: scuemata.#Family & {
}
// Embed the disjunction of all injected panel schema, if any were injected.
if len(compose._panelSchemas) > 0 {
or(compose._panelSchemas) // TODO try to stick graph in here
or(compose._panelSchemas) // TODO try to stick graph in here
}
// Make the plugin-composed subtrees open if the panel is
@ -334,7 +337,10 @@ Family: scuemata.#Family & {
title?: string
// Name of default datasource.
datasource?: string
datasource: {
type?: string
uid?: string
}
gridPos?: {
// Panel
@ -353,6 +359,7 @@ Family: scuemata.#Family & {
// Name of template variable to repeat for.
repeat?: string
}
// Support for legacy graph panels.
#GraphPanel: {
...
@ -384,8 +391,8 @@ Family: scuemata.#Family & {
value_type: *"individual" | "cumulative"
}
}
}
]
},
],
]
compose: {
// Scuemata families for all panel types that should be composed into the
@ -393,8 +400,8 @@ Family: scuemata.#Family & {
Panel: [string]: scuemata.#PanelFamily
// _panelTypes: [for typ, _ in Panel {typ}]
_panelTypes: [ for typ, _ in Panel {typ}, "graph", "row"]
_panelSchemas: [ for typ, scue in Panel {
_panelTypes: [ for typ, _ in Panel {typ}, "graph", "row"]
_panelSchemas: [ for typ, scue in Panel {
for lv, lin in scue.lineages {
for sv, sch in lin {
(_mapPanel & {arg: {
@ -404,7 +411,7 @@ Family: scuemata.#Family & {
}}).out
}
}
}, { type: string }]
}, {type: string }]
_mapPanel: {
arg: {
type: string & !=""