%# Copyright (C) The Arvados Authors. All rights reserved.
SPDX-License-Identifier: AGPL-3.0 %>
<% if p.state == 'Complete' %>
complete
<% 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 %>