diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-17 16:55:12 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-17 16:55:12 -0500 |
| commit | 46168f2d1551514414beda6fc7ffe25eb67d8553 (patch) | |
| tree | 8428e8fd0ef77ad41c66d915abd4cdd843d68d67 /www | |
| parent | d290db98c46031830da306d39deb2a752d3515af (diff) | |
#93 - if monitors is empty redirect to login as user may not have access to view any monitors
Former-commit-id: ae3488eef88d4977c211f0f310822ba3d39fef2b
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 5a3ef4f9..fed99b9e 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -40,6 +40,19 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' var hiddenOrder = []; // 1 = hide, 0 = don't hide var tempMonitors = message; + if (tempMonitors.length == 0) + { + $ionicPopup.alert({ + title: "No Monitors found", + template: "Please check your credentials" + }); + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("login"); + return; + } + console.log ("TEMP MONITORS IS " + JSON.stringify(tempMonitors)); var tempResponse = ZMDataModel.applyMontageMonitorPrefs(message, 0); $scope.monitors = tempResponse[0]; |
