Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A dedicated variable at nomad/ui/defaults #24868

Draft
wants to merge 4 commits into
base: 20482-expanded-ui-agent-config-and-defaults
Choose a base branch
from

Conversation

philrenaud
Copy link
Contributor

Adds a variable at nomad/ui/defaults to override agent config ui defaults, but can still be overriden by localStorage and queryParams.

A nice middle ground between "Everybody gets this because it's part of the agent configuration" and "Only you, in this browser, get it", because you can turn variable access on/off via ACL policy definitions, with the added benefit of "You can change this without having to restart your server", which is a problem the agent UI config block has.

@philrenaud philrenaud self-assigned this Jan 15, 2025
];

async establishUIDefaults() {
// // First, check to see if there are localStorage properties set for each of the defaults.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a premature optimization


async fetchVariableDefaults() {
try {
// if (this.can.can('read variable', 'nomad/ui/defaults', '*')) { // TODO: is wildcard correctly handled by "can"?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested without can ability checks and this fails gracefully. Can probably remove the condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant