build.tt: don't duplicate RunCommandLog buttons

This commit is contained in:
Cole Helbling 2022-01-31 11:35:33 -08:00
parent 61189ecca9
commit 34e4c119f4

View file

@ -527,24 +527,16 @@ END;
<div class="d-flex flex-column align-items-end"> <div class="d-flex flex-column align-items-end">
[% IF runcommandlog.end_time != undef %] [% IF runcommandlog.end_time != undef %]
Ran for [% INCLUDE renderDuration duration = runcommandlog.end_time - runcommandlog.start_time %] Ran for [% INCLUDE renderDuration duration = runcommandlog.end_time - runcommandlog.start_time %]
[% IF runcommandlog.uuid != undef %]
[% runLog = c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid) %]
<div>
<a class="btn btn-secondary btn-sm" href="[% runLog %]">pretty</a>
<a class="btn btn-secondary btn-sm" href="[% runLog %]/raw">raw</a>
<a class="btn btn-secondary btn-sm" href="[% runLog %]/tail">tail</a>
</div>
[% END %]
[% ELSE %] [% ELSE %]
Running for [% INCLUDE renderDuration duration = curTime - runcommandlog.start_time %] Running for [% INCLUDE renderDuration duration = curTime - runcommandlog.start_time %]
[% IF runcommandlog.uuid != undef %] [% END %]
[% runLog = c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid) %] [% IF runcommandlog.uuid != undef %]
<div> [% runLog = c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid) %]
<a class="btn btn-secondary btn-sm" href="[% runLog %]">pretty</a> <div>
<a class="btn btn-secondary btn-sm" href="[% runLog %]/raw">raw</a> <a class="btn btn-secondary btn-sm" href="[% runLog %]">pretty</a>
<a class="btn btn-secondary btn-sm" href="[% runLog %]/tail">tail</a> <a class="btn btn-secondary btn-sm" href="[% runLog %]/raw">raw</a>
</div> <a class="btn btn-secondary btn-sm" href="[% runLog %]/tail">tail</a>
[% END %] </div>
[% END %] [% END %]
</div> </div>
[% ELSE %] [% ELSE %]