diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-12 17:02:18 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-12 17:02:18 -0500 |
| commit | 4e5e7d28a94106dab8ecf8ff08acfdf5589fe4c6 (patch) | |
| tree | f84ddadb7267f430dd918f17e0dbb3b5d1b0f6a1 /www/js/MontageCtrl.js | |
| parent | 63f4c7e94db1243084f3d7cef023c7a1124f03b5 (diff) | |
#82 - initial commits towards showing monitor specific alarm notitications in montage
Former-commit-id: 278d0c8fb24ef38e607caf66f1f6279b2e36f70b
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 2e5feb8c..40b3a69c 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -199,6 +199,33 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $scope.modal.remove(); }; + + + //---------------------------------------------------------------- + // Alarm emit handling + //---------------------------------------------------------------- + $rootScope.$on("alarm", function (event, args) { + console.log ("***EVENT TRAP***"); + var alarmMonitors = args.message; + for (var i=0; i< alarmMonitors.length; i++) + { + console.log ("**** TRAPPED EVENT: "+alarmMonitors[i]); + + for (var j=0; i<$scope.monitors.length; i++) + { + if ($scope.monitors[j].Monitor.Id == alarmMonitors[i]) + { + $scope.monitors[j].Monitor.isAlarmed="true"; + } + } + + } + + + + + + }); //---------------------------------------------------------------- // Alarm notification handling |
