From 14090fbb866b14561614061759bfab721e275bfd Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 24 Jan 2022 11:05:49 -0800 Subject: [PATCH] runcommand-log.tt: init --- src/lib/Hydra/Controller/Build.pm | 3 +- src/root/log.tt | 6 ++-- src/root/runcommand-log.tt | 49 +++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 src/root/runcommand-log.tt diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index f00eecf8..a833ae04 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -140,9 +140,8 @@ sub view_log : Chained('buildChain') PathPart('log') { sub view_runcommand_log : Chained('buildChain') PathPart('runcommand-log') { my ($self, $c, $sha) = @_; - $c->stash->{is_runcommand} = 1; $c->stash->{log_uri} = $c->uri_for($c->controller('Root')->action_for("runcommandlog"), $sha . "-" . $c->stash->{build}->id); - $c->stash->{template} = 'log.tt'; + $c->stash->{template} = 'runcommand-log.tt'; } diff --git a/src/root/log.tt b/src/root/log.tt index 4874fa77..8bb4954d 100644 --- a/src/root/log.tt +++ b/src/root/log.tt @@ -1,6 +1,6 @@ [% WRAPPER layout.tt - 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) + 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) %] [% PROCESS common.tt %] @@ -11,7 +11,7 @@ [% ELSE %] is [% END %] - [% IF is_runcommand %] the output of a RunCommand execution of[% ELSE %] the build log of[% END %] derivation [% IF step; step.drvpath; ELSE; build.drvpath; END %]. + the build log of derivation [% IF step; step.drvpath; ELSE; build.drvpath; END %]. [% IF step && step.machine %] It was built on [% step.machine %]. [% END %] diff --git a/src/root/runcommand-log.tt b/src/root/runcommand-log.tt new file mode 100644 index 00000000..d1d4cd75 --- /dev/null +++ b/src/root/runcommand-log.tt @@ -0,0 +1,49 @@ +[% WRAPPER layout.tt + titleHTML="RunCommand log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ linkToJob(build.jobset, job) + title="RunCommand log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job " _ makeNameTextForJob(build.jobset, job) +%] +[% PROCESS common.tt %] + +

+ Below + [% IF tail %] + are the last lines of + [% ELSE %] + is + [% END %] + the output of a RunCommand execution of derivation [% IF step; step.drvpath; ELSE; build.drvpath; END %]. + [% IF tail %] + The full log is also available. + [% END %] +

+ +
+Loading...
+
+ + + +[% END %]