diff --git a/.changelog/24454.txt b/.changelog/24454.txt index 1a140ae967f..33bac43bf33 100644 --- a/.changelog/24454.txt +++ b/.changelog/24454.txt @@ -1,3 +1,3 @@ ```release-note:improvement -cli: Added UI URL hints to the end of common CLI commands and a -ui flag to auto-open them +cli: Added UI URL hints to the end of common CLI commands and a `-ui` flag to auto-open them ``` diff --git a/nomad/structs/config/ui.go b/nomad/structs/config/ui.go index 9c10c9940ad..0cd547e562d 100644 --- a/nomad/structs/config/ui.go +++ b/nomad/structs/config/ui.go @@ -7,6 +7,8 @@ import ( "fmt" "slices" "strings" + + "github.com/hashicorp/nomad/helper/pointer" ) // UIConfig contains the operator configuration of the web UI @@ -139,14 +141,13 @@ type LabelUIConfig struct { // DefaultUIConfig returns the canonical defaults for the Nomad // `ui` configuration. func DefaultUIConfig() *UIConfig { - enabled := true return &UIConfig{ - Enabled: enabled, + Enabled: true, Consul: &ConsulUIConfig{}, Vault: &VaultUIConfig{}, Label: &LabelUIConfig{}, ContentSecurityPolicy: DefaultCSPConfig(), - ShowCLIHints: &enabled, + ShowCLIHints: pointer.Of(true), } } diff --git a/website/content/docs/configuration/ui.mdx b/website/content/docs/configuration/ui.mdx index 5c33b0dd259..29b67304a4c 100644 --- a/website/content/docs/configuration/ui.mdx +++ b/website/content/docs/configuration/ui.mdx @@ -60,7 +60,7 @@ and the configuration is individual to each agent. - `show_cli_hints` `(bool: true)` - Controls whether CLI commands display hints about equivalent UI pages. For example, when running `nomad server members`, - the CLI will show a message indicating where to find server information in + the CLI shows a message indicating where to find server information in the web UI. Set to `false` to disable these hints. ## `content_security_policy` Parameters @@ -111,10 +111,10 @@ header sent with the web UI response. - `text` `(string: "")` - Specifies the text of the label that will be displayed in the header of the Web UI. - `background_color` `(string: "")` - The background color of the label to - be displayed. The Web UI will default to a black background. HEX values + be displayed. The Web UI defaults to a black background. HEX values may be used. - `text_color` `(string: "")` - The text color of the label to be displayed. - The Web UI will default to white text. HEX values may be used. + The Web UI defaults to white text. HEX values may be used.