mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-07-26 18:38:30 +00:00
update 1.2.2.3 beta
This commit is contained in:
@@ -7718,7 +7718,7 @@ function RestoreOptionsModal({
|
||||
<div className="rounded-md border border-blue-500/40 bg-blue-500/5 p-3 text-[11px] text-muted-foreground flex items-start gap-2">
|
||||
<History className="h-3.5 w-3.5 text-blue-400 shrink-0 mt-0.5" />
|
||||
<div>
|
||||
After the reboot, this Backups tab will show a live post-restore progress card with ETA, per-component status, log tail and rollback delta. If Telegram/Discord/ntfy notifications are configured, you'll also receive the "Host restore finished" event.
|
||||
After the reboot, this Backups tab will show a live post-restore progress card with estimated time, per-component status, log tail and rollback delta. If Telegram/Discord/ntfy notifications are configured, you'll also receive the "Host restore finished" event.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ const CURRENT_VERSION_FEATURES = [
|
||||
},
|
||||
{
|
||||
icon: <RefreshCw className="h-5 w-5" />,
|
||||
text: "Live post-restore progress — after a reboot the Backups tab shows a real-time progress card with step-by-step milestones, ETA, per-component status (NVIDIA, Intel GPU tools, Coral, AMD tools), boot sanity warnings, a rollback delta widget listing VMs / LXCs / components that exist on the host but weren't in the backup, and a log tail with an Issues-only filter. Past restores are archived and browsable.",
|
||||
text: "Live post-restore progress — after a reboot the Backups tab shows a real-time progress card with step-by-step milestones, estimated time remaining, per-component status (NVIDIA, Intel GPU tools, Coral, AMD tools), boot sanity warnings, a rollback delta widget listing VMs / LXCs / components that exist on the host but weren't in the backup, and a log tail with an Issues-only filter. Past restores are archived and browsable.",
|
||||
},
|
||||
{
|
||||
icon: <Shield className="h-5 w-5" />,
|
||||
|
||||
@@ -124,18 +124,21 @@ const formatRelative = (iso: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
// Rough ETA derived from steps_done + elapsed. Best-effort: skips at
|
||||
// step 0 (no data yet) and returns "—" once the run is terminal.
|
||||
// Rough time-remaining estimate derived from steps_done + elapsed.
|
||||
// Best-effort: at step 0 there's no data yet, so it returns
|
||||
// "estimating time…". After the run is terminal, "—". The output is
|
||||
// a full phrase so the caller doesn't have to add suffix words that
|
||||
// only make sense on some branches.
|
||||
const computeEta = (state: RestoreState): string => {
|
||||
if (state.status !== "running") return "—"
|
||||
if (!state.steps_done || state.steps_done <= 0) return "estimating…"
|
||||
if (!state.steps_done || state.steps_done <= 0) return "estimating time…"
|
||||
const elapsedSec = Math.max(1, Math.round((Date.now() - new Date(state.started_at).getTime()) / 1000))
|
||||
const perStep = elapsedSec / state.steps_done
|
||||
const remaining = Math.max(0, state.steps_total - state.steps_done)
|
||||
const eta = Math.round(perStep * remaining)
|
||||
if (eta < 60) return `~${eta}s`
|
||||
if (eta < 3600) return `~${Math.round(eta / 60)}m`
|
||||
return `~${Math.round(eta / 3600)}h`
|
||||
if (eta < 60) return `~${eta}s left`
|
||||
if (eta < 3600) return `~${Math.round(eta / 60)}m left`
|
||||
return `~${Math.round(eta / 3600)}h left`
|
||||
}
|
||||
|
||||
// ── Small building blocks ─────────────────────────────────────
|
||||
@@ -316,7 +319,7 @@ const RestoreDetailModal: React.FC<{
|
||||
<span>{state.current_step || "—"}</span>
|
||||
<span>
|
||||
{state.steps_done}/{state.steps_total} steps
|
||||
{state.status === "running" && ` · ETA ${computeEta(state)}`}
|
||||
{state.status === "running" && ` · ${computeEta(state)}`}
|
||||
</span>
|
||||
</div>
|
||||
<div className="h-2 rounded-full bg-muted overflow-hidden">
|
||||
@@ -552,7 +555,7 @@ export const RestoreProgressCard: React.FC = () => {
|
||||
</span>
|
||||
<span>
|
||||
{state.steps_done}/{state.steps_total} steps
|
||||
{state.status === "running" && ` · ETA ${computeEta(state)}`}
|
||||
{state.status === "running" && ` · ${computeEta(state)}`}
|
||||
{state.summary?.duration && state.status !== "running" && ` · ${state.summary.duration}`}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user