From bcb77df2d33202b350a338290e42d6d28cf5c263 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Thu, 30 Jul 2026 02:30:29 -0400 Subject: [PATCH] =?UTF-8?q?[IMP]=20script=20todo:=20suivi=20install=20?= =?UTF-8?q?=E2=80=94=20colonne=20#=20(s=C3=A9quence)=20+=20max=20de=20dur?= =?UTF-8?q?=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nouvelle 1re colonne « # » : numéro de séquence de chaque VM. - Sommaire enrichi du « max » de durée : la VM TERMINÉE la plus lente (pire cas), à côté du temps global et de l'ETA. Validé headless : # = 1..N, sub_title « … · max MM:SS ». Co-Authored-By: Claude Opus 4.8 (1M context) --- script/todo/qemu_install_monitor.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/script/todo/qemu_install_monitor.py b/script/todo/qemu_install_monitor.py index 1d6b489..253cec2 100644 --- a/script/todo/qemu_install_monitor.py +++ b/script/todo/qemu_install_monitor.py @@ -685,6 +685,8 @@ def run_monitor(manifest_path: str, run_app: bool = True): # Largeurs FIXES pour les colonnes courtes -> l'État n'est plus # tronqué (« ❌ effacée », « ⏸ en pause » lisibles) ; la table # défile horizontalement (overflow-x) pour les noms de VM longs. + # « # » : numéro de séquence de la VM (première colonne). + table.add_column("#", key="seq", width=3) table.add_column("VM", key="vm", width=26) table.add_column("⚠", key="err", width=4) table.add_column("État", key="state", width=12) @@ -692,9 +694,10 @@ def run_monitor(manifest_path: str, run_app: bool = True): table.add_column("Odoo", key="odoo", width=6) table.add_column("Durée", key="elapsed", width=7) table.add_column("Disque", key="disk", width=8) - for vm in vms: + for i, vm in enumerate(vms, 1): table.add_row( - vm["name"], "", "⏳", "—", "--:--", "-", key=vm["name"] + str(i), vm["name"], "", "⏳", "—", "--:--", "-", + key=vm["name"], ) # max_lines borne la mémoire/rendu (un install verbeux × 30 VM). self._log = RichLog( @@ -882,9 +885,14 @@ def run_monitor(manifest_path: str, run_app: bool = True): eta = ( f" · ETA ~{_fmt_secs(max(remaining))}" if remaining else "" ) + # Max de durée : la VM TERMINÉE la plus lente (pire cas). + max_dur = max( + (el for _s, _c, el in self._final.values()), default=0 + ) + maxd = f" · max {self._fmt(max_dur)}" if max_dur else "" self.sub_title = ( f"{done}/{len(vms)} {t('completed')} · " - f"{self._fmt(now - started)}{eta}" + f"{self._fmt(now - started)}{eta}{maxd}" ) if tele: self.query_one("#telemetry", Static).update(tele)