Skip to content

DashboardBuilder🔗

Constructor🔗

func NewDashboardBuilder(title string) *DashboardBuilder

Methods🔗

Build🔗

Builds the object.

func (builder *DashboardBuilder) Build() (Dashboard, error)

SwitchVariableKind🔗

func (builder *DashboardBuilder) SwitchVariableKind(switchVariableKind cog.Builder[dashboardv2beta1.SwitchVariableKind]) *DashboardBuilder

AdhocVariable🔗

func (builder *DashboardBuilder) AdhocVariable(adhocVariableKind cog.Builder[dashboardv2beta1.AdhocVariableKind]) *DashboardBuilder

Annotations🔗

func (builder *DashboardBuilder) Annotations(annotations []cog.Builder[dashboardv2beta1.AnnotationQueryKind]) *DashboardBuilder

AutoGridLayout🔗

func (builder *DashboardBuilder) AutoGridLayout(autoGridLayoutKind cog.Builder[dashboardv2beta1.AutoGridLayoutKind]) *DashboardBuilder

ConstantVariable🔗

func (builder *DashboardBuilder) ConstantVariable(constantVariableKind cog.Builder[dashboardv2beta1.ConstantVariableKind]) *DashboardBuilder

CursorSync🔗

Configuration of dashboard cursor sync behavior.

"Off" for no shared crosshair or tooltip (default).

"Crosshair" for shared crosshair.

"Tooltip" for shared crosshair AND shared tooltip.

func (builder *DashboardBuilder) CursorSync(cursorSync dashboardv2beta1.DashboardCursorSync) *DashboardBuilder

CustomVariable🔗

func (builder *DashboardBuilder) CustomVariable(customVariableKind cog.Builder[dashboardv2beta1.CustomVariableKind]) *DashboardBuilder

DatasourceVariable🔗

func (builder *DashboardBuilder) DatasourceVariable(datasourceVariableKind cog.Builder[dashboardv2beta1.DatasourceVariableKind]) *DashboardBuilder

Description🔗

Description of dashboard.

func (builder *DashboardBuilder) Description(description string) *DashboardBuilder

Editable🔗

Whether a dashboard is editable or not.

func (builder *DashboardBuilder) Editable(editable bool) *DashboardBuilder

Elements🔗

func (builder *DashboardBuilder) Elements(elements map[string]dashboardv2beta1.Element) *DashboardBuilder

GridLayout🔗

func (builder *DashboardBuilder) GridLayout(gridLayoutKind cog.Builder[dashboardv2beta1.GridLayoutKind]) *DashboardBuilder

GroupByVariable🔗

func (builder *DashboardBuilder) GroupByVariable(groupByVariableKind cog.Builder[dashboardv2beta1.GroupByVariableKind]) *DashboardBuilder

IntervalVariable🔗

func (builder *DashboardBuilder) IntervalVariable(intervalVariableKind cog.Builder[dashboardv2beta1.IntervalVariableKind]) *DashboardBuilder

LibraryPanel🔗

func (builder *DashboardBuilder) LibraryPanel(key string, libraryPanelKind cog.Builder[dashboardv2beta1.LibraryPanelKind]) *DashboardBuilder

Links with references to other dashboards or external websites.

func (builder *DashboardBuilder) Links(links []cog.Builder[dashboardv2beta1.DashboardLink]) *DashboardBuilder

LiveNow🔗

When set to true, the dashboard will redraw panels at an interval matching the pixel width.

This will keep data "moving left" regardless of the query refresh rate. This setting helps

avoid dashboards presenting stale live data.

func (builder *DashboardBuilder) LiveNow(liveNow bool) *DashboardBuilder

Panel🔗

func (builder *DashboardBuilder) Panel(key string, panelKind cog.Builder[dashboardv2beta1.PanelKind]) *DashboardBuilder

Preload🔗

When set to true, the dashboard will load all panels in the dashboard when it's loaded.

func (builder *DashboardBuilder) Preload(preload bool) *DashboardBuilder

QueryVariable🔗

func (builder *DashboardBuilder) QueryVariable(queryVariableKind cog.Builder[dashboardv2beta1.QueryVariableKind]) *DashboardBuilder

Revision🔗

Plugins only. The version of the dashboard installed together with the plugin.

This is used to determine if the dashboard should be updated when the plugin is updated.

func (builder *DashboardBuilder) Revision(revision uint16) *DashboardBuilder

RowsLayout🔗

func (builder *DashboardBuilder) RowsLayout(rowsLayoutKind cog.Builder[dashboardv2beta1.RowsLayoutKind]) *DashboardBuilder

TabsLayout🔗

func (builder *DashboardBuilder) TabsLayout(tabsLayoutKind cog.Builder[dashboardv2beta1.TabsLayoutKind]) *DashboardBuilder

Tags🔗

Tags associated with dashboard.

func (builder *DashboardBuilder) Tags(tags []string) *DashboardBuilder

TextVariable🔗

func (builder *DashboardBuilder) TextVariable(textVariableKind cog.Builder[dashboardv2beta1.TextVariableKind]) *DashboardBuilder

TimeSettings🔗

func (builder *DashboardBuilder) TimeSettings(timeSettings cog.Builder[dashboardv2beta1.TimeSettingsSpec]) *DashboardBuilder

Title🔗

Title of dashboard.

func (builder *DashboardBuilder) Title(title string) *DashboardBuilder

Variables🔗

Configured template variables.

func (builder *DashboardBuilder) Variables(variables []dashboardv2beta1.VariableKind) *DashboardBuilder

See also🔗