mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Host enabled flag is now a checkbox rather than a radio button on the Hosts add/dit dialog.
This commit is contained in:
@@ -41,14 +41,10 @@ angular.module('HostFormDefinition', [])
|
|||||||
},
|
},
|
||||||
enabled: {
|
enabled: {
|
||||||
label: 'Enabled?',
|
label: 'Enabled?',
|
||||||
type: 'radio',
|
type: 'checkbox',
|
||||||
addRequired: false,
|
addRequired: false,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
options: [
|
"default": true,
|
||||||
{ 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 " +
|
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>",
|
"are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.</p>",
|
||||||
dataTitle: 'Host Enabled',
|
dataTitle: 'Host Enabled',
|
||||||
|
|||||||
@@ -242,8 +242,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
|||||||
data['variables'] = JSON.stringify(json_data, undefined, '\t');
|
data['variables'] = JSON.stringify(json_data, undefined, '\t');
|
||||||
}
|
}
|
||||||
|
|
||||||
data['enabled'] = (scope['enabled'] == "true") ? true : false;
|
|
||||||
|
|
||||||
Rest.setUrl(defaultUrl);
|
Rest.setUrl(defaultUrl);
|
||||||
Rest.post(data)
|
Rest.post(data)
|
||||||
.success( function(data, status, headers, config) {
|
.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 };
|
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.variable_url = data.related.variable_data;
|
||||||
scope.$emit('hostLoaded');
|
scope.$emit('hostLoaded');
|
||||||
})
|
})
|
||||||
@@ -408,8 +404,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
|||||||
data['variables'] = JSON.stringify(json_data, undefined, '\t');
|
data['variables'] = JSON.stringify(json_data, undefined, '\t');
|
||||||
}
|
}
|
||||||
|
|
||||||
data['enabled'] = (scope['enabled'] == "true") ? true : false;
|
|
||||||
|
|
||||||
Rest.setUrl(defaultUrl);
|
Rest.setUrl(defaultUrl);
|
||||||
Rest.put(data)
|
Rest.put(data)
|
||||||
.success( function(data, status, headers, config) {
|
.success( function(data, status, headers, config) {
|
||||||
|
|||||||
Reference in New Issue
Block a user