Skip to content

Commit

Permalink
feat(dashboard): add support for initial sorting and refresh rate (#1206
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gmanandhar-nr authored Sep 2, 2024
1 parent ad6a16d commit e16073c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions pkg/dashboards/dashboards_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,16 @@ 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"`
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"`
}

// RawConfigurationPlatformOptions represents the platform widget options
Expand All @@ -326,6 +328,15 @@ type DashboardWidgetLegend struct {
Enabled *bool `json:"enabled,omitempty"`
}

type DashboardWidgetRefreshRate struct {
Frequency interface{} `json:"frequency,omitempty"`
}

type DashboardWidgetInitialSorting struct {
Direction string `json:"direction,omitempty"`
Name string `json:"name,omitempty"`
}

type DashboardWidgetYAxisLeft struct {
Max float64 `json:"max,omitempty"`
Min *float64 `json:"min,omitempty"`
Expand Down

0 comments on commit e16073c

Please sign in to comment.