mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02: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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user