inspectui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchInstanceStateCmd

func FetchInstanceStateCmd(model InspectModel) tea.Cmd

FetchInstanceStateCmd fetches the instance state from the engine (exported for embedding).

func ToSplitPaneItems

func ToSplitPaneItems(items []deployui.DeployItem) []splitpane.Item

ToSplitPaneItems converts a slice of DeployItems to splitpane.Items.

Types

type BackToListMsg

type BackToListMsg struct{}

BackToListMsg is sent when the user wants to navigate back to the list view.

type InspectAppConfig

type InspectAppConfig struct {
	DeployEngine   engine.DeployEngine
	Logger         *zap.Logger
	InstanceID     string
	InstanceName   string
	Styles         *stylespkg.Styles
	Headless       bool
	HeadlessWriter io.Writer
	JSONMode       bool
}

InspectAppConfig holds configuration for creating a new inspect application.

type InspectDetailsRenderer

type InspectDetailsRenderer struct {
	MaxExpandDepth       int
	NavigationStackDepth int
	InstanceState        *state.InstanceState
	Finished             bool
}

InspectDetailsRenderer implements splitpane.DetailsRenderer for inspect UI.

func (*InspectDetailsRenderer) RenderDetails

func (r *InspectDetailsRenderer) RenderDetails(item splitpane.Item, width int, s *styles.Styles) string

RenderDetails renders the right pane content for a selected item.

type InspectErrorMsg

type InspectErrorMsg struct {
	Err error
}

InspectErrorMsg is sent when an error occurs.

type InspectEventMsg

type InspectEventMsg types.BlueprintInstanceEvent

InspectEventMsg wraps a deployment event for the inspect flow.

func (InspectEventMsg) AsFinish

AsFinish returns the finish data if this is a finish event.

type InspectFooterRenderer

type InspectFooterRenderer struct {
	InstanceID       string
	InstanceName     string
	CurrentStatus    core.InstanceStatus
	Streaming        bool
	Finished         bool
	SpinnerView      string
	HasInstanceState bool
	EmbeddedInList   bool // When true, shows "esc back to list" instead of "q quit"
}

InspectFooterRenderer implements splitpane.FooterRenderer for inspect UI.

func (*InspectFooterRenderer) RenderFooter

func (r *InspectFooterRenderer) RenderFooter(model *splitpane.Model, s *styles.Styles) string

RenderFooter renders the inspect-specific footer.

type InspectModel

type InspectModel struct {
	// contains filtered or unexported fields
}

InspectModel is the model for the inspect view.

func NewInspectModel

func NewInspectModel(cfg InspectModelConfig) *InspectModel

NewInspectModel creates a new inspect model.

func (*InspectModel) CurrentStatus

func (m *InspectModel) CurrentStatus() core.InstanceStatus

CurrentStatus returns the current status from the footer renderer.

func (*InspectModel) Err

func (m *InspectModel) Err() error

Err returns the current error from the inspect model.

func (*InspectModel) GetError

func (m *InspectModel) GetError() error

GetError returns the current error from the inspect model. Deprecated: Use Err() for consistency with other models.

func (InspectModel) Init

func (m InspectModel) Init() tea.Cmd

Init initializes the inspect model.

func (*InspectModel) InstanceState

func (m *InspectModel) InstanceState() *state.InstanceState

InstanceState returns the current instance state.

func (*InspectModel) IsFinished

func (m *InspectModel) IsFinished() bool

IsFinished returns whether the inspect operation has finished.

func (*InspectModel) IsInSubView

func (m *InspectModel) IsInSubView() bool

IsInSubView returns true if the inspect model is showing a sub-view (overview, spec, exports, or drill-down) where esc should close the sub-view rather than navigate back to the list.

func (*InspectModel) RefreshInstanceState

func (m *InspectModel) RefreshInstanceState(instanceState *state.InstanceState)

RefreshInstanceState updates the instance state and hydrates existing items with the latest ResourceState data. This preserves the current item list and selection while updating output/spec data for completed resources.

func (*InspectModel) SetEmbeddedInList

func (m *InspectModel) SetEmbeddedInList(embedded bool)

SetEmbeddedInList marks the inspect model as embedded within the list UI. This changes the footer to show "esc back to list" instead of just "q quit".

func (*InspectModel) SetInstanceState

func (m *InspectModel) SetInstanceState(instanceState *state.InstanceState)

SetInstanceState sets the instance state and rebuilds items from it.

func (InspectModel) Update

func (m InspectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages for the inspect model.

func (InspectModel) View

func (m InspectModel) View() string

View renders the inspect model.

type InspectModelConfig

type InspectModelConfig struct {
	DeployEngine   engine.DeployEngine
	Logger         *zap.Logger
	InstanceID     string
	InstanceName   string
	Styles         *stylespkg.Styles
	IsHeadless     bool
	HeadlessWriter io.Writer
	JSONMode       bool
}

InspectModelConfig holds configuration for creating a new inspect model.

type InspectSectionGrouper

type InspectSectionGrouper struct {
	shared.SectionGrouper
}

InspectSectionGrouper implements splitpane.SectionGrouper for inspect UI.

type InspectStreamClosedMsg

type InspectStreamClosedMsg struct{}

InspectStreamClosedMsg is sent when the event stream is closed.

type InspectStreamStartedMsg

type InspectStreamStartedMsg struct{}

InspectStreamStartedMsg is sent when the event stream has been started.

type InstanceInputFormModel

type InstanceInputFormModel struct {
	// contains filtered or unexported fields
}

InstanceInputFormModel provides a form for entering instance name/ID.

func NewInstanceInputFormModel

func NewInstanceInputFormModel(styles *stylespkg.Styles) *InstanceInputFormModel

NewInstanceInputFormModel creates a new instance input form.

func (*InstanceInputFormModel) Init

func (m *InstanceInputFormModel) Init() tea.Cmd

Init initializes the form.

func (*InstanceInputFormModel) Update

func (m *InstanceInputFormModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages.

func (*InstanceInputFormModel) View

func (m *InstanceInputFormModel) View() string

View renders the form.

type InstanceInputMsg

type InstanceInputMsg struct {
	InstanceID   string
	InstanceName string
}

InstanceInputMsg is sent when the user enters an instance identifier.

type InstanceNotFoundMsg

type InstanceNotFoundMsg struct {
	Err error
}

InstanceNotFoundMsg is sent when the instance is not found.

type InstanceStateFetchedMsg

type InstanceStateFetchedMsg struct {
	InstanceState *state.InstanceState
	IsInProgress  bool
}

InstanceStateFetchedMsg is sent when the instance state has been fetched.

type InstanceStateRefreshedMsg

type InstanceStateRefreshedMsg struct {
	InstanceState *state.InstanceState
}

InstanceStateRefreshedMsg is sent when the instance state has been refreshed during streaming.

type MainModel

type MainModel struct {
	Error error
	// contains filtered or unexported fields
}

MainModel is the top-level model for the inspect command TUI.

func NewInspectApp

func NewInspectApp(cfg InspectAppConfig) (*MainModel, error)

NewInspectApp creates a new inspect application with the given configuration.

func (MainModel) Init

func (m MainModel) Init() tea.Cmd

Init initializes the main model.

func (MainModel) Update

func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages for the main model.

func (MainModel) View

func (m MainModel) View() string

View renders the main model.

type StateRefreshTickMsg

type StateRefreshTickMsg struct{}

StateRefreshTickMsg triggers a periodic state refresh during streaming.

Jump to

Keyboard shortcuts

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