diff --git a/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js index 8aa97d902..34b9e2b0a 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js @@ -48,8 +48,6 @@ }); }]) .controller('botsCtrl',['$scope', '$rootScope', '$state', function ($scope, $rootScope, $state) { - /*var treeNames = ['Bots']; - $rootScope.$emit('treeNameUpdate', treeNames);*/ $state.go('dashboard.bots.library'); $rootScope.stateItems = $state.params; }]); diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js index 4e6093f5a..86403d016 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -65,7 +65,16 @@ genSevs.promiseDelete(param).then(function (response) { if (response) { toastr.success('Successfully deleted'); - lib.init(); + if($scope.totalBotsSelected) { + lib.init(); + } else if($scope.runningBotsselected) { + $scope.showBotsRunning(); + } else if($scope.failedBotsselected) { + $scope.showFailedBots(); + } else { + lib.init(); + } + lib.summary(); } }, function(data) { toastr.error('error:: ' + data.toString()); @@ -87,7 +96,16 @@ genSevs.promiseDelete(param).then(function (response) { if (response) { toastr.success('Successfully deleted'); - lib.init(); + if($scope.totalBotsSelected) { + lib.init(); + } else if($scope.runningBotsselected) { + $scope.showBotsRunning(); + } else if($scope.failedBotsselected) { + $scope.showFailedBots(); + } else { + lib.init(); + } + lib.summary(); } }, function(data) { toastr.error('error:: ' + data.toString());