MongocampSettings
Read-only viewer for the MongoCamp server's settings: the loaded plugins and a searchable, paged table of every configuration (key, value, type, whether a change needs a restart). Administrators only.
Usage
<template>
<MongocampSettings />
</template>Props
All optional; every one defaults to false (show everything).
| Prop | Hides |
|---|---|
hideHeading | the "Server settings" heading |
hideRefresh | the refresh button |
hidePlugins | the plugins card — the plugins request is skipped too |
hideCluster | the cluster card — the cluster request is skipped too |
hideConfigurations | the whole configuration section (search, masked note, table, pager) — the configuration request is skipped too |
hideSearch | the configuration search box |
hideMaskedNote | the "secret values are masked" note |
hideGrantHint | boolean |
<MongocampSettings hide-heading hide-plugins hide-search />Hiding never reveals anything: masked values stay masked, and non-admins still only see the notice.
In a page with its own header
Like the list components, it exposes refresh() (all parts again) and has a toolbar slot after its reload button, so a page can hide the heading and reload (hide-heading hide-refresh) and reload from its own header.
The configuration table is a named, keyboard-focusable region ("Server configuration"): long values make it scroll sideways, and a keyboard user can then scroll it too.
Behavior
- Admins only — for anyone else (
useMongocampRoles().isAdminis false) the component shows a short notice and asks the server nothing. Like the other role checks it is UI-level gating; the server decides what a token may read. - Cluster — the members the server reports (name, coordinator / site master badges); on a single node that is one member. Optional context: if the request fails the card is simply absent, the rest of the page is unaffected.
- Plugins — the route, file and ignored plugins the server reports.
- Configurations — sorted by key; the grey line under a key is the server's own comment. Search matches key, comment, type and the visible value, client-side. The table is paged ten rows at a time with a pager that only appears when needed.
- Errors — a failed load shows
MongocampErrorAlertwith retry; the refresh button reloads both requests. - Read-only — there is no way to change a setting or stop the server from here.
shutdownandupdateConfigurationare not wrapped anywhere in this module.
Secrets are never shown
The server's configuration list contains real secrets — on a stock MongoCamp 1.5.10 the auth secret, the database user name and password, and the database host. A value is masked (shown as a "••••••••" badge) when its key looks secret (pass, secret, token, api key, credential, private, username, host) and the value is text or a non-empty list. Switches and numbers stay visible even under such a key (AUTH_TOKEN is just a boolean, AUTH_APIKEYLENGTH just a number), and an unset secret shows "—".
Masking happens while the rows are built, before anything is rendered: the original value is never copied into a row, so it cannot reach the page, the search box or a copy/paste, and there is no reveal button. The key-based rule is a heuristic — a secret stored under an innocent-looking key would be shown, so treat the page as admin-only regardless. The /system/settings response repeats the whole configuration map; it is dropped, only its plugin lists are used.
Related composables
useMongocampSystem—getCluster,getSettings,listConfigurationsuseMongocampRoles— the admin check