adding notifications on connection issues, again

parent d0028bec
...@@ -45,7 +45,7 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl( ...@@ -45,7 +45,7 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
// from the abstract parent (it has no url) // from the abstract parent (it has no url)
$scope.studentData.id = $state.$current.locals.globals.$stateParams.idStudent; $scope.studentData.id = $state.$current.locals.globals.$stateParams.idStudent;
// // --------------------------------------------------------------------------
// WebSockets communication // WebSockets communication
// //
io.socket.on('update_peers', function (data) { io.socket.on('update_peers', function (data) {
...@@ -56,12 +56,6 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl( ...@@ -56,12 +56,6 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
} }
}); });
io.socket.on('disconnect', function() {
$scope.studentData.pcb_count = 0;
$scope.studentData.pdb_count = 0;
ngToast.alert($translate.instant('no_subscribed'));
});
io.socket.on('disconnect', function () { io.socket.on('disconnect', function () {
$scope.studentData.pcb_count = 0; $scope.studentData.pcb_count = 0;
$scope.studentData.pdb_count = 0; $scope.studentData.pdb_count = 0;
...@@ -89,6 +83,10 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl( ...@@ -89,6 +83,10 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
}); });
}); });
// --------------------------------------------------------------------------
// Scope functions
//
$scope.updateLicenseExpiration = function () { $scope.updateLicenseExpiration = function () {
if (!$scope.studentData.license){ if (!$scope.studentData.license){
$scope.studentData.license_expired = true; $scope.studentData.license_expired = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment