Files
awx/awx/ui/static/js/lists/HomeHosts.js
Chris Houseknecht 73255eace9 Job detail page refactor / 2.0 style changes
Removed well and index from primary list pages. Job detail page cleanup. Fixed status filter on host summary list. Incresed # rows kept in memory for each list to 100. Showing unreachable host count on the play, mostly to help debugging.
2014-06-25 22:45:16 -04:00

115 lines
3.7 KiB
JavaScript

/*********************************************
* Copyright (c) 2014 AnsibleWorks, Inc.
*
* HomeHosts.js
*
* List view object for Hosts data model. Used
* on the home tab.
*
*/
'use strict';
angular.module('HomeHostListDefinition', [])
.value('HomeHostList', {
name: 'hosts',
iterator: 'host',
selectTitle: 'Add Existing Hosts',
editTitle: 'Hosts',
index: false,
hover: true,
well: true,
fields: {
status: {
label: "Status",
iconOnly: true,
icon: "{{ 'icon-job-' + host.active_failures }}",
awToolTip: "{{ host.badgeToolTip }}",
dataTitle: "{{ host.job_status_title }}",
awTipPlacement: "top",
dataPlacement: "right",
awPopOver: "{{ host.job_status_html }}",
ngClick:"bob",
columnClass: "col-md-1 col-sm-2 col-xs-3",
searchable: false,
nosort: true
},
name: {
key: true,
label: 'Name',
columnClass: 'col-lg-4 col-md3 col-sm-3 col-xs-7 ellipsis',
ngClick: "editHost(host.id)"
},
inventory_name: {
label: 'Inventory',
sourceModel: 'inventory',
sourceField: 'name',
columnClass: 'col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis',
linkTo: "{{ '/#/inventories/' + host.inventory }}"
},
enabled: {
label: 'Disabled?',
searchSingleValue: true,
searchType: 'boolean',
searchValue: 'false',
searchOnly: true
},
has_active_failures: {
label: 'Has failed jobs?',
searchSingleValue: true,
searchType: 'boolean',
searchValue: 'true',
searchOnly: true
},
has_inventory_sources: {
label: 'Has external source?',
searchSingleValue: true,
searchType: 'boolean',
searchValue: 'true',
searchOnly: true
},
id: {
label: 'ID',
searchOnly: true
}
},
fieldActions: {
enabled_flag: {
//label: 'Enabled',
iconClass: "{{ 'fa icon-enabled-' + host.enabled }}",
dataPlacement: 'top',
awToolTip: "{{ host.enabledToolTip }}",
dataTipWatch: "host.enabledToolTip",
ngClick: "toggleHostEnabled(host.id, host.has_inventory_sources)"
},
/*active_failures: {
//label: 'Job Status',
//ngHref: "\{\{'/#/hosts/' + host.id + '/job_host_summaries/?inventory=' + inventory_id \}\}",
awPopOver: "{{ host.job_status_html }}",
dataTitle: "{{ host.job_status_title }}",
awToolTip: "{{ host.badgeToolTip }}",
awTipPlacement: 'top',
dataPlacement: 'left',
iconClass: "{{ 'fa icon-failures-' + host.has_active_failures }}"
}*/
edit: {
label: 'Edit',
ngClick: "editHost(host.id)",
icon: 'icon-edit',
awToolTip: 'Edit host',
dataPlacement: 'top'
}
},
actions: {
stream: {
ngClick: "showActivity()",
awToolTip: "View Activity Stream",
mode: 'all'
}
}
});