page

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BuildJobListPageName is the name that identifies the BuildJobList page.
	BuildJobListPageName = "buildJoblist"
)
View Source
const (
	// JobLogPageName is the name that identifies the JobLogPage page.
	JobLogPageName = "joblog"
)
View Source
const (
	// ProjectBuildListPageName is the name that identifies thi ProjectBuildList page.
	ProjectBuildListPageName = "projectbuildlist"
)
View Source
const (
	// ProjectListPageName is the name that identifies thi projectList page.
	ProjectListPageName = "projectlist"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildJobList

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

BuildJobList is the page where a build job list will be available.

func NewBuildJobList

func NewBuildJobList(controller controller.Controller, app *tview.Application, router *Router) *BuildJobList

NewBuildJobList returns a new BuildJobList.

func (*BuildJobList) BeforeLoad

func (b *BuildJobList) BeforeLoad()

BeforeLoad satisfies Page interface.

func (*BuildJobList) Refresh

func (b *BuildJobList) Refresh(projectID, buildID string)

Refresh will refresh all the page data.

func (*BuildJobList) Register

func (b *BuildJobList) Register(pages *tview.Pages)

Register satisfies Page interface.

type JobLog

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

JobLog is the page where a build job log will be available.

func NewJobLog

func NewJobLog(controller controller.Controller, app *tview.Application, router *Router) *JobLog

NewJobLog returns a new JobLog.

func (*JobLog) BeforeLoad

func (j *JobLog) BeforeLoad()

BeforeLoad satisfies Page interface.

func (*JobLog) Refresh

func (j *JobLog) Refresh(projectID, buildID, jobID string)

Refresh will refresh all the page data.

func (*JobLog) Register

func (j *JobLog) Register(pages *tview.Pages)

Register satisfies Page interface.

type Loader added in v0.4.1

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

Loader knows how to load and autoreload.

func NewLoader added in v0.4.1

func NewLoader(reloadInterval time.Duration, app *tview.Application) *Loader

NewLoader returns a new loader.

func (*Loader) LoadPage added in v0.4.1

func (l *Loader) LoadPage(allowAutoreload bool, f func())

LoadPage will ensure only one route is loaded at a time. Also ensures that the pages that can autoreload do it if it is required.

type Page

type Page interface {
	// Register will register as a page.
	Register(pages *tview.Pages)

	// BeforeLoad will be called when loading the page from one of the other pages.
	BeforeLoad()
}

Page is the way we will render the different pages of the ui

type ProjectBuildList

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

ProjectBuildList is the page where a projects build list will be available.

func NewProjectBuildList

func NewProjectBuildList(controller controller.Controller, app *tview.Application, router *Router) *ProjectBuildList

NewProjectBuildList returns a new ProjectBuildList.

func (*ProjectBuildList) BeforeLoad

func (p *ProjectBuildList) BeforeLoad()

BeforeLoad satisfies Page interface.

func (*ProjectBuildList) Refresh

func (p *ProjectBuildList) Refresh(projectID string)

Refresh will refresh all the page data.

func (*ProjectBuildList) Register

func (p *ProjectBuildList) Register(pages *tview.Pages)

Register satisfies Page interface.

type ProjectList

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

ProjectList is the main page where the project list will be available.

func NewProjectList

func NewProjectList(controller controller.Controller, app *tview.Application, router *Router) *ProjectList

NewProjectList returns a new project list.

func (*ProjectList) BeforeLoad

func (p *ProjectList) BeforeLoad()

BeforeLoad satisfies Page interface.

func (*ProjectList) Refresh

func (p *ProjectList) Refresh()

Refresh will refresh all the page data.

func (*ProjectList) Register

func (p *ProjectList) Register(pages *tview.Pages)

Register satisfies Page interface.

type Router

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

Router knows how to route the ui from one page to another.

func NewRouter

func NewRouter(app *tview.Application, loader *Loader, controller controller.Controller, pages *tview.Pages) *Router

NewRouter returns a new router.

func (*Router) Exit added in v0.2.0

func (r *Router) Exit()

Exit will terminate everything.

func (*Router) LoadBuildJobList

func (r *Router) LoadBuildJobList(projectID, buildID string)

LoadBuildJobList will set the ui on the build job list.

func (*Router) LoadJobLog

func (r *Router) LoadJobLog(projectID, buildID, jobID string)

LoadJobLog will set the ui on the build job log.

func (*Router) LoadProjectBuildList

func (r *Router) LoadProjectBuildList(projectID string)

LoadProjectBuildList will set the ui on the project build list.

func (*Router) LoadProjectList

func (r *Router) LoadProjectList()

LoadProjectList will set the ui on the project list.

Jump to

Keyboard shortcuts

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