diff --git a/awx/ui/client/src/configuration/configuration.controller.js b/awx/ui/client/src/configuration/configuration.controller.js index 33056ec486..66f08942a9 100644 --- a/awx/ui/client/src/configuration/configuration.controller.js +++ b/awx/ui/client/src/configuration/configuration.controller.js @@ -66,7 +66,17 @@ export default [ ConfigurationService.getCurrentValues() .then(function(data) { var currentKeys = _.keys(data); + $scope.requiredLogValues = {}; _.each(currentKeys, function(key) { + + if(key === "LOG_AGGREGATOR_HOST") { + $scope.requiredLogValues.LOG_AGGREGATOR_HOST = data[key]; + } + + if(key === "LOG_AGGREGATOR_TYPE") { + $scope.requiredLogValues.LOG_AGGREGATOR_TYPE = data[key]; + } + if (data[key] !== null && typeof data[key] === 'object') { if (Array.isArray(data[key])) { //handle arrays @@ -301,6 +311,11 @@ export default [ ConfigurationService.patchConfiguration(payload) .then(function() { $scope[key] = $scope.configDataResolve[key].default; + + if(key === "LOG_AGGREGATOR_HOST" || key === "LOG_AGGREGATOR_TYPE") { + $scope.requiredLogValues[key] = $scope.configDataResolve[key].default; + } + if($scope[key + '_field'].type === "select"){ // We need to re-instantiate the Select2 element // after resetting the value. Example: @@ -410,6 +425,10 @@ export default [ ConfigurationService.patchConfiguration(getFormPayload()) .then(function(data) { loginUpdate(); + + $scope.requiredLogValues.LOG_AGGREGATOR_HOST = $scope.LOG_AGGREGATOR_HOST; + $scope.requiredLogValues.LOG_AGGREGATOR_TYPE = $scope.LOG_AGGREGATOR_TYPE; + saveDeferred.resolve(data); $scope[formTracker.currentFormName()].$setPristine(); }) diff --git a/awx/ui/client/src/configuration/system-form/configuration-system.partial.html b/awx/ui/client/src/configuration/system-form/configuration-system.partial.html index 0b039e761b..0e45b5cd1e 100644 --- a/awx/ui/client/src/configuration/system-form/configuration-system.partial.html +++ b/awx/ui/client/src/configuration/system-form/configuration-system.partial.html @@ -25,6 +25,20 @@