ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REFRESH_SECONDS     = 3
	EVENTS_PANEL_HEIGHT = 15
	NODE_PANEL_HEIGHT   = 9

	NodesWindow      Window = "Nodes"
	DashboardWindow  Window = "Dashboard"
	EventsWindow     Window = "Events"
	ContainersWindow Window = "Containers"
)

Variables

View Source
var (
	ActiveWindow   Window
	ContainerPanel *termui.Table
	Containers     []*kube.ContainerInfo
	ContainerMaxes map[string]*kube.ContainerMaxes
	CpuColumn      []termui.GridBufferer
	Events         []api_v1.Event
	EventsPanel    *termui.Table
	KubeClient     *kube.KubeClient
	MemoryColumn   []termui.GridBufferer
	Namespace      string
	NodePanel      *termui.List
	NodeResources  []*kube.NodeResources
	Nodes          []api_v1.Node
	SortField      string
	SortOrder      bool
)

Functions

func CenterText

func CenterText(text string) string

func CompareStruct

func CompareStruct(t interface{}, field string, i, j int, reverse bool) bool

func ContainerFooter

func ContainerFooter() *termui.Par

func ContainersHandler

func ContainersHandler(e termui.EvtKbd)

func DashboardFooter

func DashboardFooter() *termui.Par

func DashboardHandler

func DashboardHandler(e termui.EvtKbd)

func DefaultHandler

func DefaultHandler(e termui.Event)

func EventsFooter

func EventsFooter() *termui.Par
func Footer(text string) *termui.Par

func GaugePanel

func GaugePanel(label string, barColor termui.Attribute) *termui.Gauge

func KubeTop

func KubeTop(kubeClient *kube.KubeClient, namespace string)

func NewContainersPanel

func NewContainersPanel(height int) *termui.Table

func NewEventsPanel

func NewEventsPanel(height int) *termui.Table

func NewNodePanel

func NewNodePanel() *termui.List

func NodesFooter

func NodesFooter() *termui.Par

func ShowContainers

func ShowContainers()

func ShowDashboard

func ShowDashboard()

func ShowEvents

func ShowEvents()

func ShowNodeWindow

func ShowNodeWindow()

func TimeToDurationStr

func TimeToDurationStr(t time.Time) string

func UpdatePanels

func UpdatePanels()

func UpdateResources

func UpdateResources()

Types

type Window

type Window string

Jump to

Keyboard shortcuts

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