1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #6814 from jlmitch5/loggingProtocolCtit

add logging protocol and timeout to ctit ui
This commit is contained in:
jlmitch5 2017-06-30 08:52:13 -04:00 committed by GitHub
commit 413976f2f7
3 changed files with 24 additions and 1 deletions

View File

@ -392,7 +392,11 @@ export default [
}
else {
// Everything else
payload[key] = $scope[key];
if (key !== 'LOG_AGGREGATOR_TCP_TIMEOUT' ||
($scope.LOG_AGGREGATOR_PROTOCOL === 'https' ||
$scope.LOG_AGGREGATOR_PROTOCOL === 'tcp')) {
payload[key] = $scope[key];
}
}
});

View File

@ -171,6 +171,10 @@ export default [
$scope.$parent.LOG_AGGREGATOR_TYPE = _.find($scope.$parent.LOG_AGGREGATOR_TYPE_options, { value: $scope.$parent.LOG_AGGREGATOR_TYPE });
}
if($scope.$parent.LOG_AGGREGATOR_PROTOCOL !== null) {
$scope.$parent.LOG_AGGREGATOR_PROTOCOL = _.find($scope.$parent.LOG_AGGREGATOR_PROTOCOL_options, { value: $scope.$parent.LOG_AGGREGATOR_PROTOCOL });
}
if(flag !== undefined){
dropdownRendered = flag;
}
@ -183,6 +187,7 @@ export default [
placeholder: i18n._('Select types'),
});
$scope.$parent.configuration_logging_template_form.LOG_AGGREGATOR_TYPE.$setPristine();
$scope.$parent.configuration_logging_template_form.LOG_AGGREGATOR_PROTOCOL.$setPristine();
}
}

View File

@ -42,6 +42,20 @@
},
LOG_AGGREGATOR_ENABLED: {
type: 'toggleSwitch',
},
LOG_AGGREGATOR_PROTOCOL: {
type: 'select',
reset: 'LOG_AGGREGATOR_PROTOCOL',
ngOptions: 'type.label for type in LOG_AGGREGATOR_PROTOCOL_options track by type.value'
},
LOG_AGGREGATOR_TCP_TIMEOUT: {
type: 'text',
reset: 'LOG_AGGREGATOR_TCP_TIMEOUT',
ngShow: 'LOG_AGGREGATOR_PROTOCOL.value === "tcp" || LOG_AGGREGATOR_PROTOCOL.value === "https"',
awRequiredWhen: {
reqExpression: "LOG_AGGREGATOR_PROTOCOL.value === 'tcp' || LOG_AGGREGATOR_PROTOCOL.value === 'https'",
init: "false"
},
}
},