3899: Shorten count of ended/succeed/failed in a-r-p-i with some clever Ruby.
[arvados.git] / apps / workbench / app / views / application / _job_status_label.html.erb
1 <% status = Job::state j %>
2 <% to_label = {
3      "Cancelled" => "danger",
4      "Complete" => "success",
5      "Running" => "info",
6      "Failed" => "danger",
7      "Queued" => "default",
8      nil => "default"
9    } %>
10
11   <span class="label label-<%= to_label[status] %>"><%= if defined? title then title else status.downcase end %></span>