From a9c2880cf62013c0343c51911b8cc1f046865bd2 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 27 Apr 2010 07:55:19 +0000 Subject: [PATCH] Hydra/25: At job pages, show the hash of the output * added hash of output path to the information tab on build page in stead --- src/lib/Hydra/Controller/Build.pm | 4 ++++ src/root/build.tt | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 1d66038b..d1f4b160 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -8,6 +8,7 @@ use Hydra::Helper::CatalystUtils; use Hydra::Helper::AddBuilds; use File::stat; use Data::Dump qw(dump); +use Nix; sub build : Chained('/') PathPart CaptureArgs(1) { my ($self, $c, $id) = @_; @@ -38,6 +39,9 @@ sub view_build : Chained('build') PathPart('') Args(0) { $c->stash->{drvAvailable} = isValidPath $build->drvpath; $c->stash->{flashMsg} = $c->flash->{buildMsg}; + my $pathHash = $c->stash->{available} ? Nix::queryPathHash($build->outpath) : "Not available"; + $c->stash->{pathHash} = $pathHash; + if (!$build->finished && $build->schedulingInfo->busy) { my $logfile = $build->schedulingInfo->logfile; $c->stash->{logtext} = `cat $logfile` if -e $logfile; diff --git a/src/root/build.tt b/src/root/build.tt index 8dfa4cad..56656340 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -292,6 +292,12 @@ [% END %] + + Output store path hash: + + [% pathHash %] + + Time added: [% INCLUDE renderDateTime timestamp = build.timestamp %]