Module: Adhoq::ExecutionDecorator

Defined in:
app/decorators/adhoq/execution_decorator.rb

Instance Method Summary collapse

Instance Method Details

#status_labelObject



2
3
4
5
6
# File 'app/decorators/adhoq/execution_decorator.rb', line 2

def status_label
   :span, class: ["label", status_label_class] do
    status
  end
end

#status_label_classObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/decorators/adhoq/execution_decorator.rb', line 8

def status_label_class
  case status
  when "success"
    "label-success"
  when "failure"
    "label-danger"
  when "requested"
    "label-default"
  else
    "label-default"
  end
end