gui

package
v0.0.0-...-fb66a68 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTimeAgo

func GetTimeAgo(jobTime time.Time) string

if < 24 hours, x hours if < 7 days, x days ignores leap years, clock changes, etc. Just a rough conversion for display purposes.

Types

type ConfigureJobTableEntries

type ConfigureJobTableEntries struct {
	NameEntry        *gtk.Entry
	DescriptionEntry *gtk.Entry
	ScriptEntry      *gtk.TextView

	*ValidationLabel
	*TaskrunnerGUI
	*taskrunner.Job
	// contains filtered or unexported fields
}

func (*ConfigureJobTableEntries) GetScriptEntryText

func (editJobTableEntries *ConfigureJobTableEntries) GetScriptEntryText() taskrunner.Script

func (*ConfigureJobTableEntries) GetScriptScrollWindow

func (editJobTableEntries *ConfigureJobTableEntries) GetScriptScrollWindow() *gtk.ScrolledWindow

func (*ConfigureJobTableEntries) ToJob

func (editJobTableEntries *ConfigureJobTableEntries) ToJob(jobId uint) (*taskrunner.Job, error)

func (*ConfigureJobTableEntries) ToWidget

func (editJobTableEntries *ConfigureJobTableEntries) ToWidget() gtk.IWidget

type EditJobView

type EditJobView struct {
	*TaskrunnerGUI
	Job *taskrunner.Job
	// contains filtered or unexported fields
}

func (*EditJobView) Content

func (editJobView *EditJobView) Content() gtk.IWidget

func (*EditJobView) OnJobRunStatusChange

func (editJobView *EditJobView) OnJobRunStatusChange(jobRun *taskrunner.JobRun)

func (*EditJobView) Title

func (editJobView *EditJobView) Title() string

type HomeScene

type HomeScene struct {
	*TaskrunnerGUI
}

func (*HomeScene) Content

func (homeScreen *HomeScene) Content() gtk.IWidget

func (*HomeScene) OnJobRunStatusChange

func (homeScreen *HomeScene) OnJobRunStatusChange(jobRun *taskrunner.JobRun)

func (*HomeScene) Title

func (homeScreen *HomeScene) Title() string

type JobRunScene

type JobRunScene struct {
	*TaskrunnerGUI
	// contains filtered or unexported fields
}

func (*JobRunScene) Content

func (jobRunScene *JobRunScene) Content() gtk.IWidget

func (*JobRunScene) OnJobRunStatusChange

func (jobRunScene *JobRunScene) OnJobRunStatusChange(jobRun *taskrunner.JobRun)

func (*JobRunScene) Title

func (jobRunScene *JobRunScene) Title() string

type JobScene

type JobScene struct {
	*TaskrunnerGUI
	Job *taskrunner.Job
}

func (*JobScene) Content

func (jobScene *JobScene) Content() gtk.IWidget

func (*JobScene) OnJobRunStatusChange

func (jobScene *JobScene) OnJobRunStatusChange(jobRun *taskrunner.JobRun)

func (*JobScene) Title

func (jobScene *JobScene) Title() string

type Scene

type Scene interface {
	Title() string
	Content() gtk.IWidget
	OnJobRunStatusChange(jobRun *taskrunner.JobRun)
}

type TaskrunnerGUI

type TaskrunnerGUI struct {
	PaneContent Scene

	Window *gtk.Window
	*taskrunnerdal.TaskrunnerDAL
	JobStatusChangeChan chan *taskrunner.JobRun // job runs
	// contains filtered or unexported fields
}

func NewTaskrunnerGUI

func NewTaskrunnerGUI(taskrunnerDAL *taskrunnerdal.TaskrunnerDAL, udevRulesDAL *triggers.UdevRulesDAL, options TaskrunnerGUIOptions) *TaskrunnerGUI

func (*TaskrunnerGUI) NewConfigureJobTableEntries

func (taskrunnerGUI *TaskrunnerGUI) NewConfigureJobTableEntries(job *taskrunner.Job, udevRulesDAL *triggers.UdevRulesDAL) *ConfigureJobTableEntries

func (*TaskrunnerGUI) NewEditJobView

func (taskrunnerGUI *TaskrunnerGUI) NewEditJobView(job *taskrunner.Job, udevRulesDAL *triggers.UdevRulesDAL) *EditJobView

func (*TaskrunnerGUI) NewHomeScene

func (taskrunner *TaskrunnerGUI) NewHomeScene() *HomeScene

func (*TaskrunnerGUI) NewJobRunScene

func (taskrunnerGUI *TaskrunnerGUI) NewJobRunScene(jobRun *taskrunner.JobRun) *JobRunScene

func (*TaskrunnerGUI) NewJobScene

func (taskrunnerGUI *TaskrunnerGUI) NewJobScene(job *taskrunner.Job) *JobScene

func (*TaskrunnerGUI) RenderScene

func (taskrunnerGUI *TaskrunnerGUI) RenderScene(scene Scene)

type TaskrunnerGUIOptions

type TaskrunnerGUIOptions struct {
	JobLogMaxLines uint
	CommandPrefix  string
}

type ValidationLabel

type ValidationLabel struct {
	Widget *gtk.VBox
	// contains filtered or unexported fields
}

func NewValidationLabel

func NewValidationLabel(errColor *gdk.Color) *ValidationLabel

func (*ValidationLabel) Clear

func (validationLabel *ValidationLabel) Clear()

func (*ValidationLabel) SetText

func (validationLabel *ValidationLabel) SetText(text string)

Jump to

Keyboard shortcuts

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