Labels are now badges

This commit is contained in:
Tyson Whitehead 2021-04-08 11:00:48 -04:00
parent 70df5e6312
commit b6f5b6eb38
No known key found for this signature in database
GPG key ID: B22199763A27997B

View file

@ -127,7 +127,7 @@ BLOCK renderBuildListBody;
</td> </td>
[% END %] [% END %]
[% IF showSchedulingInfo %] [% IF showSchedulingInfo %]
<td>[% IF busy %]<span class="label label-success">Started</span>[% ELSE %]<span class="label">Queued</span>[% END %]</td> <td>[% IF busy %]<span class="badge badge-success">Started</span>[% ELSE %]<span class="badge badge-secondary">Queued</span>[% END %]</td>
[% END %] [% END %]
<td><a class="row-link" href="[% link %]">[% build.id %]</a></td> <td><a class="row-link" href="[% link %]">[% build.id %]</a></td>
[% IF !hideJobName %] [% IF !hideJobName %]
@ -477,27 +477,27 @@ BLOCK renderEvals %]
- -
[% END %] [% END %]
[% IF eval.evaluationerror.errormsg %] [% IF eval.evaluationerror.errormsg %]
<span class="label label-warning">Eval Errors</span> <span class="badge badge-warning">Eval Errors</span>
[% END %] [% END %]
</td> </td>
<td align='right' class="nowrap"> <td align='right' class="nowrap">
<span class="label label-success">[% e.nrSucceeded %]</span> <span class="badge badge-success">[% e.nrSucceeded %]</span>
</td> </td>
<td align="right" class="nowrap"> <td align="right" class="nowrap">
[% IF e.nrFailed > 0 %] [% IF e.nrFailed > 0 %]
<span class="label label-important">[% e.nrFailed %]</span> <span class="badge badge-danger">[% e.nrFailed %]</span>
[% END %] [% END %]
</td> </td>
<td align="right" class="nowrap"> <td align="right" class="nowrap">
[% IF e.nrScheduled > 0 %] [% IF e.nrScheduled > 0 %]
<span class="label">[% e.nrScheduled %]</span> <span class="badge badge-secondary">[% e.nrScheduled %]</span>
[% END %] [% END %]
</td> </td>
<td align='right' class="nowrap"> <td align='right' class="nowrap">
[% IF e.diff > 0 %] [% IF e.diff > 0 %]
<span class='label label-success'><strong>+[% e.diff %]</strong></span> <span class='badge badge-success'><strong>+[% e.diff %]</strong></span>
[% ELSIF e.diff < 0 && e.nrScheduled == 0 %] [% ELSIF e.diff < 0 && e.nrScheduled == 0 %]
<span class='label label-important'><strong>[% e.diff %]</strong></span> <span class='badge badge-danger'><strong>[% e.diff %]</strong></span>
[% END %] [% END %]
</td> </td>
</tr> </tr>
@ -598,35 +598,35 @@ BLOCK renderJobsetOverview %]
<td>[% HTML.escape(j.description) %]</td> <td>[% HTML.escape(j.description) %]</td>
<td>[% IF j.lastcheckedtime; <td>[% IF j.lastcheckedtime;
INCLUDE renderDateTime timestamp = j.lastcheckedtime; INCLUDE renderDateTime timestamp = j.lastcheckedtime;
IF j.errormsg || j.fetcherrormsg; %]&nbsp;<span class = 'label label-warning'>Error</span>[% END; IF j.errormsg || j.fetcherrormsg; %]&nbsp;<span class = 'badge badge-warning'>Error</span>[% END;
ELSE; "-"; ELSE; "-";
END %]</td> END %]</td>
[% IF j.get_column('nrtotal') > 0 %] [% IF j.get_column('nrtotal') > 0 %]
[% successrate = ( j.get_column('nrsucceeded') / j.get_column('nrtotal') )*100 %] [% successrate = ( j.get_column('nrsucceeded') / j.get_column('nrtotal') )*100 %]
[% IF j.get_column('nrscheduled') > 0 %] [% IF j.get_column('nrscheduled') > 0 %]
[% class = 'label' %] [% class = 'badge badge-secondary' %]
[% ELSIF successrate < 25 %] [% ELSIF successrate < 25 %]
[% class = 'label label-important' %] [% class = 'badge badge-danger' %]
[% ELSIF successrate < 75 %] [% ELSIF successrate < 75 %]
[% class = 'label label-warning' %] [% class = 'badge badge-warning' %]
[% ELSIF successrate <= 100 %] [% ELSIF successrate <= 100 %]
[% class = 'label label-success' %] [% class = 'badge badge-success' %]
[% END %] [% END %]
[% END %] [% END %]
<td><span class="[% class %]">[% successrate FILTER format('%d') %]%</span></td> <td><span class="[% class %]">[% successrate FILTER format('%d') %]%</span></td>
<td> <td>
[% IF j.get_column('nrsucceeded') > 0 %] [% IF j.get_column('nrsucceeded') > 0 %]
<span class="label label-success">[% j.get_column('nrsucceeded') %]</span> <span class="badge badge-success">[% j.get_column('nrsucceeded') %]</span>
[% END %] [% END %]
</td> </td>
<td> <td>
[% IF j.get_column('nrfailed') > 0 %] [% IF j.get_column('nrfailed') > 0 %]
<span class="label label-important">[% j.get_column('nrfailed') %]</span> <span class="badge badge-danger">[% j.get_column('nrfailed') %]</span>
[% END %] [% END %]
</td> </td>
<td> <td>
[% IF j.get_column('nrscheduled') > 0 %] [% IF j.get_column('nrscheduled') > 0 %]
<span class="label label">[% j.get_column('nrscheduled') %]</span> <span class="badge badge-secondary">[% j.get_column('nrscheduled') %]</span>
[% END %] [% END %]
</td> </td>
</tr> </tr>