From 925016d556ba7fa93e85de4da21833a5d9e71de7 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Tue, 19 Nov 2013 09:27:39 +0000 Subject: [PATCH] Host enabled flag is now a checkbox rather than a radio button on the Hosts add/dit dialog. --- awx/ui/static/js/forms/Hosts.js | 8 ++------ awx/ui/static/js/helpers/Hosts.js | 6 ------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/awx/ui/static/js/forms/Hosts.js b/awx/ui/static/js/forms/Hosts.js index 378230e1b9..e5086055d6 100644 --- a/awx/ui/static/js/forms/Hosts.js +++ b/awx/ui/static/js/forms/Hosts.js @@ -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: "

Indicates if a host is available and should be included in running jobs.

For hosts that " + "are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.

", dataTitle: 'Host Enabled', diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js index 0f476db130..b1d3dec0ff 100644 --- a/awx/ui/static/js/helpers/Hosts.js +++ b/awx/ui/static/js/helpers/Hosts.js @@ -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) {