Documentation ¶
Index ¶
- Constants
- func StandardizeKey(event *tcell.EventKey) tcell.Key
- func WorkflowStepFormat(name string, status v1alpha1.WorkflowStepPhase) string
- type App
- func (a *App) AddAction(actions model.KeyActions)
- func (a *App) Components() map[string]tview.Primitive
- func (a *App) Crumbs() *Crumbs
- func (a *App) DelAction(keys []tcell.Key)
- func (a *App) HasAction(key tcell.Key) (model.KeyAction, bool)
- func (a *App) InfoBoard() *InfoBoard
- func (a *App) Init()
- func (a *App) Logo() *Logo
- func (a *App) Menu() *Menu
- func (a *App) QueueUpdate(f func())
- func (a *App) QueueUpdateDraw(f func())
- type Crumbs
- type InfoBoard
- type Logo
- type Menu
- type Pages
- type Table
- type ThemeSelector
- type TopologyTreeNodeFormatter
Constants ¶
const ( // KeyHelp corresponding value of keyboard key "?" KeyHelp = 63 // KeySlash corresponding value of keyboard key "/" KeySlash = 47 // KeyColon corresponding value of keyboard key ":" KeyColon = 58 // KeySpace corresponding value of keyboard key "SPACE" KeySpace = 32 )
const ( KeyA tcell.Key = iota + 97 KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ )
Defines char keystrokes.
Variables ¶
This section is empty.
Functions ¶
func StandardizeKey ¶
func StandardizeKey(event *tcell.EventKey) tcell.Key
StandardizeKey standardized combined key event and return corresponding key
func WorkflowStepFormat ¶
func WorkflowStepFormat(name string, status v1alpha1.WorkflowStepPhase) string
WorkflowStepFormat format the workflow step text with the emoji
Types ¶
type App ¶
type App struct { *tview.Application Main *tview.Pages // contains filtered or unexported fields }
App represent the ui of application
func (*App) AddAction ¶
func (a *App) AddAction(actions model.KeyActions)
AddAction add a new keyAction
func (*App) Components ¶
Components return the application root components.
func (*App) QueueUpdateDraw ¶
func (a *App) QueueUpdateDraw(f func())
QueueUpdateDraw queues up a ui action and redraw the ui.
type Crumbs ¶
Crumbs component lay on footer of app and indicate resource level
func NewCrumbs ¶
func NewCrumbs(config *config.ThemeConfig) *Crumbs
NewCrumbs return a new crumbs component
type InfoBoard ¶
InfoBoard a component which display system info
func NewInfo ¶
func NewInfo(config *config.ThemeConfig) *InfoBoard
NewInfo return an info component instance
func (*InfoBoard) UpdateInfo ¶
UpdateInfo update the info of system info board
type Menu ¶
Menu is menu component which display key actions of app's main view
func (*Menu) UpdateMenu ¶
UpdateMenu update menu component
type Pages ¶
Pages is the app's main content view component
type Table ¶
Table is a base table component which can be reused by other component
func NewTable ¶
func NewTable(style *config.ThemeConfig) *Table
NewTable return a new table component
type ThemeSelector ¶ added in v1.7.0
ThemeSelector is used to select the theme
func NewThemeSelector ¶ added in v1.7.0
func NewThemeSelector(config *config.ThemeConfig, closeFun func()) *ThemeSelector
NewThemeSelector is used to create a new theme selector
func (*ThemeSelector) Init ¶ added in v1.7.0
func (s *ThemeSelector) Init()
Init is used to initialize the theme selector
func (*ThemeSelector) Start ¶ added in v1.7.0
func (s *ThemeSelector) Start()
Start is used to start the theme selector
type TopologyTreeNodeFormatter ¶ added in v1.7.0
type TopologyTreeNodeFormatter struct {
// contains filtered or unexported fields
}
TopologyTreeNodeFormatter is the formatter for the topology tree node
func NewTopologyTreeNodeFormatter ¶ added in v1.7.0
func NewTopologyTreeNodeFormatter(style *config.ThemeConfig) *TopologyTreeNodeFormatter
NewTopologyTreeNodeFormatter create a new topology tree node formatter
func (TopologyTreeNodeFormatter) ColorizeKind ¶ added in v1.7.0
func (t TopologyTreeNodeFormatter) ColorizeKind(kind string) string
ColorizeKind colorize the kind text
func (TopologyTreeNodeFormatter) ColorizeStatus ¶ added in v1.7.0
func (t TopologyTreeNodeFormatter) ColorizeStatus(status types.HealthStatusCode) string
ColorizeStatus colorize the status text
func (TopologyTreeNodeFormatter) EmojiFormat ¶ added in v1.7.0
func (t TopologyTreeNodeFormatter) EmojiFormat(name string, kind string) string
EmojiFormat format the name with the emoji