1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

fix ctit logging toggle from being showed for log types other than https

This commit is contained in:
John Mitchell 2017-09-05 12:29:07 -04:00
parent 6f96df6bbb
commit 86a6e5ee63
3 changed files with 9 additions and 5 deletions

View File

@ -394,7 +394,9 @@ export default [
// Default AD_HOC_COMMANDS to an empty list
payload[key] = $scope[key].value || [];
} else {
payload[key] = $scope[key].value;
if ($scope[key]) {
payload[key] = $scope[key].value;
}
}
}
} else if($scope.configDataResolve[key].type === 'list' && $scope[key] !== null) {

View File

@ -62,7 +62,8 @@
disableChooseOption: true
},
LOG_AGGREGATOR_VERIFY_CERT: {
type: 'toggleSwitch'
type: 'toggleSwitch',
ngShow: 'LOG_AGGREGATOR_PROTOCOL.value === "https"'
}
},

View File

@ -762,9 +762,10 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += label(labelOptions);
html += `<div class="ScheduleToggle" ng-class="{'is-on': ${field.toggleSource}, 'ScheduleToggle--disabled': ${field.ngDisabled}}" aw-tool-tip=""
data-placement="top">
<button ng-show="${field.toggleSource}" class="ScheduleToggle-switch is-on" ng-click="toggleForm('${field.toggleSource}')"
html += `<div class="ScheduleToggle" ng-class="{'is-on': ${field.toggleSource}, 'ScheduleToggle--disabled': ${field.ngDisabled}}" aw-tool-tip="" `
html += (field.ngShow) ? "ng-show=\"" + field.ngShow + "\" " : "";
html += `data-placement="top">`;
html += `<button ng-show="${field.toggleSource}" class="ScheduleToggle-switch is-on" ng-click="toggleForm('${field.toggleSource}')"
ng-disabled="${field.ngDisabled}">ON</button>
<button ng-show="!${field.toggleSource}" class="ScheduleToggle-switch" ng-click="toggleForm('${field.toggleSource}')"
ng-disabled="${field.ngDisabled}">OFF</button>