<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% button_id = "button_close_#{@job_history.id}" form_id = "edit_job_history_#{@job_history.id}" @title_section = t('.dialog_title') @title_item = get_title_subheader(@job_history.job_name, @job_history.id) @view_only = true @help_link_anchor = HELP_URL_CONFIG['history']['job_history']['job_history_details'] %> <% form_for(@job_history, :html => { :id => form_id, :class => "edit_job_history"}) do |form| %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "job-history-general", :section_title => t('common.details'), :details_only => true}) do %>

<%= t_label('common.run_number') %>

<%= @job_history.id %>

<%= t_label('common.job_name') %>

<%= @job_history.job_name %>

<% unless @job_history.job_suite_member_job_id > 0 if @parent_job.nil? %>

<%= t_label('common.source_job_name') %>

<%= t('common.unknown') %>

<% elsif @job_history.job_name != @parent_job.name %>

<%= t_label('common.source_job_name') %>

<%= @parent_job.name %> <%= t('job_histories.job_name_changed_during') %>

<% end end if !@job_history.job_suite_name.nil? && @job_history.job_suite_name != "" %>

<%= t_label('job_histories.index.job_suite_name') %>

<%= @job_history.job_suite_name %>

<% end %> <% if !@job_history.job_suite_history_id.nil? && @job_history.job_suite_history_id != 0 %>

<%= t_label('job_histories.index.job_suite_run_number') %>

<%= @job_history.job_suite_history_id %>

<% end %> <% if @job_history.parent_job.nil? || @job_history.parent_job.job_type != JobSuite::JOB_TYPE %>

<%= t_label('common.agent') %>

<%= @job_history.agent_name %>

<%= t_label('common.agent_group') %>

<%= @job_history.agent_group_name %>

<%= t_label("common.queue") %>

<%= h @job_history.job_queue_name %>

<% unless @job_history.ibmi_job_number.nil?%>

<%= t_label('job_histories.index.agent_job_info') %>

<%= format_agent_job_info(@job_history.ibmi_job_number, @job_history.ibmi_job_user, @job_history.ibmi_job_name) %>

<% end %> <% end %>

<%= t_label('common.job_status') %>

<%= format_status_code(@job_history.job_status, @job_history.ended_reason_code) %>
<% if @job_history.job_status == JobHistory::RETRY_WAIT || @job_history.ended_reason_code == JobHistory::FAILED_REASON_CONDITION_NOT_MET %>

<%= t_label('common.condition_retry_count') %>

<%= @job_history.retry_number %>

<% end %> <% if @job_history.job_status == JobHistory::RETRY_WAIT %>

<%= t_label('common.condition_retry_next_time') %>

<%= format_timestamp(@job_history.retry_next_time) %>

<% end %> <% if @job_history.job_status == JobHistory::RETRY_WAIT || @job_history.ended_reason_code == JobHistory::FAILED_REASON_CONDITION_NOT_MET %>

<%= t_label('common.failed_condition') %>

<%= format_termination_data(@job_history.termination_data) %>

<% end %>

<%= t_label('common.estimated_completion_time') %>

<%= @job_history.server_running_time_utc == 0 || @job_history.estimated_runtime_ms == 0 ? '' : format_timestamp(@job_history.server_running_time_utc + @job_history.estimated_runtime_ms) %>

<% if @job_history.parent_job.nil? || @job_history.parent_job.job_type != JobSuite::JOB_TYPE %>

<%= t_label('job.priority') %>

<%= @job_history.job_priority %>

<%= t_label('common.start_at_command_sequence') %>

<% first_command = t('job_history.display_command', :sequence => @job_history.formatted_start_at_command_sequence.to_s, :command => (!@first_command_string.nil? && CGI::unescapeHTML (@first_command_string)) || '') %>

<%= h first_command %>

<% end %> <% if @failed_command_string %>

<%= t_label('common.failed_at_command_sequence') %>

<% failed_command = t('job_history.display_command', :sequence => @job_history.formatted_failed_at_command_sequence.to_s, :command => @failed_command_string) %>

<%= h failed_command %>

<% end %> <% if @job_history.parent_job.nil? || @job_history.parent_job.job_type != MemberJob::JOB_TYPE %>

<%= t_label("jobs.job.timezone_option") %>

<%= h @job_history.timezone_type_text %>

<% end %>

<%= t_label('common.reactivity_code') %>

<%= @job_history.formatted_reactivity_code %>

<%= t_label('common.bypass_job_monitors') %>

<%= @job_history.formatted_bypass_job_monitors %>

<% if @job_history.parent_job.nil? || @job_history.parent_job.job_type != JobSuite::JOB_TYPE %>

<%= t_label('common.bypass_conditions') %>

<%= @job_history.formatted_bypass_conditions %>

<% end %> <% # only show this field if we are user initiated %> <% if @job_history.initiation_code == 2%>

<%= t_label('common.clear_prereq_code') %>

<%= @job_history.formatted_clear_prereq_code %>

<% end %> <% if @job_history.formatted_moved_from_date_time.length > 0 %>

<%= t_label('common.moved_from_date_time') %>

<%= @job_history.formatted_moved_from_date_time %>

<% end %> <% if @job_history.detailed_restart_history.length > 0 %>

<%= t_label('common.restart_history') %>

<%= @job_history.detailed_restart_history %>

<% else %>

<%= t_label('job_histories.index.restart_history') %>

<%= @job_history.restart_history %>

<% end %>

<%= t_label('common.missed_job') %>

<%= @job_history.formatted_was_missed %>

<%= t_label('common.init_code') %>

<%= format_initiated_code(@job_history.initiation_code) %>

<% if ((@job_history.initiation_code == 1 || @job_history.initiation_code == 4) && @job_history.ended_reason_code != JobHistory::FAILED_REASON_PREREQUISITE_NOT_MET) %>

<%= t_label('common.initiation_data_text') %>

<% else %>

<%= t_label('common.initiation_data_text') %>

<%= @job_history.translated_initation_data %>

<% end %>

<%= t_label('common.job_params') %>

<%= @job_history.job_parameters and @job_history.job_parameters.split("\t").map{ |p| "#{p}" }.join %>

<% unless @job_history.default_suite_parameters.blank? %>

<%= t_label('job_histories.index.default_suite_params') %>

<%= @job_history.default_suite_parameters.split("\t").map{ |p| "#{p}" }.join %>

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "job-history-general", :section_title => t('common.server_time'), :details_only => true}) do %>

<%= t_label('common.sched_time') %>

<% if @job_history.timezone_type == Job::TIMEZONE_CUSTOM %>

<%= format_timestamp(@job_history.scheduled_time_utc) %>
<%= format_timestamp_in_time_zone(@job_history.scheduled_time_utc, @job_history.job_timezone) %>

<% else %>

<%= format_timestamp(@job_history.scheduled_time_utc) %>

<% end %>

<%= t_label('common.server_initiated_time') %>

<%= format_timestamp(@job_history.server_initiated_time_utc) %>

<%= t_label('common.server_submitted_time') %>

<%= format_timestamp(@job_history.server_submitted_time_utc) %>

<%= t_label('common.server_running_time') %>

<%= format_timestamp(@job_history.server_running_time_utc) %>

<%= t_label('common.server_ended_time') %>

<%= format_timestamp(@job_history.server_ended_time_utc) %>

<% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "job-history-general", :section_title => t('common.agent_time'), :details_only => true}) do %>

<%= t_label('common.agent_scheduled_time') %>

<%= format_timestamp_in_time_zone(@job_history.scheduled_time_utc, @job_history.agent_timezone) %>

<%= t_label('common.agent_initiated_time') %>

<%= format_timestamp_in_time_zone(@job_history.server_initiated_time_utc, @job_history.agent_timezone) %>

<%= t_label('common.agent_submitted_time') %>

<%= format_timestamp_in_time_zone(@job_history.server_submitted_time_utc, @job_history.agent_timezone) %>

<%= t_label('common.agent_started_time') %>

<%= format_timestamp_in_time_zone(@job_history.agent_started_time_utc, @job_history.agent_timezone) %>

<%= t_label('common.agent_ended_time') %>

<%= format_timestamp_in_time_zone(@job_history.agent_ended_time_utc, @job_history.agent_timezone) %>

<% end if @job_history.parent_job.nil? || @job_history.parent_job.job_type != JobSuite::JOB_TYPE %>
<%= standard_buttons(button_id) %>
<% end %>