aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/components/message-router/charts/message-router-kafka
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2019-06-20 09:56:35 -0400
committerGary Wu <gary.wu@futurewei.com>2019-06-22 05:46:52 +0000
commit3afc3d39ba182c38ce202b7b14ac53612a877cc6 (patch)
tree9b1151554088352fec19cc3aa346904bdd929b20 /kubernetes/dmaap/components/message-router/charts/message-router-kafka
parente3418116109b26d013ab0dd23651c63e779bc036 (diff)
release 1.5.3 APPC dockers
new appc docker for dublin Issue-ID: APPC-1595 Change-Id: I52533ce35868b2ad1bd82d2e1cec7c48102cb430 Signed-off-by: Taka Cho <takamune.cho@att.com> (cherry picked from commit a1d20aee2c93e7ceeda1c680e654fecbe9284317)
Diffstat (limited to 'kubernetes/dmaap/components/message-router/charts/message-router-kafka')
0 files changed, 0 insertions, 0 deletions
ghlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*-
 * ============LICENSE_START=======================================================
 * ONAP CLAMP
 * ================================================================================
 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END============================================
 * ===================================================================
 *
 */

import React from 'react'
import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
import Form from 'react-bootstrap/Form';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import styled from 'styled-components';
import UserService from '../../api/UserService';

const ModalStyled = styled(Modal)`
	background-color: transparent;
`

export default class UserInfoModal extends React.Component {

	constructor(props, context) {
		super(props, context);

		this.handleClose = this.handleClose.bind(this);
	    this.renderPermissions = this.renderPermissions.bind(this);
		this.renderUserName = this.renderUserName.bind(this);
		this.state = {
			show: true,
			userInfo: {}
		};
	}
	componentWillMount() {
		UserService.getUserInfo().then(userInfo => {
			this.setState({ userInfo: userInfo })
		});
	}

	handleClose() {
			this.props.history.push('/');
	}
	renderPermissions() {
          if (this.state.userInfo["allPermissions"]) {
	        var listOfPermissions = this.state.userInfo["allPermissions"].map(function(perm) {
	            return <Form.Control plaintext readOnly defaultValue={perm} />;
	        })
		    return listOfPermissions;
		  } else {
		    return;
		  }
 	}
	renderUserName() {
		if (this.state.userInfo["userName"]) {
			return <Form.Control plaintext readOnly defaultValue={this.state.userInfo["userName"]} />
		} else  {
			return;
		}
	}
	renderVersion() {
		if (this.state.userInfo["cldsVersion"]) {
			return <Form.Control plaintext readOnly defaultValue={this.state.userInfo["cldsVersion"]} />
		} else  {
			return;
		}
	}
	render() {
		return (
			<ModalStyled size="lg"  show={this.state.show} onHide={this.handleClose}>
				<Modal.Header closeButton>
					<Modal.Title>User Info</Modal.Title>
				</Modal.Header>
				<Modal.Body>
					<Form.Group as={Row} controlId="userName">
						<Form.Label column sm="3">Current User:</Form.Label>
						<Col>{this.renderUserName()}</Col>
					</Form.Group>
					<Form.Group as={Row} controlId="cldsVersion">
						<Form.Label column sm="3">CLDS Version:</Form.Label>
						<Col>{this.renderVersion()}</Col>
					</Form.Group>
					<Form.Group as={Row} controlId="userPermissions">
						<Form.Label column sm="3">User Permissions:</Form.Label>
						<Col>
							{this.renderPermissions()}
						</Col>
					</Form.Group>
				</Modal.Body>
				<Modal.Footer>
					<Button variant="secondary" type="null" onClick={this.handleClose}>Cancel</Button>
				</Modal.Footer>
			</ModalStyled>
		);
	}
}