instances

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionStart = iota
	ActionStop
	ActionSoftReboot
	ActionReboot
	ActionSSH
	ActionDelete
)

Action indices for the detail view

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailView

type DetailView struct {
	views.BaseView
	// contains filtered or unexported fields
}

DetailView displays instance details with actions.

func NewDetailView

func NewDetailView(ctx *views.Context, instance map[string]interface{}, imageName, floatingIP string) *DetailView

NewDetailView creates a new instance detail view.

func (*DetailView) HandleKey

func (v *DetailView) HandleKey(msg tea.KeyMsg) tea.Cmd

func (*DetailView) HelpText

func (v *DetailView) HelpText() string

func (*DetailView) Render

func (v *DetailView) Render(width, height int) string

func (*DetailView) Title

func (v *DetailView) Title() string

type ExecuteInstanceActionMsg

type ExecuteInstanceActionMsg struct {
	Instance map[string]interface{}
	Action   int
}

ExecuteInstanceActionMsg signals to execute an action on an instance.

type ShowInstanceDetailMsg

type ShowInstanceDetailMsg struct {
	Instance map[string]interface{}
}

ShowInstanceDetailMsg signals to show instance detail.

type TableView

type TableView struct {
	views.BaseView
	// contains filtered or unexported fields
}

TableView displays a list of instances in a table.

func NewTableView

func NewTableView(ctx *views.Context, data []map[string]interface{}, imageMap, floatingIPMap map[string]string) *TableView

NewTableView creates a new instance table view.

func (*TableView) GetSelectedInstance

func (v *TableView) GetSelectedInstance() map[string]interface{}

GetSelectedInstance returns the currently selected instance.

func (*TableView) HandleKey

func (v *TableView) HandleKey(msg tea.KeyMsg) tea.Cmd

func (*TableView) HelpText

func (v *TableView) HelpText() string

func (*TableView) Render

func (v *TableView) Render(width, height int) string

func (*TableView) Title

func (v *TableView) Title() string

func (*TableView) UpdateData

func (v *TableView) UpdateData(data []map[string]interface{}, imageMap, floatingIPMap map[string]string)

UpdateData updates the table with new data.

Jump to

Keyboard shortcuts

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