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 ¶
- type Dashboard
- func (d *Dashboard) Cleanup()
- func (d *Dashboard) HideRefreshing()
- func (d *Dashboard) SetRefreshFunc(f func())
- func (d *Dashboard) SetupGrid() *tview.Grid
- func (d *Dashboard) SetupKeyboardNavigation(app *tview.Application, grid *tview.Grid)
- func (d *Dashboard) ShowProgress(message string)
- func (d *Dashboard) ShowRefreshing()
- func (d *Dashboard) UpdateData(summary *models.MigrationSummary, organization string)
- type FilterOption
- type MigrationTable
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) 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
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
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