Documentation ¶
Index ¶
- func AddFilterValue(filter *component.TableFilter, value string)
- func FindLatestPodForSelector(ctx context.Context, client service.Dashboard, namespace string, ...) (*corev1.Pod, error)
- func GetResourceByName(ctx context.Context, client service.Dashboard, ...) (*unstructured.Unstructured, error)
- func InitTableFilters(filters []*component.TableFilter)
- func ListPodsBySelector(ctx context.Context, client service.Dashboard, namespace string, ...) ([]*corev1.Pod, error)
- func ListResourcesBySelector(ctx context.Context, client service.Dashboard, apiVersion, kind, ns string, ...) (*unstructured.UnstructuredList, error)
- func MatchesSelector(labels map[string]string, selector labels.Set) bool
- func NewMarkdownCard(title, bodyText string) *component.Card
- func NewMarkdownText(text string) *component.Text
- func NewTextCard(title, bodyText string) *component.Card
- func PipelineBuildNumber(pa *v1.PipelineActivity) int
- func ResourceTimeLessThan(t1, t2 *metav1.Time) bool
- func SortSummarySection(sections []component.SummarySection)
- func TableTitle(text string) string
- func ToApplicationIcon(icon string) string
- func ToBreadcrumbMarkdown(names ...string) string
- func ToDurationMarkdown(time time.Time, titlePrefix string) string
- func ToDurationString(u time.Time) string
- func ToGitLinkMarkdown(repoLink string) string
- func ToMarkdownExternalLink(title, target, link string) string
- func ToMarkdownLink(title, link string) string
- func ToMarkdownLinkFromURL(link string) string
- func ToOwnerRepositoryLinkMarkdown(owner, repository, repoLink string) string
- func ToPipelineActivity(u *unstructured.Unstructured) (*v1.PipelineActivity, error)
- func ToPod(u *unstructured.Unstructured) (*corev1.Pod, error)
- func ToSecret(u *unstructured.Unstructured) (*corev1.Secret, error)
- func ToStructured(u *unstructured.Unstructured, structured interface{}) error
- func ToTimeMarkdown(mt *metav1.Time) string
- func ToTimestamp(t *metav1.Time) component.Component
- func ToTooltipText(text, tooltip string) string
- func ViewPipelineLogs(ns, podName string, containers ...string) (*component.Logs, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFilterValue ¶
func AddFilterValue(filter *component.TableFilter, value string)
AddFilterValue adds the filter value if its missing
func GetResourceByName ¶
func GetResourceByName(ctx context.Context, client service.Dashboard, apiVersion, kind, name, ns string) (*unstructured.Unstructured, error)
GetResourceByName looks up the resource by name
func InitTableFilters ¶
func InitTableFilters(filters []*component.TableFilter)
InitTableFilters sorts the values and sets the selected values to the current values
func ListPodsBySelector ¶
func ListPodsBySelector(ctx context.Context, client service.Dashboard, namespace string, selector labels.Set) ([]*corev1.Pod, error)
ListPodsBySelector loads the pods for the given selector
func ListResourcesBySelector ¶
func ListResourcesBySelector(ctx context.Context, client service.Dashboard, apiVersion, kind, ns string, selector labels.Set) (*unstructured.UnstructuredList, error)
ListResourcesBySelector lists resources using a selector
func MatchesSelector ¶
MatchesSelector returns true if the given labels match the selector
func NewMarkdownCard ¶
NewMarkdownCard helper function to create a card with a text body
func NewMarkdownText ¶ added in v0.0.28
NewMarkdownText creates a trusted markdown object
func NewTextCard ¶
NewTextCard helper function to create a card with a text body
func PipelineBuildNumber ¶
func PipelineBuildNumber(pa *v1.PipelineActivity) int
PipelineBuildNumber returns the build number for the pipeline
func ResourceTimeLessThan ¶
ResourceTimeLessThan returns whether the first time is less than the second time
func SortSummarySection ¶
func SortSummarySection(sections []component.SummarySection)
SortSummarySection sorts the summary sections in name order
func TableTitle ¶ added in v0.0.40
TableTitle allows us to disable table titles
func ToApplicationIcon ¶
ToApplicationIcon converts the string into an icon replacing any known bad images with better ones etc
func ToBreadcrumbMarkdown ¶
ToBreadcrumbMarkdown creates a breadcrumb row
func ToDurationString ¶
func ToGitLinkMarkdown ¶
func ToMarkdownExternalLink ¶
func ToMarkdownLink ¶
func ToMarkdownLinkFromURL ¶
func ToOwnerRepositoryLinkMarkdown ¶
ToOwnerRepositoryLinkMarkdown converts the given owner/repository and link to markdown
func ToPipelineActivity ¶
func ToPipelineActivity(u *unstructured.Unstructured) (*v1.PipelineActivity, error)
ToPipelineActivity converts to a PipelineActivity
func ToSecret ¶
func ToSecret(u *unstructured.Unstructured) (*corev1.Secret, error)
ToSecret converts to a Secret
func ToStructured ¶
func ToStructured(u *unstructured.Unstructured, structured interface{}) error
ToStructured converts an unstructured object to a pointer to a structured type
func ToTimeMarkdown ¶
ToTimeMarkdown returns a formatted time as markdown
func ToTooltipText ¶ added in v0.0.44
ToTooltipText returns the text with a tooltop
Types ¶
This section is empty.