fixed sockets on inventory page

This commit is contained in:
John Mitchell
2015-06-01 13:49:44 -04:00
parent 22bbf21c09
commit 7f550fb1c2
2 changed files with 4 additions and 4 deletions

View File

@@ -1011,7 +1011,7 @@ var tower = angular.module('Tower', [
$rootScope.$emit('JobStatusChange-portal', data); $rootScope.$emit('JobStatusChange-portal', data);
} else if (urlToCheck === '/projects') { } else if (urlToCheck === '/projects') {
$rootScope.$emit('JobStatusChange-projects', data); $rootScope.$emit('JobStatusChange-projects', data);
} else if (/\/inventory\/(\d)+\/manage/.test(urlToCheck)) { } else if (/\/inventories\/(\d)+\/manage/.test(urlToCheck)) {
$rootScope.$emit('JobStatusChange-inventory', data); $rootScope.$emit('JobStatusChange-inventory', data);
} }
}); });

View File

@@ -1053,10 +1053,10 @@ export function InventoriesManage ($log, $scope, $rootScope, $location,
}); });
// start watching for real-time updates // start watching for real-time updates
if ($scope.removeWatchUpdateStatus) { if ($rootScope.removeWatchUpdateStatus) {
$scope.removeWatchUpdateStatus(); $rootScope.removeWatchUpdateStatus();
} }
$scope.removeWatchUpdateStatus = $scope.$on('JobStatusChange-inventory', function(data) { $rootScope.removeWatchUpdateStatus = $rootScope.$on('JobStatusChange-inventory', function(e, data) {
var stat, group; var stat, group;
if (data.group_id) { if (data.group_id) {
group = Find({ list: $scope.groups, key: 'id', val: data.group_id }); group = Find({ list: $scope.groups, key: 'id', val: data.group_id });