<#956 Replace raw JSON editors with structured for...
# osctrl
g
#956 Replace raw JSON editors with structured form UI for service config Pull request opened by alvarofraguas Summary • Redesigns the Service Config page (
/_app/config/$service
) to use per-field form controls instead of raw Monaco JSON code editors • Renders type-appropriate inputs for each config field: text inputs for strings, number inputs for integers, toggle switches for booleans, comma-separated inputs for string arrays, and masked values with reveal buttons for sensitive fields (passwords, secrets, keys) • Sections with 3+ boolean flags (e.g. osquery feature toggles) use a compact 2-column toggle grid • Collapsible sections with chevron toggle — editable sections default open, read-only sections default closed • Per-field dirty tracking with yellow left-border highlight on changed rows and a change count badge on section headers • All Go config struct field types are accounted for:
string
,
int
,
bool
,
[]string
,
time.Duration
, and nested objects • Preserves the existing Apply & Restart flow, confirmation dialog, service tabs, and all backend API contracts unchanged Before Raw JSON code editor per section — requires manual JSON editing to change config values. After Structured form fields matching the UX pattern of the Settings page — individual inputs per field with inline save. Test plan • Navigate to
/_app/config/api
and verify all sections render with structured form fields • Navigate to
/_app/config/tls
and verify TLS-specific sections (batchWriter, osctrld, metrics) render correctly • Edit a field in an editable section (e.g. service port), verify dirty state indicators appear • Click Save on a dirty section, verify it persists and the source badge changes to "db" • Verify "Apply & Restart" button appears after saving, confirm dialog works, and service restarts successfully • Verify read-only sections (db, redis, jwt, tls, saml, oidc) show values but no input controls • Verify sensitive fields (Password, JWTSecret, ClientSecret) are masked with a reveal toggle • Verify OIDC scopes/requiredGroups render as tag chips (string arrays) • Verify osquery section shows feature toggles in a compact 2-column boolean grid • Collapse and expand sections, verify state persists during the session jmpsec/osctrl