<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %>
title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" stateId="job_focused" baseParameters="{ results: 300, target_type: 'Agent', target_id: '<%=h params[:agent_id] %>', tag: '<%=h params[:tag] %>' }" includeTagFilter="true" tagMatchAnyDefault="<%=h match_any_default %>" <% elsif (params[:agent_group_id]) %> title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" stateId="job_focused" baseParameters="{ results: 300, target_type: 'AgentGroup', target_id: '<%=h params[:agent_group_id] %>', tag: '<%=h params[:tag] %>' }" includeTagFilter="true" tagMatchAnyDefault="<%=h match_any_default %>" <% elsif (params[:job_queue_id]) %> title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" stateId="job_focused" baseParameters="{ results: 300, job_queue_id: '<%=h params[:job_queue_id] %>', tag: '<%=h params[:tag] %>' }" includeTagFilter="true" tagMatchAnyDefault="<%=h match_any_default %>" <% else %> baseParameters="{ tag: '<%=h params[:tag].delete "'\"\\/<>[]^:#" unless params[:tag].nil? %>' }" <% end %> cls="full-page-grid" <% if params[:import_date] %> title="<%= t("#{controller.controller_name}.page_title") %> » Imported from '<%=h params[:file_name]%>' from agent <%=h params[:agent_name]%>" stateful="false" <% else %> stateId="jobsGrid" title="<%= t("#{controller.controller_name}.page_title") %>" <% end %> restoreURLs="<%= edit_prerequisites_job_path(-1) %>, <%= edit_conditions_job_path(-1) %>, <%= job_monitor_events_job_path(-1) %>, <%= status_notification_job_path(-1) %>, <%= output_distribution_job_path(-1) %>, <%= job_notes_path(-1) %>, <%= job_special_instances_path(-1) %>, <%= job_forecast_schedules_path(-1) %>, <%= copy_job_path(-1) %>, <%= job_path(-1) %>, <%= hold_job_job_path(-1) %>, <%= hold_confirm_job_path(-1) %>, <%= release_job_job_path(-1) %>, <%= job_history_by_job_job_path(-1) %>, <%= job_monitor_history_by_job_job_path(-1) %>, <%= output_distribution_histories_path(-1) %>, <%= schedule_logs_path(-1) %>, <%= whereused_job_path(-1) %>, <%= prerequisite_statuses_job_path(-1) %>, <%= clear_prerequisite_statuses_job_path(-1) %>, <%= next_scheduled_time_job_path(-1) %>, <%= do_multiple_jobs_now_jobs_path(:format => :json) %>, <%= hold_multiple_jobs_path(:format => :json) %>, <%= release_multiple_jobs_path(:format => :json) %>, <%= destroy_multiple_jobs_path(:format => :json) %>, <%= clear_multiple_prerequisite_statuses_jobs_path(:format => :json) %>" region="center" lazyRender="true" dojoType="helpsys.ext.LiveGrid" authenticity_token="<%= form_authenticity_token %>" autoExpandColumn="jobsGridDescription" dataColumns="[ { name: 'id'}, {name: 'name'}, {name: 'description'}, {name: 'agent_name'}, {name: 'job_queue_name'}, {name: 'hold_status'}, {name: 'default_priority'}, {name: 'schedule_type'}, {name: 'job_type'}, {name: 'is_reactive'}, {name: 'next_scheduled_time_utc'} ]" deletePath="<%= job_path(-1) %>" editPath="<%= edit_job_path(-1) %>" editInPopup="false" gridColumns="[ {dataIndex: 'name', header: '<%=t "common.name" %>', id: 'jobsGridName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'}, {dataIndex: 'description', header: '<%=t "common.description" %>', id: 'jobsGridDescription', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'}, {dataIndex: 'agent_name', header: '<%=t "common.agent_or_group" %>', id: 'jobsGridAgentName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'}, {dataIndex: 'job_queue_name', header: '<%=t "common.queue" %>', id: 'jobsGridJobQueueName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'}, {dataIndex: 'hold_status', header: ' <%=t "jobs.index.hold_status" %>', id: 'showHoldJobStatus', locked:false, sortable:true, width: 100, filter: true, filterType: 'list', filterList: <%= "[[1, '#{t('agents.index.held_for_generic')}'],[2, '#{t('agents.index.held')}'],[3, '#{t('agents.index.held_until_generic')}'],[0, '#{t('agents.index.released')}']]" %>}, {dataIndex: 'default_priority', header: '<%=t "job.default_priority" %>', id: 'jobDefaultPriority', locked: false, sortable: true, width: 70, filter: true, filterType: 'numeric'}, {dataIndex: 'schedule_type', header: ' <%=t "jobs.index.schedule_type" %>', id: 'JobsGridScheduleType', locked:false, sortable:true, width: 200, filter: true, filterType: 'list', filterList: <%= "[['#{Job::UNSCHEDULE_JOB_TYPE}', '#{t('jobs.edit_schedule.unscheduled_job')}'],['#{Job::DAY_OF_WEEK_TYPE}', '#{t('jobs.edit_schedule.day_of_week')}'],['#{Job::DATE_LIST_TYPE}', '#{t('jobs.edit_schedule.date_list')}'],['#{Job::DAY_OF_PERIOD_TYPE}', '#{t('jobs.edit_schedule.day_of_period')}'],['#{Job::TIMED_INTERVAL_TYPE}', '#{t('jobs.edit_schedule.timed_interval')}'],['#{Job::DAILY_INTERVAL_TYPE}', '#{t('jobs.edit_schedule.daily_interval')}'],['#{Job::DAY_OF_WEEK_RANGE_TYPE}', '#{t('jobs.edit_schedule.day_of_week_range')}'],['#{Job::DATE_LIST_RANGE_TYPE}', '#{t('jobs.edit_schedule.date_list_range')}'],['#{Job::DAY_OF_PERIOD_RANGE_TYPE}', '#{t('jobs.edit_schedule.day_of_period_range')}'],['#{Job::SAP_RUN_INTERCEPTED_JOB}', '#{t('jobs.edit_schedule.sap_run_intercepted_job')}'],['#{Job::CRON_EXPRESSION_TYPE}', '#{t('jobs.edit_schedule.cron_expression')}']]" %>}, {dataIndex: 'is_reactive', header: '<%= t('jobs.index.reactive') %>', id: 'jobsGridReactive', locked: false, sortable: true, width: 80, filter: true, filterType: 'boolean', yesText: '<%= t('common.key_yes') %>', noText: '<%= t('common.key_no') %>'}, {dataIndex: 'next_scheduled_time_utc', header: '<%= t('jobs.index.next_scheduled_time') %>', id: 'jobsGridNextScheduleTime', locked: false, sortable: true, width: 200, filter: true, filterType: 'dateTime'} ]" helpUrl="<%=help_link(HELP_URL_CONFIG['jobs']['job_manager'])%>" refererURL="<%= @return_referer %>" includeDelete="true" includeEdit="true" includeShow="true" includeTagFilter="true" tagMatchAnyDefault="<%= match_any_default %>" itemType='<%= t('common.job') %>' menuCfg="{items: [ { iconCls: 'icon_edit', text: '<%=t ".edit_job" %>', menu: { items: [{ iconCls: '', text: '<%=t ".edit_job_submenu" %>', actsOn: 'one', actionUrl: '<%= edit_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".edit_job_monitor" %>', actsOn: 'one', actionUrl: '<%= job_monitor_events_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".prerequisites" %>', actsOn: 'one', actionUrl: '<%= edit_prerequisites_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".conditions" %>', actsOn: 'one', actionUrl: '<%= edit_conditions_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".status_notification" %>', actsOn: 'one', actionUrl: '<%= status_notification_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".output_distribution" %>', actsOn: 'one', actionUrl: '<%= output_distribution_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t ".note" %>', actsOn: 'one', actionUrl: '<%= job_notes_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%= t "common.job_params" %>', actsOn: 'one', actionUrl: '<%= edit_job_params_job_path(-1) %>', usePopup: false },'-',{ iconCls: '', text: '<%=t "common.special_instances" %>', actsOn: 'one', actionUrl: '<%= job_special_instances_path(:job_id => -1) %>', usePopup: false },'-',{ iconCls: 'icon_forecast_schedule', text: '<%=t "common.forecast_schedule" %>', actsOn: 'one', actionUrl: '<%= job_forecast_schedules_path(:job_id => -1) %>', usePopup: false }] } },{ iconCls: 'icon_copy', text: '<%=t ".copy_job" %>', actsOn: 'one', actionUrl: '<%= copy_job_path(-1) %>', usePopup: false },{ iconCls: 'icon_delete', text: '<%=t ".delete_job" %>', actsOn: 'many', method: 'DELETE', actionUrl: '<%= job_path(-1) %>', ajaxRequest: true, actionId: 'delete_job', customAction: true, confirmText: '<%=t ".delete_confirmation" %>' },{ iconCls: 'icon_control', text: '<%=t "jobs.job_control" %>', menu: { items: [{ iconCls: 'icon_do_job_now', text: '<%=t ".do_job_now" %>', actsOn: 'many', actionId: 'do_job_now', customAction: true, actionUrl: '<%= start_job_job_path(-1) %>', usePopup: true },{ iconCls: 'icon_hold_job', text: '<%=t "jobs.hold_confirm.hold_job" %>', actsOn: 'many', actionId: 'hold_job', customAction: true, actionUrl: '<%= hold_confirm_job_path(-1) %>', usePopup: true },{ iconCls: 'icon_release_job', text: '<%=t "jobs.release_job" %>', actsOn: 'many', actionId: 'release_job', customAction: true, method: 'POST', actionUrl: '<%= release_job_job_path(-1) %>', ajaxRequest: true, confirmText: '<%=t "jobs.release.confirmation" %>', usePopup: false }] } },'-',{ iconCls: 'icon_job_history', text: '<%=t "jobs.history" %>', menu: { items: [{ iconCls: '', text: '<%=t ".job_history" %>', actsOn: 'one', actionUrl: '<%= job_history_by_job_job_path(-1) %>', usePopup: false },{ iconCls: '', text: '<%=t ".job_monitor_history" %>', actsOn: 'one', actionUrl: '<%= job_monitor_history_by_job_job_path(-1) %>', usePopup: false }, { iconCls: '', text: '<%=t "common.output_distribution_history" %>', actsOn: 'one', actionUrl: '<%= output_distribution_histories_path() + "?job_id=-1" %>' },{ iconCls: '', text: '<%=t "common.server_history" %>', actsOn: 'one', actionUrl: '<%= schedule_logs_path(:job_id => -1) %>', usePopup: false }] } },'-',{ iconCls: 'icon_export', text: '<%=t ".export_job" %>', actsOn: 'many', handler: function(){exportController.openExportPopup.call(exportController)} }, { iconCls: 'icon_audit', text: '<%=t "common.show_audit_changes" %>', actsOn: 'one', actionUrl: '<%= audits_path(:auditable_id => -1, :auditable_type => 'Job') %>' }, { iconCls: 'icon_whereused', text: '<%= t("common.where_used") %>', actsOn: 'one', actionUrl: '<%= whereused_job_path(-1) %>' }, { iconCls: 'icon_prerequisite_status', text: '<%=t "common.prerequisite_statuses" %>', actsOn: 'one', actionUrl: '<%= prerequisite_statuses_job_path(-1) %>', usePopup: false }, { iconCls: 'icon_delete', text: '<%=t "common.clear_prereq_statuses" %>', actsOn: 'many', actionUrl: '<%= clear_prerequisite_statuses_job_path(-1) %>', ajaxRequest: true, customAction: true, actionId: 'clear_job_prerequisite_statuses', method: 'POST', confirmText: '<%=t "common.clear_prereq_statuses_confirmation" %>' },'-',{ iconCls: 'icon_next_schedule_time', text: '<%= t ".next_scheduled_time" %>', actsOn: 'one', customAction: true, method: 'GET', ajaxRequest: true, actionUrl: '<%= next_scheduled_time_job_path(-1, :popup => "true") %>', usePopup: false },'-', { iconCls: 'icon_send_event', text: '<%=t ".send_status" %>', menu: { items: [ { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::SUBMITTED) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.submitted" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::SKIPPED) %>', iconCls: 'icon_send_event_skipped', text: '<%=t "job_history.job_status.skipped" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::RUNNING) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.running" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::FAILED) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.failed" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::COMPLETED) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.completed" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::CANCELED) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.canceled" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobHistory::RETRY_WAIT) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "job_history.job_status.retry_wait" %>', usePopup: true } ] } } , { iconCls: 'icon_send_event', text: '<%=t ".send_monitor_event" %>', menu: { items: [ { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobMonitorEvent::UNDERRUN) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "jobs.index.under_run" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobMonitorEvent::OVERRUN) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "jobs.index.over_run" %>', usePopup: true }, { actsOn: 'one', actionUrl: '<%= confirm_send_status_job_path(-1, :status => JobMonitorEvent::LATESTART) %>', iconCls: 'icon_send_event_submitted', text: '<%=t "jobs.index.late_start" %>', usePopup: true } ] } } ]}" sortField="{field: 'name', direction: 'ASC'}" tbar="{items: [{ iconCls: 'icon_create', text: '<%=t ".create_job" %>', actsOn: 'none', actionUrl: '<%= new_job_path %>', usePopup: false }]}" <% if params[:import_date] %> url="<%= jobs_path(:format => 'json', :cron_id => params[:cron_id], :import_date => params[:import_date]) %>" style="height:100%;"> <% else %> url="<%= jobs_path(:format => 'json') %>" style="height:100%;"> <% end %>