<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %>
title="<%= @page_title + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" stateId="job_histories_focused" baseParameters="{ results: 300, job_id: '<%= params[:job_id] %>'<%= ", job_type: '" + params[:job_type] + "'" if !params[:job_type].nil? %> }" includeTagFilter="false" <% elsif (params[:agent_id] || params[:agent_group_id]) %> <% if (params[:job_status] == nil) %> advanceDateFilter="{dateField: 'server_initiated_time_utc'}" <% end %> title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" stateId="job_histories_focused" baseParameters="{ results: 300, <% if params[:agent_id] %> agent_id: '<%= params[:agent_id] %>', <% else %> agent_group_id: '<%= params[:agent_group_id] %>', <% end %> job_status: '<%= params[:job_status] %>' }" includeTagFilter="false" <% elsif params[:job_queue_id]%> <% if (params[:job_status] == nil) %> advanceDateFilter="{dateField: 'server_initiated_time_utc'}" <% end %> title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>" baseParameters="{ results: 300, <% if params[:job_queue_id] %> job_queue_id: '<%= params[:job_queue_id] %>', <% end %> <% if params[:job_status] %> job_status: '<%= params[:job_status] %>' <% end %> }" <% elsif (params[:apply_filters]) %> advanceDateFilter="{dateField: '<%= @date_filter_field %>'<%= @date %>}" includeTimedIntervalFilter = "true" stateId="job_histories_drill_in" title = "<%= t("dashboards.page_name")+' » '+t("dashboards.chart_name_#{params[:chart_id]}")+' » '+t("#{controller.controller_name}.page_title") %>" includeTagFilter="true" tagMatchAnyDefault="<%= match_any_default %>" baseParameters="{ tag: '<%= params[:tag] %>', results: 300, <% if params[:job_status] %> job_status: '<%= params[:job_status] %>' <% end %> }" <% else %> advanceDateFilter="{dateField: 'server_initiated_time_utc'}" includeTimedIntervalFilter = "true" stateId="job_historiesGrid" title = "<%= t("#{controller.controller_name}.page_title") %>" includeTagFilter="true" tagMatchAnyDefault="<%= match_any_default %>" baseParameters="{ tag: '<%= params[:tag] %>', results: 300, <% if params[:job_status] %> job_status: '<%= params[:job_status] %>' <% end %> }" <% end %> includeAutoRefresh="true" <% if (!params[:job_type].nil? && params[:job_type] == 'job_suite') %> helpUrl="<%=help_link(HELP_URL_CONFIG['history']['job_suite_history'])%>" <% elsif (!params[:job_type].nil? && params[:job_type] == 'member') %> helpUrl="<%=help_link(HELP_URL_CONFIG['history']['member_job_history'])%>" <% else %> helpUrl="<%=help_link(HELP_URL_CONFIG['history']['job_history']['job_history_manager'])%>" <% end %> refererURL="<%= @return_referer %>" restoreURLs="<%= edit_job_history_path(-1) %>, <%= job_history_path(-1) %>, <%= schedule_logs_path(-1) %>, <%= output_distribution_history_job_history_path(-1) %>, <%= edit_job_job_history_path(-1) %>, <%= edit_job_path(-1) %>, <%= edit_members_job_suite_path(-1, :cur_referrer => true ) %>, <%= edit_job_suite_path(-1) %>, <%= edit_job_suite_members_job_history_path(-1) %>, <%= job_monitor_events_job_history_path(-1) %>, <%= job_monitor_events_job_suite_path(-1) %>, <%= job_monitor_events_job_path(-1) %>, <%= job_monitor_events_member_job_path(-1) %>, <%= edit_prerequisites_job_history_path(-1) %>, <%= edit_prerequisites_job_suite_path(-1) %>, <%= edit_prerequisites_job_path(-1) %>, <%= edit_conditions_job_history_path(-1) %>, <%= edit_conditions_member_job_path(-1) %>, <%= edit_conditions_job_path(-1) %>, <%= status_notification_job_history_path(-1) %>, <%= status_notification_job_suite_path(-1) %>, <%= status_notification_member_job_path(-1) %>, <%= status_notification_job_path(-1) %>, <%= output_distribution_job_history_path(-1) %>, <%= output_distribution_job_path(-1) %>, <%= output_distribution_member_job_path(-1) %>, <%= notes_job_history_path(-1) %>, <%= job_suite_notes_path(-1) %>, <%= member_job_notes_path(-1) %>, <%= job_notes_path(-1) %>, <%= special_instance_job_history_path(-1) %>, <%= job_suite_special_instances_path(-1) %>, <%= job_special_instances_path(-1) %>, <%= forecast_schedule_job_history_path(-1) %>, <%= job_suite_forecast_schedules_path(-1) %>, <%= job_forecast_schedules_path(:job_id => -1) %>, <%= bypass_job_history_path(-1) %>, <%= dequeue_job_job_history_path(-1) %>, <%= restart_job_now_member_job_path(-1) %>, <%= restart_job_now_job_path(-1) %>, <%= restart_job_job_history_path(-1) %>" region="center" lazyRender="true" dojoType="helpsys.ext.LiveGrid" 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: 'agent_job_info'}, {name: 'job_status'}, {name: 'estimated_progress'}, {name: 'estimated_completion_time'}, {name: 'job_retry_number'}, {name: 'job_retry_next_time'}, {name: 'job_initiated_code'}, {name: 'scheduled_time_utc'}, {name: 'scheduled_time_agent'}, {name: 'server_initiated_time_utc'}, {name: 'server_ended_time_utc'}, {name: 'server_submitted_time_utc'}, {name: 'server_running_time_utc'}, {name: 'queue_ended_time_utc'}, {name: 'queued_duration'}, {name: 'running_duration'}, {name: 'duration'}, {name: 'restart_history'}, {name: 'job_priority'} ]" deletePath="<%= job_history_path(-1) %>" deleteConfirmation="<%=t ".delete_confirmation" %>" editPath="<%= edit_job_history_path(-1) %>" editInPopup="false" itemType='<%= t('common.job_history_entry') %>' gridColumns="[ {dataIndex: 'id', header: '<%=t ".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: 'job_suite_run_id', header: '<%=t ".job_suite_run_number" %>', id: 'job_historiesGridJobSuiteRunHistoryId', locked: false, sortable: true, width: 120, filter: true, filterType: 'numeric'}, {dataIndex: 'job_suite_name', header: '<%=t ".job_suite_name" %>', id: 'job_historiesGridJobSuiteName', 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: 'agent_job_info', header: '<%=t ".agent_job_info" %>', id: 'job_historiesGridAgentJobInfor', locked: false, sortable: false, width: 150, filter: false, hidden: true}, {dataIndex: 'job_status', header: '<%=t ".job_status" %>', id: 'job_historiesGridJobStatus', locked: false, sortable: true, width: 120, filter: true, filterType: 'list', filterList: <%= JobHistory.FILTER_STATUS_ALL %>}, {dataIndex: 'estimated_progress', header: '<%= t(".estimated_progress") %>', id: 'job_historiesGridEstimatedProgress', locked: false, sortable: false, width: 100, filter: false, menuDisabled: true}, {dataIndex: 'estimated_completion_time', header: '<%=t ".estimated_completion_time" %>', id: 'job_historiesGridEstimatedCompletionTime', locked: false, sortable: false, width: 150, filter: false, menuDisabled: true, hidden: true}, {dataIndex: 'job_retry_number', header: '<%= t(".job_retry_number") %>', id: 'jqeGridJobRetryNumber', locked: false, sortable: false, width: 100, menuDisabled: true}, {dataIndex: 'job_retry_next_time', header: '<%= t(".job_retry_next_time") %>', id: 'jqeGridJobRetryNextTime', locked: false, sortable: false, width: 100, menuDisabled: true}, {dataIndex: 'job_initiated_code', header: '<%=t "common.init_code" %>', id: 'job_historiesGridJobInitiationCode', locked: false, sortable: true, width: 100, filter: true, filterType: 'list', filterList: <%= JobHistory.FILTER_INITIATION_CODE_ALL %>}, {dataIndex: 'scheduled_time_utc', header: '<%=t 'common.scheduled_time' %>', id: 'job_historiesGridScheduledTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'}, {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 ".server_initiated_time" %>', id: 'job_historiesGridServerInitiatedTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'}, {dataIndex: 'server_ended_time_utc', header: '<%=t ".server_ended_time" %>', id: 'job_historiesGridServerEndedTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'}, {dataIndex: 'server_submitted_time_utc', header: '<%=t ".server_submitted_time" %>', id: 'job_historiesGridServerSubmittedTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime', hidden: true}, {dataIndex: 'server_running_time_utc', header: '<%=t ".server_running_time" %>', id: 'job_historiesGridServerRunningTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime', hidden: true}, {dataIndex: 'queue_ended_time_utc', header: '<%=t ".queue_ended_time" %>', id: 'job_historiesGridQueuedEndedTime', locked: false, sortable: true, width: 150, filter: true, filterType: 'dateTime'}, {dataIndex: 'queued_duration', header: '<%=t "common.queued_duration" %>', id: 'job_historiesGridQueuedDuration', locked: false, sortable: true, width: 150, filter: false, hidden: true}, {dataIndex: 'running_duration', header: '<%=t "common.running_duration" %>', id: 'job_historiesGridRunningDuration', locked: false, sortable: true, width: 150, filter: true, filterType: 'timeHours', hidden: true}, {dataIndex: 'duration', header: '<%=t "common.duration" %>', id: 'job_historiesGridDuration', locked: false, sortable: true, width: 150, filter: false, hidden: true}, {dataIndex: 'restart_history', header: '<%=t ".restart_history" %>', id: 'job_historiesGridRestartHistory', locked: false, sortable: true, width: 70, filter: true, filterType: 'boolean', yesText: '<%= JobHistory.YES %>', noText: '<%= JobHistory.NO %>'}, {dataIndex: 'job_priority', header: '<%=t "job.priority" %>', id: 'job_historiesGridJobPriority', locked: false, sortable: true, width: 70, filter: true, filterType: 'numeric', hidden: true} ]" includeDelete="true" includeEdit="true" includeShow="true" autoFill="false" forceFit="false" menuCfg="{items: [{ iconCls: 'icon_page', text: '<%=t ".job_history_details" %>', actsOn: 'one', actionUrl: '<%= edit_job_history_path(-1) %>', usePopup: false },{ iconCls: 'icon_search', text: '<%=t ".focus_history" %>', actsOn: 'one', actionUrl: '<%= job_history_by_job_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: 'icon_delete', text: '<%=t ".delete_job_history" %>', actsOn: 'many', method: 'DELETE', actionUrl: '<%= job_history_path(-1) %>', ajaxRequest: true, actionId: 'delete_job_history', customAction: true, confirmText: '<%=t(".delete_confirmation") %>' }, '-',{ iconCls: 'icon_schedule_log', text: '<%=t "common.server_history" %>', actsOn: 'one', actionUrl: '<%= schedule_logs_path(:job_history_id => -1) %>' }, { iconCls: 'icon_agent_joblog', text: '<%=t ".agent_joblog" %>', actsOn: 'one', customAction: true, handler: function(){controller.onAgentLog.call(controller)} }, { iconCls: 'icon_output_distribution_history', text: '<%=t "common.output_distribution_history" %>', actsOn: 'one', actionUrl: '<%= output_distribution_history_job_history_path(-1) %>' }, '-',{ iconCls: 'icon_edit', text: '<%=t "jobs.index.edit_job" %>', menu: { items: [{ iconCls: '', text: '<%=t "jobs.index.edit_job_submenu" %>', actsOn: 'one', actionUrl: '<%= edit_job_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%=t "job_suites.index.edit_job_suite_members" %>', actsOn: 'one', actionUrl: '<%= edit_job_suite_members_job_history_path("\#{job_id}", :cur_referrer => true) %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.edit_job_monitor" %>', actsOn: 'one', actionUrl: '<%= job_monitor_events_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.prerequisites" %>', actsOn: 'one', actionUrl: '<%= edit_prerequisites_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.conditions" %>', actsOn: 'one', actionUrl: '<%= edit_conditions_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.status_notification" %>', actsOn: 'one', actionUrl: '<%= status_notification_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.output_distribution" %>', actsOn: 'one', actionUrl: '<%= output_distribution_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "jobs.index.note" %>', actsOn: 'one', actionUrl: '<%= notes_job_history_path("\#{job_id}") %>', usePopup: false },{ iconCls: '', text: '<%= t "common.job_params" %>', actsOn: 'one', actionUrl: '<%= job_parameters_job_history_path("\#{job_id}") %>', usePopup: false },'-',{ iconCls: '', text: '<%=t "common.special_instances" %>', actsOn: 'one', actionUrl: '<%= special_instance_job_history_path(-1) %>', usePopup: false },'-',{ iconCls: 'icon_forecast_schedule', text: '<%=t "common.forecast_schedule" %>', actsOn: 'one', actionUrl: '<%= forecast_schedule_job_history_path(-1) %>', usePopup: false }] } }, '-',{ iconCls: 'icon_do_job_now', text: '<%= t(".do_job_now") %>', actsOn: 'one', customAction: true, method: 'POST', confirmText: '<%=t("job_queue_entries.do_job_now.confirmation") %>', actionUrl: '<%= bypass_job_history_path(-1) %>', ajaxRequest: true, id: 'do_job_menu_id' }, { iconCls: 'icon_jobq_end_job', text: '<%= t(".end_job") %>', menu: { items: [ { iconCls: 'icon-job-history-complete', actsOn: 'many', actionUrl: '<%= dequeue_job_job_history_path("\#{job_id}", :end_option => JobQueueEntry::END_JOB_COMPLETED, :job_history_id => "\#{id}", :job_id => "\#{job_id}") %>', ajaxRequest: true, customAction: true, method: 'POST', text: '<%=t "job_history.job_status.completed" %>', actionId: 'end_job', value: <%= JobQueueEntry::END_JOB_COMPLETED %>, usePopup: false, confirmText: '<%=t("common.end_job_confirmation", :status => t("job_history.job_status.completed")) %>', multipleConfirmText: '<%=t("common.end_multiple_job_confirmation", :status => t("job_history.job_status.completed")) %>' }, {iconCls: 'icon-job-history-canceled', actsOn: 'many', actionUrl: '<%= dequeue_job_job_history_path("\#{job_id}", :end_option => JobQueueEntry::END_JOB_CANCELED, :job_history_id => "\#{id}", :job_id => "\#{job_id}") %>', ajaxRequest: true, customAction: true, method: 'POST', text: '<%=t "job_histories.end_options.cancelled" %>', actionId: 'end_job', value: <%= JobQueueEntry::END_JOB_CANCELED %>, usePopup: false, 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")) %>' }, {iconCls: 'icon-job-history-failed', actsOn: 'many', actionUrl: '<%= dequeue_job_job_history_path("\#{job_id}", :end_option => JobQueueEntry::END_JOB_FAILED, :job_history_id => "\#{id}", :job_id => "\#{job_id}") %>', ajaxRequest: true, customAction: true, method: 'POST', text: '<%=t "job_histories.end_options.failed" %>', actionId: 'end_job', value: <%= JobQueueEntry::END_JOB_FAILED %>, usePopup: false, 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")) %>' } ] } },{ iconCls: 'icon_restart', text: '<%=t ".restart_job" %>', actsOn: 'one', actionId: 'restart_job', actionUrl: '<%= restart_job_job_history_path(-1) %>', usePopup: true } ]}" predefinedFilters="{ filters: [{ name: '<%= t("job_histories.filter_active") %>', filter: [{ key: 'job_status', value: ['R', 'S', 'W', 'H', 'V', 'X'] }] },{ name: '<%= t("job_histories.filter_comp_and_failed") %>', filter: [{ key: 'job_status', value: ['C', 'A', 'F', 'E'] }] },{ name: '<%= t("job_histories.filter_and_error") %>', filter: [{ key: 'job_status', value: ['E', 'F'] }] }] }" sortField="{field: 'id', direction: 'DESC'}" tbar="{items: []}" <% if params[:skipped] %> url="<%= job_histories_path(:format => 'json', :skipped => true) %>"> <% else %> url="<%= job_histories_path(:format => 'json') %>"> <% end %>