%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% button_id = "button_close_#{@member_job.id}" form_id = @member_job.new_record? ? "new_job" : "edit_job_#{@member_job.id}" @title_section = t('editing_member_jobs.member_job.dialog_title') @title_item = t('common.new_caption') @help_link_anchor = HELP_URL_CONFIG['member_jobs']['settings'] %> <% form_for(@member_job, :url => job_editing_job_suite_editing_member_jobs_url(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :ids=>ids), :html => { :id => form_id, :class => "edit_member_job", :autocomplete => "off", :onsubmit => "try {helpsys.CntMgr.getController('#{form_id}').submitForm();} catch(e) {console.log(e);};return false;"}) do |form| %> <% if @copy %> <% fields_for :member_job, @source_member_job do |copy_member_job| %> <% @source_member_job.job_conditions.each_with_index do |copy_condition, idx| %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][sequence_number]", copy_condition.sequence_number %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_type]", copy_condition.condition_type %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_data]", copy_condition.condition_data %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_var1]", copy_condition.condition_var1 %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_choice]", copy_condition.condition_choice %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][conjunction]", copy_condition.conjunction %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_var2]", copy_condition.condition_var2 %> <%= hidden_field_tag "member_job[job_conditions_attributes][#{idx}][condition_data1]", copy_condition.condition_data1 %> <% end %> <%= hidden_field :member_job, :conditional, :value=>@source_member_job.conditional %> <%= hidden_field :member_job, :cond_retry, :value=>@source_member_job.cond_retry %> <%= hidden_field :member_job, :cond_retry_delay, :value=>@source_member_job.cond_retry_delay %> <%= hidden_field :member_job, :cond_retry_count, :value=>@source_member_job.cond_retry_count %> <%= hidden_field :member_job, :condition_fail_status, :value=>@source_member_job.condition_fail_status %> <%= hidden_field :member_job, :email_job_log, :value=>@source_member_job.email_job_log %> <%= hidden_field :member_job, :job_parameters, :value=>@source_member_job.job_parameters %> <% if @source_member_job.send_submit_email %> <%= hidden_field :member_job, :send_submit_email, :value=>'1' %> <% end %> <% if @source_member_job.send_run_email %> <%= hidden_field :member_job, :send_run_email, :value=>'1' %> <% end %> <% if @source_member_job.send_complete_email %> <%= hidden_field :member_job, :send_complete_email, :value=>'1' %> <% end %> <% if @source_member_job.send_fail_email %> <%= hidden_field :member_job, :send_fail_email, :value=>'1' %> <% end %> <% if @source_member_job.send_cancel_email %> <%= hidden_field :member_job, :send_cancel_email, :value=>'1' %> <% end %> <% if @source_member_job.send_retry_wait_email %> <%= hidden_field :member_job, :send_retry_wait_email, :value=>'1' %> <% end %> <% if @source_member_job.send_skipped_email %> <%= hidden_field :member_job, :send_skipped_email, :value=>'1' %> <% end %> <% if @source_member_job.send_cancel_snmp_trap %> <%= hidden_field :member_job, :send_cancel_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_complete_snmp_trap %> <%= hidden_field :member_job, :send_complete_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_fail_snmp_trap %> <%= hidden_field :member_job, :send_fail_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_run_snmp_trap %> <%= hidden_field :member_job, :send_run_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_submit_snmp_trap %> <%= hidden_field :member_job, :send_submit_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_skipped_snmp_trap %> <%= hidden_field :member_job, :send_skipped_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.send_retry_wait_snmp_trap %> <%= hidden_field :member_job, :send_retry_wait_snmp_trap, :value=>'1' %> <% end %> <% if @source_member_job.copy_joblog_to_server %> <%= hidden_field :member_job, :copy_joblog_to_server, :value=>'1' %> <% end %> <% if @source_member_job.send_complete_email_log %> <%= hidden_field :member_job, :send_complete_email_log, :value=>'1' %> <% end %> <% if @source_member_job.send_failed_email_log %> <%= hidden_field :member_job, :send_failed_email_log, :value=>'1' %> <% end %> <% if @source_member_job.send_canceled_email_log %> <%= hidden_field :member_job, :send_canceled_email_log, :value=>'1' %> <% end %> <% end %> <% unless @source_member_job.late_start_notification_list.nil? %> <% if @source_member_job.late_start_notification_list.public_list %> <%= hidden_field :member_job, :late_start_notification_list_id, :value => @source_member_job.late_start_notification_list_id %> <% else%> <% list_users = @source_member_job.late_start_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :late_start_users, :notify_contact_id, :name => "late_start_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_late_start_notification_list, true %> <% end %> <% unless @source_member_job.overrun_notification_list.nil? %> <% if @source_member_job.overrun_notification_list.public_list %> <%= hidden_field :member_job, :overrun_notification_list_id, :value => @source_member_job.overrun_notification_list_id %> <% else %> <% list_users = @source_member_job.overrun_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :overrun_users, :notify_contact_id, :name => "overrun_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_overrun_notification_list, true %> <% end %> <% unless @source_member_job.underrun_notification_list.nil? %> <% if @source_member_job.underrun_notification_list.public_list %> <%= hidden_field :member_job, :underrun_notification_list_id, :value => @source_member_job.underrun_notification_list_id %> <% else %> <% list_users = @source_member_job.underrun_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :underrun_users, :notify_contact_id, :name => "underrun_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end%> <%= hidden_field_tag :update_underrun_notification_list, true %> <% end %> <% unless @source_member_job.submit_notification_list.nil? %> <% if @source_member_job.submit_notification_list.public_list %> <%= hidden_field :member_job, :submit_notification_list_id, :value => @source_member_job.submit_notification_list_id %> <% else %> <% list_users = @source_member_job.submit_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :submit_status_users, :notify_contact_id, :name => "submit_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_submit_notification_list, true %> <% end %> <% unless @source_member_job.run_notification_list.nil? %> <% if @source_member_job.run_notification_list.public_list %> <%= hidden_field :member_job, :run_notification_list_id, :value => @source_member_job.run_notification_list_id %> <% else %> <% list_users = @source_member_job.run_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :run_status_users, :notify_contact_id, :name => "run_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_run_notification_list, true %> <% end %> <% unless @source_member_job.complete_notification_list.nil? %> <% if @source_member_job.complete_notification_list.public_list %> <%= hidden_field :member_job, :complete_notification_list_id, :value => @source_member_job.complete_notification_list_id %> <% else %> <% list_users = @source_member_job.complete_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :complete_status_users, :notify_contact_id, :name => "complete_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_complete_notification_list, true %> <% end %> <% unless @source_member_job.fail_notification_list.nil? %> <% if @source_member_job.fail_notification_list.public_list %> <%= hidden_field :member_job, :fail_notification_list_id, :value => @source_member_job.fail_notification_list_id %> <% else %> <% list_users = @source_member_job.fail_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :fail_status_users, :notify_contact_id, :name => "fail_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end%> <%= hidden_field_tag :update_fail_notification_list, true %> <% end %> <% unless @source_member_job.cancel_notification_list.nil? %> <% if @source_member_job.cancel_notification_list.public_list %> <%= hidden_field :member_job, :cancel_notification_list_id, :value => @source_member_job.cancel_notification_list_id %> <% else %> <% list_users = @source_member_job.cancel_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :cancel_status_users, :notify_contact_id, :name => "cancel_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_cancel_notification_list, true %> <% end %> <% unless @source_member_job.email_notification_list.nil? %> <%= hidden_field_tag :copy_email_notification_list, true %> <% if @source_member_job.email_notification_list.public_list %> <%= hidden_field_tag :shared_email_notification_list, @source_member_job.email_notification_list_id %> <% else%> <% list_users = @source_member_job.email_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :email_joblog_users, :notify_contact_id, :name => "email_joblog_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_email_notification_list, true %> <% end %> <% unless @source_member_job.retry_wait_notification_list.nil? %> <%= hidden_field_tag "update_retry_wait_notification_list", true %> <% if @source_member_job.retry_wait_notification_list.public_list %> <%= hidden_field :member_job, :retry_wait_notification_list_id, :value => @source_member_job.retry_wait_notification_list_id %> <% else %> <% list_users = @source_member_job.retry_wait_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :retry_wait_status_users, :notify_contact_id, :name => "retry_wait_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <% end %> <% unless @source_member_job.skipped_notification_list.nil? %> <% if @source_member_job.skipped_notification_list.public_list %> <%= hidden_field :member_job, :skipped_notification_list_id, :value => @source_member_job.skipped_notification_list_id %> <% else %> <% list_users = @source_member_job.skipped_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :skipped_status_users, :notify_contact_id, :name => "skipped_status_users[notification_list_users_attributes][#{list_index}][notify_contact_id]", :value => list_users[list_index].notify_contact_id %> <% end %> <% end %> <%= hidden_field_tag :update_skipped_notification_list, true %> <% end %> <%= form.hidden_field :overrun_monitor_option %> <%= form.hidden_field :overrun_time %> <%= form.hidden_field :overrun_completion_time %> <%= form.hidden_field :overrun_send_snmp_trap %> <%= form.hidden_field :overrun_send_email %> <%= form.hidden_field :overrun_end_job %> <%= form.hidden_field :overrun_monitor_selected %> <%= form.hidden_field :overrun_action_selected %> <%= form.hidden_field :underrun_monitor_selected %> <%= form.hidden_field :underrun_time %> <%= form.hidden_field :underrun_send_snmp_trap %> <%= form.hidden_field :underrun_send_email %> <%= form.hidden_field :underrun_action_selected %> <%= form.hidden_field :late_start_monitor_option %> <%= form.hidden_field :late_start_time %> <%= form.hidden_field :late_start_start_time %> <%= form.hidden_field :late_start_send_snmp_trap %> <%= form.hidden_field :late_start_send_email %> <%= form.hidden_field :late_start_end_job %> <%= form.hidden_field :late_start_monitor_selected %> <%= form.hidden_field :late_start_action_selected %> <%= form.hidden_field :email_notification_list_id %> <%= form.hidden_field :retry_wait_notification_list_id %> <% if @source_member_job.note %> <%= hidden_field_tag :note_context, @source_member_job.note.context %> <%= hidden_field_tag :update_note, true %> <% end %> <% @source_member_job.output_distributions.each_with_index do |copy_output_distribution, idx| %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][file_filter]", copy_output_distribution.file_filter %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][copy_file]", copy_output_distribution.copy_file %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][copy_duplicate]", copy_output_distribution.copy_duplicate %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][email_attachment]", copy_output_distribution.email_attachment %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][fail_on_missing_files]", copy_output_distribution.fail_on_missing_files %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][days_to_keep]", copy_output_distribution.days_to_keep %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][purge_handling]", copy_output_distribution.purge_handling %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][filter_type]", copy_output_distribution.filter_type %> <%= hidden_field_tag "member_job[output_distributions_attributes][#{idx}][report_id]", copy_output_distribution.report_id %> <% if copy_output_distribution.notification_list %> <% if copy_output_distribution.notification_list.public_list %> <%= hidden_field_tag "output_distributions#{idx}[notification_list_id]", copy_output_distribution.notification_list_id %> <% else%> <% list_users = copy_output_distribution.notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field_tag "output_distributions#{idx}[notification_list_users_attributes][#{list_index}][notify_contact_id]", list_users[list_index].notify_contact_id %> <% end %> <% end %> <% end %> <% end %> <%= hidden_field_tag "member_job[email_subject_overrun]", @source_member_job.email_subject_overrun %> <%= hidden_field_tag "member_job[email_subject_underrun]", @source_member_job.email_subject_underrun %> <%= hidden_field_tag "member_job[email_subject_latestart]", @source_member_job.email_subject_latestart %> <%= hidden_field_tag "member_job[email_subject_canceled]", @source_member_job.email_subject_canceled %> <%= hidden_field_tag "member_job[email_subject_completed]", @source_member_job.email_subject_completed %> <%= hidden_field_tag "member_job[email_subject_failed]", @source_member_job.email_subject_failed %> <%= hidden_field_tag "member_job[email_subject_running]", @source_member_job.email_subject_running %> <%= hidden_field_tag "member_job[email_subject_submitted]", @source_member_job.email_subject_submitted %> <%= hidden_field_tag "member_job[email_subject_retry_wait]", @source_member_job.email_subject_retry_wait %> <%= hidden_field_tag "member_job[email_subject_skipped]", @source_member_job.email_subject_skipped %> <%= hidden_field_tag "member_job[email_body_overrun]", @source_member_job.email_body_overrun %> <%= hidden_field_tag "member_job[email_body_underrun]", @source_member_job.email_body_underrun %> <%= hidden_field_tag "member_job[email_body_latestart]", @source_member_job.email_body_latestart %> <%= hidden_field_tag "member_job[email_body_canceled]", @source_member_job.email_body_canceled %> <%= hidden_field_tag "member_job[email_body_completed]", @source_member_job.email_body_completed %> <%= hidden_field_tag "member_job[email_body_failed]", @source_member_job.email_body_failed %> <%= hidden_field_tag "member_job[email_body_running]", @source_member_job.email_body_running %> <%= hidden_field_tag "member_job[email_body_submitted]", @source_member_job.email_body_submitted %> <%= hidden_field_tag "member_job[email_body_retry_wait]", @source_member_job.email_body_retry_wait %> <%= hidden_field_tag "member_job[email_body_skipped]", @source_member_job.email_body_skipped %> <% end %> <%= render( :partial => 'edit_general', :layout => 'shared/edit_section', :locals => { :section_id => "member_job-general", :section_title => t('common.general_title'), :details_only => true}) %> <%= render( :partial => 'edit_agent_environment', :layout => 'shared/edit_section', :locals => { :section_id => "job-agent-environment", :section_title => t('jobs.job.agent_environment_tab'), :details_only => true}) %> <%= render( :partial => 'edit_commands', :layout => 'shared/edit_section', :locals => { :section_id => "job-commands", :section_title => t('jobs.job.commands_tab'), :details_only => true}) %> <%= render( :partial => 'edit_joblog', :layout => 'shared/edit_section', :locals => { :section_id => "job-joblog", :section_title => t('jobs.job.control_tab'), :details_only => true}) %>
<% end %>