views

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPipelineType           = "jenkins.io/pipelineType"
	AnnotationValuePipelineTypeMetaa = "meta"

	// AnnotationHome the link to the chart home page
	AnnotationHome = "jenkins.io/home"

	// AnnotationHost used to indicate the host if using NodePort Ingress resources on premise without a LoadBalancer
	AnnotationHost = "jenkins.io/host"

	// AnnotationIcon used to annotate a Deployment with its icon
	AnnotationIcon = "jenkins.io/icon"

	// LabelHelmChart label used by helm for the name of the chart
	LabelHelmChart = "helm.sh/chart"

	// LabelJXChart label for the name of the chart for jx deployments
	LabelJXChart = "chart"

	// LabelAppName standard label for the app name
	// see https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
	// see https://helm.sh/docs/chart_best_practices/labels/
	LabelAppName = "app.kubernetes.io/name"

	// LabelAppVersion standard label for the app version
	// see https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
	// see https://helm.sh/docs/chart_best_practices/labels/
	LabelAppVersion = "app.kubernetes.io/version"

	// DefaultIcon default icon image if none specified
	DefaultIcon = "https://clarity.design/.netlify/functions/download-icon?set=technology&shape=container-line"
)

Variables

This section is empty.

Functions

func BuildAppsView

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

func BuildEnvironmentAppsView

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

func BuildEnvironmentView

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

func BuildEnvironmentsView

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

func BuildHelmReleaseView

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

func BuildHelmReleasesView

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

func BuildOverview

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

func BuildPipelineContainerView

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

func BuildPipelineContainersView

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

func BuildPipelineLog

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

func BuildPipelineTerminalView

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

func BuildPipelineView

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

func BuildPipelinesView

func BuildPipelinesView(request service.Request, config *PipelinesViewConfig) (component.Component, error)

func BuildPipelinesViewDefault

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

func BuildPipelinesViewRecent

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

func BuildPreviewsView added in v0.0.33

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

func BuildRepositoriesView

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

func FindContainerName

func FindContainerName(step *v1.CoreActivityStep, u *unstructured.Unstructured) string

func FindContainerNameForStepName

func FindContainerNameForStepName(pod *corev1.Pod, pipelineActivityStepNames []string) string

func FindIngressLinkByAppName

func FindIngressLinkByAppName(name string, ingresses []*v1beta1.Ingress) string

func SortPipelines

func SortPipelines(resources []*v1.PipelineActivity)

SortPipelines sorts pipelines in name order then with newest build first

func ToCommandLine

func ToCommandLine(index int, c *corev1.Container) string

func ToDeploymentIcon

func ToDeploymentIcon(r *appsv1.Deployment) string
func ToDeploymentLink(r *appsv1.Deployment, name, icon string) component.Component

func ToDeploymentStatus

func ToDeploymentStatus(r *appsv1.Deployment) component.Component

func ToDeploymentVersion

func ToDeploymentVersion(r *appsv1.Deployment, version string) component.Component

func ToDuration

func ToDuration(pa *v1.PipelineActivity) component.Component

func ToEnvVarSection

func ToEnvVarSection(e corev1.EnvVar) component.SummarySection

func ToEnvironmentName

func ToEnvironmentName(r *v1.Environment) string

func ToEnvironmentNameComponent

func ToEnvironmentNameComponent(r *v1.Environment) component.Component
func ToEnvironmentNameLink(r *v1.Environment) component.Component

func ToEnvironmentNamespace

func ToEnvironmentNamespace(r *v1.Environment) component.Component

func ToEnvironmentPromote

func ToEnvironmentPromote(r *v1.Environment) component.Component

func ToEnvironmentRemote

func ToEnvironmentRemote(r *v1.Environment) component.Component

func ToEnvironmentSource

func ToEnvironmentSource(r *v1.Environment) component.Component

func ToHelmName

func ToHelmName(r *rspb.Release) component.Component

func ToHelmStatus

func ToHelmStatus(r *rspb.Release) component.Component

func ToHelmStatusIcon

func ToHelmStatusIcon(s rspb.Status) string

func ToHelmUpdated

func ToHelmUpdated(r *rspb.Release) component.Component

func ToImage

func ToImage(c *corev1.Container) string
func ToIngressLink(ing *v1beta1.Ingress) string

func ToLastStepMarkdown

func ToLastStepMarkdown(pa *v1.PipelineActivity) string

ToLastStepMarkdown returns the running step

func ToNameMarkdown

func ToNameMarkdown(pa *v1.PipelineActivity) string

ToNameMarkdown returns the markdown of the name

func ToOrder

func ToPipelineLastStepStatus

func ToPipelineLastStepStatus(pa *v1.PipelineActivity, addContext, addTimestamp bool) component.Component

func ToPipelineName

func ToPipelineName(pa *v1.PipelineActivity) component.Component

func ToPipelineOwner

func ToPipelineOwner(pa *v1.PipelineActivity) component.Component

func ToPipelinePodContainerView

func ToPipelinePodContainerView(header component.Component, vc containersViewContext, pod *corev1.Pod, index int, c *corev1.Container, pr *v1beta1.PipelineRun) component.Component

func ToPipelinePodContainersView

func ToPipelinePodContainersView(vc containersViewContext, pod *corev1.Pod) component.Component

func ToPipelineRepository

func ToPipelineRepository(pa *v1.PipelineActivity) component.Component

func ToPipelineStartCompleteTimeMarkdown

func ToPipelineStartCompleteTimeMarkdown(pa *v1.PipelineActivity) string

ToPipelineStartCompleteTimeMarkdown returns the time the pipeline started and completed

func ToPipelineStatus

func ToPipelineStatus(pa *v1.PipelineActivity) component.Component

func ToPipelineStatusMarkup

func ToPipelineStatusMarkup(statusType v1.ActivityStatusType) string

func ToRepository

func ToRepository(pa *v1.PipelineActivity) component.Component

func ToRepositoryMarkdown

func ToRepositoryMarkdown(pa *v1.PipelineActivity) string

func ToRepositoryName

func ToRepositoryName(r *v1.SourceRepository) component.Component

func ToRepositoryStatus

func ToRepositoryStatus(r *v1.SourceRepository) component.Component

func ToResourceNameVersion

func ToResourceNameVersion(r *metav1.ObjectMeta) (string, string)

func ToStatus

func ToStatus(pa *v1.PipelineActivity) *component.Text

func ToStepName

func ToStepName(vc containersViewContext, c *corev1.Container) string

func ToStepsView

ToStepsView renders a markdown description of the pipeline

func YAMLToMarkdown

func YAMLToMarkdown(text string) string

YAMLToMarkdown convert the YAML source into markdown

Types

type PipelineStepRenderer

type PipelineStepRenderer struct {
	Writer           strings.Builder
	PipelineActivity *v1.PipelineActivity
	Pod              *unstructured.Unstructured
}

type PipelinesViewConfig

type PipelinesViewConfig struct {
	Context          pluginctx.Context
	Columns          []string
	Title            string
	Header           string
	Filter           func(*v1.PipelineActivity, []v1.PipelineActivity) bool
	OwnerFilter      component.TableFilter
	RepositoryFilter component.TableFilter
	BranchFilter     component.TableFilter
	StatusFilter     component.TableFilter
}

func (*PipelinesViewConfig) TableFilters

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

type PreviewsViewConfig added in v0.0.33

type PreviewsViewConfig struct {
	OwnerFilter      component.TableFilter
	RepositoryFilter component.TableFilter
}

func (*PreviewsViewConfig) TableFilters added in v0.0.33

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

type RepositoriesViewConfig

type RepositoriesViewConfig struct {
	OwnerFilter component.TableFilter
}

func (*RepositoriesViewConfig) TableFilters

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

Jump to

Keyboard shortcuts

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