% if p.success %> finished <% elsif p.success == false %> failed <% elsif p.active %> running <% else %> <% if (p.components.select do |k,v| v[:job] end).length == 0 %> not started <% else %> not running <% end %> <% end %>