diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 15 | ||||
| -rw-r--r-- | www/js/MonitorCtrl.js | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 7ebc764b..beadd18b 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -163,6 +163,21 @@ angular.module('zmApp.controllers') $scope.monitors = ZMDataModel.applyMontageMonitorPrefs(tempMon, 2)[0]; } else $scope.monitors = message; + + + if ($scope.monitors.length == 0) + { + $ionicPopup.alert({ + title: "No Monitors found", + template: "Please check your credentials" + }); + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("login"); + return; + } + // console.log ("********** GOT MONITORS " + JSON.stringify($scope.monitors)); //$scope.monitors = message; diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 60b9f0cb..f5da0733 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -19,6 +19,21 @@ angular.module('zmApp.controllers') console.log("***EVENTS: Waiting for Monitors to load before I proceed"); $scope.monitors = []; $scope.monitors = message; + + + if ($scope.monitors.length == 0) + { + $ionicPopup.alert({ + title: "No Monitors found", + template: "Please check your credentials" + }); + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("login"); + return; + } + var loginData = ZMDataModel.getLogin(); monitorStateCheck(); console.log("Setting Awake to " + ZMDataModel.getKeepAwake()); |
