% if p.state == 'Complete' %>
finished
<% elsif p.state == 'Failed' %>
failed
<% elsif p.state == 'RunningOnServer' || p.state == 'RunningOnClient' %>
running
<% elsif p.state == 'Paused' %>
paused
<% else %>
<% if not p.components.values.any? { |c| c[:job] rescue false } %>
not started
<% else %>
not running
<% end %>
<% end %>