diff --git a/frontend/src/FleetView.tsx b/frontend/src/FleetView.tsx index 874c9d1..441dc0f 100644 --- a/frontend/src/FleetView.tsx +++ b/frontend/src/FleetView.tsx @@ -224,6 +224,8 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp const [open, setOpen] = useState>({}); const stacks = (scan?.stacks ?? []).filter(keep); const hidden = (scan?.stacks.length ?? 0) - stacks.length; + // Stack en cours de mise à jour (pull, down, up -d) sur cette connexion. + const applyingDir = scan?.running && scan.task === "apply" ? scan.current : undefined; return (
@@ -233,9 +235,9 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp {target.roots.join(" · ")}{target.depth > 1 ? ` (profondeur ${target.depth})` : ""} - {scan?.running && ( + {scan?.running && scan.task !== "apply" && ( - {scan.task === "apply" ? "Mise à jour" : "Analyse"} + Analyse {scan.current ? ` : ${scan.current.split("/").pop()}` : "…"} )} @@ -275,26 +277,29 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp {stacks.map((st) => { const isOpen = !!open[st.dir]; const [late, total] = [st.services?.filter((s) => s.state === "update").length ?? 0, st.services?.length ?? 0]; + const applying = !!applyingDir && applyingDir === st.dir; + const status = applying ? "applying" : st.status; return ( -
  • +
  • setOpen({ ...open, [st.dir]: !isOpen })}> - - {st.status === "uptodate" && } - {st.status === "updates" && } - {st.status === "error" && } - {statusLabel[st.status]} + + {applying && } + {!applying && st.status === "uptodate" && } + {!applying && st.status === "updates" && } + {!applying && st.status === "error" && } + {applying ? "Mise à jour en cours" : statusLabel[st.status]} {st.name} {st.dir} - {st.status === "error" ? {st.error} : total > 0 ? (late > 0 ? `${late}/${plural(total, "image")} à mettre à jour` : plural(total, "image")) : ""} + {applying ? "pull, down puis up -d…" : st.status === "error" ? {st.error} : total > 0 ? (late > 0 ? `${late}/${plural(total, "image")} à mettre à jour` : plural(total, "image")) : ""} - {me.admin && st.status === "updates" && ( + {me.admin && st.status === "updates" && !applying && (