1 <% if p.state == 'Complete' %>
2 <span class="label label-success">complete</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>
7 <% elsif p.state == 'Paused' %>
8 <span class="label label-default">paused</span>
10 <% if not p.components.values.any? { |c| c[:job] rescue false } %>
11 <span class="label label-default">not started</span>
13 <span class="label label-default">not running</span>