diff options
author | xuegao <xg353y@intl.att.com> | 2019-07-25 15:43:06 +0200 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2019-07-29 13:14:56 +0200 |
commit | e52d5727650590b9adaa43f5830c40913cebf348 (patch) | |
tree | c7cbcfc5b2f2a0fe4329a4a97f9c297ac303de81 /ui-react/src/api | |
parent | b09e7df8439398fc094a56ec33fa33950ac8fa9e (diff) |
Rework user info window
Rework the user info window with react.
Issue-ID: CLAMP-449
Change-Id: I260bcb3c15cae73af0c180706928415ddc81dfbf
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/api')
-rw-r--r-- | ui-react/src/api/UserService.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/ui-react/src/api/UserService.js b/ui-react/src/api/UserService.js index 22168d41b..be21e692a 100644 --- a/ui-react/src/api/UserService.js +++ b/ui-react/src/api/UserService.js @@ -47,5 +47,26 @@ export default class UserService { return UserService.notLoggedUserName; }); } -} + static getUserInfo() { + return fetch('/restservices/clds/v1/clds/cldsInfo', { + method: 'GET', + credentials: 'same-origin', + }) + .then(function (response) { + console.debug("getUserInfo response received, status code:", response.status); + if (response.ok) { + return response.json(); + } + }) + .then(function (data) { + console.info ("User info received:",data) + return data; + }) + .catch(function(error) { + console.warn("getUserInfo error received, user set to: ",UserService.notLoggedUserName); + console.error("getUserInfo error:",error); + return; + }); + } +} |