forked from lix-project/hydra
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
This commit is contained in:
parent
2bfddaf4ae
commit
a9c2880cf6
|
@ -8,6 +8,7 @@ use Hydra::Helper::CatalystUtils;
|
||||||
use Hydra::Helper::AddBuilds;
|
use Hydra::Helper::AddBuilds;
|
||||||
use File::stat;
|
use File::stat;
|
||||||
use Data::Dump qw(dump);
|
use Data::Dump qw(dump);
|
||||||
|
use Nix;
|
||||||
|
|
||||||
sub build : Chained('/') PathPart CaptureArgs(1) {
|
sub build : Chained('/') PathPart CaptureArgs(1) {
|
||||||
my ($self, $c, $id) = @_;
|
my ($self, $c, $id) = @_;
|
||||||
|
@ -38,6 +39,9 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
||||||
$c->stash->{drvAvailable} = isValidPath $build->drvpath;
|
$c->stash->{drvAvailable} = isValidPath $build->drvpath;
|
||||||
$c->stash->{flashMsg} = $c->flash->{buildMsg};
|
$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) {
|
if (!$build->finished && $build->schedulingInfo->busy) {
|
||||||
my $logfile = $build->schedulingInfo->logfile;
|
my $logfile = $build->schedulingInfo->logfile;
|
||||||
$c->stash->{logtext} = `cat $logfile` if -e $logfile;
|
$c->stash->{logtext} = `cat $logfile` if -e $logfile;
|
||||||
|
|
|
@ -292,6 +292,12 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Output store path hash:</th>
|
||||||
|
<td>
|
||||||
|
<tt>[% pathHash %]</tt>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Time added:</th>
|
<th>Time added:</th>
|
||||||
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
||||||
|
|
Loading…
Reference in a new issue