%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% button_id = "button_close_#{@job_suite.id}" form_id = @job_suite.new_record? ? "new_job" : "edit_job_#{@job_suite.id}" @title_section = t('job_suites.job_suite.dialog_title') @title_item = t('common.new_caption') @help_link_anchor = HELP_URL_CONFIG['job_suites']['settings'] %> <% form_for(@job_suite, :html => { :id => form_id, :class => "edit_job_suite", :autocomplete => "off", :onsubmit => "try {helpsys.CntMgr.getController('#{form_id}').submitForm();} catch(e) {console.log(e);};return false;"}) do |form| %> <% if @copy %> <% fields_for :job_suite, @source_job_suite do |copy_job_suite| %> <%= hidden_field_tag "copy", true %> <%= hidden_field_tag "copy_id", @source_job_suite.id %> <% if @source_job_suite.forecast_schedule %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][schedule_type]", @source_job_suite.forecast_schedule.schedule_type %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][calendar_id]", @source_job_suite.forecast_schedule.calendar_id %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][day_type]", @source_job_suite.forecast_schedule.day_type %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][time_range_start]", @source_job_suite.forecast_schedule.time_range_start %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][time_range_end]", @source_job_suite.forecast_schedule.time_range_end %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][non_workday_option]", @source_job_suite.forecast_schedule.non_workday_option %> <% @source_job_suite.forecast_schedule.forecast_day_of_week_runtimes.each_with_index do |copy_day_of_week_runtimes, idx| %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runtime]", copy_day_of_week_runtimes.runtime %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_mon]", copy_day_of_week_runtimes.runcode_mon %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_tue]", copy_day_of_week_runtimes.runcode_tue %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_wed]", copy_day_of_week_runtimes.runcode_wed %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_thu]", copy_day_of_week_runtimes.runcode_thu %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_fri]", copy_day_of_week_runtimes.runcode_fri %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_sat]", copy_day_of_week_runtimes.runcode_sat %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_week_runtimes_attributes][#{idx}][runcode_sun]", copy_day_of_week_runtimes.runcode_sun %> <% end %> <% @source_job_suite.forecast_schedule.forecast_day_of_period_runtimes.each_with_index do |copy_day_of_period_runtimes, idx| %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_period_runtimes_attributes][#{idx}][runtime]", copy_day_of_period_runtimes.runtime %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_period_runtimes_attributes][#{idx}][day_number]", copy_day_of_period_runtimes.day_number %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_day_of_period_runtimes_attributes][#{idx}][period_type]", copy_day_of_period_runtimes.period_type %> <% end %> <% @source_job_suite.forecast_schedule.forecast_date_objects.each_with_index do |copy_date_objects, idx| %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_date_objects_attributes][#{idx}][date_object_id]", copy_date_objects.date_object_id %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_date_objects_attributes][#{idx}][date_object_type]", copy_date_objects.date_object_type %> <% end %> <% @source_job_suite.forecast_schedule.forecast_runtimes.each_with_index do |copy_runtime, idx| %> <%= hidden_field_tag "job_suite[forecast_schedule_attributes][forecast_runtimes_attributes][#{idx}][runtime]", copy_runtime.runtime %> <% end %> <% end %> <% @source_job_suite.special_instances.each_with_index do |special_instance, idx| %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][date_object_id]", special_instance.date_object_id %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][description]", special_instance.description %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][instance_type]", special_instance.instance_type %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][name]", special_instance.name %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][scheduled_after]", special_instance.scheduled_after %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][scheduled_before]", special_instance.scheduled_before %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][tag_list]", special_instance.tag_list %> <% special_instance.special_instance_days.each_with_index do |copy_special_instance_day, idx2| %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][scheduled_after]", copy_special_instance_day.scheduled_after %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][scheduled_before]", copy_special_instance_day.scheduled_before %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_mon]", copy_special_instance_day.runcode_mon %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_tue]", copy_special_instance_day.runcode_tue %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_wed]", copy_special_instance_day.runcode_wed %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_thu]", copy_special_instance_day.runcode_thu %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_fri]", copy_special_instance_day.runcode_fri %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_sat]", copy_special_instance_day.runcode_sat %> <%= hidden_field_tag "job_suite[special_instances_attributes][#{idx}][special_instance_days_attributes][#{idx2}][runcode_sun]", copy_special_instance_day.runcode_sun %> <% end %> <% end %> <% @source_job_suite.dependencies.each_with_index do |copy_prereq, idx| %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][prereq_object_id]", copy_prereq.prereq_object_id %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][prereq_object_type]", copy_prereq.prereq_object_type %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][prereq_type]", copy_prereq.prereq_type %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][sequence_number]", copy_prereq.sequence_number %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][conjunction]", copy_prereq.conjunction %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][react_to_status]", copy_prereq.react_to_status %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][latch_status]", copy_prereq.latch_status %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][keep_status]", copy_prereq.keep_status %> <%= hidden_field_tag "job_suite[dependencies_attributes][#{idx}][special_instance_id]", copy_prereq.special_instance_id %> <% end %> <%= hidden_field :job_suite, :conditional, :value=>@source_job_suite.conditional %> <%= hidden_field :job_suite, :cond_retry, :value=>@source_job_suite.cond_retry %> <%= hidden_field :job_suite, :cond_retry_delay, :value=>@source_job_suite.cond_retry_delay %> <%= hidden_field :job_suite, :cond_retry_count, :value=>@source_job_suite.cond_retry_count %> <%= hidden_field :job_suite, :condition_fail_status, :value=>@source_job_suite.condition_fail_status %> <%= hidden_field :job_suite, :email_job_log, :value=>@source_job_suite.email_job_log %> <%= hidden_field :job_suite, :job_parameters, :value=>@source_job_suite.job_parameters %> <% if @source_job_suite.send_submit_email %> <%= hidden_field :job_suite, :send_submit_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_run_email %> <%= hidden_field :job_suite, :send_run_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_complete_email %> <%= hidden_field :job_suite, :send_complete_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_fail_email %> <%= hidden_field :job_suite, :send_fail_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_cancel_email %> <%= hidden_field :job_suite, :send_cancel_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_skipped_snmp_trap %> <%= hidden_field :job_suite, :send_skipped_snmp_trap, :value=>'1' %> <% end %> <% if @source_job_suite.send_complete_snmp_trap %> <%= hidden_field :job_suite, :send_complete_snmp_trap, :value=>'1' %> <% end %> <% if @source_job_suite.send_run_snmp_trap %> <%= hidden_field :job_suite, :send_run_snmp_trap, :value=>'1' %> <% end %> <% if @source_job_suite.copy_joblog_to_server %> <%= hidden_field :job_suite, :copy_joblog_to_server, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_fail_email %> <%= hidden_field :job_suite, :send_member_fail_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_fail_snmp_trap %> <%= hidden_field :job_suite, :send_member_fail_snmp_trap, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_cancel_email %> <%= hidden_field :job_suite, :send_member_cancel_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_cancel_snmp_trap %> <%= hidden_field :job_suite, :send_member_cancel_snmp_trap, :value=>'1' %> <% end %> <% if @source_job_suite.send_skipped_email %> <%= hidden_field :job_suite, :send_skipped_email, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_failed_email_log %> <%= hidden_field :job_suite, :send_member_failed_email_log, :value=>'1' %> <% end %> <% if @source_job_suite.send_member_canceled_email_log %> <%= hidden_field :job_suite, :send_member_canceled_email_log, :value=>'1' %> <% end %> <% end %> <% unless @source_job_suite.late_start_notification_list.nil? %> <% if @source_job_suite.late_start_notification_list.public_list %> <%= hidden_field :job_suite, :late_start_notification_list_id, :value => @source_job_suite.late_start_notification_list_id %> <% else%> <% list_users = @source_job_suite.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_job_suite.overrun_notification_list.nil? %> <% if @source_job_suite.overrun_notification_list.public_list %> <%= hidden_field :job_suite, :overrun_notification_list_id, :value => @source_job_suite.overrun_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.underrun_notification_list.nil? %> <% if @source_job_suite.underrun_notification_list.public_list %> <%= hidden_field :job_suite, :underrun_notification_list_id, :value => @source_job_suite.underrun_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.submit_notification_list.nil? %> <% if @source_job_suite.submit_notification_list.public_list %> <%= hidden_field :job_suite, :submit_notification_list_id, :value => @source_job_suite.submit_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.run_notification_list.nil? %> <% if @source_job_suite.run_notification_list.public_list %> <%= hidden_field :job_suite, :run_notification_list_id, :value => @source_job_suite.run_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.complete_notification_list.nil? %> <% if @source_job_suite.complete_notification_list.public_list %> <%= hidden_field :job_suite, :complete_notification_list_id, :value => @source_job_suite.complete_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.fail_notification_list.nil? %> <% if @source_job_suite.fail_notification_list.public_list %> <%= hidden_field :job_suite, :fail_notification_list_id, :value => @source_job_suite.fail_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.cancel_notification_list.nil? %> <% if @source_job_suite.cancel_notification_list.public_list %> <%= hidden_field :job_suite, :cancel_notification_list_id, :value => @source_job_suite.cancel_notification_list_id %> <% else %> <% list_users = @source_job_suite.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_job_suite.member_fail_notification_list.nil? %> <% if @source_job_suite.member_fail_notification_list.public_list %> <%= hidden_field :job_suite, :member_fail_notification_list_id, :value => @source_job_suite.member_fail_notification_list_id %> <% else %> <% list_users = @source_job_suite.member_fail_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :member_fail_status_users, :notify_contact_id, :name => "member_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_member_fail_notification_list, true %> <% end %> <% unless @source_job_suite.member_cancel_notification_list.nil? %> <% if @source_job_suite.member_cancel_notification_list.public_list %> <%= hidden_field :job_suite, :member_cancel_notification_list_id, :value => @source_job_suite.member_cancel_notification_list_id %> <% else %> <% list_users = @source_job_suite.member_cancel_notification_list.notification_list_users %> <% list_users.each_index do |list_index| %> <%= hidden_field :member_cancel_status_users, :notify_contact_id, :name => "member_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_member_cancel_notification_list, true %> <% end %> <% unless @source_job_suite.email_notification_list.nil? %> <%= hidden_field_tag :copy_email_notification_list, true %> <% if @source_job_suite.email_notification_list.public_list %> <%= hidden_field_tag :shared_email_notification_list, @source_job_suite.email_notification_list_id %> <% else%> <% list_users = @source_job_suite.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_job_suite.skipped_notification_list.nil? %> <% if @source_job_suite.skipped_notification_list.public_list %> <%= hidden_field :job_suite, :skipped_notification_list_id, :value => @source_job_suite.skipped_notification_list_id %> <% else %> <% list_users = @source_job_suite.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 :hold %> <%= form.hidden_field :hold_times %> <%= form.hidden_field :held_count %> <%= form.hidden_field :hold_until %> <%= form.hidden_field :retry_wait_notification_list_id %> <% if @source_job_suite.note %> <%= hidden_field_tag :note_context, @source_job_suite.note.context %> <%= hidden_field_tag :update_note, true %> <% end %> <%= hidden_field_tag "job_suite[email_subject_overrun]", @source_job_suite.email_subject_overrun %> <%= hidden_field_tag "job_suite[email_subject_underrun]", @source_job_suite.email_subject_underrun %> <%= hidden_field_tag "job_suite[email_subject_latestart]", @source_job_suite.email_subject_latestart %> <%= hidden_field_tag "job_suite[email_subject_completed]", @source_job_suite.email_subject_completed %> <%= hidden_field_tag "job_suite[email_subject_running]", @source_job_suite.email_subject_running %> <%= hidden_field_tag "job_suite[email_subject_skipped]", @source_job_suite.email_subject_skipped %> <%= hidden_field_tag "job_suite[email_subject_member_canceled]", @source_job_suite.email_subject_member_canceled %> <%= hidden_field_tag "job_suite[email_subject_member_failed]", @source_job_suite.email_subject_member_failed %> <%= hidden_field_tag "job_suite[email_body_overrun]", @source_job_suite.email_body_overrun %> <%= hidden_field_tag "job_suite[email_body_underrun]", @source_job_suite.email_body_underrun %> <%= hidden_field_tag "job_suite[email_body_latestart]", @source_job_suite.email_body_latestart %> <%= hidden_field_tag "job_suite[email_body_completed]", @source_job_suite.email_body_completed %> <%= hidden_field_tag "job_suite[email_body_running]", @source_job_suite.email_body_running %> <%= hidden_field_tag "job_suite[email_body_skipped]", @source_job_suite.email_body_skipped %> <%= hidden_field_tag "job_suite[email_body_member_canceled]", @source_job_suite.email_body_member_canceled %> <%= hidden_field_tag "job_suite[email_body_member_failed]", @source_job_suite.email_body_member_failed %> <% end %> <%= render( :partial => 'edit_general', :layout => 'shared/edit_section', :locals => { :section_id => "job_suite-general", :section_title => t('common.general_title'), :details_only => true}) %> <%= render( :partial => 'edit_schedule', :layout => 'shared/edit_section', :locals => { :section_id => "job-suite-schedule", :section_title => t('job_suites.job_suite.job_schedule'), :details_only => true}) %> <%= render( :partial => 'edit_exceptions', :layout => 'shared/edit_section', :locals => { :section_id => "job-suite-exceptions", :section_title => t('job_suites.job_suite.exception_tab'), :details_only => true}) %> <%= render( :partial => 'edit_missed_job', :layout => 'shared/edit_section', :locals => { :section_id => "job-suite-missed-job", :section_title => t('job_suites.missed_options_tab'), :details_only => true}) %> <%= render( :partial => 'edit_control', :layout => 'shared/edit_section', :locals => { :section_id => "job-suite-control", :section_title => t('job_suites.control.job_history_purge'), :details_only => true}) %>
<% end %>