Repository navigation
refactor(settings): move the four remaining setting readers onto the catalog - #205
Merged
Merged
Conversation
…catalog
FOG_HOST_IDENTIFY_SMBIOS, FOG_AGENT_ENROLL_DEPLOY_WINDOW,
FOG_CLIENT_CHECKIN_TIME and FOG_ENABLE_SHOW_PASSWORDS now come from
config/fog-settings.js through sails.helpers.settings.get, so the FOG
Configuration page shows and validates every runtime setting fog-node reads.
Each normalize and default copies the old reader's rule, so no agent
identity, enrollment auto-approval, poll interval or password-reveal
decision changes. A table-driven test feeds 18 stored values (no row,
'', null, {}, booleans, numbers, strings) to the old rule and to the
catalog path for each key and requires the same result.
The page gains number and checkbox controls. A number field that is empty
or not a number sends nothing and shows "Enter a number.": Number('') is
0, so a cleared deploy-window field would otherwise switch off deploy
auto-approval in one edit. The descriptions say what fog-node does where
the 1.6 text is false for it.
Closes #201
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #201. Part of the FOG 1.6 parity map (#155). Follows #198 (catalog) and #199 (FOG Configuration page).
What
config/fog-settings.js:FOG_HOST_IDENTIFY_SMBIOS(select),FOG_AGENT_ENROLL_DEPLOY_WINDOW(number),FOG_CLIENT_CHECKIN_TIME(number),FOG_ENABLE_SHOW_PASSWORDS(checkbox).resolve-host.js,auto-approve.js,poll.jsandform-generator.jsread throughsails.helpers.settings.get.DEFAULT_WINDOW_HOURS,DEFAULT_POLL_INTERVALandsettingOnare gone; the catalog holds those rules now.numberandcheckboxcontrols, disabled withoutsetting.update.No decision changes
Each
normalize+defaultcopies the old reader's rule.test/helpers/settings-catalog.test.jsfeeds 18 stored values to the old rule (kept as a fixture) and to the catalog path for each key, compared withdeepStrictEqual. The existing agent tests pass unchanged.Guard
An empty or non-numeric number field sends no save and shows "Enter a number.".
Number('')is 0, so a cleared deploy-window field would otherwise turn off deploy auto-approval in one edit. The server rule is unchanged.Review
Implementation: sonnet. Spec and standards review: both on opus (critical tier: agent identity and auto-approval paths). Round 1: spec CLEAN, standards 2 findings (fixed). Round 2: both CLEAN.
Test
npm test(538 passing),npm run test:ui,npm run test:ui:prod.🤖 Generated with Claude Code