summaryrefslogtreecommitdiffstats
path: root/app/common/services/userModel.js
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2017-10-06 13:53:06 -0700
committerEd Tanous <ed.tanous@intel.com>2017-11-06 16:25:49 -0800
commitbbcf670a1c8c7463556eb006bc8f6bbfe29af3e4 (patch)
tree484eb0804112a112f3a49af78c5112eb68ef0e4e /app/common/services/userModel.js
parent2a4895547294a5c32eeb2302739f5ce80626520a (diff)
downloadphosphor-webui-bbcf670a1c8c7463556eb006bc8f6bbfe29af3e4.tar.gz
phosphor-webui-bbcf670a1c8c7463556eb006bc8f6bbfe29af3e4.zip
Modernize web GUI and make it installable on BMC
1. Move from gulp server to webpack. This allows the proper compression to allow the webui to be embedded in the BMC. 2. Update js paths to use requires, not hardcoded paths. This was required to make the packaging work correctly. 3. Add babel config to do translation. 4. Update angularjs directive calls to use the angular 1.6 syntax for promises intead of success and fail. https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$http 5. As a consequence of using NPM/webpack, the versions of angular and associated modules that were checked in have been updated. Change-Id: Icb71e2eedb0d9a8943fc914f9dc4be11d0983c00 Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'app/common/services/userModel.js')
-rw-r--r--app/common/services/userModel.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/common/services/userModel.js b/app/common/services/userModel.js
index a3fc277..2c9de65 100644
--- a/app/common/services/userModel.js
+++ b/app/common/services/userModel.js
@@ -20,8 +20,9 @@ window.angular && (function (angular) {
},
login : function(username, password, callback){
APIUtils.login(username, password, function(response, error){
- if(response &&
- response.status == APIUtils.API_RESPONSE.SUCCESS_STATUS){
+ if(response &&
+ (response.status == APIUtils.API_RESPONSE.SUCCESS_STATUS
+ || response.status === undefined)){
sessionStorage.setItem('LOGIN_ID', username);
callback(true);
}else{
@@ -52,4 +53,4 @@ window.angular && (function (angular) {
};
}]);
-})(window.angular); \ No newline at end of file
+})(window.angular);
OpenPOWER on IntegriCloud