components

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package components implements specific widgets for the dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGraph

type BaseGraph struct {
	widgets.Plot
}

BaseGraph represents the widget with some usage graph.

func NewBaseGraph

func NewBaseGraph(title string, labels []string) *BaseGraph

NewBaseGraph initializes BaseGraph.

func NewCPUGraph

func NewCPUGraph() *BaseGraph

NewCPUGraph creates CPU usage graph.

func NewLoadAvgGraph

func NewLoadAvgGraph() *BaseGraph

NewLoadAvgGraph creates loadavg graph.

func NewMemGraph

func NewMemGraph() *BaseGraph

NewMemGraph creates mem usage graph.

func (*BaseGraph) OnAPIDataChange

func (widget *BaseGraph) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type BaseSparklineGroup

type BaseSparklineGroup struct {
	widgets.SparklineGroup
	// contains filtered or unexported fields
}

BaseSparklineGroup represents the widget with some sparklines.

func NewBaseSparklineGroup

func NewBaseSparklineGroup(title string, labels, dataLabels []string) *BaseSparklineGroup

NewBaseSparklineGroup initializes BaseSparklineGroup.

func NewDiskSparkline

func NewDiskSparkline() *BaseSparklineGroup

NewDiskSparkline creates disk sparkline.

func NewNetSparkline

func NewNetSparkline() *BaseSparklineGroup

NewNetSparkline creates network sparkline.

func (*BaseSparklineGroup) OnAPIDataChange

func (widget *BaseSparklineGroup) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type CPUInfo

type CPUInfo struct {
	tview.TextView
}

CPUInfo represents the widget with CPU info.

func NewCPUInfo

func NewCPUInfo() *CPUInfo

NewCPUInfo initializes CPUInfo.

func (*CPUInfo) OnAPIDataChange

func (widget *CPUInfo) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type Footer struct {
	tview.TextView
	// contains filtered or unexported fields
}

Footer represents the top bar with host info.

func NewFooter

func NewFooter(screenKeyToName map[string]string) *Footer

NewFooter initializes Footer.

func (*Footer) OnNodeSelect

func (widget *Footer) OnNodeSelect(node string)

OnNodeSelect implements the NodeSelectListener interface.

func (*Footer) OnNodeSetChange

func (widget *Footer) OnNodeSetChange(nodes []string)

OnNodeSetChange implements the NodeSetListener interface.

func (*Footer) SelectScreen

func (widget *Footer) SelectScreen(screen string)

SelectScreen refreshes the footer with the tabs and screens data.

type Header struct {
	tview.TextView
	// contains filtered or unexported fields
}

Header represents the top bar with host info.

func NewHeader

func NewHeader() *Header

NewHeader initializes Header.

func (*Header) OnAPIDataChange

func (widget *Header) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

func (*Header) OnNodeSelect

func (widget *Header) OnNodeSelect(node string)

OnNodeSelect implements the NodeSelectListener interface.

func (*Header) OnResourceDataChange

func (widget *Header) OnResourceDataChange(data resourcedata.Data)

OnResourceDataChange implements the ResourceDataListener interface.

type HorizontalLine

type HorizontalLine struct {
	tview.TextView
}

HorizontalLine is a widget that draws a horizontal line.

func NewHorizontalLine

func NewHorizontalLine() *HorizontalLine

NewHorizontalLine initializes HorizontalLine.

type KubernetesInfo

type KubernetesInfo struct {
	tview.TextView
	// contains filtered or unexported fields
}

KubernetesInfo represents the kubernetes info widget.

func NewKubernetesInfo

func NewKubernetesInfo() *KubernetesInfo

NewKubernetesInfo initializes KubernetesInfo.

func (*KubernetesInfo) OnAPIDataChange

func (widget *KubernetesInfo) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

func (*KubernetesInfo) OnNodeSelect

func (widget *KubernetesInfo) OnNodeSelect(node string)

OnNodeSelect implements the NodeSelectListener interface.

func (*KubernetesInfo) OnResourceDataChange

func (widget *KubernetesInfo) OnResourceDataChange(data resourcedata.Data)

OnResourceDataChange implements the ResourceDataListener interface.

type LoadAvgInfo

type LoadAvgInfo struct {
	tview.TextView
}

LoadAvgInfo represents the widget with load average info.

func NewLoadAvgInfo

func NewLoadAvgInfo() *LoadAvgInfo

NewLoadAvgInfo initializes LoadAvgInfo.

func (*LoadAvgInfo) OnAPIDataChange

func (widget *LoadAvgInfo) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type LogViewer

type LogViewer struct {
	tview.Grid
	// contains filtered or unexported fields
}

LogViewer represents the logs widget.

func NewLogViewer

func NewLogViewer() *LogViewer

NewLogViewer initializes LogViewer.

func (*LogViewer) WriteLog

func (widget *LogViewer) WriteLog(logLine string)

WriteLog writes the log line to the widget.

type MemInfo

type MemInfo struct {
	tview.TextView
}

MemInfo represents the widget with memory info.

func NewMemInfo

func NewMemInfo() *MemInfo

NewMemInfo initializes LoadAvgInfo.

func (*MemInfo) OnAPIDataChange

func (widget *MemInfo) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type NetworkInfo

type NetworkInfo struct {
	tview.TextView
	// contains filtered or unexported fields
}

NetworkInfo represents the network info widget.

func NewNetworkInfo

func NewNetworkInfo() *NetworkInfo

NewNetworkInfo initializes NetworkInfo.

func (*NetworkInfo) OnNodeSelect

func (widget *NetworkInfo) OnNodeSelect(node string)

OnNodeSelect implements the NodeSelectListener interface.

func (*NetworkInfo) OnResourceDataChange

func (widget *NetworkInfo) OnResourceDataChange(data resourcedata.Data)

OnResourceDataChange implements the ResourceDataListener interface.

type ProcessTable

type ProcessTable struct {
	widgets.List
}

ProcessTable represents the widget with process info.

func NewProcessTable

func NewProcessTable() *ProcessTable

NewProcessTable initializes ProcessTable.

func (*ProcessTable) OnAPIDataChange

func (widget *ProcessTable) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type ProcsInfo

type ProcsInfo struct {
	tview.TextView
}

ProcsInfo represents the widget with processes info.

func NewProcsInfo

func NewProcsInfo() *ProcsInfo

NewProcsInfo initializes ProcsInfo.

func (*ProcsInfo) OnAPIDataChange

func (widget *ProcsInfo) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type SystemGauges

type SystemGauges struct {
	*TermUIWrapper
	// contains filtered or unexported fields
}

SystemGauges quickly show CPU/mem load.

func NewSystemGauges

func NewSystemGauges() *SystemGauges

NewSystemGauges creates SystemGauges.

func (*SystemGauges) OnAPIDataChange

func (widget *SystemGauges) OnAPIDataChange(node string, data *apidata.Data)

OnAPIDataChange implements the APIDataListener interface.

type TalosInfo

type TalosInfo struct {
	tview.TextView
	// contains filtered or unexported fields
}

TalosInfo represents the Talos info widget.

func NewTalosInfo

func NewTalosInfo() *TalosInfo

NewTalosInfo initializes TalosInfo.

func (*TalosInfo) OnNodeSelect

func (widget *TalosInfo) OnNodeSelect(node string)

OnNodeSelect implements the NodeSelectListener interface.

func (*TalosInfo) OnResourceDataChange

func (widget *TalosInfo) OnResourceDataChange(data resourcedata.Data)

OnResourceDataChange implements the ResourceDataListener interface.

type TermUIWrapper

type TermUIWrapper struct {
	*tview.Box
	// contains filtered or unexported fields
}

TermUIWrapper is a custom tview component that wraps a legacy termui component and draws it.

func NewTermUIWrapper

func NewTermUIWrapper(drawable termui.Drawable) *TermUIWrapper

NewTermUIWrapper initializes a new TermUIWrapper.

func (*TermUIWrapper) Draw

func (w *TermUIWrapper) Draw(screen tcell.Screen)

Draw implements the tview.Primitive interface.

Jump to

Keyboard shortcuts

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