mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
AC-1286 host config key dialog
Now the dialog only appears on job template save when the host config key or URL actually change. Before the dialog always appeared when allow callbacks was enabled.
This commit is contained in:
parent
64dbb0b4b2
commit
90ae15f3ba
@ -710,10 +710,19 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
}
|
||||
$scope.removeTemplateSaveSuccess = $scope.$on('templateSaveSuccess', function(e, data) {
|
||||
Wait('stop');
|
||||
if (data.related && data.related.callback) {
|
||||
Alert('Callback URL', '<p>Host callbacks are enabled for this template. The callback URL is:</p>'+
|
||||
'<p style="padding: 10px 0;"><strong>' + $scope.callback_server_path + data.related.callback + '</strong></p>'+
|
||||
'<p>The host configuration key is: <strong>' + data.host_config_key + '</strong></p>', 'alert-info', saveCompleted);
|
||||
if ($scope.allow_callbacks && ($scope.host_config_key !== master.host_config_key || $scope.callback_url !== master.callback_url)) {
|
||||
console.log('host_config_key: ' + $scope.host_config_key);
|
||||
console.log('master_host_config_key: ' + master.host_config_key);
|
||||
console.log('callback_url: ' + $scope.callback_url);
|
||||
console.log('master_callback_url: ' + master.callback_url);
|
||||
if (data.related && data.related.callback) {
|
||||
Alert('Callback URL', '<p>Host callbacks are enabled for this template. The callback URL is:</p>'+
|
||||
'<p style="padding: 10px 0;"><strong>' + $scope.callback_server_path + data.related.callback + '</strong></p>'+
|
||||
'<p>The host configuration key is: <strong>' + data.host_config_key + '</strong></p>', 'alert-info', saveCompleted);
|
||||
}
|
||||
else {
|
||||
saveCompleted();
|
||||
}
|
||||
}
|
||||
else {
|
||||
saveCompleted();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user