mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 18:31:47 -05:00
76 lines
2.7 KiB
JavaScript
76 lines
2.7 KiB
JavaScript
/*************************************************
|
|
* Copyright (c) 2015 Ansible, Inc.
|
|
*
|
|
* All Rights Reserved
|
|
*************************************************/
|
|
|
|
|
|
export default [ 'i18n', function(i18n){
|
|
return {
|
|
name: 'hosts',
|
|
iterator: 'host',
|
|
selectTitle: i18n._('Add Existing Hosts'),
|
|
editTitle: i18n._('HOSTS'),
|
|
listTitle: i18n._('HOSTS'),
|
|
index: false,
|
|
hover: true,
|
|
well: true,
|
|
emptyListText: i18n._('NO HOSTS FOUND'),
|
|
fields: {
|
|
status: {
|
|
basePath: 'unified_jobs',
|
|
label: '',
|
|
iconOnly: true,
|
|
nosort: true,
|
|
icon: 'icon-job-{{ host.active_failures }}',
|
|
awToolTip: '{{ host.badgeToolTip }}',
|
|
awTipPlacement: 'right',
|
|
dataPlacement: 'right',
|
|
awPopOver: '{{ host.job_status_html }}',
|
|
dataTitle: '{{host.job_status_title}}',
|
|
ngClick:'viewHost(host.id)',
|
|
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumn--smallStatus'
|
|
},
|
|
name: {
|
|
key: true,
|
|
label: i18n._('Name'),
|
|
columnClass: 'col-lg-5 col-md-5 col-sm-5 col-xs-8 ellipsis List-staticColumnAdjacent',
|
|
ngClick: 'editHost(host.id)'
|
|
},
|
|
inventory_name: {
|
|
label: i18n._('Inventory'),
|
|
sourceModel: 'inventory',
|
|
sourceField: 'name',
|
|
columnClass: 'col-lg-5 col-md-4 col-sm-4 hidden-xs elllipsis',
|
|
linkTo: "{{ '/#/inventories/' + host.inventory_id }}"
|
|
},
|
|
enabled: {
|
|
label: i18n._('Status'),
|
|
columnClass: 'List-staticColumn--toggle',
|
|
type: 'toggle',
|
|
ngClick: 'toggleHostEnabled(host)',
|
|
nosort: true,
|
|
awToolTip: "<p>" + i18n._("Indicates if a host is available and should be included in running jobs.") + "</p><p>" + i18n._("For hosts that are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.") + "</p>",
|
|
dataTitle: i18n._('Host Enabled'),
|
|
ngDisabled: 'host.has_inventory_sources'
|
|
}
|
|
},
|
|
|
|
fieldActions: {
|
|
|
|
columnClass: 'col-lg-2 col-md-3 col-sm-3 col-xs-4',
|
|
edit: {
|
|
label: i18n._('Edit'),
|
|
ngClick: 'editHost(host.id)',
|
|
icon: 'icon-edit',
|
|
awToolTip: i18n._('Edit host'),
|
|
dataPlacement: 'top'
|
|
}
|
|
},
|
|
|
|
actions: {
|
|
|
|
}
|
|
};
|
|
}];
|