From 258e9314a9c6c443ee6796ae2273ee7f87b1ab54 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 11 Apr 2024 17:12:47 +0200 Subject: [PATCH] web: include current step status on /machines --- src/root/build.tt | 18 +----------------- src/root/common.tt | 21 +++++++++++++++++++++ src/root/machine-status.tt | 4 ++-- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/root/build.tt b/src/root/build.tt index b4176958..18ff6f01 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -61,23 +61,7 @@ END; [% IF step.busy != 0 || ((step.machine || step.starttime) && (step.status == 0 || step.status == 1 || step.status == 3 || step.status == 4 || step.status == 7)); INCLUDE renderMachineName machine=step.machine; ELSE; "n/a"; END %] [% IF step.busy != 0 %] - [% IF step.busy == 1 %] - Preparing - [% ELSIF step.busy == 10 %] - Connecting - [% ELSIF step.busy == 20 %] - Sending inputs - [% ELSIF step.busy == 30 %] - Building - [% ELSIF step.busy == 35 %] - Waiting to receive outputs - [% ELSIF step.busy == 40 %] - Receiving outputs - [% ELSIF step.busy == 50 %] - Post-processing - [% ELSE %] - Unknown state - [% END %] + [% INCLUDE renderBusyStatus %] [% ELSIF step.status == 0 %] [% IF step.isnondeterministic %] Succeeded with non-determistic result diff --git a/src/root/common.tt b/src/root/common.tt index f8f61fea..48655878 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -261,6 +261,27 @@ BLOCK renderBuildStatusIcon; END; +BLOCK renderBusyStatus; + IF step.busy == 1 %] + Preparing + [% ELSIF step.busy == 10 %] + Connecting + [% ELSIF step.busy == 20 %] + Sending inputs + [% ELSIF step.busy == 30 %] + Building + [% ELSIF step.busy == 35 %] + Waiting to receive outputs + [% ELSIF step.busy == 40 %] + Receiving outputs + [% ELSIF step.busy == 50 %] + Post-processing + [% ELSE %] + Unknown state + [% END; +END; + + BLOCK renderStatus; IF build.finished; buildstatus = build.buildstatus; diff --git a/src/root/machine-status.tt b/src/root/machine-status.tt index 4195c178..07a2359d 100644 --- a/src/root/machine-status.tt +++ b/src/root/machine-status.tt @@ -6,10 +6,10 @@ Job - System Build Step What + Status Since @@ -40,10 +40,10 @@ [% idle = 0 %] [% INCLUDE renderFullJobName project=step.project jobset=step.jobset job=step.job %] - [% step.system %] [% step.build %] [% IF step.busy >= 30 %][% step.stepnr %][% ELSE; step.stepnr; END %] [% step.drvpath.match('-(.*)').0 %] + [% INCLUDE renderBusyStatus %] [% INCLUDE renderDuration duration = curTime - step.starttime %] [% END %]