Statut "mise a jour en cours" (bleu, icone animee) sur la ligne du stack

- front : pendant un apply, la ligne du stack concerne passe en bleu avec
  une pastille "Mise à jour en cours" et une icone qui tourne, jusqu'a la
  fin du up -d ; l'indicateur en haut a droite ne sert plus qu'a l'analyse.
- back : le repertoire en cours est connu des le lancement de l'apply
  (et plus seulement apres l'attente du semaphore).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNfwm4oqRVX4CcBfiA3HL3
This commit is contained in:
claude BotandClaude Opus 5.5 committed 2026-11-23 09:26:32 +01:00
1 parent 7e1358ab1e
commit ae36cf55d8
3 files changed
+32 -11

No files matched your search

+15 -10
View File
@@ -224,6 +224,8 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp
const [open, setOpen] = useState<Record<string, boolean>>({});
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 (
<div className="target">
@@ -233,9 +235,9 @@ function TargetBlock({ server, target, scan, me, keep, filtering, onCheck, onApp
</code>
<span className="muted roots">{target.roots.join(" · ")}{target.depth > 1 ? ` (profondeur ${target.depth})` : ""}</span>
<span className="spacer" />
{scan?.running && (
{scan?.running && scan.task !== "apply" && (
<span className="muted small-text running">
<RefreshIcon size={13} className="spin" /> {scan.task === "apply" ? "Mise à jour" : "Analyse"}
<RefreshIcon size={13} className="spin" /> Analyse
{scan.current ? ` : ${scan.current.split("/").pop()}` : "…"}
</span>
)}
@@ -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 (
<li key={st.dir} className={`stack st-${st.status} ${isOpen ? "open" : ""}`}>
<li key={st.dir} className={`stack st-${status} ${isOpen ? "open" : ""}`}>
<div className="stack-row" onClick={() => setOpen({ ...open, [st.dir]: !isOpen })}>
<button className="icon-btn" aria-expanded={isOpen} aria-label="Détails" onClick={(e) => (e.stopPropagation(), setOpen({ ...open, [st.dir]: !isOpen }))}>
{isOpen ? <ChevronDownIcon /> : <ChevronRightIcon />}
</button>
<span className={`status-pill st-${st.status}`}>
{st.status === "uptodate" && <CheckIcon size={13} />}
{st.status === "updates" && <ArrowUpIcon size={13} />}
{st.status === "error" && <WarningIcon size={13} />}
{statusLabel[st.status]}
<span className={`status-pill st-${status}`} aria-live="polite">
{applying && <RefreshIcon size={13} className="spin" />}
{!applying && st.status === "uptodate" && <CheckIcon size={13} />}
{!applying && st.status === "updates" && <ArrowUpIcon size={13} />}
{!applying && st.status === "error" && <WarningIcon size={13} />}
{applying ? "Mise à jour en cours" : statusLabel[st.status]}
</span>
<span className="stack-name">
<strong>{st.name}</strong>
<small className="muted">{st.dir}</small>
</span>
<span className="stack-meta muted">
{st.status === "error" ? <span className="error-text clip" title={st.error}>{st.error}</span> : total > 0 ? (late > 0 ? `${late}/${plural(total, "image")} à mettre à jour` : plural(total, "image")) : ""}
{applying ? "pull, down puis up -d…" : st.status === "error" ? <span className="error-text clip" title={st.error}>{st.error}</span> : total > 0 ? (late > 0 ? `${late}/${plural(total, "image")} à mettre à jour` : plural(total, "image")) : ""}
</span>
{me.admin && st.status === "updates" && (
{me.admin && st.status === "updates" && !applying && (
<button className="primary" disabled={scan?.running} onClick={(e) => (e.stopPropagation(), onApply(st))} title="pull, down puis up -d">
<ArrowUpIcon />
Mettre à jour
+11
View File
@@ -16,6 +16,7 @@
--danger-soft: #ffe3e3;
--ok: #2b8a3e;
--warn: #e67700;
--info: #1c7ed6;
--folder: var(--accent); /* dossiers dans la couleur d'accent, comme Excalicloud */
--shadow: 0 0 0.93px 0 rgb(0 0 0 / 0.17), 0 0 3.13px 0 rgb(0 0 0 / 0.08), 0 7px 14px 0 rgb(0 0 0 / 0.05);
--shadow-lg: 0 100px 80px rgb(0 0 0 / 0.07), 0 41.8px 33.4px rgb(0 0 0 / 0.05), 0 22.3px 17.9px rgb(0 0 0 / 0.042),
@@ -46,6 +47,7 @@
--danger-soft: #4a1d1d;
--ok: #69db7c;
--warn: #ffa94d;
--info: #4dabf7;
--folder: var(--accent);
--shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 14px rgb(0 0 0 / 0.3);
--shadow-lg: 0 20px 50px rgb(0 0 0 / 0.6);
@@ -1004,6 +1006,10 @@ textarea:focus-visible {
.stack.st-error {
box-shadow: inset 3px 0 0 var(--danger);
}
.stack.st-applying {
box-shadow: inset 3px 0 0 var(--info);
background: color-mix(in srgb, var(--info) 6%, var(--panel));
}
.stack-row {
display: flex;
align-items: center;
@@ -1037,6 +1043,11 @@ textarea:focus-visible {
color: var(--warn);
background: color-mix(in srgb, var(--warn) 18%, transparent);
}
.status-pill.st-applying {
color: var(--info);
background: color-mix(in srgb, var(--info) 16%, transparent);
white-space: nowrap;
}
.status-pill.st-error {
color: var(--danger);
background: var(--danger-soft);