views

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColoredState

func ColoredState(state, stateType string) string

ColoredState returns a colored string based on state type

func FormatCPUUsage

func FormatCPUUsage(used, total int) string

FormatCPUUsage formats CPU usage percentage

func FormatDuration

func FormatDuration(d string) string

FormatDuration formats a duration into a human-readable string

func FormatDurationDetailed

func FormatDurationDetailed(d time.Duration) string

FormatDurationDetailed formats a duration to a readable string

func FormatMemory

func FormatMemory(mb int64) string

FormatMemory formats memory size in MB to human-readable format

func FormatTimeDuration

func FormatTimeDuration(d time.Duration) string

FormatTimeDuration formats a time.Duration for display

func GetJobStateColor

func GetJobStateColor(state string) string

GetJobStateColor returns the color for a job state

func GetNodeStateColor

func GetNodeStateColor(state string) string

GetNodeStateColor returns the color for a node state

func GetPartitionStateColor

func GetPartitionStateColor(state string) string

GetPartitionStateColor returns the color for a partition state

func OLD_showJobTemplateSelector

func OLD_showJobTemplateSelector(v *JobsView)

OLD_showJobTemplateSelector shows template selection dialog - DEPRECATED

func ShowHelpModal

func ShowHelpModal(pages *tview.Pages)

ShowHelpModal shows the help as a modal dialog

func TruncateString

func TruncateString(s string, maxLen int) string

TruncateString truncates a string to the specified length with ellipsis

Types

type AccountsView

type AccountsView struct {
	*BaseView
	// contains filtered or unexported fields
}

AccountsView displays the accounts list

func NewAccountsView

func NewAccountsView(client dao.SlurmClient) *AccountsView

NewAccountsView creates a new accounts view

func (*AccountsView) Hints

func (v *AccountsView) Hints() []string

Hints returns keyboard hints

func (*AccountsView) Init

func (v *AccountsView) Init(ctx context.Context) error

Init initializes the accounts view

func (*AccountsView) OnFocus

func (v *AccountsView) OnFocus() error

OnFocus handles focus events

func (*AccountsView) OnKey

func (v *AccountsView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*AccountsView) OnLoseFocus

func (v *AccountsView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*AccountsView) Refresh

func (v *AccountsView) Refresh() error

Refresh updates the accounts data

func (*AccountsView) Render

func (v *AccountsView) Render() tview.Primitive

Render returns the view's main component

func (*AccountsView) SetApp

func (v *AccountsView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*AccountsView) SetPages

func (v *AccountsView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*AccountsView) Stop

func (v *AccountsView) Stop() error

Stop stops the view

type Alert

type Alert struct {
	Level   string
	Icon    string
	Color   string
	Message string
}

Alert represents a system alert

type BaseView

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

BaseView provides common functionality for all views

func NewBaseView

func NewBaseView(name, title string) *BaseView

NewBaseView creates a new base view instance

func (*BaseView) GetApp

func (v *BaseView) GetApp() *tview.Application

GetApp returns the tview application reference

func (*BaseView) GetLastError

func (v *BaseView) GetLastError() error

GetLastError returns the last error that occurred

func (*BaseView) Hints

func (v *BaseView) Hints() []string

Hints returns keyboard shortcut hints for the status bar (default implementation)

func (*BaseView) Init

func (v *BaseView) Init(ctx context.Context) error

Init initializes the base view

func (*BaseView) IsRefreshing

func (v *BaseView) IsRefreshing() bool

IsRefreshing returns true if the view is currently refreshing

func (*BaseView) Name

func (v *BaseView) Name() string

Name returns the view name

func (*BaseView) OnFocus

func (v *BaseView) OnFocus() error

OnFocus provides default focus handling

func (*BaseView) OnKey

func (v *BaseView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey provides default key handling

func (*BaseView) OnLoseFocus

func (v *BaseView) OnLoseFocus() error

OnLoseFocus provides default focus loss handling

func (*BaseView) Refresh

func (v *BaseView) Refresh() error

Refresh provides default refresh (must be overridden)

func (*BaseView) Render

func (v *BaseView) Render() tview.Primitive

Render provides default render (must be overridden)

func (*BaseView) SetApp

func (v *BaseView) SetApp(app *tview.Application)

SetApp sets the tview application reference

func (*BaseView) SetLastError

func (v *BaseView) SetLastError(err error)

SetLastError sets the last error

func (*BaseView) SetRefreshing

func (v *BaseView) SetRefreshing(refreshing bool)

SetRefreshing sets the refreshing state

func (*BaseView) Stop

func (v *BaseView) Stop() error

Stop provides default stop implementation

func (*BaseView) Title

func (v *BaseView) Title() string

Title returns the view title

type BatchOperation

type BatchOperation string

BatchOperation represents a batch operation type

const (
	BatchCancel   BatchOperation = "cancel"
	BatchHold     BatchOperation = "hold"
	BatchRelease  BatchOperation = "release"
	BatchRequeue  BatchOperation = "requeue"
	BatchDelete   BatchOperation = "delete"
	BatchPriority BatchOperation = "priority"
	BatchExport   BatchOperation = "export"
)

type BatchOperationsView

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

BatchOperationsView handles batch operations on multiple jobs

func NewBatchOperationsView

func NewBatchOperationsView(client dao.SlurmClient, app *tview.Application) *BatchOperationsView

NewBatchOperationsView creates a new batch operations view

func (*BatchOperationsView) SetPages

func (v *BatchOperationsView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*BatchOperationsView) ShowBatchOperations

func (v *BatchOperationsView) ShowBatchOperations(selectedJobs []string, selectedJobsData []map[string]interface{}, onComplete func())

ShowBatchOperations displays the batch operations modal

type ConfigView

type ConfigView struct {
	*tview.Flex
	// contains filtered or unexported fields
}

ConfigView provides a configuration management interface

func NewConfigView

func NewConfigView(app *tview.Application, pages *tview.Pages, configPath string) *ConfigView

NewConfigView creates a new configuration view

func (*ConfigView) Focus

func (cv *ConfigView) Focus(delegate func(p tview.Primitive))

Focus implements tview.Primitive

func (*ConfigView) GetConfigPath

func (cv *ConfigView) GetConfigPath() string

GetConfigPath returns the configuration file path

func (*ConfigView) GetCurrentConfig

func (cv *ConfigView) GetCurrentConfig() *config.Config

GetCurrentConfig returns the current configuration

func (*ConfigView) HasUnsavedChanges

func (cv *ConfigView) HasUnsavedChanges() bool

HasUnsavedChanges returns whether there are unsaved changes

func (*ConfigView) Refresh

func (cv *ConfigView) Refresh()

Refresh reloads the configuration

func (*ConfigView) SetConfigChangedCallback

func (cv *ConfigView) SetConfigChangedCallback(callback func(*config.Config))

SetConfigChangedCallback sets the callback for configuration changes

type DashboardView

type DashboardView struct {
	*BaseView
	// contains filtered or unexported fields
}

DashboardView displays a comprehensive cluster overview

func NewDashboardView

func NewDashboardView(client dao.SlurmClient) *DashboardView

NewDashboardView creates a new dashboard view

func (*DashboardView) Hints

func (v *DashboardView) Hints() []string

Hints returns keyboard hints

func (*DashboardView) Init

func (v *DashboardView) Init(ctx context.Context) error

Init initializes the dashboard view

func (*DashboardView) OnFocus

func (v *DashboardView) OnFocus() error

OnFocus handles focus events

func (*DashboardView) OnKey

func (v *DashboardView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*DashboardView) OnLoseFocus

func (v *DashboardView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*DashboardView) Refresh

func (v *DashboardView) Refresh() error

Refresh updates all dashboard data

func (*DashboardView) Render

func (v *DashboardView) Render() tview.Primitive

Render returns the view's main component

func (*DashboardView) SetPages

func (v *DashboardView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*DashboardView) Stop

func (v *DashboardView) Stop() error

Stop stops the view

type EnhancedTerminalView

type EnhancedTerminalView struct {
	BaseView
	// contains filtered or unexported fields
}

EnhancedTerminalView provides an advanced multi-pane terminal interface

func NewEnhancedTerminalView

func NewEnhancedTerminalView(client dao.SlurmClient) *EnhancedTerminalView

NewEnhancedTerminalView creates a new enhanced terminal view

func (*EnhancedTerminalView) BroadcastCommand

func (etv *EnhancedTerminalView) BroadcastCommand(command string) error

BroadcastCommand sends a command to all active terminals

func (*EnhancedTerminalView) GetActiveNodes

func (etv *EnhancedTerminalView) GetActiveNodes() []string

GetActiveNodes returns the list of active node connections

func (*EnhancedTerminalView) GetTerminalCount

func (etv *EnhancedTerminalView) GetTerminalCount() int

GetTerminalCount returns the number of active terminals

func (*EnhancedTerminalView) Hints

func (etv *EnhancedTerminalView) Hints() []string

func (*EnhancedTerminalView) Init

func (etv *EnhancedTerminalView) Init(ctx context.Context) error

Init initializes the enhanced terminal view

func (*EnhancedTerminalView) OnKey

func (etv *EnhancedTerminalView) OnKey(event *tcell.EventKey) *tcell.EventKey

func (*EnhancedTerminalView) Refresh

func (etv *EnhancedTerminalView) Refresh() error

func (*EnhancedTerminalView) Render

func (etv *EnhancedTerminalView) Render() tview.Primitive

BaseView interface implementation

func (*EnhancedTerminalView) Stop

func (etv *EnhancedTerminalView) Stop()

func (*EnhancedTerminalView) Update

func (etv *EnhancedTerminalView) Update() error

type FilteredJobOutputView

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

FilteredJobOutputView displays job output with filtering and search capabilities

func NewFilteredJobOutputView

func NewFilteredJobOutputView(client dao.SlurmClient, app *tview.Application, configPath string) (*FilteredJobOutputView, error)

NewFilteredJobOutputView creates a new filtered job output view

func (*FilteredJobOutputView) Close

func (v *FilteredJobOutputView) Close() error

Close cleans up resources

func (*FilteredJobOutputView) SetPages

func (v *FilteredJobOutputView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*FilteredJobOutputView) ShowJobOutput

func (v *FilteredJobOutputView) ShowJobOutput(jobID, jobName, outputType string)

ShowJobOutput displays job output with filtering support

type GlobalSearch

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

GlobalSearch provides global search functionality across all data types

func NewGlobalSearch

func NewGlobalSearch(client dao.SlurmClient, app *tview.Application) *GlobalSearch

NewGlobalSearch creates a new global search component

func (*GlobalSearch) Show

func (gs *GlobalSearch) Show(pages *tview.Pages, onSelect func(result SearchResult))

Show displays the global search interface

type HealthView

type HealthView struct {
	*BaseView
	// contains filtered or unexported fields
}

HealthView displays cluster health monitoring information

func NewHealthView

func NewHealthView(client dao.SlurmClient) *HealthView

NewHealthView creates a new health monitoring view

func (*HealthView) Hints

func (v *HealthView) Hints() []string

Hints returns keyboard hints

func (*HealthView) Init

func (v *HealthView) Init(ctx context.Context) error

Init initializes the health view

func (*HealthView) OnFocus

func (v *HealthView) OnFocus() error

OnFocus handles focus events

func (*HealthView) OnKey

func (v *HealthView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*HealthView) OnLoseFocus

func (v *HealthView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*HealthView) Refresh

func (v *HealthView) Refresh() error

Refresh updates the health monitoring data

func (*HealthView) Render

func (v *HealthView) Render() tview.Primitive

Render returns the view's main component

func (*HealthView) SetApp

func (v *HealthView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*HealthView) SetPages

func (v *HealthView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*HealthView) Stop

func (v *HealthView) Stop() error

Stop stops the view

type HelpView

type HelpView struct {
	*BaseView
	// contains filtered or unexported fields
}

HelpView displays interactive help and keyboard shortcuts

func NewHelpView

func NewHelpView() *HelpView

NewHelpView creates a new help view

func (*HelpView) OnFocus

func (v *HelpView) OnFocus() error

OnFocus handles focus events

func (*HelpView) OnKey

func (v *HelpView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*HelpView) OnLoseFocus

func (v *HelpView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*HelpView) Render

func (v *HelpView) Render() tview.Primitive

Render returns the view's main component

func (*HelpView) SetApp

func (v *HelpView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*HelpView) SetPages

func (v *HelpView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

type HighlightPatternsView

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

HighlightPatternsView manages highlight patterns separately

func NewHighlightPatternsView

func NewHighlightPatternsView(app *tview.Application, prefsManager *preferences.StreamingPreferencesManager) *HighlightPatternsView

NewHighlightPatternsView creates a new highlight patterns view

func (*HighlightPatternsView) SetPages

func (v *HighlightPatternsView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*HighlightPatternsView) Show

func (v *HighlightPatternsView) Show()

Show displays the highlight patterns dialog

type JobDependency

type JobDependency struct {
	JobID     string
	DependsOn []string
	Type      string // "afterok", "afternotok", "afterany", "after"
	Status    string // "waiting", "satisfied", "failed"
}

JobDependency represents a job dependency relationship

type JobOutputView

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

JobOutputView displays job output (stdout/stderr) with real-time streaming support

func NewJobOutputView

func NewJobOutputView(client dao.SlurmClient, app *tview.Application) *JobOutputView

NewJobOutputView creates a new job output view

func (*JobOutputView) SetPages

func (v *JobOutputView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*JobOutputView) SetStreamManager

func (v *JobOutputView) SetStreamManager(streamManager *streaming.StreamManager)

SetStreamManager sets the stream manager for real-time streaming

func (*JobOutputView) ShowJobOutput

func (v *JobOutputView) ShowJobOutput(jobID, jobName, outputType string)

ShowJobOutput displays job output in a modal

type JobSubmissionWizard

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

JobSubmissionWizard provides an interactive interface for submitting jobs

func NewJobSubmissionWizard

func NewJobSubmissionWizard(client dao.SlurmClient, app *tview.Application) *JobSubmissionWizard

NewJobSubmissionWizard creates a new job submission wizard

func (*JobSubmissionWizard) Show

func (w *JobSubmissionWizard) Show(pages *tview.Pages, onSubmit func(jobID string), onCancel func())

Show displays the job submission wizard

type JobTemplate

type JobTemplate struct {
	Name          string             `json:"name"`
	Description   string             `json:"description"`
	JobSubmission *dao.JobSubmission `json:"job_submission"`
}

JobTemplate represents a saved job configuration

type JobTemplateManager

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

JobTemplateManager manages job templates

func NewJobTemplateManager

func NewJobTemplateManager() *JobTemplateManager

NewJobTemplateManager creates a new job template manager

type JobsView

type JobsView struct {
	*BaseView
	// contains filtered or unexported fields
}

JobsView displays the jobs list

func NewJobsView

func NewJobsView(client dao.SlurmClient) *JobsView

NewJobsView creates a new jobs view

func (*JobsView) Hints

func (v *JobsView) Hints() []string

Hints returns keyboard hints

func (*JobsView) Init

func (v *JobsView) Init(ctx context.Context) error

Init initializes the jobs view

func (*JobsView) OnFocus

func (v *JobsView) OnFocus() error

OnFocus handles focus events

func (*JobsView) OnKey

func (v *JobsView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*JobsView) OnLoseFocus

func (v *JobsView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*JobsView) Refresh

func (v *JobsView) Refresh() error

Refresh updates the jobs data

func (*JobsView) Render

func (v *JobsView) Render() tview.Primitive

Render returns the view's main component

func (*JobsView) SetApp

func (v *JobsView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*JobsView) SetPages

func (v *JobsView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*JobsView) SetStatusBar

func (v *JobsView) SetStatusBar(statusBar *components.StatusBar)

SetStatusBar sets the main status bar reference

func (*JobsView) Stop

func (v *JobsView) Stop() error

Stop stops the view

type ModalHandler

type ModalHandler interface {
	ShowModal(name string, modal tview.Primitive)
	HideModal(name string)
}

ModalHandler provides methods for showing and hiding modals

type NodesView

type NodesView struct {
	*BaseView
	// contains filtered or unexported fields
}

NodesView displays the nodes list with resource utilization

func NewNodesView

func NewNodesView(client dao.SlurmClient) *NodesView

NewNodesView creates a new nodes view

func (*NodesView) Hints

func (v *NodesView) Hints() []string

Hints returns keyboard hints

func (*NodesView) Init

func (v *NodesView) Init(ctx context.Context) error

Init initializes the nodes view

func (*NodesView) OnFocus

func (v *NodesView) OnFocus() error

OnFocus handles focus events

func (*NodesView) OnKey

func (v *NodesView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*NodesView) OnLoseFocus

func (v *NodesView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*NodesView) Refresh

func (v *NodesView) Refresh() error

Refresh updates the nodes data

func (*NodesView) Render

func (v *NodesView) Render() tview.Primitive

Render returns the view's main component

func (*NodesView) SetApp

func (v *NodesView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*NodesView) SetPages

func (v *NodesView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*NodesView) Stop

func (v *NodesView) Stop() error

Stop stops the view

type PartitionsView

type PartitionsView struct {
	*BaseView
	// contains filtered or unexported fields
}

PartitionsView displays the partitions list with queue depth visualization

func NewPartitionsView

func NewPartitionsView(client dao.SlurmClient) *PartitionsView

NewPartitionsView creates a new partitions view

func (*PartitionsView) Hints

func (v *PartitionsView) Hints() []string

Hints returns keyboard hints

func (*PartitionsView) Init

func (v *PartitionsView) Init(ctx context.Context) error

Init initializes the partitions view

func (*PartitionsView) OnFocus

func (v *PartitionsView) OnFocus() error

OnFocus handles focus events

func (*PartitionsView) OnKey

func (v *PartitionsView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*PartitionsView) OnLoseFocus

func (v *PartitionsView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*PartitionsView) Refresh

func (v *PartitionsView) Refresh() error

Refresh updates the partitions data

func (*PartitionsView) Render

func (v *PartitionsView) Render() tview.Primitive

Render returns the view's main component

func (*PartitionsView) SetApp

func (v *PartitionsView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*PartitionsView) SetPages

func (v *PartitionsView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*PartitionsView) Stop

func (v *PartitionsView) Stop() error

Stop stops the view

type PerformanceView

type PerformanceView struct {
	BaseView
	// contains filtered or unexported fields
}

PerformanceView provides a comprehensive performance monitoring interface

func NewPerformanceView

func NewPerformanceView(client dao.SlurmClient) *PerformanceView

NewPerformanceView creates a new performance monitoring view

func (*PerformanceView) Hints

func (pv *PerformanceView) Hints() []string

Hints returns keyboard shortcuts

func (*PerformanceView) Init

func (pv *PerformanceView) Init(ctx context.Context) error

Init initializes the performance view

func (*PerformanceView) OnFocus

func (pv *PerformanceView) OnFocus() error

OnFocus is called when the view gains focus

func (*PerformanceView) OnKey

func (pv *PerformanceView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles key events

func (*PerformanceView) OnLoseFocus

func (pv *PerformanceView) OnLoseFocus() error

OnLoseFocus is called when the view loses focus

func (*PerformanceView) Refresh

func (pv *PerformanceView) Refresh() error

Refresh manually refreshes the view

func (*PerformanceView) Render

func (pv *PerformanceView) Render() tview.Primitive

Render returns the main container

func (*PerformanceView) SetApp

func (pv *PerformanceView) SetApp(app *tview.Application)

SetApp sets the tview application reference

func (*PerformanceView) SetPages

func (pv *PerformanceView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*PerformanceView) Stop

func (pv *PerformanceView) Stop() error

Stop stops the performance monitoring

func (*PerformanceView) Update

func (pv *PerformanceView) Update() error

Update refreshes the view data

type QoSView

type QoSView struct {
	*BaseView
	// contains filtered or unexported fields
}

QoSView displays the QoS (Quality of Service) list

func NewQoSView

func NewQoSView(client dao.SlurmClient) *QoSView

NewQoSView creates a new QoS view

func (*QoSView) Hints

func (v *QoSView) Hints() []string

Hints returns keyboard hints

func (*QoSView) Init

func (v *QoSView) Init(ctx context.Context) error

Init initializes the QoS view

func (*QoSView) OnFocus

func (v *QoSView) OnFocus() error

OnFocus handles focus events

func (*QoSView) OnKey

func (v *QoSView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*QoSView) OnLoseFocus

func (v *QoSView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*QoSView) Refresh

func (v *QoSView) Refresh() error

Refresh updates the QoS data

func (*QoSView) Render

func (v *QoSView) Render() tview.Primitive

Render returns the view's main component

func (*QoSView) SetApp

func (v *QoSView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*QoSView) SetPages

func (v *QoSView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*QoSView) Stop

func (v *QoSView) Stop() error

Stop stops the view

type ReservationsView

type ReservationsView struct {
	*BaseView
	// contains filtered or unexported fields
}

ReservationsView displays the reservations list

func NewReservationsView

func NewReservationsView(client dao.SlurmClient) *ReservationsView

NewReservationsView creates a new reservations view

func (*ReservationsView) Hints

func (v *ReservationsView) Hints() []string

Hints returns keyboard hints

func (*ReservationsView) Init

func (v *ReservationsView) Init(ctx context.Context) error

Init initializes the reservations view

func (*ReservationsView) OnFocus

func (v *ReservationsView) OnFocus() error

OnFocus handles focus events

func (*ReservationsView) OnKey

func (v *ReservationsView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*ReservationsView) OnLoseFocus

func (v *ReservationsView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*ReservationsView) Refresh

func (v *ReservationsView) Refresh() error

Refresh updates the reservations data

func (*ReservationsView) Render

func (v *ReservationsView) Render() tview.Primitive

Render returns the view's main component

func (*ReservationsView) SetApp

func (v *ReservationsView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*ReservationsView) SetPages

func (v *ReservationsView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*ReservationsView) Stop

func (v *ReservationsView) Stop() error

Stop stops the view

type SSHTerminalView

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

SSHTerminalView provides an SSH terminal interface

func NewSSHTerminalView

func NewSSHTerminalView(app *tview.Application) *SSHTerminalView

NewSSHTerminalView creates a new SSH terminal view

func (*SSHTerminalView) SetNodes

func (v *SSHTerminalView) SetNodes(nodes []string)

SetNodes sets the available nodes for SSH connections

func (*SSHTerminalView) SetPages

func (v *SSHTerminalView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*SSHTerminalView) ShowSSHInterface

func (v *SSHTerminalView) ShowSSHInterface(defaultNode string)

ShowSSHInterface displays the SSH terminal interface

func (*SSHTerminalView) Shutdown

func (v *SSHTerminalView) Shutdown()

Shutdown gracefully shuts down the SSH terminal view

type SearchResult

type SearchResult struct {
	Type        string // "job", "node", "partition", etc.
	ID          string
	Name        string
	Description string
	Score       int // Relevance score
	Data        interface{}
}

SearchResult represents a single search result

type StreamMonitorView

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

StreamMonitorView displays multiple job streams simultaneously

func NewStreamMonitorView

func NewStreamMonitorView(client dao.SlurmClient, app *tview.Application, streamManager *streaming.StreamManager) *StreamMonitorView

NewStreamMonitorView creates a new multi-stream monitor

func (*StreamMonitorView) AddStream

func (v *StreamMonitorView) AddStream(jobID, jobName, outputType string) error

AddStream adds a stream to the monitor

func (*StreamMonitorView) GetActiveStreamCount

func (v *StreamMonitorView) GetActiveStreamCount() int

GetActiveStreamCount returns the number of active streams

func (*StreamMonitorView) IsVisible

func (v *StreamMonitorView) IsVisible() bool

IsVisible returns true if the monitor is currently visible

func (*StreamMonitorView) SetPages

func (v *StreamMonitorView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*StreamMonitorView) Show

func (v *StreamMonitorView) Show()

Show displays the stream monitor

type StreamPanel

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

StreamPanel represents a single streaming job panel

type StreamingPreferencesView

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

StreamingPreferencesView displays and manages streaming preferences

func NewStreamingPreferencesView

func NewStreamingPreferencesView(app *tview.Application, prefsManager *preferences.StreamingPreferencesManager) *StreamingPreferencesView

NewStreamingPreferencesView creates a new streaming preferences view

func (*StreamingPreferencesView) SetOnSave

func (v *StreamingPreferencesView) SetOnSave(callback func())

SetOnSave sets the callback for when preferences are saved

func (*StreamingPreferencesView) SetPages

func (v *StreamingPreferencesView) SetPages(pages *tview.Pages)

SetPages sets the pages manager for modal display

func (*StreamingPreferencesView) Show

func (v *StreamingPreferencesView) Show()

Show displays the preferences dialog

type UsersView

type UsersView struct {
	*BaseView
	// contains filtered or unexported fields
}

UsersView displays the users list

func NewUsersView

func NewUsersView(client dao.SlurmClient) *UsersView

NewUsersView creates a new users view

func (*UsersView) Hints

func (v *UsersView) Hints() []string

Hints returns keyboard hints

func (*UsersView) Init

func (v *UsersView) Init(ctx context.Context) error

Init initializes the users view

func (*UsersView) OnFocus

func (v *UsersView) OnFocus() error

OnFocus handles focus events

func (*UsersView) OnKey

func (v *UsersView) OnKey(event *tcell.EventKey) *tcell.EventKey

OnKey handles keyboard events

func (*UsersView) OnLoseFocus

func (v *UsersView) OnLoseFocus() error

OnLoseFocus handles loss of focus

func (*UsersView) Refresh

func (v *UsersView) Refresh() error

Refresh updates the users data

func (*UsersView) Render

func (v *UsersView) Render() tview.Primitive

Render returns the view's main component

func (*UsersView) SetApp

func (v *UsersView) SetApp(app *tview.Application)

SetApp sets the application reference

func (*UsersView) SetPages

func (v *UsersView) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*UsersView) Stop

func (v *UsersView) Stop() error

Stop stops the view

type View

type View interface {
	// Name returns the unique name of the view (e.g., "jobs", "nodes")
	Name() string

	// Title returns the display title for the view
	Title() string

	// Hints returns keyboard shortcut hints for the status bar
	Hints() []string

	// Init initializes the view with the given context
	Init(ctx context.Context) error

	// Render returns the tview primitive to be displayed
	Render() tview.Primitive

	// Refresh updates the view data from the backend
	Refresh() error

	// OnKey handles keyboard events, returns nil if handled
	OnKey(event *tcell.EventKey) *tcell.EventKey

	// OnFocus is called when the view gains focus
	OnFocus() error

	// OnLoseFocus is called when the view loses focus
	OnLoseFocus() error

	// Stop cleanly shuts down the view
	Stop() error
}

View represents a base interface for all views in S9s

type ViewManager

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

ViewManager manages multiple views and handles switching between them

func NewViewManager

func NewViewManager(app *tview.Application) *ViewManager

NewViewManager creates a new view manager

func (*ViewManager) AddView

func (vm *ViewManager) AddView(view View) error

AddView adds a view to the manager

func (*ViewManager) GetCurrentView

func (vm *ViewManager) GetCurrentView() (View, error)

GetCurrentView returns the current active view

func (*ViewManager) GetView

func (vm *ViewManager) GetView(name string) (View, error)

GetView returns a view by name

func (*ViewManager) GetViewNames

func (vm *ViewManager) GetViewNames() []string

GetViewNames returns all registered view names in order

func (*ViewManager) NextView

func (vm *ViewManager) NextView() error

NextView switches to the next view in the order

func (*ViewManager) PreviousView

func (vm *ViewManager) PreviousView() error

PreviousView switches to the previous view in the order

func (*ViewManager) RefreshCurrentView

func (vm *ViewManager) RefreshCurrentView() error

RefreshCurrentView refreshes the current active view

func (*ViewManager) SetCurrentView

func (vm *ViewManager) SetCurrentView(name string) error

SetCurrentView sets the current active view

func (*ViewManager) SetPages

func (vm *ViewManager) SetPages(pages *tview.Pages)

SetPages sets the pages reference for modal handling

func (*ViewManager) StopAll

func (vm *ViewManager) StopAll() error

StopAll stops all views

Jump to

Keyboard shortcuts

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