feat(admin): ask the panel to restart, from verdande's own settings
Release / Build and publish image (push) Failing after 10m2s
Release / Build and publish image (push) Failing after 10m2s
A container cannot replace its own image from the inside, so "update" is really "ask whoever owns the container to recreate it" — Yggdrasil pulls `:latest` on the way, which is what makes a restart an update at all. This removes the second browser tab, not the panel's authority: the panel still does the work and still records who asked. Three settings, needed together, and the page names whichever are missing — an operator reading "not configured" should not have to go and find out which of three. The token is never sent to a browser; the page is told only whether it is set. Answers 202 rather than waiting. The panel stops this container as part of answering, so the reply may never arrive, and a request cut off mid-flight is the successful case wearing a failure's clothes. The interface believes neither answer and polls /healthz until it responds. Administrators only, and sessions only. A leaked API token that could restart the server is a denial of service in one request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
19aa02e80c
commit
2b45aa33e1
@@ -199,6 +199,8 @@ export const api = {
|
||||
deleteUser: (id) => del(`/users/${id}`),
|
||||
revokeInvite: (id) => del(`/invites/${id}`),
|
||||
listErrors: () => get('/errors'),
|
||||
panelStatus: () => get('/panel'),
|
||||
restartFromPanel: () => post('/panel/restart'),
|
||||
|
||||
// The nightly backup, which ran since the beginning with nothing to show it.
|
||||
// The OAuth client itself, which is the instance's registration with Google
|
||||
|
||||
@@ -635,5 +635,16 @@ export const da = {
|
||||
'passkey.signingIn': 'Venter på enheden…',
|
||||
|
||||
'passkey.unavailable':
|
||||
'Passkeys kan ikke bruges her — enten understøtter browseren dem ikke, eller også er serverens adresse en IP frem for et domænenavn, hvilket ingen authenticator accepterer.'
|
||||
'Passkeys kan ikke bruges her — enten understøtter browseren dem ikke, eller også er serverens adresse en IP frem for et domænenavn, hvilket ingen authenticator accepterer.',
|
||||
|
||||
// --- restarting from the interface ---------------------------------------------
|
||||
'update.restart': 'Genstart og hent nyeste version',
|
||||
'update.restarting': 'Genstarter…',
|
||||
'update.restartQuestion':
|
||||
'Genstart nu? Serveren er nede i omkring et halvt minut, og henter den nyeste version på vejen op.',
|
||||
'update.asking': 'Beder panelet om at genstarte…',
|
||||
'update.waiting': 'Venter på at serveren kommer op igen…',
|
||||
'update.stillDown': 'Serveren er ikke kommet op endnu. Kig i panelet.',
|
||||
'update.notConfigured':
|
||||
'Denne instans kan ikke genstarte sig selv: {missing} er ikke sat. En container kan ikke udskifte sit eget image — panelet gør arbejdet, og det her er kun måden at bede om det.'
|
||||
};
|
||||
|
||||
@@ -630,5 +630,16 @@ export const en = {
|
||||
'passkey.signingIn': 'Waiting for the device…',
|
||||
|
||||
'passkey.unavailable':
|
||||
'Passkeys cannot be used here — either this browser does not support them, or the server’s address is an IP rather than a domain name, which no authenticator will accept.'
|
||||
'Passkeys cannot be used here — either this browser does not support them, or the server’s address is an IP rather than a domain name, which no authenticator will accept.',
|
||||
|
||||
// --- restarting from the interface ---------------------------------------------
|
||||
'update.restart': 'Restart and pull the latest version',
|
||||
'update.restarting': 'Restarting…',
|
||||
'update.restartQuestion':
|
||||
'Restart now? The server is down for about half a minute, and pulls the newest version on the way back up.',
|
||||
'update.asking': 'Asking the panel to restart…',
|
||||
'update.waiting': 'Waiting for the server to come back…',
|
||||
'update.stillDown': 'The server has not come back yet. Have a look in the panel.',
|
||||
'update.notConfigured':
|
||||
'This instance cannot restart itself: {missing} are not set. A container cannot replace its own image — the panel does the work, and this is only the way to ask.'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user