diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-05-16 10:01:15 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-05-16 10:01:15 -0400 |
| commit | cadf88096c24256d90db2b2c1567518187fcb125 (patch) | |
| tree | 6f6d565ed9f7e15b01834d304651b096a4f4dd24 /www/js/DataModel.js | |
| parent | 374b1e58d415c5e2525a45654893516c798c5f44 (diff) | |
various updates to lazy to document why
Former-commit-id: 21224eb61a2b5e060b38cca3bfd5e0ccb85f95d7
Diffstat (limited to 'www/js/DataModel.js')
| -rw-r--r-- | www/js/DataModel.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 4ce8bfbc..7d446bdc 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -50,6 +50,7 @@ angular.module('zmApp.controllers') 'eventServerMonitors':'', // list of monitors to notify from ES 'eventServerInterval':'', // list of intervals for all monitors 'refreshSec':'2', // timer value for frame change in sec + 'enableLogs':true, 'enableDebug':false, // if enabled with log messages with "debug" 'usePin':false, 'pinCode':'', @@ -116,7 +117,8 @@ angular.module('zmApp.controllers') //-------------------------------------------------------------------------- function zmLog(val,logtype) { - $fileLogger.log(logtype, val); + if (loginData.enableLogs) + $fileLogger.log(logtype, val); } @@ -134,7 +136,7 @@ angular.module('zmApp.controllers') // separate out a debug so we don't do this if comparison for normal logs function zmDebug(val) { - if (loginData.enableDebug) + if (loginData.enableDebug && loginData.enableLogs) $fileLogger.debug(val); } @@ -425,12 +427,18 @@ angular.module('zmApp.controllers') loginData.packMontage = false; } - if (typeof loginData.forceNetworkStop == 'undefined') + if (typeof loginData.forceNetworkStop == 'undefined') { zmDebug ("forceNetwork does not exist. Setting to false"); loginData.forceNetworkStop = false; } + if (typeof loginData.enableLogs == 'undefined') + { + zmDebug ("enableLogs does not exist. Setting to true"); + loginData.enableLogs = true; + } + if (typeof loginData.defaultPushSound == 'undefined') |
