feat: rebranded from vpn-router to linux-manager.
This commit is contained in:
1 parent
8efe21bfa6
commit
85a1ffa21f
238 files changed
+5010
-3761
No files matched your search
+13
-13
@@ -21,7 +21,7 @@ const STATES: Record<UpgradeState['state'], string> = {
|
||||
}
|
||||
|
||||
/**
|
||||
* The update information of the router's package, read when shown: a table of the package with its installed
|
||||
* The update information of the server's package, read when shown: a table of the package with its installed
|
||||
* version and, when the repository apt is configured with has a newer one, that version, as of apt's last update of
|
||||
* its package lists. With system, that of the system's packages instead: a table of the packages apt-get upgrade
|
||||
* would upgrade, each with its installed and its new version, from /system-updates, upgraded by /system-upgrade.
|
||||
@@ -29,11 +29,11 @@ const STATES: Record<UpgradeState['state'], string> = {
|
||||
* Check update, always in the top right corner, has the manager update apt's package lists, and the information is
|
||||
* read again every POLL_SECONDS until the update ends.
|
||||
*
|
||||
* With updates available, Upgrade is added beside it and starts the upgrade of the packages on the router after a confirmation, and a dialog
|
||||
* follows it every POLL_SECONDS with its output. The upgrade restarts the manager and the router's web service, so a
|
||||
* With updates available, Upgrade is added beside it and starts the upgrade of the packages on the server after a confirmation, and a dialog
|
||||
* follows it every POLL_SECONDS with its output. The upgrade restarts the manager and the server's web service, so a
|
||||
* failed read is shown as a restart and reading goes on. When the manager's package changed, Reload page loads its new
|
||||
* web application. A failed or interrupted upgrade is shown with its output and can be started again. When a package
|
||||
* asks for a reboot, Reboot reboots the router after a confirmation, and the page reloads once the manager answers again.
|
||||
* asks for a reboot, Reboot reboots the server after a confirmation, and the page reloads once the manager answers again.
|
||||
*
|
||||
* onBusy is called with true while a check, an upgrade or a reboot runs and with false when it ends.
|
||||
*/
|
||||
@@ -142,7 +142,7 @@ export default function UpdatesNotice(props: { onBusy?: (busy: boolean) => void;
|
||||
}
|
||||
}
|
||||
|
||||
const managerChanged = upgrade?.state === 'succeeded' && upgrade.before?.['vpn-router'] !== upgrade.after?.['vpn-router']
|
||||
const managerChanged = upgrade?.state === 'succeeded' && upgrade.before?.['linux-manager'] !== upgrade.after?.['linux-manager']
|
||||
const newer = updates?.available ? updates.packages.filter((item) => item.update) : []
|
||||
const checkedAt = checking
|
||||
? 'checking for updates...'
|
||||
@@ -213,17 +213,17 @@ export default function UpdatesNotice(props: { onBusy?: (busy: boolean) => void;
|
||||
}
|
||||
>
|
||||
{upgrade.rebooting || rebooting
|
||||
? 'The router is rebooting; the page reloads when the Router Manager answers again.'
|
||||
: `The router needs a reboot${upgrade.reboot_packages.length > 0 ? ` for ${upgrade.reboot_packages.join(', ')}` : ''}.`}
|
||||
? 'The server is rebooting; the page reloads when the Manager answers again.'
|
||||
: `The server needs a reboot${upgrade.reboot_packages.length > 0 ? ` for ${upgrade.reboot_packages.join(', ')}` : ''}.`}
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
{confirming === 'upgrade' && (
|
||||
<ConfirmDialog
|
||||
title={props.system ? "Upgrade the system's packages" : "Upgrade the router's package"}
|
||||
title={props.system ? "Upgrade the system's packages" : "Upgrade the server's package"}
|
||||
message={props.system
|
||||
? `The ${newer.length} packages listed are upgraded on the router with apt-get upgrade; none is installed or removed. Services restart during the upgrade, the Router Manager among them when vpn-router is listed, and the page may not answer for a while.`
|
||||
: 'vpn-router is upgraded on the router. The Router Manager and the router\'s web service restart during the upgrade, and the page may not answer for a while.'}
|
||||
? `The ${newer.length} packages listed are upgraded on the server with apt-get upgrade; none is installed or removed. Services restart during the upgrade, the Manager among them when linux-manager is listed, and the page may not answer for a while.`
|
||||
: 'linux-manager is upgraded on the server. The Manager and the server\'s web service restart during the upgrade, and the page may not answer for a while.'}
|
||||
confirmLabel="Upgrade"
|
||||
destructive={false}
|
||||
onConfirm={() => void start('upgrade')}
|
||||
@@ -232,8 +232,8 @@ export default function UpdatesNotice(props: { onBusy?: (busy: boolean) => void;
|
||||
)}
|
||||
{confirming === 'reboot' && (
|
||||
<ConfirmDialog
|
||||
title="Reboot the router"
|
||||
message={'The router reboots in a few seconds. Its VPN connections are interrupted until it is up again.'}
|
||||
title="Reboot the server"
|
||||
message={'The server reboots in a few seconds. Its VPN connections are interrupted until it is up again.'}
|
||||
confirmLabel="Reboot"
|
||||
destructive
|
||||
onConfirm={() => void start('reboot')}
|
||||
@@ -245,7 +245,7 @@ export default function UpdatesNotice(props: { onBusy?: (busy: boolean) => void;
|
||||
<DialogTitle>{props.system ? 'System upgrade' : 'Upgrade'}</DialogTitle>
|
||||
<DialogContent>
|
||||
<Stack sx={{ gap: 1 }}>
|
||||
{unreachable && <Alert severity="info">The Router Manager is restarting...</Alert>}
|
||||
{unreachable && <Alert severity="info">The Manager is restarting...</Alert>}
|
||||
{upgrade && (
|
||||
<Typography variant="body2">
|
||||
{STATES[upgrade.state]}
|
||||
|
||||
Reference in new issue
Block a user