configuration

package
v0.20.13 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertLevel added in v0.16.8

type AlertLevel string

Alert level enum values correspond to the severity levels of the MUI Alert component: https://mui.com/material-ui/react-alert/#severity

const (
	AlertLevelSuccess AlertLevel = "success"
	AlertLevelInfo    AlertLevel = "info"
	AlertLevelWarning AlertLevel = "warning"
	AlertLevelError   AlertLevel = "error"
)

type CommandSpec added in v0.16.8

type CommandSpec struct {
	// Name is the title of the command
	Name string `json:"name"`
	// Template is the template string for the command
	Template string `json:"template"`
	// DescriptionMd is an optional description for the command in Markdown
	DescriptionMd *string `json:"descriptionMd,omitempty"`
	// AlertMessageMd is an optional message for the command, to be displayed as
	// an alert, written in Markdown
	AlertMessageMd *string `json:"alertMessageMd,omitempty"`
	// AlertLevel is the severity level of the alert
	AlertLevel AlertLevel `json:"alertLevel"`
}

CommandSpec details a command to be displayed on a job's "Commands" sidebar tab in the Lookout UI

type CustomTheme added in v0.20.1

type CustomTheme struct {
	Name        string                    `json:"name"`
	ThemeConfig LookoutThemeConfigOptions `json:"themeConfig"`
}

type CustomThemeConfigs added in v0.20.1

type CustomThemeConfigs struct {
	Themes           []CustomTheme `json:"themes"`
	DefaultThemeName string        `json:"defaultThemeName"`
}

type ErrorMonitoringConfig added in v0.19.14

type ErrorMonitoringConfig struct {
	Sentry *SentryConfig `json:"sentry,omitempty"`
}

type LookoutConfig added in v0.16.8

type LookoutConfig struct {
	Auth authconfig.AuthConfig

	ApiPort     int
	Profiling   *profilingconfig.ProfilingConfig
	MetricsPort int

	CorsAllowedOrigins []string
	Tls                TlsConfig

	Postgres configuration.PostgresConfig

	PrunerConfig PrunerConfig

	UIConfig
}

func (LookoutConfig) Validate added in v0.16.8

func (c LookoutConfig) Validate() error

type LookoutThemeConfigOptions added in v0.20.1

type LookoutThemeConfigOptions struct {
	// Typography
	FontFamily            *string `json:"fontFamily,omitempty"`
	MonospaceFontFamily   *string `json:"monospaceFontFamily,omitempty"`
	UppercaseButtonText   *bool   `json:"uppercaseButtonText,omitempty"`
	UppercaseOverlineText *bool   `json:"uppercaseOverlineText,omitempty"`

	// Shape
	BorderRadiusPx *int `json:"borderRadiusPx,omitempty"`

	// Palette (light, default)
	PrimaryColour                *string `json:"primaryColour,omitempty"`
	SecondaryColour              *string `json:"secondaryColour,omitempty"`
	AppBarColour                 *string `json:"appBarColour,omitempty"`
	ErrorColour                  *string `json:"errorColour,omitempty"`
	WarningColour                *string `json:"warningColour,omitempty"`
	InfoColour                   *string `json:"infoColour,omitempty"`
	SuccessColour                *string `json:"successColour,omitempty"`
	StatusQueuedColour           *string `json:"statusQueuedColour,omitempty"`
	StatusPendingColour          *string `json:"statusPendingColour,omitempty"`
	StatusRunningColour          *string `json:"statusRunningColour,omitempty"`
	StatusSucceededColour        *string `json:"statusSucceededColour,omitempty"`
	StatusFailedColour           *string `json:"statusFailedColour,omitempty"`
	StatusCancelledColour        *string `json:"statusCancelledColour,omitempty"`
	StatusPreemptedColour        *string `json:"statusPreemptedColour,omitempty"`
	StatusLeasedColour           *string `json:"statusLeasedColour,omitempty"`
	StatusRejectedColour         *string `json:"statusRejectedColour,omitempty"`
	DefaultBackgroundColour      *string `json:"defaultBackgroundColour,omitempty"`
	PaperSurfaceBackgroundColour *string `json:"paperSurfaceBackgroundColour,omitempty"`

	// Palette (dark)
	PrimaryColourDark                *string `json:"primaryColourDark,omitempty"`
	SecondaryColourDark              *string `json:"secondaryColourDark,omitempty"`
	AppBarColourDark                 *string `json:"appBarColourDark,omitempty"`
	ErrorColourDark                  *string `json:"errorColourDark,omitempty"`
	WarningColourDark                *string `json:"warningColourDark,omitempty"`
	InfoColourDark                   *string `json:"infoColourDark,omitempty"`
	SuccessColourDark                *string `json:"successColourDark,omitempty"`
	StatusQueuedColourDark           *string `json:"statusQueuedColourDark,omitempty"`
	StatusPendingColourDark          *string `json:"statusPendingColourDark,omitempty"`
	StatusRunningColourDark          *string `json:"statusRunningColourDark,omitempty"`
	StatusSucceededColourDark        *string `json:"statusSucceededColourDark,omitempty"`
	StatusFailedColourDark           *string `json:"statusFailedColourDark,omitempty"`
	StatusCancelledColourDark        *string `json:"statusCancelledColourDark,omitempty"`
	StatusPreemptedColourDark        *string `json:"statusPreemptedColourDark,omitempty"`
	StatusLeasedColourDark           *string `json:"statusLeasedColourDark,omitempty"`
	StatusRejectedColourDark         *string `json:"statusRejectedColourDark,omitempty"`
	DefaultBackgroundColourDark      *string `json:"defaultBackgroundColourDark,omitempty"`
	PaperSurfaceBackgroundColourDark *string `json:"paperSurfaceBackgroundColourDark,omitempty"`
}

type PrunerConfig

type PrunerConfig struct {
	ExpireAfter              time.Duration
	DeduplicationExpireAfter time.Duration
	Timeout                  time.Duration
	BatchSize                int
	Postgres                 configuration.PostgresConfig
}

type SentryConfig added in v0.19.14

type SentryConfig struct {
	Dsn         string `json:"dsn"`
	Environment string `json:"environment"`
}

type TlsConfig added in v0.16.8

type TlsConfig struct {
	Enabled  bool
	KeyPath  string
	CertPath string
}

type UIConfig added in v0.16.8

type UIConfig struct {
	CustomTitle string `json:"customTitle"`

	// We have a separate flag here (instead of making the Oidc field optional)
	// so that clients can override the server's preference.
	OidcEnabled bool `json:"oidcEnabled"`
	Oidc        *struct {
		Authority string `json:"authority"`
		ClientId  string `json:"clientId"`
		Scope     string `json:"scope"`
	} `json:"oidc,omitempty"`

	ArmadaApiBaseUrl         string `json:"armadaApiBaseUrl"`
	UserAnnotationPrefix     string `json:"userAnnotationPrefix"`
	BinocularsBaseUrlPattern string `json:"binocularsBaseUrlPattern"`

	JobSetsAutoRefreshMs int           `json:"jobSetsAutoRefreshMs,omitempty"`
	JobsAutoRefreshMs    int           `json:"jobsAutoRefreshMs,omitempty"`
	CommandSpecs         []CommandSpec `json:"commandSpecs"`

	Backend string `json:"backend,omitempty"`

	// PinnedTimeZoneIdentifiers is the list of identifiers of IANA time zones to be displayed at
	// the top of the time zone selector.
	PinnedTimeZoneIdentifiers []string `json:"pinnedTimeZoneIdentifiers"`

	ErrorMonitoring ErrorMonitoringConfig `json:"errorMonitoring"`

	CustomThemeConfigs *CustomThemeConfigs `json:"customThemeConfigs,omitempty"`
}

UIConfig must match the LookoutUiConfig TypeScript interface defined in internal/lookoutui/src/lookoutUiConfig.d.ts

Jump to

Keyboard shortcuts

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