diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index a16cea9e..bb6a47ce 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -339,27 +339,30 @@ sub getDependencyGraph { } -sub deps : Chained('build') PathPart('deps') { +sub build_deps : Chained('build') PathPart('build-deps') { my ($self, $c) = @_; - my $build = $c->stash->{build}; my $drvPath = $build->drvpath; + + error($c, "Derivation no longer available.") unless isValidPath $drvPath; + + $c->stash->{buildTimeGraph} = getDependencyGraph($self, $c, 0, {}, $drvPath); + + $c->stash->{template} = 'build-deps.tt'; +} + + +sub runtime_deps : Chained('build') PathPart('runtime-deps') { + my ($self, $c) = @_; + my $build = $c->stash->{build}; my @outPaths = map { $_->path } $build->buildoutputs->all; - $c->stash->{available} = all { isValidPath($_) } @outPaths; - $c->stash->{drvAvailable} = isValidPath $drvPath; + error($c, "Build outputs no longer available.") unless all { isValidPath($_) } @outPaths; - if ($c->stash->{available}) { - my $done = {}; - $c->stash->{runtimeGraph} = [ map { getDependencyGraph($self, $c, 1, $done, $_) } @outPaths ]; - } + my $done = {}; + $c->stash->{runtimeGraph} = [ map { getDependencyGraph($self, $c, 1, $done, $_) } @outPaths ]; - if ($c->stash->{drvAvailable}) { - my $done = {}; - $c->stash->{buildTimeGraph} = getDependencyGraph($self, $c, 0, $done, $drvPath); - } - - $c->stash->{template} = 'deps.tt'; + $c->stash->{template} = 'runtime-deps.tt'; } diff --git a/src/root/build-deps.tt b/src/root/build-deps.tt new file mode 100644 index 00000000..5aa4bd1e --- /dev/null +++ b/src/root/build-deps.tt @@ -0,0 +1,7 @@ +[% PROCESS deps.tt %] + +
+ +
diff --git a/src/root/build.tt b/src/root/build.tt index 4c8ceba5..eff48106 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -70,6 +70,8 @@ [% IF build.buildsteps %]
  • Build steps
  • [% END %] [% IF build.dependents %]
  • Used by
  • [% END%] [% IF prevBuilds %]
  • History chart
  • [% END %] + [% IF drvAvailable %]
  • Build dependencies
  • [% END %] + [% IF available %]
  • Runtime dependencies
  • [% END %]
    @@ -101,7 +103,7 @@ [% HTML.escape(build.releasename) %] [% ELSE %] - +g Nix name: [% build.nixname %] @@ -249,11 +251,11 @@ Derivation store path: - [% build.drvpath %][% IF drvAvailable %] (build-time dependencies)[% END %] + [% build.drvpath %] Output store paths: - [% INCLUDE renderOutputs outputs=build.buildoutputs %] [% IF available %](runtime dependencies)[% END %] + [% INCLUDE renderOutputs outputs=build.buildoutputs %] Time added: @@ -344,8 +346,6 @@ [% IF build.dependents %]
    -

    Used by

    -

    The following builds have used this build as an input:

    @@ -368,7 +368,8 @@ [% IF prevBuilds %]
    -

    Build time history (in seconds)

    +

    Build time history (in seconds)

    +
    @@ -436,9 +437,11 @@ }); -

    Store path size history (in MB)

    +

    Store path size history (in MB)

    +
    + + [% END %] + + [% IF available %] +
    + + [% END %] +
    [% END %] - diff --git a/src/root/deps.tt b/src/root/deps.tt index f20949d9..cf8f0fdb 100644 --- a/src/root/deps.tt +++ b/src/root/deps.tt @@ -1,11 +1,6 @@ -[% WRAPPER layout.tt title="Dependencies of build $id" %] [% PROCESS common.tt %] -[% USE HTML %] -[% project = build.project; - jobset = build.jobset; - job = build.job; - global.nodeId = 1 %] +[% global.nodeId = 1 %] [% BLOCK renderNode %]
  • @@ -34,28 +29,3 @@ [% END %]
  • [% END %] - -

    Runtime dependency graph

    -[% IF available %] -
      - [% done={}; FOREACH node IN runtimeGraph; INCLUDE renderNode; END %] -
    -[% ELSE %] -

    No longer available.

    -[% END %] -
    - -
    - -

    Build-time dependency graph

    -[% IF drvAvailable %] -
      - [% INCLUDE renderNode node=buildTimeGraph %] -
    -[% ELSE %] -

    No longer available.

    -[% END %] -
    - -[% END %] - diff --git a/src/root/runtime-deps.tt b/src/root/runtime-deps.tt new file mode 100644 index 00000000..db22b47f --- /dev/null +++ b/src/root/runtime-deps.tt @@ -0,0 +1,7 @@ +[% PROCESS deps.tt %] + +
    +
      + [% FOREACH node IN runtimeGraph; INCLUDE renderNode; END %] +
    +
    \ No newline at end of file diff --git a/src/root/static/css/hydra.css b/src/root/static/css/hydra.css index 20f767f3..c8ba7640 100644 --- a/src/root/static/css/hydra.css +++ b/src/root/static/css/hydra.css @@ -30,7 +30,7 @@ span:target > span.dep-tree-line { } :target { - padding-top: 40px; - margin-top: -40px; - display: inline-block; /* required for webkit browsers */ + padding-top: 40px; + margin-top: -40px; + display: inline-block; /* required for webkit browsers */ }