summaryrefslogtreecommitdiffstats
path: root/docs/platform/offeredapis.rst
diff options
context:
space:
mode:
authorTao Shen <shentao@chinamobile.com>2019-06-11 08:55:55 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-11 08:55:55 +0000
commit2eb611bcb3d776714f15a47e32b8ac77861d31cd (patch)
tree2cffc403527f60aec2890433688fc2c236c61285 /docs/platform/offeredapis.rst
parent999afe1b6412babc574f4b00ead059459f1a29e1 (diff)
parentb74f1453b2c309b7395b909762a3d3543dab6406 (diff)
Merge "add usecase-ui user guide"
Diffstat (limited to 'docs/platform/offeredapis.rst')
-rw-r--r--docs/platform/offeredapis.rst7
1 files changed, 0 insertions, 7 deletions
diff --git a/docs/platform/offeredapis.rst b/docs/platform/offeredapis.rst
deleted file mode 100644
index a667b0c7..00000000
--- a/docs/platform/offeredapis.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-
-Offered APIs
--------------
-
-No offered APIs is provided in the Amsterdam release. Such functionalities will be provided in the future if necessary.
y */ .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 Table from 'react-bootstrap/Table';
import LoopCache from '../../../api/LoopCache';
import styled from 'styled-components';

const LoopLogsHeaderDivStyled = styled.div`
	background-color: ${props => props.theme.loopLogsHeaderBackgroundColor};
	padding: 10px 10px;
	color: ${props => props.theme.loopLogsHeaderFontColor};
`
const TableStyled = styled(Table)`
    
    overflow: auto;
`
const TableRow = ({ logRow }) => (
	<tr>
		<td>{logRow.logInstant}</td>
		<td>{logRow.logType}</td>
		<td>{logRow.logComponent}</td>
		<td>{logRow.message}</td>
	</tr>

)

export default class LoopLogs extends React.Component {

	state = {
		loopCache: new LoopCache({})
	}
	constructor(props) {
		super(props);
		this.renderLogs = this.renderLogs.bind(this);
		this.state.loopCache = props.loopCache;
	}

	shouldComponentUpdate(nextProps, nextState) {
		return this.state.loopCache !== nextState.loopCache;
	}

	componentWillReceiveProps(newProps) {
		this.setState({
			loopCache: newProps.loopCache
		});
	}

	renderLogs() {
		if (this.state.loopCache.getLoopLogsArray() != null) {
			return (
				this.state.loopCache.getLoopLogsArray().map(row => <TableRow logRow={row} />)
			)
		}
	}

	render() {
		return (
			<LoopLogsHeaderDivStyled>
				<label>Loop Logs</label>
				<TableStyled striped hover variant responsive>
					<thead>
						<tr>
							<th><span align="left">Date</span></th>
							<th><span align="left">Type</span></th>
							<th><span align="left">Component</span></th>
							<th><span align="right">Log</span></th>
						</tr>
					</thead>
					<tbody>
						{this.renderLogs()}
					</tbody>
				</TableStyled>
			</LoopLogsHeaderDivStyled>

		);
	}
}