diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-30 03:30:57 +0100 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-30 03:30:57 +0100 |
| commit | 8812d6fd22b1710e019ba53e94723c76b97af6b7 (patch) | |
| tree | e5e2a74d56715f20d3604cab15943dfa4f9f54f6 /www/js/DataModel.js | |
| parent | af2a626dedb251670b573356b6993c5d7197f0ec (diff) | |
#108 - minAlarmCount is now part of each serverProfile and will persist
Former-commit-id: 89ecf51624e78a95474630b48c05d9fa921164c0
Diffstat (limited to 'www/js/DataModel.js')
| -rw-r--r-- | www/js/DataModel.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 56204c98..0a529365 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -58,6 +58,7 @@ angular.module('zmApp.controllers') 'montageHiddenOrder':'', 'montageArraySize':'0', 'graphSize':200, + 'minAlarmCount':'1', }; @@ -201,6 +202,15 @@ angular.module('zmApp.controllers') if (!isEmpty(loadedData)) { loginData = loadedData; + + // old version hacks for new variables + + if (typeof loginData.minAlarmCount === 'undefined') + { + console.log ("MIN ALARM"); + loginData.minAlarmCount = '1'; + } + zmLog ("DataModel init recovered this loginData as " + JSON.stringify(loginData)); } else @@ -783,7 +793,7 @@ angular.module('zmApp.controllers') if (endTime) myurl = myurl + "/EndTime <=:"+endTime; - myurl = myurl + "/AlarmFrames >=:" + $rootScope.minAlarmCount; + myurl = myurl + "/AlarmFrames >=:" + loginData.minAlarmCount; myurl = myurl + ".json"; @@ -861,7 +871,7 @@ angular.module('zmApp.controllers') if (endTime) myurl = myurl + "/EndTime <=:"+endTime; - myurl = myurl + "/AlarmFrames >=:" + $rootScope.minAlarmCount; + myurl = myurl + "/AlarmFrames >=:" + loginData.minAlarmCount; myurl = myurl + ".json"; |
