Merge "kibana authentication"
[clamp.git] / ui-react / src / LoopUI.js
index 4271f10..7d8fcb5 100644 (file)
@@ -38,6 +38,8 @@ import { Route, Redirect } from 'react-router-dom'
 import OpenLoopModal from './components/dialogs/OpenLoop/OpenLoopModal';
 import OperationalPolicyModal from './components/dialogs/OperationalPolicy/OperationalPolicyModal';
 import ConfigurationPolicyModal from './components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal';
+import LoopProperties from './components/dialogs/LoopProperties';
+import UserInfo from './components/dialogs/UserInfo';
 
 const ProjectNameStyled = styled.a`
        vertical-align: middle;
@@ -46,7 +48,7 @@ const ProjectNameStyled = styled.a`
 
 `
 const LoopViewDivStyled = styled.div`
-       height: 90vh;
+       height: 100%;
        overflow: hidden;
        margin-left: 10px;
        margin-right: 10px;
@@ -104,7 +106,7 @@ export default class LoopUI extends React.Component {
 
        renderMenuNavBar() {
                return (
-                       <MenuBar />
+                       <MenuBar loopCache={this.state.loopCache}/>
                );
        }
 
@@ -138,7 +140,7 @@ export default class LoopUI extends React.Component {
        renderLoopViewHeader() {
                return (
                        <LoopViewHeaderDivStyled>
-                               Loop Viewer - <LoopViewLoopNameSpanStyled id="loop_name">{this.state.loopName}</LoopViewLoopNameSpanStyled>
+                               Loop Viewer - {this.state.loopName}
                        </LoopViewHeaderDivStyled>
                );
        }
@@ -147,12 +149,16 @@ export default class LoopUI extends React.Component {
                return (
                        <LoopViewBodyDivStyled>
                                <LoopSvg loopCache={this.state.loopCache} />
-                               <LoopLogs />
-                               <LoopStatus />
+                               <LoopStatus loopCache={this.state.loopCache}/>
+                               <LoopLogs loopCache={this.state.loopCache} />
                        </LoopViewBodyDivStyled>
                );
        }
 
+       getLoopCache() {
+               return this.state.loopCache;
+
+       }
        renderLoopViewer() {
                return (
                        <LoopViewDivStyled>
@@ -175,8 +181,10 @@ export default class LoopUI extends React.Component {
                                {this.renderLoopViewer()}
                                <Route path="/operationalPolicyModal"
                                        render={(routeProps) => (<OperationalPolicyModal {...routeProps} loopCache={this.state.loopCache} />)} />
-                               <Route path="/configurationPolicyModal" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.state.loopCache} />)} />
+                               <Route path="/configurationPolicyModal/:componentName" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.state.loopCache} />)} />
                                <Route path="/openLoop" render={(routeProps) => (<OpenLoopModal {...routeProps} updateLoopCacheFunction={this.updateLoopCache} />)} />
+                               <Route path="/loopProperties" render={(routeProps) => (<LoopProperties {...routeProps} loopCache={this.getLoopCache()} />)} />
+                               <Route path="/userInfo" render={(routeProps) => (<UserInfo {...routeProps} />)} />
                                <Route path="/closeLoop" render={(routeProps) => (<Redirect to='/'/>)} />
                        </div>
                );