github.com/kuoss/venti@v0.2.20/pkg/model/dashboard.go (about) 1 package model 2 3 // dashboard 4 type Dashboard struct { 5 Title string `json:"title"` 6 Rows []Row `json:"rows"` 7 } 8 9 type Row struct { 10 Panels []Panel `json:"panels"` 11 } 12 13 type Panel struct { 14 Title string `json:"title" yaml:"title"` 15 Type string `json:"type" yaml:"type"` 16 Headers []string `json:"headers,omitempty" yaml:"headers,omitempty"` 17 Targets []Target `json:"targets" yaml:"targets"` 18 ChartOptions *ChartOptions `json:"chartOptions,omitempty" yaml:"chartOptions,omitempty"` 19 } 20 21 type ChartOptions struct { 22 YMax int `json:"yMax,omitempty" yaml:"yMax,omitempty"` 23 } 24 25 // TODO: what Legend, Legends is for? 26 type Target struct { 27 Expr string `json:"expr"` 28 Legend string `json:"legend,omitempty" yaml:"legend,omitempty"` 29 Legends []string `json:"legends,omitempty" yaml:"legends,omitempty"` 30 Unit string `json:"unit,omitempty" yaml:"unit,omitempty"` 31 Columns []string `json:"columns,omitempty" yaml:"columns,omitempty"` 32 Headers []string `json:"headers,omitempty" yaml:"headers,omitempty"` 33 Key string `json:"key,omitempty" yaml:"key,omitempty"` 34 Thresholds []Threshold `json:"thresholds,omitempty" yaml:"thresholds,omitempty"` 35 Aggregation string `json:"aggregation,omitempty" yaml:"aggregation,omitempty"` 36 } 37 38 type Threshold struct { 39 Values []int `yaml:"values,omitempty" json:"values,omitempty"` 40 Invert bool `yaml:"invert,omitempty" json:"invert,omitempty"` 41 }