Skip to content

Commit

Permalink
Addressing a few PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jan 8, 2025
1 parent c1de817 commit b03325e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changelog/24454.txt
Original file line number Diff line number Diff line change
@@ -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
```
7 changes: 4 additions & 3 deletions nomad/structs/config/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"fmt"
"slices"
"strings"

"github.com/hashicorp/nomad/helper/pointer"
)

// UIConfig contains the operator configuration of the web UI
Expand Down Expand Up @@ -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),
}
}

Expand Down
6 changes: 3 additions & 3 deletions website/content/docs/configuration/ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.



Expand Down

0 comments on commit b03325e

Please sign in to comment.