sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
| 3 | * ONAP CLAMP |
| 4 | * ================================================================================ |
| 5 | * Copyright (C) 2019 AT&T Intellectual Property. All rights |
| 6 | * reserved. |
| 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 |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 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 | * =================================================================== |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | import React from 'react'; |
| 25 | import styled from 'styled-components'; |
sebdet | e44fdb1 | 2019-07-12 12:25:56 +0200 | [diff] [blame] | 26 | import MenuBar from './components/menu/MenuBar'; |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 27 | import Navbar from 'react-bootstrap/Navbar'; |
| 28 | import logo from './logo.png'; |
sebdet | e44fdb1 | 2019-07-12 12:25:56 +0200 | [diff] [blame] | 29 | import { GlobalClampStyle } from './theme/globalStyle.js'; |
Ted Humphrey | 01e5fde | 2020-01-27 18:57:39 -0500 | [diff] [blame] | 30 | import OnapConstants from './utils/OnapConstants'; |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 31 | |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 32 | import LoopSvg from './components/loop_viewer/svg/LoopSvg'; |
| 33 | import LoopLogs from './components/loop_viewer/logs/LoopLogs'; |
| 34 | import LoopStatus from './components/loop_viewer/status/LoopStatus'; |
sebdet | e44fdb1 | 2019-07-12 12:25:56 +0200 | [diff] [blame] | 35 | import UserService from './api/UserService'; |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 36 | import LoopCache from './api/LoopCache'; |
xuegao | ac42c4b | 2019-10-09 16:12:37 +0200 | [diff] [blame] | 37 | import LoopActionService from './api/LoopActionService'; |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 38 | |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 39 | import { Route } from 'react-router-dom' |
sebdet | 67c76a4 | 2019-11-15 17:33:44 +0100 | [diff] [blame] | 40 | import OpenLoopModal from './components/dialogs/Loop/OpenLoopModal'; |
sebdet | aa486be | 2020-02-18 02:00:11 -0800 | [diff] [blame] | 41 | import ModifyLoopModal from './components/dialogs/Loop/ModifyLoopModal'; |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 42 | import OperationalPolicyModal from './components/dialogs/OperationalPolicy/OperationalPolicyModal'; |
| 43 | import ConfigurationPolicyModal from './components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal'; |
sebdet | b13a790 | 2019-11-15 17:26:45 +0100 | [diff] [blame] | 44 | import LoopPropertiesModal from './components/dialogs/Loop/LoopPropertiesModal'; |
sebdet | 4dc849f | 2019-11-15 17:49:42 +0100 | [diff] [blame] | 45 | import UserInfoModal from './components/dialogs/UserInfoModal'; |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 46 | import LoopService from './api/LoopService'; |
ash74268 | 3a83e2a | 2020-01-31 15:40:15 +0000 | [diff] [blame] | 47 | import UploadToscaPolicyModal from './components/dialogs/Tosca/UploadToscaPolicyModal'; |
drveerendra | 684057e | 2019-11-11 19:37:39 -0500 | [diff] [blame] | 48 | import ViewToscaPolicyModal from './components/dialogs/Tosca/ViewToscaPolicyModal'; |
sebdet | 3b7f669 | 2020-02-17 06:03:31 -0800 | [diff] [blame] | 49 | import ViewLoopTemplatesModal from './components/dialogs/Tosca/ViewLoopTemplatesModal'; |
sebdet | f9e2cee | 2019-08-09 18:36:09 +0200 | [diff] [blame] | 50 | import PerformAction from './components/dialogs/PerformActions'; |
| 51 | import RefreshStatus from './components/dialogs/RefreshStatus'; |
sebdet | 2e9ae12 | 2019-11-15 16:28:55 +0100 | [diff] [blame] | 52 | import DeployLoopModal from './components/dialogs/Loop/DeployLoopModal'; |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 53 | import Alert from 'react-bootstrap/Alert'; |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 54 | |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 55 | import { Link } from 'react-router-dom'; |
| 56 | |
| 57 | const StyledMainDiv = styled.div` |
| 58 | background-color: ${props => props.theme.backgroundColor}; |
| 59 | ` |
| 60 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 61 | const ProjectNameStyled = styled.a` |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 62 | vertical-align: middle; |
| 63 | padding-left: 30px; |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 64 | font-size: 36px; |
| 65 | font-weight: bold; |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 66 | ` |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 67 | |
| 68 | const StyledRouterLink = styled(Link)` |
| 69 | color: ${props => props.theme.menuFontColor}; |
| 70 | background-color: ${props => props.theme.backgroundColor}; |
| 71 | ` |
| 72 | |
| 73 | const StyledLoginInfo = styled.a` |
| 74 | color: ${props => props.theme.menuFontColor}; |
| 75 | background-color: ${props => props.theme.backgroundColor}; |
| 76 | ` |
| 77 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 78 | const LoopViewDivStyled = styled.div` |
sebdet | 190227a | 2019-07-19 16:51:19 +0200 | [diff] [blame] | 79 | height: 100%; |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 80 | overflow: hidden; |
| 81 | margin-left: 10px; |
| 82 | margin-right: 10px; |
| 83 | margin-bottom: 10px; |
| 84 | color: ${props => props.theme.loopViewerFontColor}; |
| 85 | background-color: ${props => props.theme.loopViewerBackgroundColor}; |
| 86 | border: 1px solid transparent; |
| 87 | border-color: ${props => props.theme.loopViewerHeaderBackgroundColor}; |
| 88 | ` |
| 89 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 90 | const LoopViewHeaderDivStyled = styled.div` |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 91 | background-color: ${props => props.theme.loopViewerHeaderBackgroundColor}; |
| 92 | padding: 10px 10px; |
| 93 | color: ${props => props.theme.loopViewerHeaderFontColor}; |
| 94 | ` |
| 95 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 96 | const LoopViewBodyDivStyled = styled.div` |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 97 | background-color: ${props => (props.theme.loopViewerBackgroundColor)}; |
| 98 | padding: 10px 10px; |
| 99 | color: ${props => (props.theme.loopViewerHeaderFontColor)}; |
| 100 | height: 95%; |
| 101 | ` |
| 102 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 103 | export default class LoopUI extends React.Component { |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 104 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 105 | state = { |
| 106 | userName: null, |
Ted Humphrey | 01e5fde | 2020-01-27 18:57:39 -0500 | [diff] [blame] | 107 | loopName: OnapConstants.defaultLoopName, |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 108 | loopCache: new LoopCache({}), |
| 109 | showAlert: false |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 110 | }; |
xuegao | 7c7323d | 2019-07-09 11:52:20 +0200 | [diff] [blame] | 111 | |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 112 | constructor() { |
| 113 | super(); |
| 114 | this.getUser = this.getUser.bind(this); |
sebdet | 687b8de | 2019-08-26 14:29:11 -0700 | [diff] [blame] | 115 | this.logout = this.logout.bind(this); |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 116 | this.updateLoopCache = this.updateLoopCache.bind(this); |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 117 | this.loadLoop = this.loadLoop.bind(this); |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 118 | this.closeLoop = this.closeLoop.bind(this); |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 119 | this.showAlert = this.showAlert.bind(this); |
| 120 | this.disableAlert = this.disableAlert.bind(this); |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 121 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 122 | |
sebdet | 2dacb9b | 2019-07-17 13:48:44 +0200 | [diff] [blame] | 123 | componentWillMount() { |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 124 | this.getUser(); |
| 125 | } |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 126 | |
| 127 | getUser() { |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 128 | UserService.login().then(user => { |
| 129 | this.setState({ userName: user }) |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 130 | }); |
| 131 | } |
sebdet | 687b8de | 2019-08-26 14:29:11 -0700 | [diff] [blame] | 132 | |
| 133 | logout() { |
| 134 | UserService.logout().then(user => { |
| 135 | this.setState({ userName: user }); |
| 136 | window.location.reload(); |
| 137 | }); |
| 138 | |
| 139 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 140 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 141 | renderMenuNavBar() { |
| 142 | return ( |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 143 | <MenuBar loopName={this.state.loopName}/> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 144 | ); |
| 145 | } |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 146 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 147 | renderUserLoggedNavBar() { |
| 148 | return ( |
| 149 | <Navbar.Text> |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 150 | <StyledLoginInfo>Signed in as: </StyledLoginInfo> |
| 151 | <StyledRouterLink to="/userInfo">{this.state.userName}</StyledRouterLink> |
| 152 | <StyledRouterLink to="/logout/"> (logout)</StyledRouterLink> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 153 | </Navbar.Text> |
| 154 | ); |
| 155 | } |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 156 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 157 | renderLogoNavBar() { |
| 158 | return ( |
| 159 | <Navbar.Brand> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 160 | <img height="50px" width="234px" src={logo} alt="" /> |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 161 | <ProjectNameStyled>CLAMP</ProjectNameStyled> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 162 | </Navbar.Brand> |
| 163 | ); |
| 164 | } |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 165 | |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 166 | renderAlertBar() { |
| 167 | return ( |
| 168 | <Alert variant="danger" show={this.state.showAlert} onClose={this.disableAlert} dismissible> |
| 169 | {this.state.showMessage} |
| 170 | </Alert> |
| 171 | ); |
| 172 | } |
| 173 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 174 | renderNavBar() { |
| 175 | return ( |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 176 | <Navbar > |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 177 | {this.renderLogoNavBar()} |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 178 | <Navbar.Toggle aria-controls="responsive-navbar-nav" /> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 179 | {this.renderMenuNavBar()} |
| 180 | {this.renderUserLoggedNavBar()} |
| 181 | </Navbar> |
| 182 | ); |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 183 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 184 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 185 | renderLoopViewHeader() { |
| 186 | return ( |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 187 | <LoopViewHeaderDivStyled> |
sebdet | 190227a | 2019-07-19 16:51:19 +0200 | [diff] [blame] | 188 | Loop Viewer - {this.state.loopName} |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 189 | </LoopViewHeaderDivStyled> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 190 | ); |
| 191 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 192 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 193 | renderLoopViewBody() { |
| 194 | return ( |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 195 | <LoopViewBodyDivStyled> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 196 | <LoopSvg loopCache={this.state.loopCache} /> |
sebdet | 190227a | 2019-07-19 16:51:19 +0200 | [diff] [blame] | 197 | <LoopStatus loopCache={this.state.loopCache}/> |
sebdet | c1ccc54 | 2019-07-19 09:50:33 +0200 | [diff] [blame] | 198 | <LoopLogs loopCache={this.state.loopCache} /> |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 199 | </LoopViewBodyDivStyled> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 200 | ); |
| 201 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 202 | |
xuegao | e52d572 | 2019-07-25 15:43:06 +0200 | [diff] [blame] | 203 | getLoopCache() { |
| 204 | return this.state.loopCache; |
| 205 | |
| 206 | } |
xuegao | 5fe750c | 2019-08-06 13:03:53 +0200 | [diff] [blame] | 207 | |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 208 | renderLoopViewer() { |
| 209 | return ( |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 210 | <LoopViewDivStyled> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 211 | {this.renderLoopViewHeader()} |
| 212 | {this.renderLoopViewBody()} |
sebdet | 4946e5b | 2019-07-10 12:32:36 +0200 | [diff] [blame] | 213 | </LoopViewDivStyled> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 214 | ); |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 215 | } |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 216 | |
| 217 | updateLoopCache(loopJson) { |
xuegao | 52432d6 | 2019-10-04 16:11:22 +0200 | [diff] [blame] | 218 | this.setState({ loopCache: new LoopCache(loopJson) }); |
| 219 | this.setState({ loopName: this.state.loopCache.getLoopName() }); |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 220 | console.info(this.state.loopName+" loop loaded successfully"); |
| 221 | } |
xuegao | 5fe750c | 2019-08-06 13:03:53 +0200 | [diff] [blame] | 222 | |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 223 | showAlert(message) { |
| 224 | this.setState ({ showAlert: true, showMessage:message }); |
| 225 | } |
| 226 | |
| 227 | disableAlert() { |
| 228 | this.setState ({ showAlert: false }); |
| 229 | } |
| 230 | |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 231 | loadLoop(loopName) { |
| 232 | LoopService.getLoop(loopName).then(loop => { |
| 233 | console.debug("Updating loopCache"); |
xuegao | ac42c4b | 2019-10-09 16:12:37 +0200 | [diff] [blame] | 234 | LoopActionService.refreshStatus(loopName).then(data => { |
| 235 | this.updateLoopCache(data); |
| 236 | this.props.history.push('/'); |
| 237 | }) |
| 238 | .catch(error => { |
| 239 | this.updateLoopCache(loop); |
| 240 | this.props.history.push('/'); |
| 241 | }); |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 242 | }); |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 243 | } |
| 244 | |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 245 | closeLoop() { |
Ted Humphrey | 01e5fde | 2020-01-27 18:57:39 -0500 | [diff] [blame] | 246 | this.setState({ loopCache: new LoopCache({}), loopName: OnapConstants.defaultLoopName }); |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 247 | this.props.history.push('/'); |
| 248 | } |
sebdet | 687b8de | 2019-08-26 14:29:11 -0700 | [diff] [blame] | 249 | |
| 250 | render() { |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 251 | return ( |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 252 | <StyledMainDiv id="main_div"> |
ash74268 | 3a83e2a | 2020-01-31 15:40:15 +0000 | [diff] [blame] | 253 | <Route path="/uploadToscaPolicyModal" render={(routeProps) => (<UploadToscaPolicyModal {...routeProps} />)} /> |
drveerendra | 684057e | 2019-11-11 19:37:39 -0500 | [diff] [blame] | 254 | <Route path="/viewToscaPolicyModal" render={(routeProps) => (<ViewToscaPolicyModal {...routeProps} />)} /> |
sebdet | 3b7f669 | 2020-02-17 06:03:31 -0800 | [diff] [blame] | 255 | <Route path="/ViewLoopTemplatesModal" render={(routeProps) => (<ViewLoopTemplatesModal {...routeProps} />)} /> |
sebdet | 493c383 | 2019-07-15 17:26:18 +0200 | [diff] [blame] | 256 | <Route path="/operationalPolicyModal" |
xuegao | 2f5b2cd | 2020-01-06 16:13:46 +0100 | [diff] [blame] | 257 | render={(routeProps) => (<OperationalPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
sebdet | 83ce076 | 2019-08-02 14:53:59 +0200 | [diff] [blame] | 258 | <Route path="/configurationPolicyModal/:componentName" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> |
| 259 | <Route path="/openLoop" render={(routeProps) => (<OpenLoopModal {...routeProps} loadLoopFunction={this.loadLoop} />)} /> |
sebdet | b13a790 | 2019-11-15 17:26:45 +0100 | [diff] [blame] | 260 | <Route path="/loopProperties" render={(routeProps) => (<LoopPropertiesModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> |
sebdet | aa486be | 2020-02-18 02:00:11 -0800 | [diff] [blame] | 261 | <Route path="/modifyLoop" render={(routeProps) => (<ModifyLoopModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} /> |
| 262 | |
sebdet | 4dc849f | 2019-11-15 17:49:42 +0100 | [diff] [blame] | 263 | <Route path="/userInfo" render={(routeProps) => (<UserInfoModal {...routeProps} />)} /> |
xuegao | 691e2b7 | 2019-08-16 11:07:24 +0200 | [diff] [blame] | 264 | <Route path="/closeLoop" render={this.closeLoop} /> |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 265 | <Route path="/submit" render={(routeProps) => (<PerformAction {...routeProps} loopAction="submit" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
| 266 | <Route path="/stop" render={(routeProps) => (<PerformAction {...routeProps} loopAction="stop" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
| 267 | <Route path="/restart" render={(routeProps) => (<PerformAction {...routeProps} loopAction="restart" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
| 268 | <Route path="/delete" render={(routeProps) => (<PerformAction {...routeProps} loopAction="delete" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
| 269 | <Route path="/undeploy" render={(routeProps) => (<PerformAction {...routeProps} loopAction="undeploy" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
sebdet | 2e9ae12 | 2019-11-15 16:28:55 +0100 | [diff] [blame] | 270 | <Route path="/deploy" render={(routeProps) => (<DeployLoopModal {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 271 | <Route path="/refreshStatus" render={(routeProps) => (<RefreshStatus {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} /> |
sebdet | 687b8de | 2019-08-26 14:29:11 -0700 | [diff] [blame] | 272 | <Route path="/logout" render={this.logout} /> |
| 273 | <GlobalClampStyle /> |
xuegao | 0efeb6b | 2019-10-07 14:36:34 +0200 | [diff] [blame] | 274 | {this.renderAlertBar()} |
sebdet | 8a02dd7 | 2019-07-31 17:11:11 +0200 | [diff] [blame] | 275 | {this.renderNavBar()} |
| 276 | {this.renderLoopViewer()} |
sebdet | d0d6563 | 2019-08-26 05:47:01 -0700 | [diff] [blame] | 277 | </StyledMainDiv> |
sebdet | c8d6130 | 2019-07-04 15:50:34 +0200 | [diff] [blame] | 278 | ); |
| 279 | } |
| 280 | } |