%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2013 %>
title="<%= t("#{controller.controller_name}.page_title") + ' » ' + "#{@PAGE_TITLE_LIMIT}" %>"
<% else %>
title="<%= t("#{controller.controller_name}.page_title") %>"
<% end %>
helpUrl="<%=help_link(HELP_URL_CONFIG['scheduling_objects']['remote_servers']['remote_dependencies_list'])%>"
region="center"
forceFit="false"
lazyRender="true"
dojoType="helpsys.ext.LiveGrid"
baseParameters="{
remote_server_id: <%= params[:remote_server_id] %>,
<% if params[:prereq_object_id] %>
prereq_object_id: '<%= params[:prereq_object_id] %>',
<% end %>
tag: '<%= params[:tag] %>'
}"
authenticity_token="<%= form_authenticity_token %>"
autoExpandColumn="remote_dependenciesGridDescription"
dataColumns="[{name: 'id'}, {name: 'automate_schedule_object'}, {name: 'description'}, {name: 'object_type'}, {name: 'user_job_name'}]"
deletePath="<%= remote_server_remote_dependency_path(params[:remote_server_id], -1) %>"
deleteConfirmation='<%=t ".delete_confirmation" %>'
editPath="<%= edit_remote_server_remote_dependency_path(params[:remote_server_id], -1) %>"
editInPopup="false"
itemType='<%= t('common.remote_dependency') %>'
gridColumns="[
{ dataIndex: 'automate_schedule_object', header: '<%= t('remote_dependencies.index.automate_schedule_object') %>', id: 'remote_dependenciesGridAutomateScheduleObject', locked: false, sortable: true, width: 200, filter: true, filterType: 'string', hidden: false, hideable: false},
{ dataIndex: 'description', header: '<%= t('remote_dependencies.index.description') %>', id: 'remote_dependenciesGridDescription', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{ dataIndex: 'object_type', header: '<%= t('remote_dependencies.index.object_type') %>', id: 'remote_dependenciesGridObjectType', locked: false, sortable: true, width: 100, filter: true, filterType: 'list', filterList: <%= remote_server_type == RemoteServer::AUTOMATE_SCHEDULE_SERVER_TYPE ? RemoteEvent.FILTER_AUTOMATE_EVENT_TYPES : RemoteDependency.FILTER_PREREQ_OBJECT_TYPE %>}
<% unless remote_server_type == RemoteServer::AUTOMATE_SCHEDULE_SERVER_TYPE %>
,{ dataIndex: 'user_job_name', hideable: true, header: '<%= t('remote_dependencies.index.user_job_name') %>', id: 'remote_dependenciesGridUserJobName', locked: false, sortable: true, fixed:true, width: 150, filter: true, filterType: 'string'}
<% end %>
]"
includeDelete="true"
includeEdit="<%= @view_dependency%>"
includeShow="<%= @view_dependency%>"
includeTagFilter="true"
tagMatchAnyDefault="<%= match_any_default %>"
menuCfg="{items: [
<% unless remote_server_type == RemoteServer::AUTOMATE_SCHEDULE_SERVER_TYPE %>
{
iconCls: 'icon_edit',
text: '<%= t('.edit_remote_dependency') %>',
actsOn: 'one',
actionUrl: '<%= edit_remote_server_remote_dependency_path(params[:remote_server_id], -1) %>',
keepMask: true
},
<% end %>
{
iconCls: 'icon_delete',
text: '<%= t('.delete_remote_dependency') %>',
actsOn: 'one',
method: 'DELETE',
actionUrl: '<%= remote_server_remote_dependency_path(params[:remote_server_id], -1) %>',
ajaxRequest: true,
confirmText: '<%=t ".delete_confirmation" %>'
},{
iconCls: 'icon_job_history',
text: '<%= t('.remote_notification_history') %>',
actsOn: 'one',
actionUrl: '<%= remote_notification_histories_path(:remote_dependency_id => -1) %>'
}]}"
sortField="{field: 'id', direction: 'ASC'}"
tbar="{items: [
<% unless remote_server_type == RemoteServer::AUTOMATE_SCHEDULE_SERVER_TYPE %>
{
iconCls: 'icon_create',
text: '<%= t('.create_remote_dependency') %>',
actsOn: 'none',
actionUrl: '<%= new_remote_server_remote_dependency_path(params[:remote_server_id]) %>'
}
<% end %>
]}"
url="<%= remote_server_remote_dependencies_path(params[:remote_server_id], :format => 'json') %>" style="height:100%;">