...
|
...
|
@@ -77,6 +77,7 @@ function ExtensionTableController($scope, $filter, $document, $translate, types, |
77
|
77
|
if (newVal) {
|
78
|
78
|
if ($scope.subscriber) {
|
79
|
79
|
telemetryWebsocketService.unsubscribe($scope.subscriber);
|
|
80
|
+ $scope.subscriber = null;
|
80
|
81
|
}
|
81
|
82
|
|
82
|
83
|
vm.subscribed = false;
|
...
|
...
|
@@ -88,6 +89,13 @@ function ExtensionTableController($scope, $filter, $document, $translate, types, |
88
|
89
|
}
|
89
|
90
|
});
|
90
|
91
|
|
|
92
|
+ $scope.$on('$destroy', function() {
|
|
93
|
+ if ($scope.subscriber) {
|
|
94
|
+ telemetryWebsocketService.unsubscribe($scope.subscriber);
|
|
95
|
+ $scope.subscriber = null;
|
|
96
|
+ }
|
|
97
|
+ });
|
|
98
|
+
|
91
|
99
|
$scope.$watch("vm.query.search", function(newVal, prevVal) {
|
92
|
100
|
if (!angular.equals(newVal, prevVal) && vm.query.search != null) {
|
93
|
101
|
updateExtensions();
|
...
|
...
|
@@ -325,9 +333,8 @@ function ExtensionTableController($scope, $filter, $document, $translate, types, |
325
|
333
|
vm.subscribed = true;
|
326
|
334
|
}
|
327
|
335
|
};
|
|
336
|
+ telemetryWebsocketService.subscribe($scope.subscriber);
|
328
|
337
|
}
|
329
|
|
- telemetryWebsocketService.subscribe($scope.subscriber);
|
330
|
|
-
|
331
|
338
|
}
|
332
|
339
|
}
|
333
|
340
|
function onSubscriptionData(data) {
|
...
|
...
|
|