dashboard

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GridItem

type GridItem struct {
	X       int             `json:"x" yaml:"x"`
	Y       int             `json:"y" yaml:"y"`
	Width   int             `json:"width" yaml:"width"`
	Height  int             `json:"height" yaml:"height"`
	Content *common.JSONRef `json:"content" yaml:"content"`
}

type GridLayoutCollapse

type GridLayoutCollapse struct {
	Open bool `json:"open" yaml:"open"`
}

type GridLayoutDisplay

type GridLayoutDisplay struct {
	Title string `json:"title" yaml:"title"`
	// If Collapse is defined, the grid layout will be rendered in a collapsible group.
	// If not defined, the grid layout will be rendered expanded without the ability to collapse it.
	Collapse *GridLayoutCollapse `json:"collapse,omitempty" yaml:"collapse,omitempty"`
}

type GridLayoutSpec

type GridLayoutSpec struct {
	Display        *GridLayoutDisplay `json:"display,omitempty" yaml:"display,omitempty"`
	Items          []GridItem         `json:"items" yaml:"items"`
	RepeatVariable string             `json:"repeatVariable,omitempty" yaml:"repeatVariable,omitempty"`
}

type Layout

type Layout struct {
	Kind LayoutKind `json:"kind" yaml:"kind"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Spec LayoutSpec `json:"spec" yaml:"spec"`
}

func (*Layout) UnmarshalJSON

func (d *Layout) UnmarshalJSON(data []byte) error

func (*Layout) UnmarshalYAML

func (d *Layout) UnmarshalYAML(unmarshal func(any) error) error

type LayoutKind

type LayoutKind string
const (
	KindGridLayout LayoutKind = "Grid"
)

func (*LayoutKind) UnmarshalJSON

func (k *LayoutKind) UnmarshalJSON(data []byte) error

func (*LayoutKind) UnmarshalYAML

func (k *LayoutKind) UnmarshalYAML(unmarshal func(any) error) error

type LayoutSpec

type LayoutSpec any
type Link struct {
	Name            string `json:"name,omitempty" yaml:"name,omitempty"`
	URL             string `json:"url" yaml:"url"`
	Tooltip         string `json:"tooltip,omitempty" yaml:"tooltip,omitempty"`
	RenderVariables bool   `json:"renderVariables,omitempty" yaml:"renderVariables,omitempty"`
	TargetBlank     bool   `json:"targetBlank,omitempty" yaml:"targetBlank,omitempty"`
}

type ListVariableSpec

type ListVariableSpec struct {
	variable.ListSpec `json:",inline" yaml:",inline"`
	Name              string `json:"name" yaml:"name"`
	// contains filtered or unexported fields
}

func (*ListVariableSpec) GetName

func (v *ListVariableSpec) GetName() string

func (*ListVariableSpec) UnmarshalJSON

func (v *ListVariableSpec) UnmarshalJSON(data []byte) error

func (*ListVariableSpec) UnmarshalYAML

func (v *ListVariableSpec) UnmarshalYAML(unmarshal func(any) error) error

type Panel

type Panel struct {
	Kind string    `json:"kind" yaml:"kind"`
	Spec PanelSpec `json:"spec" yaml:"spec"`
}

type PanelDisplay

type PanelDisplay struct {
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
}

type PanelSpec

type PanelSpec struct {
	Display *PanelDisplay `json:"display,omitempty" yaml:"display,omitempty"`
	Plugin  common.Plugin `json:"plugin" yaml:"plugin"`
	Queries []Query       `json:"queries,omitempty" yaml:"queries,omitempty"`
	Links   []Link        `json:"links,omitempty" yaml:"links,omitempty"`
}

type Query

type Query struct {
	Kind string    `json:"kind" yaml:"kind"`
	Spec QuerySpec `json:"spec" yaml:"spec"`
}

type QuerySpec

type QuerySpec struct {
	Name   string        `json:"name,omitempty" yaml:"name,omitempty"`
	Plugin common.Plugin `json:"plugin" yaml:"plugin"`
}

type Spec

type Spec struct {
	Display *common.Display `json:"display,omitempty" yaml:"display,omitempty"`
	// Datasources is an optional list of datasource definition.
	Datasources map[string]*datasource.Spec `json:"datasources,omitempty" yaml:"datasources,omitempty"`
	Variables   []Variable                  `json:"variables,omitempty" yaml:"variables,omitempty"`
	Panels      map[string]*Panel           `json:"panels" yaml:"panels"`
	Layouts     []Layout                    `json:"layouts" yaml:"layouts"`
	// Duration is the default time range to use when getting data to fill the dashboard
	Duration common.DurationString `json:"duration" yaml:"duration"`
	// RefreshInterval is the default refresh interval to use when landing on the dashboard
	RefreshInterval common.DurationString `json:"refreshInterval,omitempty" yaml:"refreshInterval,omitempty"`
	// Links is an optional list of links to display at the dashboard level
	Links []Link `json:"links,omitempty" yaml:"links,omitempty"`
}

func (*Spec) UnmarshalJSON

func (d *Spec) UnmarshalJSON(data []byte) error

func (*Spec) UnmarshalYAML

func (d *Spec) UnmarshalYAML(unmarshal func(any) error) error

type TextVariableSpec

type TextVariableSpec struct {
	variable.TextSpec `json:",inline" yaml:",inline"`
	Name              string `json:"name" yaml:"name"`
	// contains filtered or unexported fields
}

func (*TextVariableSpec) GetName

func (v *TextVariableSpec) GetName() string

func (*TextVariableSpec) UnmarshalJSON

func (v *TextVariableSpec) UnmarshalJSON(data []byte) error

func (*TextVariableSpec) UnmarshalYAML

func (v *TextVariableSpec) UnmarshalYAML(unmarshal func(any) error) error

type Variable

type Variable struct {
	// Kind is the type of the variable. Depending on the value of Kind, it will change the content of Spec.
	Kind variable.Kind `json:"kind" yaml:"kind"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Spec variableSpec `json:"spec" yaml:"spec"`
}

func (*Variable) UnmarshalJSON

func (v *Variable) UnmarshalJSON(data []byte) error

func (*Variable) UnmarshalYAML

func (v *Variable) UnmarshalYAML(unmarshal func(any) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL