views

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JobsViewConfigs = map[string]*JobViewConfig{
		admin.BootJobsPath: {
			ActionName:         actions.TriggerBootJob,
			ActionResourceName: "jx-boot",
			Title:              "Boot Jobs",
			Selector: labels.Set{
				"app":     "jx-boot",
				"release": "jenkins-x",
			},
		},
		admin.GCPipelineJobsPath: {
			Title: "GC Pipeline Jobs",
			Selector: labels.Set{
				"app": "gcactivities",
			},
		},
		admin.GCPodJobsPath: {
			Title: "GC Preview Jobs",
			Selector: labels.Set{
				"app": "gcpods",
			},
		},
		admin.GCPreviewJobsPath: {
			Title: "GC Preview Jobs",
			Selector: labels.Set{
				"app": "gcpreviews",
			},
		},
		admin.UpgradeJobsPath: &JobViewConfig{
			Title: "Upgrade Jobs",
			Selector: labels.Set{
				"app": "jenkins-x-upgrade-processor",
			},
		},
	}
)

Functions

func BootJobExtraView

func BootJobExtraView(request service.Request, pluginContext pluginctx.Context, cr *component.ContentResponse, view component.Component) error

BootJobExtraView lets render the output of any previous commands

func BuildBootInvalidSecretView

func BuildBootInvalidSecretView(request service.Request, pluginContext pluginctx.Context, cr *component.ContentResponse, gitURL string) error

BuildBootInvalidSecretView view that the secrets are not yet valid

func BuildBootPipelinesView

func BuildBootPipelinesView(request service.Request, pluginContext pluginctx.Context) (component.Component, error)

func BuildFailedReleasePipelinesView

func BuildFailedReleasePipelinesView(request service.Request, pluginContext pluginctx.Context) (component.Component, error)

func BuildJobsLogViewForPath

func BuildJobsLogViewForPath(request service.Request, pluginContext pluginctx.Context, path string, jobName string) (component.Component, error)

func BuildJobsViewForPath

func BuildJobsViewForPath(request service.Request, pluginContext pluginctx.Context, path string) (component.Component, error)

func BuildJobsViewLogsForPathAndSelector

func BuildJobsViewLogsForPathAndSelector(request service.Request, pluginContext pluginctx.Context, path string, jobName string, config *JobViewConfig, selector labels.Set) (component.Component, error)

func BuildNoBootSecretView

func BuildNoBootSecretView(request service.Request, pluginContext pluginctx.Context, cr *component.ContentResponse) error

BuildNoBootSecretView view that there is no boot secret

func BuildOverview

func BuildOverview(request service.Request, pluginContext pluginctx.Context) (component.Component, error)

func BuildWorkspacesView

func BuildWorkspacesView(request service.Request, ws []workspaces.WorkspaceOctant) (component.Component, error)

func GetBootEditSecretsMarkdown

func GetBootEditSecretsMarkdown(gitURL string) string

func HealthView

func HealthView(request service.Request, _ pluginctx.Context) (component.Component, error)

func JobConfirmation

func JobConfirmation(title string) component.ButtonOption

JobConfirmation for title

func RunCommandTitleMarkdown

func RunCommandTitleMarkdown(secret *corev1.Secret) string

func ToJobIcon

func ToJobIcon(r *batchv1.Job) string

func ToJobName

func ToJobName(r *batchv1.Job) component.Component

func ToJobPods

func ToJobPods(r *batchv1.Job) component.Component

func ToWorkspaceSort

func ToWorkspaceSort(r *workspaces.Workspace, idx int) component.Component

func ToWorkspaceSource

func ToWorkspaceSource(r *workspaces.Workspace) component.Component

Types

type JobViewConfig

type JobViewConfig struct {
	ButtonGroup        *component.ButtonGroup
	ActionName         string
	ActionResourceName string
	Title              string
	Selector           labels.Set
}

type ViewInfo

type ViewInfo struct {
	Title   string
	Path    string
	Factory func(request service.Request, pluginContext pluginctx.Context) (component.Component, error)
	Width   int
}

ViewInfo represents the information for views

type WorkspacesViewConfig

type WorkspacesViewConfig struct {
	TeamFilter        component.TableFilter
	EnvironmentFilter component.TableFilter
}

func (*WorkspacesViewConfig) TableFilters

func (f *WorkspacesViewConfig) TableFilters() []*component.TableFilter

Jump to

Keyboard shortcuts

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