ui

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ui provides terminal user interface components.

This package implements the terminal-based dashboard using tview, including table components, keyboard navigation, and real-time data updates for migration monitoring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard added in v0.6.0

type Dashboard struct {
	AllMigrations *MigrationTable
	CommandBar    *tview.TextView
	StatusBar     *tview.TextView
	SearchInput   *tview.InputField
	MainGrid      *tview.Grid
	// contains filtered or unexported fields
}

Dashboard represents the main UI dashboard

func NewDashboard added in v0.6.0

func NewDashboard() *Dashboard

NewDashboard creates a new UI dashboard

func (*Dashboard) Cleanup added in v0.7.0

func (d *Dashboard) Cleanup()

Cleanup cancels any running goroutines and cleans up resources

func (*Dashboard) HideRefreshing added in v0.7.0

func (d *Dashboard) HideRefreshing()

HideRefreshing hides the loading indicator and shows last update time

func (*Dashboard) SetRefreshFunc added in v0.7.0

func (d *Dashboard) SetRefreshFunc(f func())

SetRefreshFunc sets the function to call when refresh is triggered

func (*Dashboard) SetupGrid added in v0.6.0

func (d *Dashboard) SetupGrid() *tview.Grid

SetupGrid creates and configures the grid layout

func (*Dashboard) SetupKeyboardNavigation added in v0.6.0

func (d *Dashboard) SetupKeyboardNavigation(app *tview.Application, grid *tview.Grid)

SetupKeyboardNavigation configures keyboard event handling

func (*Dashboard) ShowProgress added in v0.7.0

func (d *Dashboard) ShowProgress(message string)

ShowProgress shows progress with animated dots

func (*Dashboard) ShowRefreshing added in v0.7.0

func (d *Dashboard) ShowRefreshing()

ShowRefreshing displays a loading indicator with animation

func (*Dashboard) UpdateData added in v0.6.0

func (d *Dashboard) UpdateData(summary *models.MigrationSummary, organization string)

UpdateData updates the table with new migration data

type FilterOption added in v0.7.0

type FilterOption string

FilterOption represents different filter options

const (
	FilterAll        FilterOption = "All"
	FilterQueued     FilterOption = "Queued"
	FilterInProgress FilterOption = "In Progress"
	FilterSucceeded  FilterOption = "Succeeded"
	FilterFailed     FilterOption = "Failed"
)

type MigrationTable added in v0.6.0

type MigrationTable struct {
	*tview.Table
	// contains filtered or unexported fields
}

MigrationTable represents a table for displaying migrations

func NewMigrationTable added in v0.6.0

func NewMigrationTable(title string) *MigrationTable

NewMigrationTable creates a new migration table

func (*MigrationTable) GetTitle added in v0.6.0

func (mt *MigrationTable) GetTitle() string

GetTitle returns the table title

func (*MigrationTable) SetTitleWithOrganizationAndFilter added in v0.7.0

func (mt *MigrationTable) SetTitleWithOrganizationAndFilter(organization, filter string)

SetTitleWithOrganizationAndFilter updates the table title to include organization and filter

func (*MigrationTable) UpdateData added in v0.6.0

func (mt *MigrationTable) UpdateData(migrations []models.Migration)

UpdateData updates the table with new migration data

func (*MigrationTable) UpdateDataWithStatus added in v0.7.0

func (mt *MigrationTable) UpdateDataWithStatus(migrations []models.Migration)

UpdateDataWithStatus updates the table with migration data including status information

Jump to

Keyboard shortcuts

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