Fix the userInfo
Fix user Info window, now clicking on the user name make it appears +
attempt to add a logout
Issue-ID: CLAMP-393
Change-Id: I82686a848f7ccae95c1eab22f1923a8821ba76b1
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
diff --git a/ui-react/src/components/dialogs/UserInfo.js b/ui-react/src/components/dialogs/UserInfo.js
index b8d68b8..7d81b38 100644
--- a/ui-react/src/components/dialogs/UserInfo.js
+++ b/ui-react/src/components/dialogs/UserInfo.js
@@ -39,7 +39,6 @@
super(props, context);
this.handleClose = this.handleClose.bind(this);
- this.initialValues = this.initialValues.bind(this);
this.renderReadTemplatePermission = this.renderReadTemplatePermission.bind(this);
this.renderReadModelPermission = this.renderReadModelPermission.bind(this);
this.renderReadToscaPermission = this.renderReadToscaPermission.bind(this);
@@ -49,23 +48,15 @@
this.renderUserName = this.renderUserName.bind(this);
this.state = {
show: true,
- userInfo: {permissionReadTemplate: true,
- permissionReadCl: true,
- permissionReadTosca: true,
- permissionUpdateCl: true,
- permissionUpdateTemplate: true,
- permissionUpdateTosca: true,
- userName: 'admin',
- cldsVersion: '1.0.0'
- }
+ userInfo: {}
};
-
}
- initialValues() {
+ componentWillMount() {
UserService.getUserInfo().then(userInfo => {
this.setState({ userInfo: userInfo })
});
}
+
handleClose() {
this.props.history.push('/');
}
@@ -127,7 +118,7 @@
}
render() {
return (
- <ModalStyled size="lg" show={this.state.show} onHide={this.handleClose} onEntered={this.initialValues}>
+ <ModalStyled size="lg" show={this.state.show} onHide={this.handleClose}>
<Modal.Header closeButton>
<Modal.Title>User Info</Modal.Title>
</Modal.Header>