Sha256: f45e327e13594ffdb748e38cafa86cb953e2a6cc4ceacc64db7243f8598bbd1a

Contents?: true

Size: 1.16 KB

Versions: 17

Compression:

Stored size: 1.16 KB

Contents

<%
  rows = @historical_jobs.each do |job|
    historical_job = ::Naf::HistoricalJob.find_by_id(job[0])
    if job[1].present? && historical_job.present? && historical_job.machine_runner_invocation.present?
      invocation = historical_job.machine_runner_invocation
      if invocation.status != 'dead' && job[10] == 'Running'
        job[1] = "<div class='" + invocation.status + "'>" + job[1] + "</div>".html_safe
      end
    end

    job[12] = link_to image_tag('job.png',
                                class: 'action',
                                title: "View job(id: #{job[0]}, title: #{job[4]}) log"),
                                url_for({ controller: 'log_viewer', action: 'index', record_id: job[0], record_type: 'job' }),
                                { target: '_blank', id: job[0] }

    if job[10] == "Running" || job[10] == 'Queued' || job[10] == 'Waiting'
      job[12] << "&nbsp;&nbsp;&nbsp;".html_safe
      job[12] << (link_to image_tag('terminate.png',
                  class: 'action',
                  title: "Terminate job(id: #{job[0]}, title: #{job[4]})"),
                  "#", { class: "terminate", id: job[0]})
    end
  end
%>
<%= raw rows %>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
naf-2.1.12 app/views/naf/historical_jobs/index.json.erb
naf-2.1.11 app/views/naf/historical_jobs/index.json.erb
naf-2.1.10 app/views/naf/historical_jobs/index.json.erb
naf-2.1.9 app/views/naf/historical_jobs/index.json.erb
naf-2.1.8 app/views/naf/historical_jobs/index.json.erb
naf-2.1.6 app/views/naf/historical_jobs/index.json.erb
naf-2.1.5 app/views/naf/historical_jobs/index.json.erb
naf-2.1.4 app/views/naf/historical_jobs/index.json.erb
naf-2.1.3 app/views/naf/historical_jobs/index.json.erb
naf-2.1.2 app/views/naf/historical_jobs/index.json.erb
naf-2.1.1 app/views/naf/historical_jobs/index.json.erb
naf-2.1.0 app/views/naf/historical_jobs/index.json.erb
naf-2.0.4 app/views/naf/historical_jobs/index.json.erb
naf-2.0.3 app/views/naf/historical_jobs/index.json.erb
naf-2.0.2 app/views/naf/historical_jobs/index.json.erb
naf-2.0.1 app/views/naf/historical_jobs/index.json.erb
naf-2.0.0 app/views/naf/historical_jobs/index.json.erb