Documentation
¶
Overview ¶
Package ui implements the terminal user interface (TUI) for flashingestor using tview, providing interactive progress tracking and control.
Index ¶
- Variables
- type Application
- func (app *Application) AddDomainTab(domainName string)
- func (app *Application) DisableIngestion()
- func (app *Application) DisableRemoteCollection()
- func (app *Application) GetConversionTable() *tview.Table
- func (app *Application) GetDomainTable(domainName string) *tview.Table
- func (app *Application) GetRemoteCollectTable() *tview.Table
- func (app *Application) InsertIngestHeader(domainName string)
- func (app *Application) RequestDraw()
- func (app *Application) SetAbortCallback(callback func())
- func (app *Application) SetButtonCallbacks(ingestionCallback, conversionCallback, remoteCollectionCallback, ... func())
- func (app *Application) SetRunning(running bool, operationName string)
- func (app *Application) SetRuntimeOptions(opts *config.RuntimeOptions)
- func (app *Application) SetupConversionTable()
- func (app *Application) SetupIngestRow(domainName string, row int, jobName string)
- func (app *Application) SetupRemoteCollectionTable()
- func (app *Application) ShowYesNoModal(title, message string, onYes func(), onNo func())
- func (app *Application) StopThrottledUpdates()
- func (app *Application) SwitchToDomainTab(domainName string)
- func (app *Application) SwitchToNextDomainTab()
- func (app *Application) SwitchToPage(pageName string)
- func (app *Application) UpdateConversionRow(row int, status, processed, percent, speed, avgSpeed, eta, elapsed string)
- func (app *Application) UpdateIngestRow(domainName string, row int, ...)
- func (app *Application) UpdateLog(message string)
- func (app *Application) UpdateRemoteCollectionRow(row int, ...)
- type Spinner
Constants ¶
This section is empty.
Variables ¶
var SpinnerFrames = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
UI related constants
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
*tview.Application
// contains filtered or unexported fields
}
Application wraps the tview application for better organization
func NewApplication ¶
func NewApplication() *Application
NewApplication creates a new UI application instance
func (*Application) AddDomainTab ¶
func (app *Application) AddDomainTab(domainName string)
AddDomainTab creates a new tab for a domain's ingestion table Called from background goroutines (ingestDomain), must use QueueUpdateDraw
func (*Application) DisableIngestion ¶
func (app *Application) DisableIngestion()
DisableIngestion disables the ingestion button
func (*Application) DisableRemoteCollection ¶
func (app *Application) DisableRemoteCollection()
DisableRemoteCollection disables the remote collection button
func (*Application) GetConversionTable ¶
func (app *Application) GetConversionTable() *tview.Table
GetConversionTable returns the conversion table
func (*Application) GetDomainTable ¶
func (app *Application) GetDomainTable(domainName string) *tview.Table
GetDomainTable returns the table for a specific domain
func (*Application) GetRemoteCollectTable ¶
func (app *Application) GetRemoteCollectTable() *tview.Table
GetRemoteCollectTable returns the remote collection table
func (*Application) InsertIngestHeader ¶
func (app *Application) InsertIngestHeader(domainName string)
InsertIngestHeader initializes a row in the ingestion table for a specific domain Called from goroutine in ingestDomain
func (*Application) RequestDraw ¶ added in v0.2.0
func (app *Application) RequestDraw()
RequestDraw requests a UI redraw in a throttled manner
func (*Application) SetAbortCallback ¶
func (app *Application) SetAbortCallback(callback func())
SetAbortCallback updates the function invoked when the Abort button is pressed.
func (*Application) SetButtonCallbacks ¶
func (app *Application) SetButtonCallbacks(ingestionCallback, conversionCallback, remoteCollectionCallback, clearCacheCallback func())
SetButtonCallbacks sets the callback functions for all buttons
func (*Application) SetRunning ¶
func (app *Application) SetRunning(running bool, operationName string)
SetRunning enables or disables all buttons based on whether an operation is running NOTE: This can be called from either main goroutine (event handlers) or background goroutines.
func (*Application) SetRuntimeOptions ¶
func (app *Application) SetRuntimeOptions(opts *config.RuntimeOptions)
SetRuntimeOptions sets the runtime options reference for the UI
func (*Application) SetupConversionTable ¶
func (app *Application) SetupConversionTable()
SetupConversionTable initializes the conversion table
func (*Application) SetupIngestRow ¶
func (app *Application) SetupIngestRow(domainName string, row int, jobName string)
SetupIngestRow initializes a row in the ingestion table for a specific domain Called from goroutine in ingestDomain
func (*Application) SetupRemoteCollectionTable ¶
func (app *Application) SetupRemoteCollectionTable()
SetupRemoteCollectionTable initializes the remote collection table
func (*Application) ShowYesNoModal ¶
func (app *Application) ShowYesNoModal(title, message string, onYes func(), onNo func())
ShowYesNoModal displays a yes/no confirmation dialog and calls the appropriate callback
func (*Application) StopThrottledUpdates ¶ added in v0.2.0
func (app *Application) StopThrottledUpdates()
StopThrottledUpdates stops the throttled update mechanism
func (*Application) SwitchToDomainTab ¶
func (app *Application) SwitchToDomainTab(domainName string)
SwitchToDomainTab switches to a specific domain's ingestion table Called from background goroutines (ingestDomain), must use QueueUpdateDraw
func (*Application) SwitchToNextDomainTab ¶
func (app *Application) SwitchToNextDomainTab()
SwitchToNextDomainTab cycles to the next domain tab Called from keyboard input handlers (main goroutine), can directly modify UI
func (*Application) SwitchToPage ¶
func (app *Application) SwitchToPage(pageName string)
SwitchToPage switches between the progress tracker pages
func (*Application) UpdateConversionRow ¶
func (app *Application) UpdateConversionRow(row int, status, processed, percent, speed, avgSpeed, eta, elapsed string)
UpdateConversionRow updates a specific step in the conversion table row: 1=Cache Loading, 2=Schema Loading, 3=Domain Processing, 4-9=Object conversions Columns: 0=Status, 1=Step, 2=Processed, 3=Percent, 4=Speed, 5=Avg Speed, 6=ETA, 7=Elapsed
func (*Application) UpdateIngestRow ¶
func (app *Application) UpdateIngestRow(domainName string, row int, status, requests, entries, speed, avgSpeed, elapsed string)
UpdateIngestRow updates a specific row in the ingestion table for a specific domain
func (*Application) UpdateLog ¶
func (app *Application) UpdateLog(message string)
UpdateLog adds a message to the log panel with timestamp
func (*Application) UpdateRemoteCollectionRow ¶
func (app *Application) UpdateRemoteCollectionRow(row int, status, processed, percent, speed, avgSpeed, success, eta, elapsed string)
UpdateRemoteCollectionRow updates a specific step in the remote collection table row: 1=Cache Loading, 2=Load Computers, 3=Availability Checks, 4=DNS Lookups, 5=Remote Collection (CAs), 6=Remote Collection (Computers) Columns: 0=Status, 1=Step, 2=Processed, 3=Percent, 4=Speed, 5=Avg Speed, 6=Success, 7=ETA, 8=Elapsed
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner handles spinner animations for multiple domain tables
func NewSingleTableSpinner ¶
func NewSingleTableSpinner(app *Application, table *tview.Table, statusColumn int) *Spinner
NewSingleTableSpinner creates a spinner for a single table (no domain awareness)
func NewSpinner ¶
func NewSpinner(app *Application, jobs []gildap.QueryJob, statusColumn int) *Spinner
NewSpinner creates a new spinner that can handle multiple domain tables
func (*Spinner) RegisterDomain ¶
RegisterDomain adds a domain's table to the spinner
func (*Spinner) SetRunning ¶
SetRunning marks a row as running for a specific domain and job
func (*Spinner) SetRunningRow ¶
SetRunningRow marks a specific row as running (for single-table spinners)