blob: 690bee80e41923039e367d0b24849a9dfe649fe2 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 | module ComplianceCheckSetsHelper
  def compliance_check_set_path(compliance_check_set)
    workbench_compliance_check_set_path(compliance_check_set.workbench, compliance_check_set)
  end
  def executed_compliance_check_set_path(compliance_check_set)
    executed_workbench_compliance_check_set_path(compliance_check_set.workbench, compliance_check_set)
  end
  def compliance_check_path(compliance_check)
    workbench_compliance_check_set_compliance_check_path(
      compliance_check.compliance_check_set.workbench,
      compliance_check.compliance_check_set,
      compliance_check)
  end
    # Import statuses helper
  def compliance_check_set_status(status)
    if %w[new running pending].include? status
      content_tag :span, '', class: "fa fa-clock-o"
    else
      cls =''
      cls = 'success' if status == 'successful'
      cls = 'warning' if status == 'warning'
      cls = 'danger' if %w[failed aborted canceled].include? status
      content_tag :span, '', class: "fa fa-circle text-#{cls}"
    end
  end
end
 |