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 (p.components.select do |k,v| v[:job] end).length == 0 %>
9 <span class="label label-default">not started</span>
11 <span class="label label-default">not running</span>