%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2012 %>
"
helpUrl="<%=help_link(HELP_URL_CONFIG['sap']['intercepted']['running'])%>"
region="center"
lazyRender="true"
dojoType="helpsys.ext.LiveGrid"
authenticity_token="<%= form_authenticity_token %>"
autoExpandColumn="sap_run_intercepted_jobName"
dataColumns="[{name: 'id'}, {name: 'name'},{name: 'sap_name'}, {name: 'sap_job_name'}, {name: 'sap_owner'}, {name: 'sap_client'}, {name: 'allowed_from'}, {name: 'allowed_to'}, {name: 'restricted_days'}, {name: 'hold_status'}, {name: 'sap_criterion_id'}, {name: 'description'}, {name: 'agent_name'}]"
deletePath="<%= job_path(-1, :call_referer => "srij") %>"
editPath="<%= edit_job_path(-1, :call_referer => "srij") %>"
editInPopup="false"
itemType='<%= t('common.sap_intercepted_job') %>'
gridColumns="[
{dataIndex: 'name', header: '<%= t('.name') %>', id: 'sap_run_intercepted_jobName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'description', header: '<%=t "common.description" %>', id: 'sap_run_intercepted_Description', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'agent_name', header: '<%=t "common.agent_or_group" %>', id: 'sap_run_intercepted_AgentName', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'sap_name', header: '<%= t('.system_definition') %>', id: 'sap_run_intercepted_sapName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'sap_job_name', header: '<%= t('.job_name') %>', id: 'sap_run_intercepted_sapJobName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'sap_owner', header: '<%= t('.sap_owner') %>', id: 'sap_run_intercepted_sapOwner', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'sap_client', header: '<%= t('.sap_client') %>', id: 'sap_run_intercepted_sapClient', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'allowed_from', header: '<%= t('.allowed_from') %>', id: 'sap_run_intercepted_jobsAllowedFrom', locked: false, sortable: true, width: 150, filter: true, filterType: 'time'},
{dataIndex: 'allowed_to', header: '<%= t('.allowed_to') %>', id: 'sap_run_intercepted_jobsAllowedTo', locked: false, sortable: true, width: 150, filter: true, filterType: 'time'},
{dataIndex: 'restricted_days', header: '<%= t('.restricted_days') %>', id: 'sap_run_intercepted_jobsRestrictedDays', locked: false, sortable: true, width: 150, filter: true, filterType: 'list', filterList: <%= @restricteddays %>},
{dataIndex: 'hold_status', header: '<%= t('.hold_status') %>', id: 'sap_run_intercepted_jobsHoldStatus', locked:false, sortable:true, width: 150, 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')}']]" %>}
]"
includeDelete="true"
includeEdit="true"
includeShow="false"
includeTagFilter="true"
menuCfg="{items: [
{
iconCls: 'icon_edit',
text: '<%=t "jobs.index.edit_job" %>',
menu: {
items: [{
iconCls: '',
text: '<%=t "jobs.index.edit_job_submenu" %>',
actsOn: 'one',
actionUrl: '<%= edit_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.edit_job_monitor" %>',
actsOn: 'one',
actionUrl: '<%= job_monitor_events_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.prerequisites" %>',
actsOn: 'one',
actionUrl: '<%= edit_prerequisites_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.conditions" %>',
actsOn: 'one',
actionUrl: '<%= edit_conditions_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.status_notification" %>',
actsOn: 'one',
actionUrl: '<%= status_notification_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.output_distribution" %>',
actsOn: 'one',
actionUrl: '<%= output_distribution_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%= t "jobs.index.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 "jobs.index.copy_job" %>',
actsOn: 'one',
actionUrl: '<%= copy_job_path(-1, :schedule_type => Job::SAP_RUN_INTERCEPTED_JOB) %>',
usePopup: false
},{
iconCls: 'icon_delete',
text: '<%=t "jobs.index.delete_job" %>',
actsOn: 'many',
method: 'DELETE',
actionUrl: '<%= job_path(-1) %>',
ajaxRequest: true,
actionId: 'delete_job',
customAction: true,
confirmText: '<%=t "jobs.index.delete_confirmation" %>'
},{
iconCls: 'icon_control',
text: '<%=t "jobs.job_control" %>',
menu: {
items: [{
iconCls: 'icon_do_job_now',
text: '<%=t "jobs.index.do_job_now" %>',
actsOn: 'one',
actionUrl: '<%= start_job_job_path(-1, :call_referer => "srij") %>',
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, :call_referer => "srij")%>',
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, :call_referer => "srij") %>',
ajaxRequest: true,
confirmText: '<%=t "jobs.release.confirmation" %>',
usePopup: false
}]
}
},'-',{
iconCls: 'icon_job_history',
text: '<%=t "jobs.history" %>',
menu: {
items: [{
iconCls: '',
text: '<%=t "jobs.index.job_history" %>',
actsOn: 'one',
actionUrl: '<%= job_history_by_job_job_path(-1) %>',
usePopup: false
},{
iconCls: '',
text: '<%=t "jobs.index.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: '',
text: '<%=t ".sap_intercepted_jobs" %>',
actsOn: 'one',
actionUrl: '<%= job_history_by_job_sap_run_intercepted_job_path("\#{sap_criterion_id}") %>',
usePopup: false
}]
}
}, {
iconCls: 'icon_export',
text: '<%=t "jobs.index.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: 'one',
actionUrl: '<%= clear_prerequisite_statuses_job_path(-1) %>',
ajaxRequest: true,
method: 'POST',
confirmText: '<%=t "common.clear_prereq_statuses_confirmation" %>'
},'-',{
iconCls: 'icon_next_schedule_time',
text: '<%= t "jobs.index.next_scheduled_time" %>',
actsOn: 'one',
method: 'GET',
ajaxRequest: true,
actionUrl: '<%= next_scheduled_time_job_path(-1, :popup => "true") %>',
usePopup: false
},'-', {
iconCls: 'icon_send_event',
text: '<%=t "jobs.index.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 "jobs.index.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 "jobs.index.create_job" %>',
actsOn: 'none',
actionUrl: '<%= new_job_path(:schedule_type => Job::SAP_RUN_INTERCEPTED_JOB) %>',
usePopup: false
}]}"
url="<%= sap_run_intercepted_jobs_path(:format => 'json') %>" style="height:100%;">