TB-74: minor fixes.
This commit is contained in:
parent
a075d9591d
commit
06a18bd559
@ -77,6 +77,7 @@ function ExtensionTableController($scope, $filter, $document, $translate, types,
|
|||||||
if (newVal) {
|
if (newVal) {
|
||||||
if ($scope.subscriber) {
|
if ($scope.subscriber) {
|
||||||
telemetryWebsocketService.unsubscribe($scope.subscriber);
|
telemetryWebsocketService.unsubscribe($scope.subscriber);
|
||||||
|
$scope.subscriber = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.subscribed = false;
|
vm.subscribed = false;
|
||||||
@ -88,6 +89,13 @@ function ExtensionTableController($scope, $filter, $document, $translate, types,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.$on('$destroy', function() {
|
||||||
|
if ($scope.subscriber) {
|
||||||
|
telemetryWebsocketService.unsubscribe($scope.subscriber);
|
||||||
|
$scope.subscriber = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.$watch("vm.query.search", function(newVal, prevVal) {
|
$scope.$watch("vm.query.search", function(newVal, prevVal) {
|
||||||
if (!angular.equals(newVal, prevVal) && vm.query.search != null) {
|
if (!angular.equals(newVal, prevVal) && vm.query.search != null) {
|
||||||
updateExtensions();
|
updateExtensions();
|
||||||
@ -325,9 +333,8 @@ function ExtensionTableController($scope, $filter, $document, $translate, types,
|
|||||||
vm.subscribed = true;
|
vm.subscribed = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
telemetryWebsocketService.subscribe($scope.subscriber);
|
||||||
}
|
}
|
||||||
telemetryWebsocketService.subscribe($scope.subscriber);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function onSubscriptionData(data) {
|
function onSubscriptionData(data) {
|
||||||
|
|||||||
@ -95,10 +95,10 @@
|
|||||||
>extension.field-required</div>
|
>extension.field-required</div>
|
||||||
<div translate
|
<div translate
|
||||||
ng-message="min"
|
ng-message="min"
|
||||||
>Port should be in a range from 1 to 65535</div>
|
>extension.port-range</div>
|
||||||
<div translate
|
<div translate
|
||||||
ng-message="max"
|
ng-message="max"
|
||||||
>Port should be in a range from 1 to 65535</div>
|
>extension.port-range</div>
|
||||||
</div>
|
</div>
|
||||||
</md-input-container>
|
</md-input-container>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user