You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/ui/ui.go
+35-32Lines changed: 35 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -11,42 +11,43 @@ import (
11
11
)
12
12
13
13
const (
14
-
defaultTitle="Health Dashboard | Gatus"
15
-
defaultDescription="Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"
16
-
defaultHeader="Gatus"
17
-
defaultDashboardHeading="Health Dashboard"
18
-
defaultDashboardSubheading="Monitor the health of your endpoints in real-time"
19
-
defaultLogo=""
20
-
defaultLink=""
21
-
defaultCustomCSS=""
22
-
defaultSortBy="name"
23
-
defaultFilterBy="none"
24
-
defaultConfigRefreshInterval=10*time.Minute
14
+
defaultTitle="Health Dashboard | Gatus"
15
+
defaultDescription="Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"
16
+
defaultHeader="Gatus"
17
+
defaultDashboardHeading="Health Dashboard"
18
+
defaultDashboardSubheading="Monitor the health of your endpoints in real-time"
19
+
defaultLogo=""
20
+
defaultLink=""
21
+
defaultCustomCSS=""
22
+
defaultSortBy="name"
23
+
defaultFilterBy="none"
25
24
)
26
25
27
26
var (
28
-
defaultDarkMode=true
27
+
defaultDarkMode=true
28
+
defaultConfigRefreshInterval=10*time.Minute
29
29
30
-
ErrButtonValidationFailed=errors.New("invalid button configuration: missing required name or link")
31
-
ErrInvalidDefaultSortBy=errors.New("invalid default-sort-by value: must be 'name', 'group', or 'health'")
32
-
ErrInvalidDefaultFilterBy=errors.New("invalid default-filter-by value: must be 'none', 'failing', or 'unstable'")
30
+
ErrButtonValidationFailed=errors.New("invalid button configuration: missing required name or link")
31
+
ErrInvalidDefaultSortBy=errors.New("invalid default-sort-by value: must be 'name', 'group', or 'health'")
32
+
ErrInvalidDefaultFilterBy=errors.New("invalid default-filter-by value: must be 'none', 'failing', or 'unstable'")
33
+
ErrInvalidConfigRefreshInterval=errors.New("invalid config-refresh-interval value: must be greater than zero")
33
34
)
34
35
35
36
// Config is the configuration for the UI of Gatus
36
37
typeConfigstruct {
37
-
Titlestring`yaml:"title,omitempty"`// Title of the page
38
-
Descriptionstring`yaml:"description,omitempty"`// Meta description of the page
39
-
DashboardHeadingstring`yaml:"dashboard-heading,omitempty"`// Dashboard Title between header and endpoints
40
-
DashboardSubheadingstring`yaml:"dashboard-subheading,omitempty"`// Dashboard Description between header and endpoints
41
-
Headerstring`yaml:"header,omitempty"`// Header is the text at the top of the page
42
-
Logostring`yaml:"logo,omitempty"`// Logo to display on the page
43
-
Linkstring`yaml:"link,omitempty"`// Link to open when clicking on the logo
44
-
Buttons []Button`yaml:"buttons,omitempty"`// Buttons to display below the header
45
-
CustomCSSstring`yaml:"custom-css,omitempty"`// Custom CSS to include in the page
46
-
DarkMode*bool`yaml:"dark-mode,omitempty"`// DarkMode is a flag to enable dark mode by default
47
-
DefaultSortBystring`yaml:"default-sort-by,omitempty"`// DefaultSortBy is the default sort option ('name', 'group', 'health')
48
-
DefaultFilterBystring`yaml:"default-filter-by,omitempty"`// DefaultFilterBy is the default filter option ('none', 'failing', 'unstable')
49
-
ConfigRefreshInterval time.Duration`yaml:"config-refresh-interval,omitempty"`// ConfigRefreshInterval is the interval at which to refresh the UI configuration via the API
38
+
Titlestring`yaml:"title,omitempty"`// Title of the page
39
+
Descriptionstring`yaml:"description,omitempty"`// Meta description of the page
40
+
DashboardHeadingstring`yaml:"dashboard-heading,omitempty"`// Dashboard Title between header and endpoints
41
+
DashboardSubheadingstring`yaml:"dashboard-subheading,omitempty"`// Dashboard Description between header and endpoints
42
+
Headerstring`yaml:"header,omitempty"`// Header is the text at the top of the page
43
+
Logostring`yaml:"logo,omitempty"`// Logo to display on the page
44
+
Linkstring`yaml:"link,omitempty"`// Link to open when clicking on the logo
45
+
Buttons []Button`yaml:"buttons,omitempty"`// Buttons to display below the header
46
+
CustomCSSstring`yaml:"custom-css,omitempty"`// Custom CSS to include in the page
47
+
DarkMode*bool`yaml:"dark-mode,omitempty"`// DarkMode is a flag to enable dark mode by default
48
+
DefaultSortBystring`yaml:"default-sort-by,omitempty"`// DefaultSortBy is the default sort option ('name', 'group', 'health')
49
+
DefaultFilterBystring`yaml:"default-filter-by,omitempty"`// DefaultFilterBy is the default filter option ('none', 'failing', 'unstable')
50
+
ConfigRefreshInterval*time.Duration`yaml:"config-refresh-interval,omitempty"`// ConfigRefreshInterval is the interval at which to refresh the UI configuration via the API
0 commit comments