1 <% if p.state == 'Complete' %>
2 <span class="label label-success">finished</span>
3 <% elsif p.state == 'Failed' %>
4 <span class="label label-danger">failed</span>
5 <% elsif p.state == 'RunningOnServer' || p.state == 'RunningOnClient' %>
6 <span class="label label-info">running</span>
8 <% if not p.components.values.any? { |c| c[:job] rescue false } %>
9 <span class="label label-default">not started</span>
11 <span class="label label-default">not running</span>