VAPP-19: Settings Diagnostics: wire log level to traceinfo and add server errors viewer #23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/settings-diagnostics-vapp-19"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
VAPP-19: Settings Diagnostics: wire log level to traceinfo and add server errors viewer
The Diagnostics card on the settings page was dead: the info/debug/trace
selectwas bound to nothing and "Open logs folder" had no handler (and a browser app cannot open a local file manager anyway). This wires the card to vervain-server's real admin diagnostics surfaces over the control channel.Server fns (
src/server_fns/mod.rs)All three use
control::ADMIN_ONLY_TIMEOUT, with frame shapes verified against the vervain-server dispatch (crates/meshcentral-web/src/user_session.rs):get_trace_info()sends{action: "traceinfo"}and returns the enabled source keys parsed from the reply'straceSourcesobject (a value counts as on if it istrue, a non-zero number, or a non-empty string).set_trace_info(sources)sends{action: "traceinfo", traceSources: {<key>: true, ...}}and returns the server's resulting enabled set. The map form is required: the server's write arm only applies whentraceSourcesdeserializes as an object, and the write itself is full-admin only, so the fn reconciles against the authoritative reply rather than assuming the write took.get_server_errors()sends{action: "servererrors"}and returns the buffered error log as plain text (dataabsent maps to empty).UI (
src/components/pages/settings.rs)The dead card becomes a
DiagnosticsCardcomponent:serverclearerrorlogis a stub).get_server_errorsdoubles as the admin gate: it is silently dropped for non-admins (surfacing as a timeout), so a failed initial load renders one explanatory inline line in place of the controls rather than dead toggles (same pattern as the Plugins page).Acceptance criteria
just checkpasses