Skip to content

Commit

Permalink
Pass local=1 when log type is hydra-local
Browse files Browse the repository at this point in the history
  • Loading branch information
rbvermaa committed Aug 15, 2024
1 parent 374ce75 commit 8187010
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/lib/Hydra/Controller/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ sub showLog {
$c->res->redirect($log_uri);
}

elsif ($mode eq "hydra-local") {
$c->res->redirect($log_uri . "?local=1");
}


elsif ($mode eq "tail") {
my $lines = 50;
$c->stash->{log_uri} = $log_uri . "?tail=$lines";
Expand Down
2 changes: 1 addition & 1 deletion src/root/build.tt
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ END;
[% actualLog = cachedBuildStep ? c.uri_for('/build' cachedBuild.id 'nixlog' cachedBuildStep.stepnr) : c.uri_for('/build' build.id 'log') %]
<a class="btn btn-secondary btn-sm" href="[%actualLog%]/raw">raw</a>
<a class="btn btn-secondary btn-sm" href="[%actualLog%]/tail">tail</a>
<a class="btn btn-secondary btn-sm" href="[%actualLog%]/raw?local=1">hydra-local</a>
<a class="btn btn-secondary btn-sm" href="[%actualLog%]/hydra-local">hydra-local</a>
</td>
</tr>
[% END %]
Expand Down

0 comments on commit 8187010

Please sign in to comment.