diff options
Diffstat (limited to 'www/js/MonitorCtrl.js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 15 |
1 files changed, 15 insertions, 0 deletions
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()); |
