RunCommand: Allow displaying command output

This commit is contained in:
Janne Heß
2021-12-26 16:14:28 +01:00
committed by Cole Helbling
parent 4cb5e6cd94
commit 796ce165d4
5 changed files with 59 additions and 5 deletions

View File

@ -525,9 +525,9 @@ END;
[% IF runcommandlog.start_time != undef %]
<div>Started at [% INCLUDE renderDateTime timestamp = runcommandlog.start_time; %]</div>
[% IF runcommandlog.end_time != undef %]
<div>Ran for [% INCLUDE renderDuration duration = runcommandlog.end_time - runcommandlog.start_time %]</div>
<div>Ran for [% INCLUDE renderDuration duration = runcommandlog.end_time - runcommandlog.start_time %][% IF runcommandlog.log_relative_url() %]&nbsp—&nbsp;<a href="[% c.uri_for('/build', build.id, runcommandlog.log_relative_url()) %]">Logs</a>[% END %]</div>
[% ELSE %]
<div>Running for [% INCLUDE renderDuration duration = curTime - runcommandlog.start_time %]</div>
<div>Running for [% INCLUDE renderDuration duration = curTime - runcommandlog.start_time %][% IF runcommandlog.log_relative_url() %]&nbsp—&nbsp;<a href="[% c.uri_for('/build', build.id, runcommandlog.log_relative_url()) %]">Logs</a>[% END %]</div>
[% END %]
[% ELSE %]
<div>Pending</div>

View File

@ -1,6 +1,6 @@
[% WRAPPER layout.tt
titleHTML="Log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ linkToJob(build.jobset, job)
title="Log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ makeNameTextForJob(build.jobset, job)
titleHTML=(is_runcommand ? "RunCommand log of " : "Log of ") _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ linkToJob(build.jobset, job)
title=(is_runcommand ? "RunCommand log of " : "Log of ") _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ makeNameTextForJob(build.jobset, job)
%]
[% PROCESS common.tt %]
@ -11,7 +11,7 @@
[% ELSE %]
is
[% END %]
the build log of derivation <tt>[% IF step; step.drvpath; ELSE; build.drvpath; END %]</tt>.
[% IF is_runcommand %] the output of a RunCommand execution of[% ELSE %] the build log of[% END %] derivation <tt>[% IF step; step.drvpath; ELSE; build.drvpath; END %]</tt>.
[% IF step && step.machine %]
It was built on <tt>[% step.machine %]</tt>.
[% END %]