alertView

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	HighLevel   AlertLevel = "H"
	MediumLevel            = "M"
	LowLevel               = "L"
)
View Source
const (
	AlertType MessageType = "ALERT"
	WarnType              = "WARN"
	InfoType              = "INFO"
)

Variables

View Source
var APPS_NOT_IN_DESIRED_STATE = NewAlertMessage("ANIDS", AlertType, "%v application%v not in desired state (DCR != RCR column)")
View Source
var CONTAINER_CRASHES = NewAlertMessage("CRASH", WarnType, "%v container%v crashed (CRH column) in last 24 hours (%v in last hour)")
View Source
var ErrorsSinceViewed = NewAlertMessage("ESV", AlertType, "%v monitoring errors. Data shown may be inaccurate. (shift-D to display)")
View Source
var MessageCatalog = make(map[string]*AlertMessage)
View Source
var TestMessage = NewAlertMessage("TM", InfoType, "Test Message")

Functions

This section is empty.

Types

type AlertLevel added in v0.8.2

type AlertLevel string

type AlertManager

type AlertManager struct {
	AlertSize int
	// contains filtered or unexported fields
}

func NewAlertManager

func NewAlertManager(masterUI masterUIInterface.MasterUIInterface, commonData *dataCommon.CommonData) *AlertManager

func (*AlertManager) CheckForAlerts

func (am *AlertManager) CheckForAlerts(g *gocui.Gui) error

func (*AlertManager) ClearUserMessage

func (am *AlertManager) ClearUserMessage(g *gocui.Gui, removeMessage *AlertMessage) error

func (*AlertManager) ShowMessage added in v0.8.2

func (am *AlertManager) ShowMessage(g *gocui.Gui, message *AlertMessage, args ...interface{}) error

TODO: Have message levels which will colorize differently

func (*AlertManager) UpdateMessageView added in v0.8.2

func (am *AlertManager) UpdateMessageView(g *gocui.Gui) error

TODO: Have message levels which will colorize differently

type AlertMessage added in v0.8.2

type AlertMessage struct {
	Id   string
	Type MessageType
	Text string
}

Example:

func NewAlertMessage added in v0.8.2

func NewAlertMessage(
	id string,
	msgType MessageType,
	text string) *AlertMessage

type AlertMessages added in v0.8.2

type AlertMessages []*AlertMessage

func (AlertMessages) Len added in v0.8.2

func (f AlertMessages) Len() int

func (AlertMessages) Less added in v0.8.2

func (f AlertMessages) Less(i, j int) bool

func (AlertMessages) Swap added in v0.8.2

func (f AlertMessages) Swap(i, j int)

type AlertWidget

type AlertWidget struct {
	AlertSize int
	// contains filtered or unexported fields
}

func NewAlertWidget

func NewAlertWidget(masterUI masterUIInterface.MasterUIInterface, name string, height int, commonData *dataCommon.CommonData) *AlertWidget

func (*AlertWidget) Layout

func (w *AlertWidget) Layout(g *gocui.Gui) error

func (*AlertWidget) Name

func (w *AlertWidget) Name() string

func (*AlertWidget) SetHeight

func (w *AlertWidget) SetHeight(height int)

func (*AlertWidget) SetMessage

func (w *AlertWidget) SetMessage(msg string)

type MessageType added in v0.8.2

type MessageType string

Jump to

Keyboard shortcuts

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