Sha256: c263c47b178e8176719038c9bd6c28d8ba03291da693d97d8b16fc970ab4ea17

Contents?: true

Size: 1.77 KB

Versions: 51

Compression:

Stored size: 1.77 KB

Contents

%h2 #{ workflow.to_s } jobs

- all = params.include?(:all) && params[:all].to_s == 'true'
- inputs = params.include?(:inputs) ?  params[:inputs].split(/[,\|\s]/) : []

- if not all
  %a.ui.blue.button(href='?all=true') Include done

= action_parameters :all => all do |all|
  - input :inputs, :text, "Inputs or info fields to show"
  - input :all, :hidden, "Show all", all
  
- fields = ["Info", "Task", "Status"]
- tsv = TSV.setup({}, :key_field => "Name", :fields => fields + inputs, :type => :list, :unnamed => true)
- job_info.each do |file, info|
  - next if info[:done] unless all
  - rec_inputs = nil
  - job_inputs = nil
  - status, pid, name, start = Step.step_info(file).values_at :status, :pid, :name, :start_time
  - status = html_tag("span", status, :class => status.to_s.split(">").last)
  - task = info[:task]
  - link = html_tag("a", name, :href => "/" << [workflow, task, name] * "/")
  - if Misc.pid_exists? pid
    - pid = html_tag("span", pid, :class => 'alive')
  - else
    - pid = html_tag("span", pid, :class => 'dead') 
  - info_link = html_tag("a", "info", :href => "/" << [workflow, task, name, "info"] * "/")
  - values = [info_link, task, status]
  - if inputs.any?
    - wf = Kernel.const_get(workflow)
    - step = Workflow.fast_load_step(file)
    - info = step.info
    - info = IndiferentHash.setup(info)
    - inputs.each do |i|
      - value = nil
      - if info.include? i
        - value = info[i]
      - else
        - job_inputs ||= IndiferentHash.setup((step.inputs || {}).to_hash)
        - if job_inputs.include?(i)
          - value = inputs[i]
        - else
          - rec_inputs ||= IndiferentHash.setup(step.recursive_inputs.to_hash)
          - value = rec_inputs[i] if rec_inputs.include? i
      - values << value
  - tsv[link] = values

= table do
  - tsv

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
rbbt-rest-2.0.1 share/views/monitor/jobs.haml
rbbt-rest-2.0.0 share/views/monitor/jobs.haml
rbbt-rest-1.9.1 share/views/monitor/jobs.haml
rbbt-rest-1.9.0 share/views/monitor/jobs.haml
rbbt-rest-1.8.157 share/views/monitor/jobs.haml
rbbt-rest-1.8.156 share/views/monitor/jobs.haml
rbbt-rest-1.8.155 share/views/monitor/jobs.haml
rbbt-rest-1.8.154 share/views/monitor/jobs.haml
rbbt-rest-1.8.152 share/views/monitor/jobs.haml
rbbt-rest-1.8.151 share/views/monitor/jobs.haml
rbbt-rest-1.8.150 share/views/monitor/jobs.haml
rbbt-rest-1.8.148 share/views/monitor/jobs.haml
rbbt-rest-1.8.147 share/views/monitor/jobs.haml
rbbt-rest-1.8.146 share/views/monitor/jobs.haml
rbbt-rest-1.8.145 share/views/monitor/jobs.haml
rbbt-rest-1.8.144 share/views/monitor/jobs.haml
rbbt-rest-1.8.143 share/views/monitor/jobs.haml
rbbt-rest-1.8.142 share/views/monitor/jobs.haml
rbbt-rest-1.8.140 share/views/monitor/jobs.haml
rbbt-rest-1.8.139 share/views/monitor/jobs.haml