termdash

package
v0.0.0-...-5db00e0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "dashboard",
	Short: "Start a Funnel dashboard in your terminal.",
	Run: func(cmd *cobra.Command, args []string) {
		termdash(tesServer)
	},
}

Cmd represents the worker command

View Source
var Sorters = map[string]sortMethod{
	"id":          idSorter,
	"state":       stateSorter,
	"name":        nameSorter,
	"description": descSorter,
}

Functions

func Display

func Display() bool

func ExpandView

func ExpandView(t *TaskWidget)

func FilterMenu

func FilterMenu()

func HandleKeys

func HandleKeys(i string, f func())

Apply a common handler function to all given keys

func HelpMenu

func HelpMenu()

func NextPage

func NextPage()

func PreviousPage

func PreviousPage()

func RedrawRows

func RedrawRows(clr bool)

func RefreshDisplay

func RefreshDisplay()

func Shutdown

func Shutdown()

func SortFields

func SortFields() (fields []string)

func SortMenu

func SortMenu()

Types

type GridCursor

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

func NewGridCursor

func NewGridCursor(tesHTTPServerAddress string) *GridCursor

func (*GridCursor) Down

func (gc *GridCursor) Down()

func (*GridCursor) Idx

func (gc *GridCursor) Idx() int

Return current cursor index

func (*GridCursor) Len

func (gc *GridCursor) Len() int

func (*GridCursor) NextPageExists

func (gc *GridCursor) NextPageExists() bool

func (*GridCursor) PgDown

func (gc *GridCursor) PgDown()

func (*GridCursor) PgUp

func (gc *GridCursor) PgUp()

func (*GridCursor) PreviousPageExists

func (gc *GridCursor) PreviousPageExists() bool

func (*GridCursor) RefreshTask

func (gc *GridCursor) RefreshTask(id string) *TaskWidget

Refresh a single task

func (*GridCursor) RefreshTaskList

func (gc *GridCursor) RefreshTaskList(previous, next bool) (lenChanged bool)

Refresh task list

func (*GridCursor) Reset

func (gc *GridCursor) Reset()

Set an initial cursor position, if possible

func (*GridCursor) ScrollPage

func (gc *GridCursor) ScrollPage()

func (*GridCursor) Selected

func (gc *GridCursor) Selected() *TaskWidget

func (*GridCursor) Up

func (gc *GridCursor) Up()

type TaskSource

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

func NewTaskSource

func NewTaskSource(tesHTTPServerAddress string, pageSize uint32) *TaskSource

func (*TaskSource) Get

func (ts *TaskSource) Get(id string) *TaskWidget

Get a single task, by ID

func (*TaskSource) GetNextPage

func (ts *TaskSource) GetNextPage() string

func (*TaskSource) GetPreviousPage

func (ts *TaskSource) GetPreviousPage() string

func (*TaskSource) List

func (ts *TaskSource) List(previous, next bool) TaskWidgets

Return array of tasks, sorted by field

type TaskWidget

type TaskWidget struct {
	Task    *tes.Task
	Widgets *compact.Compact
	// contains filtered or unexported fields
}

func NewTaskWidget

func NewTaskWidget(t *tes.Task) *TaskWidget

type TaskWidgets

type TaskWidgets []*TaskWidget

func (TaskWidgets) Filter

func (a TaskWidgets) Filter()

func (TaskWidgets) Len

func (a TaskWidgets) Len() int

func (TaskWidgets) Less

func (a TaskWidgets) Less(i, j int) bool

func (TaskWidgets) Swap

func (a TaskWidgets) Swap(i, j int)

type TesTaskSource

type TesTaskSource interface {
	List(bool, bool) TaskWidgets
	Get(string) *TaskWidget
	GetNextPage() string
	GetPreviousPage() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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