mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 00:59:31 +08:00
Actually enforce dashboard schema on devenv (#53797)
* Relocate dashboards test so it runs * Cover newer schema versions in stripnulls * Strip nulls and remove iteration fields * Fix fiscalYearStartMonth bounds * Fix up and format dashboard schema * Update thema, tidy Go dependencies
This commit is contained in:
@ -25,7 +25,6 @@
|
|||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": 95,
|
"id": 95,
|
||||||
"iteration": 1652465568602,
|
|
||||||
"links": [],
|
"links": [],
|
||||||
"liveNow": false,
|
"liveNow": false,
|
||||||
"panels": [
|
"panels": [
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": 85,
|
"id": 85,
|
||||||
"iteration": 1652465607869,
|
|
||||||
"links": [],
|
"links": [],
|
||||||
"liveNow": false,
|
"liveNow": false,
|
||||||
"panels": [
|
"panels": [
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -151,8 +150,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -238,8 +236,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -360,4 +357,4 @@
|
|||||||
"uid": "KVxZKdmVz",
|
"uid": "KVxZKdmVz",
|
||||||
"version": 10,
|
"version": 10,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -152,8 +151,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -259,8 +257,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -358,8 +355,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -474,4 +470,4 @@
|
|||||||
"uid": "2xuwrgV7z",
|
"uid": "2xuwrgV7z",
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
||||||
|
@ -3414,8 +3414,7 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green"
|
||||||
"value": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
@ -3489,4 +3488,4 @@
|
|||||||
"uid": "1KxMUdE7k",
|
"uid": "1KxMUdE7k",
|
||||||
"version": 5,
|
"version": 5,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
||||||
|
10
go.mod
10
go.mod
@ -102,11 +102,11 @@ require (
|
|||||||
go.opentelemetry.io/otel/trace v1.6.3
|
go.opentelemetry.io/otel/trace v1.6.3
|
||||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
||||||
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d
|
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d
|
||||||
golang.org/x/net v0.0.0-20220615171555-694bf12d69de // indirect
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||||
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb
|
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb
|
||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
||||||
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
|
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
|
||||||
golang.org/x/tools v0.1.11
|
golang.org/x/tools v0.1.12
|
||||||
gonum.org/v1/gonum v0.11.0
|
gonum.org/v1/gonum v0.11.0
|
||||||
google.golang.org/api v0.74.0
|
google.golang.org/api v0.74.0
|
||||||
google.golang.org/grpc v1.45.0
|
google.golang.org/grpc v1.45.0
|
||||||
@ -227,7 +227,7 @@ require (
|
|||||||
go.opencensus.io v0.23.0 // indirect
|
go.opencensus.io v0.23.0 // indirect
|
||||||
go.uber.org/atomic v1.9.0
|
go.uber.org/atomic v1.9.0
|
||||||
go.uber.org/goleak v1.1.12 // indirect
|
go.uber.org/goleak v1.1.12 // indirect
|
||||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
||||||
golang.org/x/text v0.3.7
|
golang.org/x/text v0.3.7
|
||||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
@ -247,7 +247,7 @@ require (
|
|||||||
github.com/golang-migrate/migrate/v4 v4.7.0
|
github.com/golang-migrate/migrate/v4 v4.7.0
|
||||||
github.com/google/go-github/v45 v45.2.0
|
github.com/google/go-github/v45 v45.2.0
|
||||||
github.com/grafana/dskit v0.0.0-20211011144203-3a88ec0b675f
|
github.com/grafana/dskit v0.0.0-20211011144203-3a88ec0b675f
|
||||||
github.com/grafana/thema v0.0.0-20220726124731-b8017e278cc1
|
github.com/grafana/thema v0.0.0-20220816214754-af057f99a2dd
|
||||||
github.com/jmoiron/sqlx v1.3.5
|
github.com/jmoiron/sqlx v1.3.5
|
||||||
go.etcd.io/etcd/api/v3 v3.5.4
|
go.etcd.io/etcd/api/v3 v3.5.4
|
||||||
go.opentelemetry.io/contrib/propagators/jaeger v1.6.0
|
go.opentelemetry.io/contrib/propagators/jaeger v1.6.0
|
||||||
|
20
go.sum
20
go.sum
@ -1356,8 +1356,8 @@ github.com/grafana/grafana-plugin-sdk-go v0.139.0 h1:2RQKM2QpSaWTtaGN6sK+R7LO7zy
|
|||||||
github.com/grafana/grafana-plugin-sdk-go v0.139.0/go.mod h1:Y+Ps2sesZ62AyCnX+hzrYnyDQYe/ZZl+A8yKLOBm12c=
|
github.com/grafana/grafana-plugin-sdk-go v0.139.0/go.mod h1:Y+Ps2sesZ62AyCnX+hzrYnyDQYe/ZZl+A8yKLOBm12c=
|
||||||
github.com/grafana/saml v0.4.9-0.20220727151557-61cd9c9353fc h1:1PY8n+rXuBNr3r1JQhoytWDCpc+pq+BibxV0SZv+Cr4=
|
github.com/grafana/saml v0.4.9-0.20220727151557-61cd9c9353fc h1:1PY8n+rXuBNr3r1JQhoytWDCpc+pq+BibxV0SZv+Cr4=
|
||||||
github.com/grafana/saml v0.4.9-0.20220727151557-61cd9c9353fc/go.mod h1:9Zh6dWPtB3MSzTRt8fIFH60Z351QQ+s7hCU3J/tTlA4=
|
github.com/grafana/saml v0.4.9-0.20220727151557-61cd9c9353fc/go.mod h1:9Zh6dWPtB3MSzTRt8fIFH60Z351QQ+s7hCU3J/tTlA4=
|
||||||
github.com/grafana/thema v0.0.0-20220726124731-b8017e278cc1 h1:BENUTE1rqYy6gcRdIAbiuSROpAYwmg3aW4CWGqoSIk4=
|
github.com/grafana/thema v0.0.0-20220816214754-af057f99a2dd h1:OukQ1Nu4PSreZTAaOfXyYhM9jYBs4UflVfOSAIG8JzM=
|
||||||
github.com/grafana/thema v0.0.0-20220726124731-b8017e278cc1/go.mod h1:fCV1rqv6XRQg2GfIQ7pU9zdxd5fLRcEBCnrDVwlK+ZY=
|
github.com/grafana/thema v0.0.0-20220816214754-af057f99a2dd/go.mod h1:fCV1rqv6XRQg2GfIQ7pU9zdxd5fLRcEBCnrDVwlK+ZY=
|
||||||
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6 h1:I9dh1MXGX0wGyxdV/Sl7+ugnki4Dfsy8lv2s5Yf887o=
|
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6 h1:I9dh1MXGX0wGyxdV/Sl7+ugnki4Dfsy8lv2s5Yf887o=
|
||||||
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6/go.mod h1:ZkJLEYLoVyg7amJK/5r779bHyzs2AU8f8VMiP6BM7uY=
|
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6/go.mod h1:ZkJLEYLoVyg7amJK/5r779bHyzs2AU8f8VMiP6BM7uY=
|
||||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||||
@ -2842,8 +2842,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su
|
|||||||
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220615171555-694bf12d69de h1:ogOG2+P6LjO2j55AkRScrkB2BFpd+Z8TY2wcM0Z3MGo=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||||
golang.org/x/net v0.0.0-20220615171555-694bf12d69de/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@ -2884,8 +2884,8 @@ golang.org/x/sync v0.0.0-20200930132711-30421366ff76/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -3054,8 +3054,8 @@ golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
||||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
@ -3196,8 +3196,8 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|||||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||||
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
|
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||||
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -251,6 +251,7 @@ interface Dashboard {
|
|||||||
enable: boolean;
|
enable: boolean;
|
||||||
hidden: boolean;
|
hidden: boolean;
|
||||||
refresh_intervals: string[];
|
refresh_intervals: string[];
|
||||||
|
time_options: string[];
|
||||||
};
|
};
|
||||||
timezone?: ('browser' | 'utc' | '');
|
timezone?: ('browser' | 'utc' | '');
|
||||||
title?: string;
|
title?: string;
|
||||||
|
@ -30,7 +30,7 @@ seqs: [
|
|||||||
// Timezone of dashboard,
|
// Timezone of dashboard,
|
||||||
timezone?: *"browser" | "utc" | "" @reviewme()
|
timezone?: *"browser" | "utc" | "" @reviewme()
|
||||||
// Whether a dashboard is editable or not.
|
// Whether a dashboard is editable or not.
|
||||||
editable: bool | *true
|
editable: bool | *true
|
||||||
graphTooltip: #DashboardCursorSync @reviewme()
|
graphTooltip: #DashboardCursorSync @reviewme()
|
||||||
// Time range for dashboard, e.g. last 6 hours, last 7 days, etc
|
// Time range for dashboard, e.g. last 6 hours, last 7 days, etc
|
||||||
time?: {
|
time?: {
|
||||||
@ -49,9 +49,11 @@ seqs: [
|
|||||||
hidden: bool | *false
|
hidden: bool | *false
|
||||||
// Selectable intervals for auto-refresh.
|
// Selectable intervals for auto-refresh.
|
||||||
refresh_intervals: [...string] | *["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
refresh_intervals: [...string] | *["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||||
|
// TODO docs
|
||||||
|
time_options: [...string] | *["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
||||||
} @reviewme()
|
} @reviewme()
|
||||||
// TODO docs
|
// TODO docs
|
||||||
fiscalYearStartMonth?: uint8 & >0 & <13 @reviewme()
|
fiscalYearStartMonth?: uint8 & <13 @reviewme()
|
||||||
// TODO docs
|
// TODO docs
|
||||||
liveNow?: bool @reviewme()
|
liveNow?: bool @reviewme()
|
||||||
// TODO docs
|
// TODO docs
|
||||||
@ -67,9 +69,13 @@ seqs: [
|
|||||||
version?: uint32 @reviewme()
|
version?: uint32 @reviewme()
|
||||||
panels?: [...(#Panel | #RowPanel | #GraphPanel | #HeatmapPanel)] @reviewme()
|
panels?: [...(#Panel | #RowPanel | #GraphPanel | #HeatmapPanel)] @reviewme()
|
||||||
// TODO docs
|
// TODO docs
|
||||||
templating?: list: [...#VariableModel] @reviewme()
|
templating?: {
|
||||||
|
list: [...#VariableModel] @reviewme()
|
||||||
|
}
|
||||||
// TODO docs
|
// TODO docs
|
||||||
annotations?: list: [...#AnnotationQuery] @reviewme()
|
annotations?: {
|
||||||
|
list: [...#AnnotationQuery] @reviewme()
|
||||||
|
}
|
||||||
// TODO docs
|
// TODO docs
|
||||||
links?: [...#DashboardLink] @reviewme()
|
links?: [...#DashboardLink] @reviewme()
|
||||||
|
|
||||||
@ -88,17 +94,17 @@ seqs: [
|
|||||||
// Whether annotation is enabled.
|
// Whether annotation is enabled.
|
||||||
enable: bool | *true @reviewme()
|
enable: bool | *true @reviewme()
|
||||||
// Name of annotation.
|
// Name of annotation.
|
||||||
name?: string @reviewme()
|
name?: string @reviewme()
|
||||||
builtIn: uint8 | *0 @reviewme() // TODO should this be persisted at all?
|
builtIn: uint8 | *0 @reviewme() // TODO should this be persisted at all?
|
||||||
// Whether to hide annotation.
|
// Whether to hide annotation.
|
||||||
hide?: bool | *false @reviewme()
|
hide?: bool | *false @reviewme()
|
||||||
// Annotation icon color.
|
// Annotation icon color.
|
||||||
iconColor?: string @reviewme()
|
iconColor?: string @reviewme()
|
||||||
type: string | *"dashboard" @reviewme()
|
type: string | *"dashboard" @reviewme()
|
||||||
// Query for annotation data.
|
// Query for annotation data.
|
||||||
rawQuery?: string @reviewme()
|
rawQuery?: string @reviewme()
|
||||||
showIn: uint8 | *0 @reviewme()
|
showIn: uint8 | *0 @reviewme()
|
||||||
target?: #Target @reviewme() // TODO currently a generic in AnnotationQuery
|
target?: #Target @reviewme() // TODO currently a generic in AnnotationQuery
|
||||||
} @cuetsy(kind="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
// FROM: packages/grafana-data/src/types/templateVars.ts
|
// FROM: packages/grafana-data/src/types/templateVars.ts
|
||||||
@ -106,8 +112,8 @@ seqs: [
|
|||||||
// TODO what about what's in public/app/features/types.ts?
|
// TODO what about what's in public/app/features/types.ts?
|
||||||
// TODO there appear to be a lot of different kinds of [template] vars here? if so need a disjunction
|
// TODO there appear to be a lot of different kinds of [template] vars here? if so need a disjunction
|
||||||
#VariableModel: {
|
#VariableModel: {
|
||||||
type: #VariableType
|
type: #VariableType
|
||||||
name: string
|
name: string
|
||||||
label?: string
|
label?: string
|
||||||
...
|
...
|
||||||
} @cuetsy(kind="interface") @reviewme()
|
} @cuetsy(kind="interface") @reviewme()
|
||||||
@ -115,16 +121,16 @@ seqs: [
|
|||||||
// FROM public/app/features/dashboard/state/DashboardModels.ts - ish
|
// FROM public/app/features/dashboard/state/DashboardModels.ts - ish
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#DashboardLink: {
|
#DashboardLink: {
|
||||||
title: string @reviewme()
|
title: string @reviewme()
|
||||||
type: #DashboardLinkType @reviewme()
|
type: #DashboardLinkType @reviewme()
|
||||||
icon?: string @reviewme()
|
icon?: string @reviewme()
|
||||||
tooltip?: string @reviewme()
|
tooltip?: string @reviewme()
|
||||||
url?: string @reviewme()
|
url?: string @reviewme()
|
||||||
tags: [...string] @reviewme()
|
tags: [...string] @reviewme()
|
||||||
asDropdown: bool | *false @reviewme()
|
asDropdown: bool | *false @reviewme()
|
||||||
targetBlank: bool | *false @reviewme()
|
targetBlank: bool | *false @reviewme()
|
||||||
includeVars: bool | *false @reviewme()
|
includeVars: bool | *false @reviewme()
|
||||||
keepTime: bool | *false @reviewme()
|
keepTime: bool | *false @reviewme()
|
||||||
} @cuetsy(kind="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
@ -151,18 +157,18 @@ seqs: [
|
|||||||
seriesBy?: #FieldColorSeriesByMode
|
seriesBy?: #FieldColorSeriesByMode
|
||||||
} @cuetsy(kind="interface") @reviewme()
|
} @cuetsy(kind="interface") @reviewme()
|
||||||
|
|
||||||
#GridPos: {
|
#GridPos: {
|
||||||
// Panel
|
// Panel
|
||||||
h: uint32 & >0 | *9 @reviewme()
|
h: uint32 & >0 | *9 @reviewme()
|
||||||
// Panel
|
// Panel
|
||||||
w: uint32 & >0 & <=24 | *12 @reviewme()
|
w: uint32 & >0 & <=24 | *12 @reviewme()
|
||||||
// Panel x
|
// Panel x
|
||||||
x: uint32 & >=0 & <24 | *0 @reviewme()
|
x: uint32 & >=0 & <24 | *0 @reviewme()
|
||||||
// Panel y
|
// Panel y
|
||||||
y: uint32 & >=0 | *0 @reviewme()
|
y: uint32 & >=0 | *0 @reviewme()
|
||||||
// true if fixed
|
// true if fixed
|
||||||
static?: bool @reviewme()
|
static?: bool @reviewme()
|
||||||
} @cuetsy(kind="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#Threshold: {
|
#Threshold: {
|
||||||
@ -343,11 +349,11 @@ seqs: [
|
|||||||
overrides: [...{
|
overrides: [...{
|
||||||
matcher: {
|
matcher: {
|
||||||
id: string | *"" @reviewme()
|
id: string | *"" @reviewme()
|
||||||
options?: _ @reviewme()
|
options?: _ @reviewme()
|
||||||
}
|
}
|
||||||
properties: [...{
|
properties: [...{
|
||||||
id: string | *"" @reviewme()
|
id: string | *"" @reviewme()
|
||||||
value?: _ @reviewme()
|
value?: _ @reviewme()
|
||||||
}]
|
}]
|
||||||
}] @reviewme()
|
}] @reviewme()
|
||||||
}
|
}
|
||||||
@ -355,9 +361,9 @@ seqs: [
|
|||||||
|
|
||||||
// Row panel
|
// Row panel
|
||||||
#RowPanel: {
|
#RowPanel: {
|
||||||
type: "row" @reviewme()
|
type: "row" @reviewme()
|
||||||
collapsed: bool | *false @reviewme()
|
collapsed: bool | *false @reviewme()
|
||||||
title?: string @reviewme()
|
title?: string @reviewme()
|
||||||
|
|
||||||
// Name of default datasource.
|
// Name of default datasource.
|
||||||
datasource?: {
|
datasource?: {
|
||||||
@ -366,7 +372,7 @@ seqs: [
|
|||||||
} @reviewme()
|
} @reviewme()
|
||||||
|
|
||||||
gridPos?: #GridPos
|
gridPos?: #GridPos
|
||||||
id: uint32 @reviewme()
|
id: uint32 @reviewme()
|
||||||
panels: [...(#Panel | #GraphPanel | #HeatmapPanel)] @reviewme()
|
panels: [...(#Panel | #GraphPanel | #HeatmapPanel)] @reviewme()
|
||||||
// Name of template variable to repeat for.
|
// Name of template variable to repeat for.
|
||||||
repeat?: string @reviewme()
|
repeat?: string @reviewme()
|
||||||
|
@ -158,6 +158,7 @@ const (
|
|||||||
// Equivalent Go types at stable import paths are provided in https://github.com/grafana/grok.
|
// Equivalent Go types at stable import paths are provided in https://github.com/grafana/grok.
|
||||||
type Model struct {
|
type Model struct {
|
||||||
Annotations *struct {
|
Annotations *struct {
|
||||||
|
// TODO docs
|
||||||
List []ModelAnnotationQuery `json:"list"`
|
List []ModelAnnotationQuery `json:"list"`
|
||||||
} `json:"annotations,omitempty"`
|
} `json:"annotations,omitempty"`
|
||||||
|
|
||||||
@ -197,6 +198,7 @@ type Model struct {
|
|||||||
// Tags associated with dashboard.
|
// Tags associated with dashboard.
|
||||||
Tags *[]string `json:"tags,omitempty"`
|
Tags *[]string `json:"tags,omitempty"`
|
||||||
Templating *struct {
|
Templating *struct {
|
||||||
|
// TODO docs
|
||||||
List []ModelVariableModel `json:"list"`
|
List []ModelVariableModel `json:"list"`
|
||||||
} `json:"templating,omitempty"`
|
} `json:"templating,omitempty"`
|
||||||
|
|
||||||
@ -220,6 +222,9 @@ type Model struct {
|
|||||||
|
|
||||||
// Selectable intervals for auto-refresh.
|
// Selectable intervals for auto-refresh.
|
||||||
RefreshIntervals []string `json:"refresh_intervals"`
|
RefreshIntervals []string `json:"refresh_intervals"`
|
||||||
|
|
||||||
|
// TODO docs
|
||||||
|
TimeOptions []string `json:"time_options"`
|
||||||
} `json:"timepicker,omitempty"`
|
} `json:"timepicker,omitempty"`
|
||||||
|
|
||||||
// Timezone of dashboard,
|
// Timezone of dashboard,
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package dev_dashboards
|
package dashboard_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@ -16,9 +17,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestDevenvDashboardValidity(t *testing.T) {
|
func TestDevenvDashboardValidity(t *testing.T) {
|
||||||
m, err := themaTestableDashboards()
|
path, err := filepath.Abs("../../../devenv/dev-dashboards")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
cm, err := dashboard.ProvideCoremodel(cuectx.ProvideThemaLibrary())
|
|
||||||
|
m, err := themaTestableDashboards(os.DirFS(path))
|
||||||
|
require.NoError(t, err)
|
||||||
|
cm, err := dashboard.New(cuectx.ProvideThemaLibrary())
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
for path, b := range m {
|
for path, b := range m {
|
||||||
@ -41,9 +45,8 @@ func TestDevenvDashboardValidity(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func themaTestableDashboards() (map[string][]byte, error) {
|
func themaTestableDashboards(in fs.FS) (map[string][]byte, error) {
|
||||||
m := make(map[string][]byte)
|
m := make(map[string][]byte)
|
||||||
in := DevDashboardFS
|
|
||||||
|
|
||||||
err := fs.WalkDir(in, ".", func(path string, d fs.DirEntry, err error) error {
|
err := fs.WalkDir(in, ".", func(path string, d fs.DirEntry, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -67,7 +70,10 @@ func themaTestableDashboards() (map[string][]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jtree := make(map[string]interface{})
|
jtree := make(map[string]interface{})
|
||||||
json.Unmarshal(b, &jtree)
|
err = json.Unmarshal(b, &jtree)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if oldschemav, has := jtree["schemaVersion"]; !has || !(oldschemav.(float64) > dashboard.HandoffSchemaVersion-1) {
|
if oldschemav, has := jtree["schemaVersion"]; !has || !(oldschemav.(float64) > dashboard.HandoffSchemaVersion-1) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
@ -7,7 +7,7 @@
|
|||||||
SED=$(command -v gsed)
|
SED=$(command -v gsed)
|
||||||
SED=${SED:-"sed"}
|
SED=${SED:-"sed"}
|
||||||
|
|
||||||
FILES=$(grep -rl '"schemaVersion": 3[3456]' devenv)
|
FILES=$(grep -rl '"schemaVersion": 3[3456789]' devenv)
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
for DASH in ${FILES}; do echo "${DASH}"; grep -v 'null,$' "${DASH}" > "${DASH}-nulless"; mv "${DASH}-nulless" "${DASH}"; done
|
for DASH in ${FILES}; do echo "${DASH}"; grep -v 'null,$' "${DASH}" > "${DASH}-nulless"; mv "${DASH}-nulless" "${DASH}"; done
|
||||||
|
Reference in New Issue
Block a user