service live configslop

This commit is contained in:
legop3
2026-09-14 17:56:53 -04:00
parent 881583ee0a
commit 91e0cc3886
69 changed files with 1188 additions and 619 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ export default function AdminApp() {
<PasswordConfirmationDialog open={confirmationOpen} busy={confirmationBusy} error={confirmationError} onCancel={cancelPasswordConfirmation} onConfirm={submitPasswordConfirmation} />
<main className="mx-auto min-h-screen w-full max-w-[100rem] p-1">
<CardFrame title="MultiRover administration" meta={connected ? role : 'offline'} bodyClassName="p-0.5 text-xs text-slate-400">
<p>{snapshot ? `Active configuration revision ${snapshot.configuration.revision}.${snapshot.restartRequired ? ' An application restart is required to apply saved changes.' : ' The running application has loaded this revision.'}` : 'Central server administration and configuration.'}</p>
<p>{snapshot ? `Active configuration revision ${snapshot.configuration.revision}. The running application has applied revision ${snapshot.appliedRevision}.` : 'Central server administration and configuration.'}</p>
</CardFrame>
{isAdmin ? (
<Tabs currentTab={activeSection} onTabChange={selectSection}>
+1 -1
View File
@@ -13,7 +13,7 @@ export default function AdminOverview({ snapshot, socket, runSensitive, onSnapsh
const config = snapshot.configuration;
async function restore(revision) {
if (!window.confirm(`Restore configuration revision ${revision}? This creates a new active revision and requires a restart.`)) return;
if (!window.confirm(`Restore configuration revision ${revision}? This creates and immediately applies a new active revision.`)) return;
try {
const response = await runSensitive(() => restoreConfigurationRevision(socket, {
revision,
@@ -65,7 +65,7 @@ export default function ConfigurationEditor({ snapshot, socket, runSensitive, on
return (
<CardFrame title="Configuration" meta={`revision ${revision}`} clipOverflow={false} bodyClassName="p-0.5">
<div className="configuration-toolbar sticky top-0 z-20 mb-0.5 space-y-0.5 border border-neutral-500/60 bg-neutral-900/95 p-0.5 backdrop-blur">
<p className="text-xs text-slate-400">Saved changes apply after an application restart.</p>
<p className="text-xs text-slate-400">Saving applies the complete revision immediately and reloads each affected service.</p>
{/* All document actions stay together at the start of the toolbar. The
editor may use a wide canvas, but width is never used to separate a
control from the content that explains it. */}
@@ -75,9 +75,19 @@ export default function ConfigurationEditor({ snapshot, socket, runSensitive, on
setDraft(clone(serverValue));
setSecretOperations({});
}}>Reset</button>
<button type="button" className="button-dark" disabled={!dirty || saving} onClick={save}>{saving ? 'Saving…' : 'Save configuration'}</button>
<button type="button" className="button-dark" disabled={!dirty || saving} onClick={save}>{saving ? 'Applying…' : 'Save configuration'}</button>
</div>
</div>
{snapshot.configurationApplication?.services?.some((service) => service.status === 'failed') ? (
<div className="mb-0.5 border border-amber-500/60 bg-amber-950/40 p-1 text-xs text-amber-100">
<p className="font-semibold">Configuration was saved, but some services could not reload</p>
<ul className="mt-0.5 list-disc space-y-0.25 pl-4">
{snapshot.configurationApplication.services
.filter((service) => service.status === 'failed')
.map((service, index) => <li key={`${service.section}-${index}`}>{service.section}: {service.error}</li>)}
</ul>
</div>
) : null}
{error ? <p className="border border-red-500/60 bg-red-950/40 p-1 text-xs text-red-100">{error}</p> : null}
{validationErrors.length ? (
<div className="border border-red-500/60 bg-red-950/40 p-1 text-xs text-red-100">