diff options
| author | Iftekharul Islam <iislam@us.ibm.com> | 2017-04-19 14:37:55 -0500 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2017-09-20 12:41:34 -0500 |
| commit | cd78950815d9b230f0eaa41a947fcae6d4cbbcb7 (patch) | |
| tree | 3bad52ea935ec87f7fd7da424f5b959f2e4c4c29 /app/login/controllers/login-controller.js | |
| parent | 994a93b29ddbae647f2cb1aae6ec94e8a26db88c (diff) | |
| download | phosphor-webui-cd78950815d9b230f0eaa41a947fcae6d4cbbcb7.tar.gz phosphor-webui-cd78950815d9b230f0eaa41a947fcae6d4cbbcb7.zip | |
Change navigation structure
Change-Id: I12c819293ce1eda188dc9f257ae9370f1b73cb18
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
Diffstat (limited to 'app/login/controllers/login-controller.js')
| -rw-r--r-- | app/login/controllers/login-controller.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/login/controllers/login-controller.js b/app/login/controllers/login-controller.js index 900063a..f4ca375 100644 --- a/app/login/controllers/login-controller.js +++ b/app/login/controllers/login-controller.js @@ -25,7 +25,7 @@ window.angular && (function (angular) { if($routeParams.fake_login && $routeParams.fake_login === 'fake_login'){ userModel.fakeLogin(); - $window.location.hash = '#/system-overview'; + $window.location.hash = '#/overview/system'; } $scope.tryLogin = function(username, password, event){ @@ -35,6 +35,7 @@ window.angular && (function (angular) { }; $scope.login = function(username, password){ $scope.error = false; + $scope.server_unreachable = false; if(!username || username == "" || !password || password == ""){ @@ -43,11 +44,13 @@ window.angular && (function (angular) { userModel.login(username, password, function(status, unreachable){ if(status){ $scope.$emit('user-logged-in',{}); - $window.location.hash = '#/system-overview'; + $window.location.hash = '#/overview/system'; }else{ - if(!unreachable){ - $scope.error = true; - } + if(unreachable){ + $scope.server_unreachable = true; + }else{ + $scope.error = true; + } }; }); } |

