app/helpers/user_workspaces_helper.rb
# get a label for a workflow status code
get a label for a workflow status code
get a label for a workflow status code
def workflow_status_labels(workflow_statuses)
    labels = []
    workflow_statuses.keys.each do |status|
      case status
      when 'Submitted'
        label_class = 'info'
      when 'Launching'
        label_class = 'info'
      when 'Running'
        label_class = 'primary'
      when 'Succeeded'
        label_class = 'success'
      when 'Failed'
        label_class = 'danger'
      else
        label_class = 'secondary'
      end
      labels << "<span class='badge badge-#{label_class}'>#{status}</span>"
    end
    labels.join("<br />").html_safe
  end
def workflow_status_labels ( workflow_statuses ) labels = [ ] workflow_statuses . keys . each do | status | case status when 'Submitted' label_class = 'info' when 'Launching' label_class = 'info' when 'Running' label_class = 'primary' when 'Succeeded' label_class = 'success' when 'Failed' label_class = 'danger' else label_class = 'secondary' end labels << "<span class='badge badge-#{label_class}'>#{status}</span>" end labels . join ( "<br />" ) . html_safe end
get a label for a workflow status code
get a label for a workflow status code
workflow_statuses
<not_specific>