AC-570 Added host enabled flag on Hosts page, allowing one-click editing for manually managed hosts. Fixed one more bug with prepending '*' to labels of required fileds.

This commit is contained in:
Chris Houseknecht
2013-11-06 08:09:02 +00:00
parent 1497d128f3
commit 49a8de4efe
7 changed files with 130 additions and 53 deletions

View File

@@ -39,10 +39,22 @@ angular.module('HostFormDefinition', [])
addRequired: false,
editRequired: false
},
inventory: {
type: 'hidden',
includeOnEdit: true,
includeOnAdd: true
enabled: {
label: 'Enabled?',
type: 'radio',
addRequired: false,
editRequired: false,
options: [
{ label: 'Yes', value: 'true'},
{ label: 'No', value: 'false' }
],
"default": "true",
awPopOver: "<p>Indicates if a host is available and should be included in running jobs.</p><p>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: 'Host Enabled',
dataPlacement: 'right',
dataContainer: '#form-modal .modal-content',
ngDisabled: 'has_inventory_sources == true'
},
variables: {
label: 'Variables',
@@ -62,6 +74,11 @@ angular.module('HostFormDefinition', [])
dataTitle: 'Host Variables',
dataPlacement: 'right',
dataContainer: '#form-modal .modal-content'
},
inventory: {
type: 'hidden',
includeOnEdit: true,
includeOnAdd: true
}
},

View File

@@ -34,19 +34,16 @@ angular.module('InventoryHostsFormDefinition', [])
searchable: false,
nosort: true
},
/*inventory_sources: {
label: 'External<br>Source?',
ngHref: "\{\{ host.has_inv_source_link \}\}",
badgeNgHref: "\{\{ host.has_inv_source_link \}\}",
badgeIcon: "\{\{ 'icon-cloud-' + host.has_inventory_sources \}\}",
enabled_flag: {
label: 'Enabled',
badgeIcon: "\{\{ 'icon-enabled-' + host.enabled \}\}",
badgePlacement: 'left',
badgeToolTip: "\{\{ host.has_inv_source_tip \}\}",
awToolTip: "\{\{ host.has_inv_source_tip \}\}",
dataPlacement: 'top',
badgeTipPlacement: 'top',
badgeToolTip: "\{\{ host.enabledToolTip \}\}",
badgeTipPlacement: "top",
ngClick: "toggle_host_enabled(\{\{ host.id \}\}, \{\{ host.has_inventory_sources \}\})",
searchable: false,
nosort: true
},*/
showValue: false
},
groups: {
label: 'Groups',
searchable: true,
@@ -54,6 +51,13 @@ angular.module('InventoryHostsFormDefinition', [])
sourceField: 'name',
nosort: true
},
enabled: {
label: 'Disabled?',
searchSingleValue: true,
searchType: 'boolean',
searchValue: 'false',
searchOnly: true
},
has_active_failures: {
label: 'Has failed jobs?',
searchSingleValue: true,
@@ -108,7 +112,7 @@ angular.module('InventoryHostsFormDefinition', [])
type: 'DropDown',
label: 'Jobs',
icon: 'icon-zoom-in',
"class": "btn-default btn-sm",
"class": "btn-default btn-xs",
options: [
{ ngClick: "allJobs(\{\{ host.id \}\})", label: 'All', ngShow: 'host.last_job' },
{ ngClick: "allHostSummaries(\{\{ host.id \}\},'\{\{ host.name \}\}', \{\{ inventory_id \}\})", label: 'All summaries',
@@ -125,7 +129,7 @@ angular.module('InventoryHostsFormDefinition', [])
"delete": {
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-trash',
"class": 'btn-sm btn-danger',
"class": 'btn-xs btn-danger',
awToolTip: 'Delete host'
}
}