diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-11-25 17:55:18 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-11-25 17:55:18 -0500 |
| commit | 43c4deb9cae942e06594e72469c7d078c8ea6834 (patch) | |
| tree | ccb9e795b45f790346e158fc375c59e8ee97954c /www/js | |
| parent | e664d4d5a8ef7a475773b4a9760022b4d87d27a3 (diff) | |
forcing all monitors checked if none are checked - #391
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventServerSettingsCtrl.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/www/js/EventServerSettingsCtrl.js b/www/js/EventServerSettingsCtrl.js index 064c785f..efa868ea 100644 --- a/www/js/EventServerSettingsCtrl.js +++ b/www/js/EventServerSettingsCtrl.js @@ -75,6 +75,7 @@ res = $scope.loginData.eventServerMonitors.split(","); minterval = $scope.loginData.eventServerInterval.split(","); + var monchecked = false; for (var i = 0; i < $scope.monitors.length; i++) { @@ -90,9 +91,23 @@ // console.log("Marking true"); $scope.monitors[i].Monitor.isChecked = true; $scope.monitors[i].Monitor.reportingInterval = getInterval($scope.monitors[i].Monitor.Id); + monchecked = true; } } + + // now if none are checked, assume it means all checked. This is related to the + // fact that ES will start sending all monitors, even ones you don't have access to + if (!monchecked) + { + NVRDataModel.debug ("Enabling all monitors for event server"); + for (var j = 0; j < $scope.monitors.length; j++) + { + $scope.monitors[i].Monitor.isChecked = true; + $scope.monitors[i].Monitor.reportingInterval = 0; + } + + } }); //-------------------------------------------------- |
