From 44ef743d847ee62188cc3e40ca6f93493499dd07 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Oct 2017 13:44:41 +0200 Subject: [PATCH] Hide some things that require a local store --- src/lib/Hydra/Controller/Build.pm | 3 ++- src/root/build.tt | 2 +- src/root/product-list.tt | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 25084f29..0dc01b65 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -65,8 +65,9 @@ sub build_GET { my $build = $c->stash->{build}; $c->stash->{template} = 'build.tt'; + $c->stash->{isLocalStore} = isLocalStore(); $c->stash->{available} = - isLocalStore + $c->stash->{isLocalStore} ? all { isValidPath($_->path) } $build->buildoutputs->all : 1; $c->stash->{drvAvailable} = isValidPath $build->drvpath; diff --git a/src/root/build.tt b/src/root/build.tt index b4d68b25..8b7171a9 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -140,7 +140,7 @@ END; [% IF steps.size() > 0 %]
  • Build steps
  • [% END %] [% IF build.dependents %]
  • Used by
  • [% END%] [% IF drvAvailable %]
  • Build dependencies
  • [% END %] - [% IF available %]
  • Runtime dependencies
  • [% END %] + [% IF localStore && available %]
  • Runtime dependencies
  • [% END %]
    diff --git a/src/root/product-list.tt b/src/root/product-list.tt index 948747b8..f9929a6d 100644 --- a/src/root/product-list.tt +++ b/src/root/product-list.tt @@ -98,6 +98,7 @@ Contents + [% IF localStore %] Source @@ -139,6 +140,7 @@ [% END %] + [% END %] [% END %] [% CASE ["file", "channel"] %]