dashboardtypes

package
v0.16.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnSchema

type ColumnSchema struct {
	Name     string `json:"name"`
	DataType string `json:"data_type"`
}

func NewLeafDataColumnType

func NewLeafDataColumnType(sqlType *sql.ColumnType) *ColumnSchema

type DashboardNodeParent

type DashboardNodeParent interface {
	GetName() string
	ChildCompleteChan() chan DashboardNodeRun
}

DashboardNodeParent is an interface implemented by all dashboard run nodes which have children

type DashboardNodeRun

type DashboardNodeRun interface {
	Initialise(ctx context.Context)
	Execute(ctx context.Context)
	GetName() string
	GetRunStatus() DashboardRunStatus
	SetError(err error)
	GetError() error
	SetComplete()
	RunComplete() bool
	GetChildren() []DashboardNodeRun
	ChildrenComplete() bool
	GetInputsDependingOn(changedInputName string) []string
	AsTreeNode() *SnapshotTreeNode
}

DashboardNodeRun is an interface implemented by all dashboard run nodes

type DashboardRunStatus

type DashboardRunStatus string
const (
	DashboardRunReady    DashboardRunStatus = "ready"
	DashboardRunComplete DashboardRunStatus = "complete"
	DashboardRunError    DashboardRunStatus = "error"
)

type LeafData

type LeafData struct {
	Columns []*ColumnSchema          `json:"columns"`
	Rows    []map[string]interface{} `json:"rows"`
}

func NewLeafData

func NewLeafData(result *queryresult.SyncQueryResult) *LeafData

type SnapshotPanel

type SnapshotPanel interface {
	IsSnapshotPanel()
}

SnapshotPanel is an interface implemented by all nodes which are to be included in the Snapshot Panels map

type SnapshotTreeNode

type SnapshotTreeNode struct {
	Name     string              `json:"name"`
	Children []*SnapshotTreeNode `json:"children,omitempty"`
	NodeType string              `json:"panel_type"`
}

SnapshotTreeNode is a struct used to store the dashboard structure in the snapshot

Jump to

Keyboard shortcuts

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