%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %>
"
helpUrl="<%=help_link(HELP_URL_CONFIG['server']['manage_missed_jobs'])%>"
region="center"
lazyRender="true"
dojoType="helpsys.ext.LiveGrid"
baseParameters="{
tag: '<%= params[:tag] %>'
}"
authenticity_token="<%= form_authenticity_token %>"
dataColumns="[
{name: 'id'},
{name: 'job'},
{name: 'job_id'},
{name: 'job_suite_run_id'},
{name: 'job_suite_name'},
{name: 'agent'},
{name: 'agent_group_name'},
{name: 'job_queue_name'},
{name: 'scheduled_time_utc'},
{name: 'scheduled_time_agent'},
{name: 'server_initiated_time_utc'},
{name: 'server_submitted_time_utc'}]"
deletePath="<%= managed_job_history_path(-1) %>"
editPath="<%= edit_job_history_path(-1) %>"
editInPopup="false"
itemType='<%= t('common.job_history_entry') %>'
gridColumns="[
{dataIndex: 'id', header: '<%=t "common.run_number" %>', id: 'job_historiesGridRunHistoryId', locked: false, sortable: true, width: 100, filter: true, filterType: 'numeric'},
{dataIndex: 'job', header: '<%=t "common.name" %>', id: 'job_historiesGridJobName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'agent', header: '<%=t "common.agent" %>', id: 'job_historiesGridAgentName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'agent_group_name', header: '<%=t "common.agent_group" %>', id: 'job_historiesGridAgentGroupName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'job_queue_name', header: '<%=t "common.queue" %>', id: 'job_historiesGridJobQueueName', locked: false, sortable: true, width: 150, filter: true, filterType: 'string'},
{dataIndex: 'scheduled_time_utc', header: '<%=t "common.scheduled_time" %>', id: 'job_historiesGridServerScheduledTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'date'},
{dataIndex: 'scheduled_time_agent', header: '<%= t 'common.sched_time' %>', id: 'job_historiesGridServerAgentScheduledTime', locked: false, sortable: false, width: 150, filter: false, hidden: true},
{dataIndex: 'server_initiated_time_utc', header: '<%=t "common.server_initiated_time" %>', id: 'job_historiesGridServerInitiatedTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'date'}
]"
includeDelete="true"
includeEdit="true"
includeShow="true"
includeTagFilter="true"
tagMatchAnyDefault="<%= match_any_default %>"
autoFill="false"
forceFit="false"
tbar="{items: [{
cls: '',
text: '<%= t("scheduler_control.index.status_label") + " " + @scheduler_control.status %>',
actsOn: 'none',
xtype: 'tbtext',
usePopup: false
}, {
xtype: 'tbseparator'
}]}"
menuCfg="{items: [{
iconCls: 'icon_page',
text: '<%=t ".job_history_details" %>',
actsOn: 'one',
actionUrl: '<%= edit_job_history_path(-1) %>',
usePopup: false
}, {
iconCls: 'icon_delete',
text: '<%=t ".delete_job_history" %>',
actsOn: 'many',
method: 'DELETE',
actionUrl: '<%= managed_job_history_path(-1) %>',
actionId: 'delete_job',
ajaxRequest: true,
customAction: true,
confirmText: '<%=t ".delete_confirmation" %>',
listeners: {
click: function(m, mIt) {
var selRows = m.scope.grid.getSelectionModel().getSelections();
if (selRows.length == 1) {
m.confirmText = String.format(helpsys.locale.managed_job_histories.index.delete_confirmation, selRows[0].id);
}
}
}
}, '-', {
iconCls: 'icon_start',
text: '<%=t ".start_job" %>',
actsOn: 'many',
customAction: true,
method: 'POST',
actionUrl: '<%= start_managed_job_job_history_path(-1) %>',
actionId: 'start_job',
usePopup: true
}, {
iconCls: 'icon_jobq_end_job',
text: '<%= t(".end_job") %>',
menu: {
items: [
{ iconCls: 'icon-job-history-complete',
actsOn: 'many',
actionUrl: '<%= end_managed_job_job_history_path(-1, :end_option => JobQueueEntry::END_JOB_COMPLETED) %>',
ajaxRequest: true,
customAction: true,
method: 'POST',
text: '<%=t "job_history.job_status.completed" %>',
actionId: 'end_job',
value: <%= JobQueueEntry::END_JOB_COMPLETED %>,
confirmText: '<%=t("common.end_job_confirmation", :status => t("job_histories.end_options.completed")) %>',
multipleConfirmText: '<%=t("common.end_multiple_job_confirmation", :status => t("job_history.job_status.completed")) %>',
usePopup: false,
listeners: {
click: function(m, mIt) {
var selRows = m.scope.grid.getSelectionModel().getSelections();
if (selRows.length == 1) {
m.confirmText = String.format(helpsys.locale.managed_job_histories.index.end_as_completed_confirmation, selRows[0].id);
}
}
}
}, {iconCls: 'icon-job-history-canceled',
actsOn: 'many',
actionUrl: '<%= end_managed_job_job_history_path(-1, :end_option => JobQueueEntry::END_JOB_CANCELED) %>',
ajaxRequest: true,
customAction: true,
method: 'POST',
text: '<%=t "job_histories.end_options.cancelled" %>',
actionId: 'end_job',
value: <%= JobQueueEntry::END_JOB_CANCELED %>,
confirmText: '<%=t("common.end_job_confirmation", :status => t("job_histories.end_options.cancelled")) %>',
multipleConfirmText: '<%=t("common.end_multiple_job_confirmation", :status => t("job_histories.end_options.cancelled")) %>',
usePopup: false,
listeners: {
click: function(m, mIt) {
var selRows = m.scope.grid.getSelectionModel().getSelections();
if (selRows.length == 1) {
m.confirmText = String.format(helpsys.locale.managed_job_histories.index.end_as_canceled_confirmation, selRows[0].id);
}
}
}
}, {iconCls: 'icon-job-history-failed',
actsOn: 'many',
actionUrl: '<%= end_managed_job_job_history_path(-1, :end_option => JobQueueEntry::END_JOB_FAILED) %>',
ajaxRequest: true,
customAction: true,
method: 'POST',
text: '<%=t "job_histories.end_options.failed" %>',
actionId: 'end_job',
value: <%= JobQueueEntry::END_JOB_FAILED %>,
confirmText: '<%=t("common.end_job_confirmation", :status => t("job_histories.end_options.failed")) %>',
multipleConfirmText: '<%=t("common.end_multiple_job_confirmation", :status => t("job_histories.end_options.failed")) %>',
usePopup: false,
listeners: {
click: function(m, mIt) {
var selRows = m.scope.grid.getSelectionModel().getSelections();
if (selRows.length == 1) {
m.confirmText = String.format(helpsys.locale.managed_job_histories.index.end_as_failed_confirmation, selRows[0].id);
}
}
}
}
]
}
}
]}"
pageSize="1000"
nearLimit="500"
sortField="{field: 'id', direction: 'DESC'}"
url="<%= managed_job_histories_path(:format => 'json') %>">