Documentation ¶
Index ¶
- Constants
- Variables
- func NewHelpView(app *App) model.View
- func NewLogView(ctx context.Context, app *App) model.View
- func NewTopologyView(ctx context.Context, app *App) model.View
- func NewYamlView(ctx context.Context, app *App) model.View
- type App
- type ApplicationView
- func (v *ApplicationView) BuildBody()
- func (v *ApplicationView) BuildHeader()
- func (v *ApplicationView) ColorizeStatusText(rowNum int)
- func (v *ApplicationView) Hint() []model.MenuHint
- func (v *ApplicationView) Init()
- func (v *ApplicationView) InitView(ctx context.Context, app *App)
- func (v *ApplicationView) Name() string
- func (v *ApplicationView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *ApplicationView) Start()
- func (v *ApplicationView) Stop()
- func (v *ApplicationView) Title() string
- func (v *ApplicationView) Update(timeoutCancel func())
- type ClusterNamespaceView
- func (v *ClusterNamespaceView) BuildBody()
- func (v *ClusterNamespaceView) BuildHeader()
- func (v *ClusterNamespaceView) ColorizeStatusText(rowNum int)
- func (v *ClusterNamespaceView) Hint() []model.MenuHint
- func (v *ClusterNamespaceView) Init()
- func (v *ClusterNamespaceView) InitView(ctx context.Context, app *App)
- func (v *ClusterNamespaceView) Name() string
- func (v *ClusterNamespaceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *ClusterNamespaceView) Start()
- func (v *ClusterNamespaceView) Stop()
- func (v *ClusterNamespaceView) Update(timeoutCancel func())
- type ClusterView
- func (v *ClusterView) BuildBody()
- func (v *ClusterView) BuildHeader()
- func (v *ClusterView) Hint() []model.MenuHint
- func (v *ClusterView) Init()
- func (v *ClusterView) InitView(ctx context.Context, app *App)
- func (v *ClusterView) Name() string
- func (v *ClusterView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *ClusterView) Start()
- func (v *ClusterView) Stop()
- func (v *ClusterView) Update(timeoutCancel func())
- type Command
- type CommonResourceView
- func (v *CommonResourceView) AutoRefresh(update func(timeoutCancel func()))
- func (v *CommonResourceView) BuildBody(body [][]string)
- func (v *CommonResourceView) BuildHeader(header []string)
- func (v *CommonResourceView) Init()
- func (v *CommonResourceView) Name() string
- func (v *CommonResourceView) Refresh(clear bool, update func(timeoutCancel func()))
- func (v *CommonResourceView) Stop()
- type ContainerView
- func (v *ContainerView) BuildBody()
- func (v *ContainerView) BuildHeader()
- func (v *ContainerView) ColorizePhaseText(rowNum int)
- func (v *ContainerView) Hint() []model.MenuHint
- func (v *ContainerView) Init()
- func (v *ContainerView) InitView(ctx context.Context, app *App)
- func (v *ContainerView) Name() string
- func (v *ContainerView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *ContainerView) Start()
- func (v *ContainerView) Stop()
- func (v *ContainerView) Update(timeoutCancel func())
- type HelpView
- type LogView
- type ManagedResourceView
- func (v *ManagedResourceView) BuildBody()
- func (v *ManagedResourceView) BuildHeader()
- func (v *ManagedResourceView) ColorizeStatusText(rowNum int)
- func (v *ManagedResourceView) Hint() []model.MenuHint
- func (v *ManagedResourceView) Init()
- func (v *ManagedResourceView) InitView(ctx context.Context, app *App)
- func (v *ManagedResourceView) Name() string
- func (v *ManagedResourceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *ManagedResourceView) Start()
- func (v *ManagedResourceView) Stop()
- func (v *ManagedResourceView) Title() string
- func (v *ManagedResourceView) Update(timeoutCancel func())
- type NamespaceView
- func (v *NamespaceView) BuildBody()
- func (v *NamespaceView) BuildHeader()
- func (v *NamespaceView) ColorizeStatusText(rowNum int)
- func (v *NamespaceView) Hint() []model.MenuHint
- func (v *NamespaceView) Init()
- func (v *NamespaceView) InitView(ctx context.Context, app *App)
- func (v *NamespaceView) Name() string
- func (v *NamespaceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *NamespaceView) Start()
- func (v *NamespaceView) Stop()
- func (v *NamespaceView) Update(timeoutCancel func())
- type PageStack
- type PodView
- func (v *PodView) BuildBody()
- func (v *PodView) BuildHeader()
- func (v *PodView) ColorizePhaseText(rowNum int)
- func (v *PodView) Hint() []model.MenuHint
- func (v *PodView) Init()
- func (v *PodView) InitView(ctx context.Context, app *App)
- func (v *PodView) Name() string
- func (v *PodView) Refresh(_ *tcell.EventKey) *tcell.EventKey
- func (v *PodView) Start()
- func (v *PodView) Stop()
- func (v *PodView) Update(timeoutCancel func())
- type ResourceView
- type TopologyTree
- type TopologyView
- func (v *TopologyView) AutoRefresh(update func(timeoutCancel func()))
- func (v *TopologyView) Hint() []model.MenuHint
- func (v *TopologyView) Init()
- func (v *TopologyView) Name() string
- func (v *TopologyView) NewAppTopologyView() *TopologyTree
- func (v *TopologyView) NewResourceTopologyView() *TopologyTree
- func (v *TopologyView) Refresh(clear bool, update func(timeoutCancel func()))
- func (v *TopologyView) Start()
- func (v *TopologyView) Stop()
- func (v *TopologyView) Update(timeoutCancel func())
- type YamlView
Constants ¶
const (
// RefreshDelay is refresh delay
RefreshDelay = 10
)
Variables ¶
var ResourceViewMap = map[string]ResourceView{ "app": new(ApplicationView), "cluster": new(ClusterView), "resource": new(ManagedResourceView), "ns": new(NamespaceView), "cns": new(ClusterNamespaceView), "pod": new(PodView), "container": new(ContainerView), }
ResourceViewMap is a map from resource name to resource view
Functions ¶
func NewLogView ¶
NewLogView return a new log view
func NewTopologyView ¶
NewTopologyView return a new topology view
Types ¶
type App ¶
App application object
func (*App) Back ¶
func (a *App) Back(_ *tcell.EventKey) *tcell.EventKey
Back to return before view corresponding to the ESC key
func (*App) SwitchTheme ¶ added in v1.7.0
func (a *App) SwitchTheme(_ *tcell.EventKey) *tcell.EventKey
SwitchTheme switch page to the theme switch page
type ApplicationView ¶
type ApplicationView struct { *CommonResourceView // contains filtered or unexported fields }
ApplicationView is the application view, this view display info of application of KubeVela
func (*ApplicationView) BuildBody ¶
func (v *ApplicationView) BuildBody()
BuildBody render the body of table
func (*ApplicationView) BuildHeader ¶
func (v *ApplicationView) BuildHeader()
BuildHeader render the header of table
func (*ApplicationView) ColorizeStatusText ¶
func (v *ApplicationView) ColorizeStatusText(rowNum int)
ColorizeStatusText colorize the status column text
func (*ApplicationView) Hint ¶
func (v *ApplicationView) Hint() []model.MenuHint
Hint return key action menu hints of the application view
func (*ApplicationView) InitView ¶
func (v *ApplicationView) InitView(ctx context.Context, app *App)
InitView return a new application view
func (*ApplicationView) Name ¶
func (v *ApplicationView) Name() string
Name return application view name
func (*ApplicationView) Refresh ¶
func (v *ApplicationView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*ApplicationView) Title ¶
func (v *ApplicationView) Title() string
Title return table title of application view
func (*ApplicationView) Update ¶
func (v *ApplicationView) Update(timeoutCancel func())
Update refresh the content of body of view
type ClusterNamespaceView ¶
type ClusterNamespaceView struct { *CommonResourceView // contains filtered or unexported fields }
ClusterNamespaceView is the cluster namespace, which display the namespace info of application's resource
func (*ClusterNamespaceView) BuildBody ¶
func (v *ClusterNamespaceView) BuildBody()
BuildBody render the body of table
func (*ClusterNamespaceView) BuildHeader ¶
func (v *ClusterNamespaceView) BuildHeader()
BuildHeader render the header of table
func (*ClusterNamespaceView) ColorizeStatusText ¶
func (v *ClusterNamespaceView) ColorizeStatusText(rowNum int)
ColorizeStatusText colorize the status column text
func (*ClusterNamespaceView) Hint ¶
func (v *ClusterNamespaceView) Hint() []model.MenuHint
Hint return key action menu hints of the cluster namespace view
func (*ClusterNamespaceView) Init ¶
func (v *ClusterNamespaceView) Init()
Init the cluster namespace view
func (*ClusterNamespaceView) InitView ¶
func (v *ClusterNamespaceView) InitView(ctx context.Context, app *App)
InitView init a new cluster namespace view
func (*ClusterNamespaceView) Name ¶
func (v *ClusterNamespaceView) Name() string
Name return cluster namespace view name
func (*ClusterNamespaceView) Refresh ¶
func (v *ClusterNamespaceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*ClusterNamespaceView) Start ¶
func (v *ClusterNamespaceView) Start()
Start the cluster namespace view
func (*ClusterNamespaceView) Stop ¶
func (v *ClusterNamespaceView) Stop()
Stop the cluster namespace view
func (*ClusterNamespaceView) Update ¶
func (v *ClusterNamespaceView) Update(timeoutCancel func())
Update refresh the content of body of view
type ClusterView ¶
type ClusterView struct { *CommonResourceView // contains filtered or unexported fields }
ClusterView is the cluster view, this view display info of cluster where selected application deployed
func (*ClusterView) BuildBody ¶
func (v *ClusterView) BuildBody()
BuildBody render the body of table
func (*ClusterView) BuildHeader ¶
func (v *ClusterView) BuildHeader()
BuildHeader render the header of table
func (*ClusterView) Hint ¶
func (v *ClusterView) Hint() []model.MenuHint
Hint return key action menu hints of the cluster view
func (*ClusterView) InitView ¶
func (v *ClusterView) InitView(ctx context.Context, app *App)
InitView init a new cluster view
func (*ClusterView) Refresh ¶
func (v *ClusterView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*ClusterView) Update ¶
func (v *ClusterView) Update(timeoutCancel func())
Update refresh the content of body of view
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is a kind of abstract of user UI operation
type CommonResourceView ¶
CommonResourceView is an abstract of resource view
func NewCommonView ¶
func NewCommonView(app *App) *CommonResourceView
NewCommonView return a new common view
func (*CommonResourceView) AutoRefresh ¶
func (v *CommonResourceView) AutoRefresh(update func(timeoutCancel func()))
AutoRefresh will refresh the view in every RefreshDelay delay
func (*CommonResourceView) BuildBody ¶
func (v *CommonResourceView) BuildBody(body [][]string)
BuildBody render the body of table
func (*CommonResourceView) BuildHeader ¶
func (v *CommonResourceView) BuildHeader(header []string)
BuildHeader render the header of table
func (*CommonResourceView) Name ¶
func (v *CommonResourceView) Name() string
Name return the name of common view
func (*CommonResourceView) Refresh ¶
func (v *CommonResourceView) Refresh(clear bool, update func(timeoutCancel func()))
Refresh the base resource view
func (*CommonResourceView) Stop ¶
func (v *CommonResourceView) Stop()
Stop the refresh goroutine and clear the table content
type ContainerView ¶
type ContainerView struct { *CommonResourceView // contains filtered or unexported fields }
ContainerView is a view which displays info of container of aime pod
func (*ContainerView) BuildBody ¶
func (v *ContainerView) BuildBody()
BuildBody render the body of table
func (*ContainerView) BuildHeader ¶
func (v *ContainerView) BuildHeader()
BuildHeader render the header of table
func (*ContainerView) ColorizePhaseText ¶
func (v *ContainerView) ColorizePhaseText(rowNum int)
ColorizePhaseText colorize the state column text
func (*ContainerView) Hint ¶
func (v *ContainerView) Hint() []model.MenuHint
Hint return key action menu hints of the container view
func (*ContainerView) InitView ¶
func (v *ContainerView) InitView(ctx context.Context, app *App)
InitView init a new container view
func (*ContainerView) Refresh ¶
func (v *ContainerView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*ContainerView) Update ¶
func (v *ContainerView) Update(timeoutCancel func())
Update refresh the content of body of view
type HelpView ¶
HelpView is the view which display help tips about how to use app
type LogView ¶
LogView is the log view, this view display log of pod
type ManagedResourceView ¶
type ManagedResourceView struct { *CommonResourceView // contains filtered or unexported fields }
ManagedResourceView is a view which displays info of application's managed resource including CRDs and k8s objects
func (*ManagedResourceView) BuildBody ¶
func (v *ManagedResourceView) BuildBody()
BuildBody render the body of table
func (*ManagedResourceView) BuildHeader ¶
func (v *ManagedResourceView) BuildHeader()
BuildHeader render the header of table
func (*ManagedResourceView) ColorizeStatusText ¶
func (v *ManagedResourceView) ColorizeStatusText(rowNum int)
ColorizeStatusText colorize the status column text
func (*ManagedResourceView) Hint ¶
func (v *ManagedResourceView) Hint() []model.MenuHint
Hint return key action menu hints of the managed resource view
func (*ManagedResourceView) InitView ¶
func (v *ManagedResourceView) InitView(ctx context.Context, app *App)
InitView init a new managed resource view
func (*ManagedResourceView) Name ¶
func (v *ManagedResourceView) Name() string
Name return managed resource view name
func (*ManagedResourceView) Refresh ¶
func (v *ManagedResourceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*ManagedResourceView) Start ¶
func (v *ManagedResourceView) Start()
Start the managed resource view
func (*ManagedResourceView) Stop ¶
func (v *ManagedResourceView) Stop()
Stop the managed resource view
func (*ManagedResourceView) Title ¶
func (v *ManagedResourceView) Title() string
Title return the table title of managed resource view
func (*ManagedResourceView) Update ¶
func (v *ManagedResourceView) Update(timeoutCancel func())
Update refresh the content of body of view
type NamespaceView ¶
type NamespaceView struct { *CommonResourceView // contains filtered or unexported fields }
NamespaceView is namespace view struct
func (*NamespaceView) BuildBody ¶
func (v *NamespaceView) BuildBody()
BuildBody render the body of table
func (*NamespaceView) BuildHeader ¶
func (v *NamespaceView) BuildHeader()
BuildHeader render the header of table
func (*NamespaceView) ColorizeStatusText ¶
func (v *NamespaceView) ColorizeStatusText(rowNum int)
ColorizeStatusText colorize the status column text
func (*NamespaceView) Hint ¶
func (v *NamespaceView) Hint() []model.MenuHint
Hint return key action menu hints of the k8s view
func (*NamespaceView) InitView ¶
func (v *NamespaceView) InitView(ctx context.Context, app *App)
InitView init a new namespace view
func (*NamespaceView) Refresh ¶
func (v *NamespaceView) Refresh(_ *tcell.EventKey) *tcell.EventKey
Refresh the view content
func (*NamespaceView) Update ¶
func (v *NamespaceView) Update(timeoutCancel func())
Update refresh the content of body of view
type PageStack ¶
PageStack store views of app's main view, and it's a high level packing of "component.Pages"
type PodView ¶
type PodView struct { *CommonResourceView // contains filtered or unexported fields }
PodView is the pod view, this view display info of pod belonging to component
func (*PodView) BuildHeader ¶
func (v *PodView) BuildHeader()
BuildHeader render the header of table
func (*PodView) ColorizePhaseText ¶
ColorizePhaseText colorize the phase column text
type ResourceView ¶
type ResourceView interface { model.View InitView(ctx context.Context, app *App) Refresh(event *tcell.EventKey) *tcell.EventKey Update(timeoutCancel func()) BuildHeader() BuildBody() }
ResourceView is the interface to abstract resource view
type TopologyTree ¶ added in v1.6.1
TopologyTree is the abstract of topology tree
type TopologyView ¶
TopologyView display the resource topology of application
func (*TopologyView) AutoRefresh ¶ added in v1.6.4
func (v *TopologyView) AutoRefresh(update func(timeoutCancel func()))
AutoRefresh will refresh the view in every RefreshDelay delay
func (*TopologyView) Hint ¶
func (v *TopologyView) Hint() []model.MenuHint
Hint return the menu hints of topology view
func (*TopologyView) Name ¶
func (v *TopologyView) Name() string
Name return the name of topology view
func (*TopologyView) NewAppTopologyView ¶
func (v *TopologyView) NewAppTopologyView() *TopologyTree
NewAppTopologyView return a new app topology view
func (*TopologyView) NewResourceTopologyView ¶
func (v *TopologyView) NewResourceTopologyView() *TopologyTree
NewResourceTopologyView return a new resource topology view
func (*TopologyView) Refresh ¶ added in v1.6.4
func (v *TopologyView) Refresh(clear bool, update func(timeoutCancel func()))
Refresh the topology view
func (*TopologyView) Update ¶ added in v1.6.4
func (v *TopologyView) Update(timeoutCancel func())
Update the topology view