summaryrefslogtreecommitdiffstats
path: root/app/login
diff options
context:
space:
mode:
authorIftekharul Islam <iislam@us.ibm.com>2017-03-29 13:54:26 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-09-20 12:41:34 -0500
commitbb5058e741e4f382bb17c050db35c9094b638c49 (patch)
tree4c6949f4712d9c3d2f8b89ac48f1e8b8d490e7e2 /app/login
parent3a0d471c48cb09ddd06c5288c21612bd127b60ac (diff)
downloadphosphor-webui-bb5058e741e4f382bb17c050db35c9094b638c49.tar.gz
phosphor-webui-bb5058e741e4f382bb17c050db35c9094b638c49.zip
Added fake login page for testing and demo
Change-Id: Ife37444dcede67b54d1f257ee99322b22ac6b78c Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
Diffstat (limited to 'app/login')
-rw-r--r--app/login/controllers/login-controller.js11
-rw-r--r--app/login/index.js5
2 files changed, 14 insertions, 2 deletions
diff --git a/app/login/controllers/login-controller.js b/app/login/controllers/login-controller.js
index b1a0d45..900063a 100644
--- a/app/login/controllers/login-controller.js
+++ b/app/login/controllers/login-controller.js
@@ -17,10 +17,17 @@ window.angular && (function (angular) {
'$window',
'APIUtils',
'dataService',
- 'userModel',
- function($scope, $window, APIUtils, dataService, userModel){
+ 'userModel',
+ '$routeParams',
+ function($scope, $window, APIUtils, dataService, userModel, $routeParams){
$scope.dataService = dataService;
+ if($routeParams.fake_login &&
+ $routeParams.fake_login === 'fake_login'){
+ userModel.fakeLogin();
+ $window.location.hash = '#/system-overview';
+ }
+
$scope.tryLogin = function(username, password, event){
if(event.keyCode === 13){
$scope.login(username, password);
diff --git a/app/login/index.js b/app/login/index.js
index 7e86ac4..a12cb6c 100644
--- a/app/login/index.js
+++ b/app/login/index.js
@@ -18,6 +18,11 @@ window.angular && (function (angular) {
// Route configuration
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
+ .when('/login/:fake_login', {
+ 'templateUrl': 'login/controllers/login-controller.html',
+ 'controller': 'LoginController',
+ authenticated: false
+ })
.when('/login', {
'templateUrl': 'login/controllers/login-controller.html',
'controller': 'LoginController',
OpenPOWER on IntegriCloud