panel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PluginKind = "AlertTable"

Variables

This section is empty.

Functions

func AlertTable

func AlertTable(options ...Option) panel.Option

Types

type AlertAction

type AlertAction string
const (
	SilenceAction AlertAction = "silence"
	RunbookAction AlertAction = "runbook"
)

type Builder

type Builder struct {
	PluginSpec `json:",inline" yaml:",inline"`
}

type ColumnDefinition

type ColumnDefinition struct {
	Name          string         `json:"name" yaml:"name"`
	Header        string         `json:"header,omitempty" yaml:"header,omitempty"`
	EnableSorting *bool          `json:"enableSorting,omitempty" yaml:"enableSorting,omitempty"`
	Sort          SortDirection  `json:"sort,omitempty" yaml:"sort,omitempty"`
	SortMode      ColumnSortMode `json:"sortMode,omitempty" yaml:"sortMode,omitempty"`
}

type ColumnSortMode

type ColumnSortMode string
const (
	AlphabeticalSort ColumnSortMode = "alphabetical"
	NumericSort      ColumnSortMode = "numeric"
	SeveritySort     ColumnSortMode = "severity"
)

type DeduplicationConfig

type DeduplicationConfig struct {
	Mode   DeduplicationMode `json:"mode" yaml:"mode"`
	Labels []string          `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type DeduplicationMode

type DeduplicationMode string
const (
	DeduplicationNone        DeduplicationMode = "none"
	DeduplicationFingerprint DeduplicationMode = "fingerprint"
	DeduplicationLabels      DeduplicationMode = "labels"
)

type LabelColorMapping

type LabelColorMapping struct {
	LabelKey  string               `json:"labelKey" yaml:"labelKey"`
	Mode      LabelColorMode       `json:"mode" yaml:"mode"`
	Overrides []LabelColorOverride `json:"overrides,omitempty" yaml:"overrides,omitempty"`
}

type LabelColorMode

type LabelColorMode string
const (
	AutoColorMode     LabelColorMode = "auto"
	SeverityColorMode LabelColorMode = "severity"
	ManualColorMode   LabelColorMode = "manual"
)

type LabelColorOverride

type LabelColorOverride struct {
	Value   string `json:"value" yaml:"value"`
	IsRegex bool   `json:"isRegex" yaml:"isRegex"`
	Color   string `json:"color" yaml:"color"`
}

type Option

type Option func(plugin *Builder) error

func AllowedActions

func AllowedActions(actions ...AlertAction) Option

func Columns

func Columns(columns ...ColumnDefinition) Option

func Deduplication

func Deduplication(config DeduplicationConfig) Option

func DefaultGroupBy

func DefaultGroupBy(labels ...string) Option

func LabelColorMappings

func LabelColorMappings(mappings ...LabelColorMapping) Option

func RunbookAnnotationKey

func RunbookAnnotationKey(key string) Option

type PluginSpec

type PluginSpec struct {
	DefaultGroupBy       []string             `json:"defaultGroupBy,omitempty" yaml:"defaultGroupBy,omitempty"`
	Columns              []ColumnDefinition   `json:"columns,omitempty" yaml:"columns,omitempty"`
	Deduplication        *DeduplicationConfig `json:"deduplication,omitempty" yaml:"deduplication,omitempty"`
	AllowedActions       []AlertAction        `json:"allowedActions,omitempty" yaml:"allowedActions,omitempty"`
	RunbookAnnotationKey string               `json:"runbookAnnotationKey,omitempty" yaml:"runbookAnnotationKey,omitempty"`
	LabelColorMappings   []LabelColorMapping  `json:"labelColorMappings,omitempty" yaml:"labelColorMappings,omitempty"`
}

type SortDirection

type SortDirection string
const (
	AscSort  SortDirection = "asc"
	DescSort SortDirection = "desc"
)

Jump to

Keyboard shortcuts

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