diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-01 09:06:41 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-01 09:06:41 -0400 |
| commit | c79860e81e03239d44793f7420874919082bc693 (patch) | |
| tree | 1feaa924e885ca8caa5fae0fe738de21d2280003 /www/js | |
| parent | 254be998caa4c9efbd3fa3f7deb7461f263685b2 (diff) | |
#341 - event server connection error display
Former-commit-id: 12e2bd9cf517d5bbd5455afa023f4a5687587661
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventServer.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 04a3d72a..8ac31e8d 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -62,6 +62,9 @@ angular.module('zmApp.controllers') // Called once at app start. Does a lazy definition of websockets open //-------------------------------------------------------------------------- function init() { + + + $rootScope.isAlarm = 0; $rootScope.alarmCount = "0"; @@ -103,6 +106,12 @@ angular.module('zmApp.controllers') // Transmit auth information to server ws.$on('$open', openHandshake); + console.log ("********** SETTING UP ERROR WS " ); + ws.$on('$error', function (e){ + console.log ("******** WS ERROR CALLED"); + NVRDataModel.displayBanner('error',['Event Server connection error']); + }); + ws.$on('$close', function () { NVRDataModel.log("Websocket closed"); |
