Documentation ¶
Index ¶
- Variables
- func FindChangesCount(taskGroupDiff []*api.TaskGroupDiff) int
- func GetTaskData(data models.Allocations)
- type Allocations
- type App
- type Footer
- type Header
- type JobDefinition
- type Jobs
- type Log
- type Namespaces
- type Nodes
- type Regions
- type RunJob
- type Splash
- type TaskGroups
- type Tasks
- func (t *Tasks) DrawUsageGauges()
- func (t *Tasks) DrawView(data models.Allocations)
- func (t *Tasks) EventsView(events []models.Events)
- func (t *Tasks) GetTitle() string
- func (t *Tasks) SetInfoView()
- func (t *Tasks) SetUsageData(usage models.TaskResource)
- func (t *Tasks) TaskDetails(task models.Tasks)
- func (t *Tasks) UpdateEventTable(events []models.Events)
- type VersionDiff
- type Versions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PasteMenu = fmt.Sprintf(" [%s]<ctrl+v> [%s]Paste", utils.ColorTOrange, utils.ColorTWhite) DryRunMenu = fmt.Sprintf(" [%s]<ctrl+d> [%s]Dry Run", utils.ColorTOrange, utils.ColorTWhite) MoveUpMenu = fmt.Sprintf(" [%s]<↑> [%s]Scroll Up", utils.ColorTOrange, utils.ColorTWhite) MoveDownMenu = fmt.Sprintf(" [%s]<↓> [%s]Scroll Down", utils.ColorTOrange, utils.ColorTWhite) )
View Source
var ( TitleTasks = "task" TitleEvents = "events" TaskLeftInfoKeys = []string{"Name", "Status", "JobId", "Client", "Modified At", "Started At"} TaskLeftInfoValues = []string{"", "", "", "", "", ""} TaskRightInfoKeys = []string{"Namespace", "Version", "Driver", "Image", "Volumes", "LifeCycle"} TaskRightInfoValues = []string{"", "", "", "", "", ""} )
View Source
var AllocMenu = []widgets.Item{ widgets.RestartTaskMenu, widgets.LogMenu, }
View Source
var JobsMenu = []widgets.Item{ widgets.StopJobMenu, widgets.DefinitionMenu, widgets.RunJobMenu, }
View Source
var LogMenu = []widgets.Item{ widgets.StdoutMenu, widgets.StderrMenu, widgets.LogAutoScrollMenu, }
View Source
var Logo = []string{
` _ _ ____ __ __ ____`,
`( \( )(_ _)( )( )(_ _)`,
` ) ( )( )(__)( _)(_`,
`(_)\_) (__) (______)(____)`,
}
View Source
var RemoveTaskMenus = []widgets.Item{ widgets.EnterMenu, widgets.UpArrowMenu, widgets.DownArrowMenu, }
View Source
var TaskMenus = []widgets.Item{ widgets.RestartTaskMenu, widgets.LogMenu, }
View Source
var TgMenu = []widgets.Item{ widgets.VersionMenu, }
View Source
var TitleAllocations = "allocations"
View Source
var TitleJobs = "jobs"
View Source
var TitleLog = "log"
View Source
var TitleNamespace = "namespaces"
View Source
var TitleNodes = "nodes"
View Source
var TitleRegions = "regions"
View Source
var TitleSplash = "splash"
View Source
var TitleTaskGroups = "taskgroups"
View Source
var TitleVersionDiff = "versiondiff"
View Source
var TitleVersions = "versions"
View Source
var VersionMenus = []widgets.Item{ widgets.RevertMenu, }
Functions ¶
func FindChangesCount ¶
func FindChangesCount(taskGroupDiff []*api.TaskGroupDiff) int
func GetTaskData ¶
func GetTaskData(data models.Allocations)
Types ¶
type Allocations ¶
type Allocations struct { *widgets.Table Title string Headers []string Data []models.Allocations Menus []widgets.Item }
func NewAllocations ¶
func NewAllocations() *Allocations
func (*Allocations) GetTitle ¶
func (a *Allocations) GetTitle() string
func (*Allocations) SetOnSelectFn ¶
func (a *Allocations) SetOnSelectFn(fn func(int, int))
func (*Allocations) SetOnTabPressFn ¶
func (a *Allocations) SetOnTabPressFn(fn func())
func (*Allocations) UpdateTableData ¶
func (a *Allocations) UpdateTableData(data []models.Allocations)
type Header ¶
type Header struct { *tview.Flex Logo *tview.TextView Menu *widgets.Menu Metadata *widgets.MapView }
func (*Header) RenderLogo ¶
func (*Header) SetMetadata ¶
type JobDefinition ¶
type JobDefinition struct { *widgets.TextView Title string Data []models.Namespaces RemoveMenus []widgets.Item }
func NewJobDefinition ¶
func NewJobDefinition() *JobDefinition
func (*JobDefinition) GetTitle ¶
func (jd *JobDefinition) GetTitle() string
func (*JobDefinition) SetJDData ¶
func (jd *JobDefinition) SetJDData(data map[string]string)
type Jobs ¶
type Jobs struct { *widgets.Table Title string Headers []string Data []models.Jobs Menus []widgets.Item }
func (*Jobs) SetOnSelectFn ¶
func (*Jobs) SetOnSelectionChanged ¶
func (*Jobs) SetOnTabPressFn ¶
func (j *Jobs) SetOnTabPressFn(fn func())
func (*Jobs) UpdateTableData ¶
func (j *Jobs) UpdateTableData(params *models.NomadParams, data []models.Jobs)
type Log ¶
type Namespaces ¶
type Namespaces struct { *widgets.Table Headers []string Data []models.Namespaces }
func NewNamespaces ¶
func NewNamespaces() *Namespaces
func (*Namespaces) SetOnSelectFn ¶
func (n *Namespaces) SetOnSelectFn(fn func(int, int))
func (*Namespaces) SetOnTabPress ¶
func (n *Namespaces) SetOnTabPress(fn func())
func (*Namespaces) UpdateTableData ¶
func (n *Namespaces) UpdateTableData(data []models.Namespaces, region string)
type Nodes ¶
func (*Nodes) SetOnSelectFn ¶
func (*Nodes) SetOnTabPressFn ¶
func (n *Nodes) SetOnTabPressFn(fn func())
func (*Nodes) UpdateTableData ¶
type Regions ¶
func NewRegions ¶
func NewRegions() *Regions
func (*Regions) SetOnSelectFn ¶
func (*Regions) SetOnTabPressFn ¶
func (reg *Regions) SetOnTabPressFn(fn func())
func (*Regions) UpdateTableData ¶
type RunJob ¶
type RunJob struct { *tview.Grid TextAreaX *widgets.TextArea HelpMenu *tview.TextView Title string Data []models.Namespaces }
func (*RunJob) GetTextAreaText ¶
func (*RunJob) SetContent ¶
func (*RunJob) UpdateHelpMenu ¶
type TaskGroups ¶
type TaskGroups struct { *widgets.Table Title string Headers []string Data []models.TaskGroups Menus []widgets.Item }
func NewTaskGroups ¶
func NewTaskGroups() *TaskGroups
func (*TaskGroups) GetTitle ¶
func (tg *TaskGroups) GetTitle() string
func (*TaskGroups) SetOnSelectFn ¶
func (tg *TaskGroups) SetOnSelectFn(fn func(int, int))
func (*TaskGroups) SetOnTabPressFn ¶
func (tg *TaskGroups) SetOnTabPressFn(fn func())
func (*TaskGroups) UpdateTableData ¶
func (tg *TaskGroups) UpdateTableData(jobId, region, namespace string, data []models.TaskGroups)
type Tasks ¶
type Tasks struct { *widgets.Flex Title string DetailsView *widgets.Flex InfoView *widgets.Flex UsageView *widgets.Flex EventsTable *widgets.Table Menus []widgets.Item RemoveMenus []widgets.Item Data models.Allocations }
func (*Tasks) DrawUsageGauges ¶
func (t *Tasks) DrawUsageGauges()
func (*Tasks) DrawView ¶
func (t *Tasks) DrawView(data models.Allocations)
func (*Tasks) EventsView ¶
func (*Tasks) SetInfoView ¶
func (t *Tasks) SetInfoView()
func (*Tasks) SetUsageData ¶
func (t *Tasks) SetUsageData(usage models.TaskResource)
func (*Tasks) TaskDetails ¶
func (*Tasks) UpdateEventTable ¶
type VersionDiff ¶
func NewVersionDiff ¶
func NewVersionDiff() *VersionDiff
func (*VersionDiff) GetTitle ¶
func (vd *VersionDiff) GetTitle() string
func (*VersionDiff) SetData ¶
func (vd *VersionDiff) SetData(jobId string, detail map[string]string, diff models.JobVersionDiff)
type Versions ¶
type Versions struct { *widgets.Table Title string Headers []string Data []models.JobVersion Menus []widgets.Item }
func NewVersions ¶
func NewVersions() *Versions
func (*Versions) SetOnSelectFn ¶
func (*Versions) SetOnTabPressFn ¶
func (v *Versions) SetOnTabPressFn(fn func())
func (*Versions) UpdateTableData ¶
func (v *Versions) UpdateTableData(jobId string, jobVersions []models.JobVersion, diffs []models.JobVersionDiff)
Click to show internal directories.
Click to hide internal directories.