Merge pull request #65 from mabashian/7294-group-circular-association

Show api errors when attempting circular association
This commit is contained in:
Michael Abashian 2017-07-27 08:53:11 -04:00 committed by GitHub
commit 41f69eeb56
7 changed files with 2 additions and 17 deletions

View File

@ -206,7 +206,6 @@ var awApp = angular.module('awApp', [
LoadConfig, Store, pendoService, Prompt, Rest, Wait,
ProcessErrors, $state, GetBasePath, ConfigService, FeaturesService,
$filter, SocketService, AppStrings) {
console.log("This works fine!");
$rootScope.$state = $state;
$rootScope.$state.matches = function(stateName) {
return $state.current.name.search(stateName) > 0;

View File

@ -26,7 +26,6 @@ export default {
onExit: function($state) {
if ($state.transition) {
$('#associate-groups-modal').modal('hide');
$('.modal-backdrop').remove();
$('body').removeClass('modal-open');
}
},

View File

@ -26,7 +26,6 @@ export default {
onExit: function($state) {
if ($state.transition) {
$('#associate-groups-modal').modal('hide');
$('.modal-backdrop').remove();
$('body').removeClass('modal-open');
}
},

View File

@ -26,7 +26,6 @@ export default {
onExit: function($state) {
if ($state.transition) {
$('#associate-groups-modal').modal('hide');
$('.modal-backdrop').remove();
$('body').removeClass('modal-open');
}
},

View File

@ -26,7 +26,6 @@ export default {
onExit: function($state) {
if ($state.transition) {
$('#associate-groups-modal').modal('hide');
$('.modal-backdrop').remove();
$('body').removeClass('modal-open');
}
},

View File

@ -94,13 +94,8 @@
$scope.saveFunction({selectedItems: $scope.selectedItems})
.then(() =>{
$scope.closeModal();
}).catch((error) => {
}).catch(() => {
$scope.closeModal();
ProcessErrors(null, error.data, error.status, null, {
hdr: 'Error!',
msg: 'Failed to associate host to group(s): POST returned status' +
error.status
});
});
};

View File

@ -93,13 +93,8 @@
$scope.saveFunction({selectedItems: $scope.selectedItems})
.then(() =>{
$scope.closeModal();
}).catch((error) => {
}).catch(() => {
$scope.closeModal();
ProcessErrors(null, error.data, error.status, null, {
hdr: 'Error!',
msg: 'Failed to associate host to host(s): POST returned status' +
error.status
});
});
};