-
Notifications
You must be signed in to change notification settings - Fork 109
feat: add BillboardSettings & ThresholdWithSeriesOverrides to Dashboard #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,17 +307,19 @@ type RawConfiguration struct { | |
| // Used by viz.markdown | ||
| Text string `json:"text,omitempty"` | ||
|
|
||
| Thresholds interface{} `json:"thresholds,omitempty"` | ||
| Legend *DashboardWidgetLegend `json:"legend,omitempty"` | ||
| YAxisLeft *DashboardWidgetYAxisLeft `json:"yAxisLeft,omitempty"` | ||
| YAxisRight *DashboardWidgetYAxisRight `json:"yAxisRight,omitempty"` | ||
| NullValues *DashboardWidgetNullValues `json:"nullValues,omitempty"` | ||
| Units *DashboardWidgetUnits `json:"units,omitempty"` | ||
| Colors *DashboardWidgetColors `json:"colors,omitempty"` | ||
| Facet *DashboardWidgetFacet `json:"facet,omitempty"` | ||
| RefreshRate *DashboardWidgetRefreshRate `json:"refreshRate,omitempty"` | ||
| InitialSorting *DashboardWidgetInitialSorting `json:"initialSorting,omitempty"` | ||
| DataFormat []*DashboardWidgetDataFormat `json:"dataFormatters,omitempty"` | ||
| Thresholds interface{} `json:"thresholds,omitempty"` | ||
| Legend *DashboardWidgetLegend `json:"legend,omitempty"` | ||
| YAxisLeft *DashboardWidgetYAxisLeft `json:"yAxisLeft,omitempty"` | ||
| YAxisRight *DashboardWidgetYAxisRight `json:"yAxisRight,omitempty"` | ||
| NullValues *DashboardWidgetNullValues `json:"nullValues,omitempty"` | ||
| Units *DashboardWidgetUnits `json:"units,omitempty"` | ||
| Colors *DashboardWidgetColors `json:"colors,omitempty"` | ||
| Facet *DashboardWidgetFacet `json:"facet,omitempty"` | ||
| RefreshRate *DashboardWidgetRefreshRate `json:"refreshRate,omitempty"` | ||
| InitialSorting *DashboardWidgetInitialSorting `json:"initialSorting,omitempty"` | ||
| DataFormat []*DashboardWidgetDataFormat `json:"dataFormatters,omitempty"` | ||
| BillboardSettings *DashboardWidgetBillboardSettings `json:"billboardSettings,omitempty"` | ||
| ThresholdsWithSeriesOverrides *DashboardWidgetThresholdsWithSeriesOverrides `json:"thresholdsWithSeriesOverrides,omitempty"` | ||
| } | ||
|
|
||
| // RawConfigurationPlatformOptions represents platform widget options | ||
|
|
@@ -395,3 +397,70 @@ type DashboardWidgetColorOverrides struct { | |
| type DashboardWidgetFacet struct { | ||
| ShowOtherSeries bool `json:"showOtherSeries,omitempty"` | ||
| } | ||
|
|
||
| type DashboardWidgetBillboardSettings struct { | ||
| Visual *DashboardWidgetBillboardVisual `json:"visual,omitempty"` | ||
| GridOptions *DashboardWidgetBillboardGridOptions `json:"gridOptions,omitempty"` | ||
| Link *DashboardWidgetBillboardLink `json:"link,omitempty"` | ||
| } | ||
|
|
||
| type BillboardVisualDisplay string | ||
|
|
||
| const ( | ||
| BillboardVisualDisplayAuto BillboardVisualDisplay = "auto" | ||
| BillboardVisualDisplayAll BillboardVisualDisplay = "all" | ||
| BillboardVisualDisplayValue BillboardVisualDisplay = "value" | ||
| BillboardVisualDisplayLabel BillboardVisualDisplay = "label" | ||
| BillboardVisualDisplayNone BillboardVisualDisplay = "none" | ||
| ) | ||
|
|
||
| type BillboardVisualAlignment string | ||
|
|
||
| const ( | ||
| BillboardVisualAlignmentAuto BillboardVisualAlignment = "auto" | ||
| BillboardVisualAlignmentStacked BillboardVisualAlignment = "stacked" | ||
| BillboardVisualAlignmentInline BillboardVisualAlignment = "inline" | ||
| ) | ||
|
|
||
| type DashboardWidgetBillboardVisual struct { | ||
| Display BillboardVisualDisplay `json:"display,omitempty"` | ||
| Alignment BillboardVisualAlignment `json:"alignment,omitempty"` | ||
| } | ||
|
|
||
| type DashboardWidgetBillboardGridOptions struct { | ||
| Columns int `json:"columns,omitempty"` | ||
| Label int `json:"label,omitempty"` | ||
| Value int `json:"value,omitempty"` | ||
| } | ||
|
|
||
| type DashboardWidgetBillboardLink struct { | ||
| Title string `json:"title,omitempty"` | ||
| URL string `json:"url,omitempty"` | ||
| NewTab bool `json:"newTab"` | ||
| } | ||
|
|
||
| type DashboardWidgetThresholdsWithSeriesOverrides struct { | ||
| Thresholds []*DashboardWidgetThresholdConfig `json:"thresholds,omitempty"` | ||
| SeriesOverrides []*DashboardWidgetThresholdSeriesOverride `json:"seriesOverrides,omitempty"` | ||
| } | ||
|
|
||
| type ThresholdSeverity string | ||
|
|
||
| const ( | ||
| ThresholdSeveritySuccess ThresholdSeverity = "success" | ||
| ThresholdSeverityWarning ThresholdSeverity = "warning" | ||
| ThresholdSeveritySevere ThresholdSeverity = "severe" | ||
| ThresholdSeverityCritical ThresholdSeverity = "critical" | ||
| ThresholdSeverityUnavailable ThresholdSeverity = "unavailable" | ||
| ) | ||
|
||
|
|
||
| type DashboardWidgetThresholdConfig struct { | ||
| From *float64 `json:"from,omitempty"` | ||
| To *float64 `json:"to,omitempty"` | ||
| Severity ThresholdSeverity `json:"severity,omitempty"` | ||
| } | ||
|
|
||
| type DashboardWidgetThresholdSeriesOverride struct { | ||
| DashboardWidgetThresholdConfig | ||
| SeriesName string `json:"seriesName"` | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.