Chore: Move dev-dashboards jsonnet into separate directory (#58619)
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
include ../../.bingo/Variables.mk
|
||||
|
||||
DASHBOARDS = $(shell find ./ -type f -name '*.json')
|
||||
TEMPLATES = $(shell find ./ -type f -name '*.tmpl')
|
||||
|
||||
vendor: jsonnetfile.json jsonnetfile.lock.json
|
||||
$(JB) install
|
||||
|
||||
gen.libsonnet: $(DASHBOARDS) $(TEMPLATES) vendor gen.go
|
||||
go generate ./
|
||||
|
||||
main.libsonnet: gen.libsonnet
|
||||
@@ -2,8 +2,5 @@ package dev_dashboards
|
||||
|
||||
import "embed"
|
||||
|
||||
// generate gen.libsonnet
|
||||
//go:generate go run gen.go
|
||||
|
||||
//go:embed *.json */*.json
|
||||
var DevDashboardFS embed.FS
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"embed"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"sort"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
dev_dashboards "github.com/grafana/grafana/devenv/dev-dashboards"
|
||||
"github.com/grafana/grafana/pkg/codegen"
|
||||
)
|
||||
|
||||
var (
|
||||
OUTPUT_PATH = "gen.libsonnet"
|
||||
EXCLUDE = map[string]struct{}{
|
||||
"jsonnetfile.json": {},
|
||||
"jsonnetfile.lock.json": {},
|
||||
"panel-library.json": {}, // TODO: remove panel-library once importing issue is fixed
|
||||
}
|
||||
)
|
||||
|
||||
//go:embed tmpl/*.tmpl
|
||||
var tmplFS embed.FS
|
||||
|
||||
func main() {
|
||||
g := newGen()
|
||||
out, err := g.generate()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
wd := codegen.NewWriteDiffer()
|
||||
wd[OUTPUT_PATH] = []byte(out)
|
||||
|
||||
if _, set := os.LookupEnv("CODEGEN_VERIFY"); set {
|
||||
err = wd.Verify()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "generated code is not up to date:\n%s\nrun `make gen-jsonnet` to regenerate\n\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
err = wd.Write()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error while writing generated code to disk:\n%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type devDashboard struct {
|
||||
Name string
|
||||
Path string
|
||||
}
|
||||
|
||||
type libjsonnetGen struct {
|
||||
templates *template.Template
|
||||
dashboards []devDashboard
|
||||
}
|
||||
|
||||
func newGen() *libjsonnetGen {
|
||||
tmpls := template.New("codegen")
|
||||
tmpls = template.Must(tmpls.ParseFS(tmplFS, "tmpl/*.tmpl"))
|
||||
return &libjsonnetGen{templates: tmpls}
|
||||
}
|
||||
|
||||
func (g *libjsonnetGen) generate() (string, error) {
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
if err := g.readDir("."); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
sort.SliceStable(g.dashboards, func(i, j int) bool {
|
||||
return g.dashboards[i].Name < g.dashboards[j].Name
|
||||
})
|
||||
|
||||
vars := struct {
|
||||
Dashboards []devDashboard
|
||||
}{g.dashboards}
|
||||
|
||||
if err := g.templates.Lookup("gen.libsonnet.tmpl").Execute(buf, vars); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
func (g *libjsonnetGen) readDir(dir string) error {
|
||||
files, err := dev_dashboards.DevDashboardFS.ReadDir(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, f := range files {
|
||||
if _, skip := EXCLUDE[f.Name()]; skip {
|
||||
continue
|
||||
}
|
||||
|
||||
if f.IsDir() {
|
||||
if err := g.readDir(path.Join(dir, f.Name())); err != nil {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
name := strings.TrimSuffix(f.Name(), ".json")
|
||||
if len(name) > 40 {
|
||||
name = name[:40]
|
||||
}
|
||||
|
||||
g.dashboards = append(g.dashboards, devDashboard{
|
||||
Path: path.Join(dir, f.Name()),
|
||||
Name: name,
|
||||
})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,713 +0,0 @@
|
||||
// This file is autogenerated. DO NOT EDIT.
|
||||
// Generated by gen.go
|
||||
// Run `make gen-jsonnet` from repository root to regenerate.
|
||||
|
||||
local grafana = import "grizzly/grafana.libsonnet";
|
||||
local resource = import "grizzly/resource.libsonnet";
|
||||
local dashboard = grafana.dashboard;
|
||||
|
||||
{
|
||||
folders: [grafana.folder.new('dev-dashboards', 'dev-dashboards')],
|
||||
dashboards: [
|
||||
dashboard.new('Repeating-Kitchen-Sink', import 'e2e-repeats/Repeating-Kitchen-Sink.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-panel-horizontally', import 'e2e-repeats/Repeating-a-panel-horizontally.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-panel-vertically', import 'e2e-repeats/Repeating-a-panel-vertically.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel-and-horizontal-repeating-panel.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel-and-vertical-repeating-panel.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-row-with-a-repeating-horizon', import 'e2e-repeats/Repeating-a-row-with-a-repeating-horizontal-panel.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-a-row-with-a-repeating-vertica', import 'e2e-repeats/Repeating-a-row-with-a-repeating-vertical-panel.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('Repeating-an-empty-row', import 'e2e-repeats/Repeating-an-empty-row.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('all-panels', import 'all-panels.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('auto_decimals', import 'panel-common/auto_decimals.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('bar-gauge-demo2', import 'datasource-testdata/bar-gauge-demo2.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('bar_gauge_demo', import 'panel-bargauge/bar_gauge_demo.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('barchart-autosizing', import 'panel-barchart/barchart-autosizing.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('barchart-thresholds-mappings', import 'panel-barchart/barchart-thresholds-mappings.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('candlestick', import 'panel-candlestick/candlestick.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('canvas-examples', import 'panel-canvas/canvas-examples.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('color_modes', import 'panel-common/color_modes.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('config-from-query', import 'transforms/config-from-query.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('demo1', import 'datasource-testdata/demo1.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('elasticsearch_compare', import 'datasource-elasticsearch/elasticsearch_compare.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('elasticsearch_v7', import 'datasource-elasticsearch/elasticsearch_v7.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('elasticsearch_v7_filebeat', import 'datasource-elasticsearch/elasticsearch_v7_filebeat.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('gauge-multi-series', import 'panel-gauge/gauge-multi-series.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('gauge_tests', import 'panel-gauge/gauge_tests.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('geomap-color-field', import 'panel-geomap/geomap-color-field.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('geomap-photo-layer', import 'panel-geomap/geomap-photo-layer.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('geomap-spatial-operations-transformer', import 'panel-geomap/geomap-spatial-operations-transformer.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('geomap-v91', import 'panel-geomap/geomap-v91.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('geomap_multi-layers', import 'panel-geomap/geomap_multi-layers.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('global-variables-and-interpolation', import 'feature-templating/global-variables-and-interpolation.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('graph-gradient-area-fills', import 'panel-graph/graph-gradient-area-fills.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('graph-shared-tooltips', import 'panel-graph/graph-shared-tooltips.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('graph-time-regions', import 'panel-graph/graph-time-regions.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('graph_tests', import 'panel-graph/graph_tests.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('graph_y_axis', import 'panel-graph/graph_y_axis.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('heatmap-calculate-log', import 'panel-heatmap/heatmap-calculate-log.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('heatmap-legacy', import 'panel-heatmap/heatmap-legacy.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('histogram_tests', import 'panel-histogram/histogram_tests.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('home', import 'home.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('influxdb-logs', import 'datasource-influxdb/influxdb-logs.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('influxdb-templated', import 'datasource-influxdb/influxdb-templated.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('join-by-field', import 'transforms/join-by-field.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('join-by-labels', import 'transforms/join-by-labels.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('lazy_loading', import 'panel-common/lazy_loading.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('linked-viz', import 'panel-common/linked-viz.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('loki_fakedata', import 'datasource-loki/loki_fakedata.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('mssql_fakedata', import 'datasource-mssql/mssql_fakedata.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('mssql_unittest', import 'datasource-mssql/mssql_unittest.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('mysql_fakedata', import 'datasource-mysql/mysql_fakedata.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('mysql_unittest', import 'datasource-mysql/mysql_unittest.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('new_features_in_v62', import 'datasource-testdata/new_features_in_v62.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('new_features_in_v74', import 'datasource-testdata/new_features_in_v74.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('new_features_in_v8', import 'datasource-testdata/new_features_in_v8.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('opentsdb', import 'datasource-opentsdb/opentsdb.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('opentsdb_v23', import 'datasource-opentsdb/opentsdb_v23.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panel-geomap', import 'panel-geomap/panel-geomap.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panel-stat-tests', import 'panel-stat/panel-stat-tests.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panel_test_piechart', import 'panel-piechart/panel_test_piechart.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panel_tests_bar_gauge', import 'panel-bargauge/panel_tests_bar_gauge.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panel_tests_bar_gauge2', import 'panel-bargauge/panel_tests_bar_gauge2.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('panels_without_title', import 'panel-common/panels_without_title.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('polystat_test', import 'panel-polystat/polystat_test.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('postgres_fakedata', import 'datasource-postgres/postgres_fakedata.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('postgres_unittest', import 'datasource-postgres/postgres_unittest.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('reuse', import 'transforms/reuse.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('rows-to-fields', import 'transforms/rows-to-fields.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('shared_queries', import 'panel-common/shared_queries.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('slow_queries_and_annotations', import 'scenarios/slow_queries_and_annotations.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('table_pagination', import 'panel-table/table_pagination.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('table_tests', import 'panel-table/table_tests.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('table_tests_new', import 'panel-table/table_tests_new.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('templating-dashboard-links-and-variables', import 'feature-templating/templating-dashboard-links-and-variables.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('templating-textbox-e2e-scenarios', import 'feature-templating/templating-textbox-e2e-scenarios.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-datalinks', import 'feature-templating/testdata-datalinks.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-nested-variables', import 'feature-templating/testdata-nested-variables.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-nested-variables-drilldown', import 'feature-templating/testdata-nested-variables-drilldown.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-repeating', import 'feature-templating/testdata-repeating.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-test-variable-output', import 'feature-templating/testdata-test-variable-output.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-variables-textbox', import 'feature-templating/testdata-variables-textbox.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata-variables-that-update-on-time-c', import 'feature-templating/testdata-variables-that-update-on-time-change.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('testdata_alerts', import 'alerting/testdata_alerts.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('text-options', import 'panel-text/text-options.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('time_zone_support', import 'scenarios/time_zone_support.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeline-demo', import 'panel-timeline/timeline-demo.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeline-modes', import 'panel-timeline/timeline-modes.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries', import 'panel-timeseries/timeseries.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-by-value-color-schemes', import 'panel-timeseries/timeseries-by-value-color-schemes.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-gradient-area', import 'panel-timeseries/timeseries-gradient-area.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-hue-gradients', import 'panel-timeseries/timeseries-hue-gradients.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-nulls', import 'panel-timeseries/timeseries-nulls.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-out-of-rage', import 'panel-timeseries/timeseries-out-of-rage.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-shared-tooltip-cursor-positio', import 'panel-timeseries/timeseries-shared-tooltip-cursor-position.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-soft-limits', import 'panel-timeseries/timeseries-soft-limits.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-stacking', import 'panel-timeseries/timeseries-stacking.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-stacking2', import 'panel-timeseries/timeseries-stacking2.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-thresholds', import 'panel-timeseries/timeseries-thresholds.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-time', import 'panel-timeseries/timeseries-time.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-y-ticks-zero-decimals', import 'panel-timeseries/timeseries-y-ticks-zero-decimals.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('timeseries-yaxis-ticks', import 'panel-timeseries/timeseries-yaxis-ticks.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": [
|
||||
{
|
||||
"source": {
|
||||
"git": {
|
||||
"remote": "https://github.com/grafana/jsonnet-libs.git",
|
||||
"subdir": "grizzly"
|
||||
}
|
||||
},
|
||||
"version": "master"
|
||||
}
|
||||
],
|
||||
"legacyImports": true
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": [
|
||||
{
|
||||
"source": {
|
||||
"git": {
|
||||
"remote": "https://github.com/grafana/jsonnet-libs.git",
|
||||
"subdir": "grizzly"
|
||||
}
|
||||
},
|
||||
"version": "49b026e4d0aa15b0fee70ae80cc1d2bb792ee14d",
|
||||
"sum": "yY8w1JvVAuxB3Z62R3OxDVcSRPUKIvEWQZ2ShyD7uis="
|
||||
}
|
||||
],
|
||||
"legacyImports": false
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
(import 'gen.libsonnet')
|
||||
@@ -1,20 +0,0 @@
|
||||
// This file is autogenerated. DO NOT EDIT.
|
||||
// Generated by gen.go
|
||||
// Run `make gen-jsonnet` from repository root to regenerate.
|
||||
|
||||
local grafana = import "grizzly/grafana.libsonnet";
|
||||
local resource = import "grizzly/resource.libsonnet";
|
||||
local dashboard = grafana.dashboard;
|
||||
|
||||
{
|
||||
folders: [grafana.folder.new('dev-dashboards', 'dev-dashboards')],
|
||||
dashboards: [{{range .Dashboards}}
|
||||
dashboard.new('{{.Name}}', import '{{.Path}}') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},{{end}}
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user