2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
24 import React from 'react';
25 import styled from 'styled-components';
26 import MenuBar from '../menu/MenuBar';
27 import Navbar from 'react-bootstrap/Navbar';
28 import logo from './logo.png';
29 import { GlobalClampStyle } from '../../theme/globalStyle.js';
31 import ClosedLoopSvg from '../loop_viewer/svg/ClosedLoopSvg';
32 import ClosedLoopLogs from '../loop_viewer/logs/ClosedLoopLogs';
33 import ClosedLoopStatus from '../loop_viewer/status/ClosedLoopStatus';
35 const ProjectNameStyle = styled.a`
36 vertical-align: middle;
41 const LoopViewDivStyle = styled.div`
47 color: ${props => props.theme.loopViewerFontColor};
48 background-color: ${props => props.theme.loopViewerBackgroundColor};
49 border: 1px solid transparent;
50 border-color: ${props => props.theme.loopViewerHeaderBackgroundColor};
53 const LoopViewHeaderDivStyle = styled.div`
54 background-color: ${props => props.theme.loopViewerHeaderBackgroundColor};
56 color: ${props => props.theme.loopViewerHeaderFontColor};
59 const LoopViewBodyDivStyle = styled.div`
60 background-color: ${props => (props.theme.loopViewerBackgroundColor)};
62 color: ${props => (props.theme.loopViewerHeaderFontColor)};
66 const LoopViewLoopNameSpanStyle = styled.span`
68 color: ${props => (props.theme.loopViewerHeaderFontColor)};
69 background-color: ${props => (props.theme.loopViewerHeaderBackgroundColor)};
72 export default class LoopUI extends React.Component {
75 loopName="Empty (NO loop loaded yet)";
83 renderUserLoggedNavBar() {
86 Signed in as: <a href="login">{this.user}</a>
94 <img height="50px" width="234px" src={logo} alt=""/>
95 <ProjectNameStyle>CLAMP</ProjectNameStyle>
103 {this.renderLogoNavBar()}
104 {this.renderMenuNavBar()}
105 {this.renderUserLoggedNavBar()}
110 renderLoopViewHeader() {
112 <LoopViewHeaderDivStyle>
113 Loop Viewer - <LoopViewLoopNameSpanStyle id="loop_name">{this.loopName}</LoopViewLoopNameSpanStyle>
114 </LoopViewHeaderDivStyle>
118 renderLoopViewBody() {
120 <LoopViewBodyDivStyle>
124 </LoopViewBodyDivStyle>
131 {this.renderLoopViewHeader()}
132 {this.renderLoopViewBody()}
141 {this.renderNavBar()}
142 {this.renderLoopViewer()}