%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2012 %>
title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>"
stateId="sap_intercepted_jobsGrid"
baseParameters="{
results: 300,
job_id: '<%= params[:job_id] %>',
tag: '<%= params[:tag] %>'
}"
includeTagFilter="false"
<% else %>
title="<%= t("#{controller.controller_name}.page_title") %>"
baseParameters="{
results: 300,
tag: '<%= params[:tag] %>'
}"
includeTagFilter="true"
tagMatchAnyDefault="<%= match_any_default %>"
advanceDateFilter="{dateField: 'planned_start_utc'}"
<% end %>
includeAutoRefresh="true"
helpUrl="<%=help_link(HELP_URL_CONFIG['sap']['intercepted']['home'])%>"
dojoType="helpsys.ext.LiveGrid"
authenticity_token="<%= form_authenticity_token %>"
dataColumns="[{name: 'id'}, {name: 'job_name_from_sap'}, {name: 'job_count_from_sap'},{name: 'job_owner_from_sap'}, {name: 'sap_system_definition'}, {name: 'job_client_from_sap'}, {name: 'planned_start_utc'}, {name: 'job'}, {name: 'agent'}, {name: 'scheduled_release_utc'}, {name: 'job_history_id'}, {name: 'skybot_job_status'}]"
deletePath="<%= sap_intercepted_job_path(-1) %>"
editInPopup="false"
deleteConfirmation='<%=t ".cancel_confirmation" %>'
itemType='<%= t('common.sap_intercepted_job') %>'
gridColumns="[
{dataIndex: 'job_name_from_sap', header: '<%= t('.job_name_from_sap') %>', id: 'sap_intercepted_jobsGridJobNameFromSAP', locked: false, sortable: true, width: 160, filter: true, filterType: 'string'},
<%# COUNT IS A STRING FIELD TO ALLOW THE SORT TO WORK NICER FOR THE USER. OTHERWISE THEY WOULD NEED TO ENTER 14000000 TO GET THE 14* RECORDS. %>
{dataIndex: 'job_count_from_sap', header: '<%= t('.job_count_from_sap') %>', id: 'sap_intercepted_jobsGridSAPJobCount', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'job_owner_from_sap', header: '<%= t('.job_owner_from_sap') %>', id: 'sap_intercepted_jobsGridJobOwnerFromSAP', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'sap_system_definition', header: '<%= t('.sap_system_definition') %>', id: 'sap_intercepted_jobsSAPSystemDefinition', locked: false, sortable: true, width: 160, filter: true, filterType: 'string'},
{dataIndex: 'job_client_from_sap', header: '<%= t('.job_client_from_sap') %>', id: 'sap_intercepted_jobsGridJobClientFromSAP', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'planned_start_utc', header: '<%= t('.planned_start_from_sap') %>', id: 'sap_intercepted_jobsGridPlannedStart', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'},
{dataIndex: 'job', header: '<%= t('.automate_job') %>', id: 'sap_intercepted_jobsGridSkybotJob', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'agent', header: '<%= t('.automate_agent') %>', id: 'sap_intercepted_jobsGridSkybotAgent', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'scheduled_release_utc', header: '<%= t('.scheduled_release') %>', id: 'sap_intercepted_jobsGridScheduledRelease', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'},
{dataIndex: 'job_history_id', header: '<%= t('.job_history_id') %>', id: 'sap_intercepted_jobsGridJobHistoryID', locked: false, sortable: true, width: 100, filter: true, filterType: 'numeric'},
{dataIndex: 'skybot_job_status', header: '<%= t('.automate_job_status') %>', id: 'sap_intercepted_jobsGridSkybotJobStatus', locked: false, sortable: true, width: 200, filter: true, filterType: 'list', filterList: <%= JobHistory.FILTER_STATUS_SAP_INTERCEPTED_JOB %>}
]"
includeDelete="true"
includeEdit="false"
includeShow="false"
autoFill="false"
forceFit="false"
menuCfg="{items: [{
iconCls: 'icon_create',
text: '<%= t('.create_run_intercept_automate_job') %>',
actsOn: 'one',
actionUrl: '<%= new_job_path( :sap_intercepted_job_id => -1 ) %>'
},{
iconCls: 'icon_search',
text: '<%=t ".focus_history" %>',
actsOn: 'one',
actionUrl: '<%= job_history_by_job_sap_intercepted_job_path(-1) %>',
usePopup: false
},{
iconCls: 'icon_delete',
text: '<%= t('.delete_intercepted_history') %>',
actsOn: 'many',
method: 'DELETE',
actionUrl: '<%= sap_intercepted_job_path(-1) %>',
ajaxRequest: true,
actionId: 'delete_sap_intercepted_job',
customAction: true,
confirmText: '<%=t ".cancel_confirmation" %>'
}]}"
sortField="{field: 'job_name_from_sap', direction: 'ASC'}"
tbar="{items: []}"
url="<%= sap_intercepted_jobs_path(:format => 'json') %>" style="height:100%;">