Host enabled flag is now a checkbox rather than a radio button on the Hosts add/dit dialog.

This commit is contained in:
Chris Houseknecht 2013-11-19 09:27:39 +00:00
parent e2209ce3bd
commit 925016d556
2 changed files with 2 additions and 12 deletions

View File

@ -41,14 +41,10 @@ angular.module('HostFormDefinition', [])
},
enabled: {
label: 'Enabled?',
type: 'radio',
type: 'checkbox',
addRequired: false,
editRequired: false,
options: [
{ label: 'Yes', value: 'true'},
{ label: 'No', value: 'false' }
],
"default": "true",
"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',

View File

@ -242,8 +242,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
data['variables'] = JSON.stringify(json_data, undefined, '\t');
}
data['enabled'] = (scope['enabled'] == "true") ? true : false;
Rest.setUrl(defaultUrl);
Rest.post(data)
.success( function(data, status, headers, config) {
@ -354,8 +352,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
relatedSets[set] = { url: related[set], iterator: form.related[set].iterator };
}
}
scope['enabled'] = (data['enabled']) ? "true" : "false";
master['enabled'] = scope['enabled'];
scope.variable_url = data.related.variable_data;
scope.$emit('hostLoaded');
})
@ -408,8 +404,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
data['variables'] = JSON.stringify(json_data, undefined, '\t');
}
data['enabled'] = (scope['enabled'] == "true") ? true : false;
Rest.setUrl(defaultUrl);
Rest.put(data)
.success( function(data, status, headers, config) {