Help us shape the future of Go! Take the 2026 Go Developer Survey

jobtab

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MenuList = JobMenuOptions{
	"PENDING": MenuOptions{
		MenuItem{
			// contains filtered or unexported fields
		},
		MenuItem{
			// contains filtered or unexported fields
		},
		MenuItem{
			// contains filtered or unexported fields
		},
	},
	"RUNNING": MenuOptions{
		MenuItem{
			// contains filtered or unexported fields
		},
		MenuItem{
			// contains filtered or unexported fields
		},
		MenuItem{
			// contains filtered or unexported fields
		},
		MenuItem{
			// contains filtered or unexported fields
		},
	},
}
View Source
var (
	SqueueCmdSwitches = []string{"-a", "--json"}
)
View Source
var SqueueTabCols = []table.Column{
	{
		Title: "Job ID",
		Width: 10,
	},
	{
		Title: "Job Name",
		Width: 60,
	},
	{
		Title: "Account",
		Width: 10,
	},
	{
		Title: "User Name",
		Width: 20,
	},
	{
		Title: "Job State",
		Width: 10,
	},
	{
		Title: "Priority",
		Width: 10,
	},
}

Functions

func GetSqueue

func GetSqueue(t time.Time) tea.Msg

Calls `squeue` to get job information for Jobs Tab

func NewCmdCC

func NewCmdCC(config config.ConfigContainer)

func NewMenu

func NewMenu(selJobState string, l *log.Logger) list.Model

func QuickGetSqueue

func QuickGetSqueue(l *log.Logger) tea.Cmd

func TimedGetSqueue

func TimedGetSqueue(l *log.Logger) tea.Cmd

Types

type Breakdowns

type Breakdowns struct {
	Top5user   generic.CountItemSlice
	Top5acc    generic.CountItemSlice
	JobPerQos  generic.CountItemSlice
	JobPerPart generic.CountItemSlice
}

type JobMenuOptions

type JobMenuOptions map[string]MenuOptions

type JobTab

type JobTab struct {
	InfoOn           bool
	CountsOn         bool
	StatsOn          bool
	FilterOn         bool
	SqueueTable      table.Model
	Squeue           SqueueJSON
	SqueueFiltered   SqueueJSON
	Filter           textinput.Model
	SelectedJob      string
	SelectedJobState string
	MenuOn           bool
	MenuChoice       MenuItem
	Menu             list.Model
	Stats
	Breakdowns
}

func (*JobTab) AdjTableHeight

func (t *JobTab) AdjTableHeight(h int, l *log.Logger)

func (*JobTab) GetStatsFiltered

func (t *JobTab) GetStatsFiltered(l *log.Logger)

func (*JobTab) JobTabStats

func (jt *JobTab) JobTabStats(l *log.Logger) string

func (*JobTab) View

func (jt *JobTab) View(l *log.Logger) string

type Keys

type Keys []*key.Binding

func (*Keys) DisableKeys added in v1.0.5

func (ky *Keys) DisableKeys()

func (*Keys) SetupKeys

func (ky *Keys) SetupKeys()
type MenuItem struct {
	// contains filtered or unexported fields
}
func (i MenuItem) Description() string
func (m *MenuItem) ExecMenuItem(jobID string, node string, l *log.Logger) tea.Cmd
func (i MenuItem) FilterValue() string
func (i MenuItem) GetAction() string
func (i MenuItem) Title() string
type MenuOptions []list.Item

type SqueueJSON

type SqueueJSON slurm.SqueueJSON

func (*SqueueJSON) FilterSqueueTable

func (sqJson *SqueueJSON) FilterSqueueTable(f string, l *log.Logger) (*TableRows, *SqueueJSON, *command.ErrorMsg)

type Stats

type Stats struct {
	// TODO: also perhaps: count by user? account?
	StateCnt map[string]uint
	AvgWait  time.Duration
	MinWait  time.Duration
	MaxWait  time.Duration
	MedWait  time.Duration
	AvgRun   time.Duration
	MinRun   time.Duration
	MaxRun   time.Duration
	MedRun   time.Duration
}

type TableRows

type TableRows []table.Row

Jump to

Keyboard shortcuts

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