<% content_for :body do %>
<% unless notice.blank? %> <% end %>

Historical Job

<% if flash[:error] -%>
<%= flash[:error] %>

<% end -%> <%= link_to 'Back to Jobs', historical_jobs_path %>    |    <%= link_to "Add Affinity", new_historical_job_historical_job_affinity_tab_path(@historical_job) %>

<% if ['Running', 'Waiting', 'Queued'].include?(@logical_job.status) -%> <% end %>
Attribute Value
Title <%= @historical_job.title %>
ID <%= @historical_job.id %>
Status <%= @logical_job.status %>
Server <%= if @historical_job.started_on_machine.present? name = @historical_job.started_on_machine.short_name name.present? ? name : @historical_job.started_on_machine.server_address end %>
Pid <%= @historical_job.pid %>
Machine Runner Invocation Id <% if @historical_job.machine_runner_invocation_id.present? -%> <%= link_to @historical_job.machine_runner_invocation_id, machine_runner_invocation_path(@historical_job.machine_runner_invocation) %> <% end -%>
Queued Time <%= @historical_job.created_at.localtime.strftime("%Y-%m-%d %r") %>
Command <%= @historical_job.command %>
Started At <%= @historical_job.started_at %>
Finished At <%= @historical_job.finished_at %>
Run Time <%= @logical_job.run_time %>
Exit Status <%= @historical_job.exit_status %>
Script Type Name <%= @historical_job.application_type.script_type_name %>
Log Level <%= @historical_job.log_level %>
Tags <%= @historical_job.running_job.try(:tags) %>
Request To Terminate <%= @historical_job.request_to_terminate %>
Machine Started On Server Address <%= @historical_job.started_on_machine.try(:server_address) %>
Machine Started On Server Name <%= @historical_job.started_on_machine.try(:server_name) %>
Application Run Group Name <%= @historical_job.application_run_group_name %>
Application Run Group Limit <%= @historical_job.application_run_group_limit %>
Application Run Group Restriction Name <%= @historical_job.application_run_group_restriction.application_run_group_restriction_name %>
<%= link_to "Historical Job Affinity Tabs", historical_job_historical_job_affinity_tabs_path(@historical_job.id) %> <%= @logical_job.affinities %>
Terminate Job <%= link_to image_tag('terminate.png', class: 'action', title: "Terminate job(id: #{@historical_job.id}, title: #{@historical_job.title})"), "#", { class: "terminate" } %>

Prerequisites

<% @historical_job.prerequisites.each do |prereq| -%> <% job = ::Logical::Naf::Job.new(prereq) %> <% end -%>
ID Command Status
<%= link_to prereq.id, historical_job_path(prereq) %> <%= prereq.command %><%= job.status %>

<%= render partial: 'naf/log_viewer/log_layout', locals: { record_id: @historical_job.id, record_type: 'job' } %>
<% end %> <%= render partial: 'naf/shared/application' %> <%= render partial: 'naf/shared/auto_resize_width', locals: { div_class: '.scrollable-output' } %> <%= render partial: 'naf/log_viewer/log_display', locals: { record_id: @historical_job.id, status: @logical_job.status, logs_url: "#{http_protocol}#{@logical_job.runner}#{naf.logs_log_parsers_path}", record_type: 'job' } %> <% content_for :javascripts do %> <% end %>