summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/MontageCtrl.js17
-rw-r--r--www/js/app.js1
2 files changed, 13 insertions, 5 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 40b3a69c..7ff9cbd7 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -211,21 +211,28 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
{
console.log ("**** TRAPPED EVENT: "+alarmMonitors[i]);
- for (var j=0; i<$scope.monitors.length; i++)
+ for (var j=0; i<$scope.monitors.length; j++)
{
if ($scope.monitors[j].Monitor.Id == alarmMonitors[i])
{
$scope.monitors[j].Monitor.isAlarmed="true";
+ scheduleRemoveFlash(j);
}
}
}
-
-
-
-
+
});
+
+ function scheduleRemoveFlash(id)
+ {
+ ZMDataModel.zmDebug ("Scheduled a 10 sec timer for dis-alarming monitor ID="+id);
+ $timeout( function() {
+ $scope.monitors[id].Monitor.isAlarmed = 'false';
+ ZMDataModel.zmDebug ("dis-alarming monitor ID="+id);
+ },zm.alarmFlashTimer);
+ }
//----------------------------------------------------------------
// Alarm notification handling
diff --git a/www/js/app.js b/www/js/app.js
index 94551555..8cb5e869 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -34,6 +34,7 @@ angular.module('zmApp', [
.constant('zm', {
minAppVersion: '1.28.107', // if ZM is less than this, the app won't work
minEventServerVersion: '0.4',
+ alarmFlashTimer:20000, // time to flash alarm
gcmSenderId:'710936220256',
httpTimeout: 15000,
largeHttpTimeout: 60000,