mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Merge pull request #65 from mabashian/7294-group-circular-association
Show api errors when attempting circular association
This commit is contained in:
@@ -206,7 +206,6 @@ var awApp = angular.module('awApp', [
|
|||||||
LoadConfig, Store, pendoService, Prompt, Rest, Wait,
|
LoadConfig, Store, pendoService, Prompt, Rest, Wait,
|
||||||
ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService,
|
ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService,
|
||||||
$filter, SocketService, AppStrings) {
|
$filter, SocketService, AppStrings) {
|
||||||
console.log("This works fine!");
|
|
||||||
$rootScope.$state = $state;
|
$rootScope.$state = $state;
|
||||||
$rootScope.$state.matches = function(stateName) {
|
$rootScope.$state.matches = function(stateName) {
|
||||||
return $state.current.name.search(stateName) > 0;
|
return $state.current.name.search(stateName) > 0;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default {
|
|||||||
onExit: function($state) {
|
onExit: function($state) {
|
||||||
if ($state.transition) {
|
if ($state.transition) {
|
||||||
$('#associate-groups-modal').modal('hide');
|
$('#associate-groups-modal').modal('hide');
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
$('body').removeClass('modal-open');
|
$('body').removeClass('modal-open');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default {
|
|||||||
onExit: function($state) {
|
onExit: function($state) {
|
||||||
if ($state.transition) {
|
if ($state.transition) {
|
||||||
$('#associate-groups-modal').modal('hide');
|
$('#associate-groups-modal').modal('hide');
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
$('body').removeClass('modal-open');
|
$('body').removeClass('modal-open');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default {
|
|||||||
onExit: function($state) {
|
onExit: function($state) {
|
||||||
if ($state.transition) {
|
if ($state.transition) {
|
||||||
$('#associate-groups-modal').modal('hide');
|
$('#associate-groups-modal').modal('hide');
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
$('body').removeClass('modal-open');
|
$('body').removeClass('modal-open');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default {
|
|||||||
onExit: function($state) {
|
onExit: function($state) {
|
||||||
if ($state.transition) {
|
if ($state.transition) {
|
||||||
$('#associate-groups-modal').modal('hide');
|
$('#associate-groups-modal').modal('hide');
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
$('body').removeClass('modal-open');
|
$('body').removeClass('modal-open');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -94,13 +94,8 @@
|
|||||||
$scope.saveFunction({selectedItems: $scope.selectedItems})
|
$scope.saveFunction({selectedItems: $scope.selectedItems})
|
||||||
.then(() =>{
|
.then(() =>{
|
||||||
$scope.closeModal();
|
$scope.closeModal();
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
$scope.closeModal();
|
$scope.closeModal();
|
||||||
ProcessErrors(null, error.data, error.status, null, {
|
|
||||||
hdr: 'Error!',
|
|
||||||
msg: 'Failed to associate host to group(s): POST returned status' +
|
|
||||||
error.status
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -93,13 +93,8 @@
|
|||||||
$scope.saveFunction({selectedItems: $scope.selectedItems})
|
$scope.saveFunction({selectedItems: $scope.selectedItems})
|
||||||
.then(() =>{
|
.then(() =>{
|
||||||
$scope.closeModal();
|
$scope.closeModal();
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
$scope.closeModal();
|
$scope.closeModal();
|
||||||
ProcessErrors(null, error.data, error.status, null, {
|
|
||||||
hdr: 'Error!',
|
|
||||||
msg: 'Failed to associate host to host(s): POST returned status' +
|
|
||||||
error.status
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user