summaryrefslogtreecommitdiff
path: root/www/js/MonitorCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@users.noreply.github.com>2018-10-15 10:42:02 -0400
committerGitHub <noreply@github.com>2018-10-15 10:42:02 -0400
commit7d696e85cbe7112ebc2a1b49ee957e42209a404c (patch)
treeff8135ee4b1ffeac839c8f3365d5d82e29760d77 /www/js/MonitorCtrl.js
parent1cd6c1ba5f1944b411f871bedeb65e93c9530bc4 (diff)
parentfb73ec7092b1763c4d64148dd8230751e10eec68 (diff)
Merge branch 'master' into master
Diffstat (limited to 'www/js/MonitorCtrl.js')
-rw-r--r--www/js/MonitorCtrl.js68
1 files changed, 34 insertions, 34 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index 881d6a2c..9edb1e36 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -182,12 +182,12 @@ angular.module('zmApp.controllers')
})
.then(function () {
- NVRDataModel.debug("MonitorCtrl: Not restarting ZM - Make sure you have the patch installed in MonitorsController.php or this won't work");
- },
- function (data, status, headers, config) {
- NVRDataModel.debug("MonitorCtrl: Error changing monitor " + JSON.stringify(data));
- $scope.monfunc.myfailedIds.push(item);
- });
+ NVRDataModel.debug("MonitorCtrl: Not restarting ZM - Make sure you have the patch installed in MonitorsController.php or this won't work");
+ },
+ function (data, status, headers, config) {
+ NVRDataModel.debug("MonitorCtrl: Error changing monitor " + JSON.stringify(data));
+ $scope.monfunc.myfailedIds.push(item);
+ });
$scope.monfunc.mypromises.push(httpPromise);
});
@@ -420,34 +420,34 @@ angular.module('zmApp.controllers')
//console.log("**** ZMC CHECK " + apiMonCheck);
$http.get(apiMonCheck)
.then(function (data) {
- data = data.data;
- NVRDataModel.debug("MonitorCtrl: monitor check state returned: " + JSON.stringify(data));
- if (data.statustext.indexOf("not running") > -1) {
- $scope.monitors[j].Monitor.isRunning = "false";
- $scope.monitors[j].Monitor.color = zm.monitorNotRunningColor;
- $scope.monitors[j].Monitor.char = "ion-close-circled";
- } else if (data.statustext.indexOf("pending") > -1) {
- $scope.monitors[j].Monitor.isRunning = "pending";
- $scope.monitors[j].Monitor.color = zm.monitorPendingColor;
- } else if (data.statustext.indexOf("running since") > -1) {
- $scope.monitors[j].Monitor.isRunning = "true";
- $scope.monitors[j].Monitor.color = zm.monitorRunningColor;
- } else if (data.statustext.indexOf("Unable to connect") > -1) {
- $scope.monitors[j].Monitor.isRunning = "false";
- $scope.monitors[j].Monitor.color = zm.monitorNotRunningColor;
- $scope.monitors[j].Monitor.char = "ion-close-circled";
- }
-
- $scope.monitors[j].Monitor.isRunningText = data.statustext;
- },
- function (data) {
- NVRDataModel.debug("MonitorCtrl: Error->monitor check state returned: " +
- JSON.stringify(data));
- NVRDataModel.displayBanner('error', [$translate.instant('kErrorRetrievingState'), $translate.instant('kPleaseTryAgain')]);
- $scope.monitors[j].Monitor.isRunning = "error";
- $scope.monitors[j].Monitor.color = zm.monitorErrorColor;
- $scope.monitors[j].Monitor.char = "ion-help-circled";
- });
+ data = data.data;
+ NVRDataModel.debug("MonitorCtrl: monitor check state returned: " + JSON.stringify(data));
+ if (data.statustext.indexOf("not running") > -1) {
+ $scope.monitors[j].Monitor.isRunning = "false";
+ $scope.monitors[j].Monitor.color = zm.monitorNotRunningColor;
+ $scope.monitors[j].Monitor.char = "ion-close-circled";
+ } else if (data.statustext.indexOf("pending") > -1) {
+ $scope.monitors[j].Monitor.isRunning = "pending";
+ $scope.monitors[j].Monitor.color = zm.monitorPendingColor;
+ } else if (data.statustext.indexOf("running since") > -1) {
+ $scope.monitors[j].Monitor.isRunning = "true";
+ $scope.monitors[j].Monitor.color = zm.monitorRunningColor;
+ } else if (data.statustext.indexOf("Unable to connect") > -1) {
+ $scope.monitors[j].Monitor.isRunning = "false";
+ $scope.monitors[j].Monitor.color = zm.monitorNotRunningColor;
+ $scope.monitors[j].Monitor.char = "ion-close-circled";
+ }
+
+ $scope.monitors[j].Monitor.isRunningText = data.statustext;
+ },
+ function (data) {
+ NVRDataModel.debug("MonitorCtrl: Error->monitor check state returned: " +
+ JSON.stringify(data));
+ NVRDataModel.displayBanner('error', [$translate.instant('kErrorRetrievingState'), $translate.instant('kPleaseTryAgain')]);
+ $scope.monitors[j].Monitor.isRunning = "error";
+ $scope.monitors[j].Monitor.color = zm.monitorErrorColor;
+ $scope.monitors[j].Monitor.char = "ion-help-circled";
+ });
})(i);
}