Files
awx/awx/ui/static/js/lists/JobHosts.js

89 lines
2.5 KiB
JavaScript

/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* JobHosts.js
* List view object for Job Host Summary data model.
*
*
*/
angular.module('JobHostDefinition', [])
.value(
'JobHostList', {
name: 'jobhosts',
iterator: 'jobhost',
editTitle: 'Job Host Summary',
index: true,
hover: true,
fields: {
host: {
label: 'Host',
key: true,
sourceModel: 'host',
sourceField: 'name',
ngBind: 'jobhost.host_name',
ngClick:"showEvents('\{\{ jobhost.summary_fields.host.name \}\}','\{\{ jobhost.related.job \}\}')"
},
status: {
label: 'Status',
icon: 'icon-circle',
"class": 'job-\{\{ jobhost.status \}\}',
searchField: 'failed',
searchType: 'boolean',
searchOptions: [{ name: "success", value: 0 }, { name: "error", value: 1 }]
},
ok: {
label: 'Success',
searchable: false
},
changed: {
label: 'Changed',
searchable: false
},
failures: {
label: 'Failure',
searchType: 'gtzero'
},
dark: {
label: 'Unreachable',
searchable: false
},
skipped: {
label: 'Skipped',
searchable: false
}
},
actions: {
refresh: {
label: 'Refresh',
icon: 'icon-refresh',
ngClick: "refresh()",
"class": 'btn-success btn-small',
awToolTip: 'Refresh the page',
mode: 'all'
},
edit: {
label: 'Details',
icon: 'icon-edit',
ngClick: "jobDetails()",
"class": 'btn btn-small',
awToolTip: 'Edit job details',
mode: 'all'
},
events: {
label: 'Events',
icon: 'icon-list-ul',
ngClick: "jobEvents()",
"class": 'btn btn-small',
awToolTip: 'View job events',
mode: 'all'
}
},
fieldActions: {
}
});