summaryrefslogtreecommitdiffstats
path: root/ui-react/src/LoopUI.js
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2019-08-12 12:04:29 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-12 12:04:29 +0000
commit13e8958238c4e7e870c04cca5035ba6d41b37889 (patch)
treea1a0e23d4ca3eebf456335521f474216e3b7ab4c /ui-react/src/LoopUI.js
parentb0710ba41d0d0cc4f06a4dc27c5090867c26113e (diff)
parent5fe750cb519c88a5fd6c55a93670354b78b806dc (diff)
Merge "Rework action itmes"
Diffstat (limited to 'ui-react/src/LoopUI.js')
-rw-r--r--ui-react/src/LoopUI.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js
index 643b32d14..c7080a2b6 100644
--- a/ui-react/src/LoopUI.js
+++ b/ui-react/src/LoopUI.js
@@ -41,6 +41,8 @@ import ConfigurationPolicyModal from './components/dialogs/ConfigurationPolicy/C
import LoopProperties from './components/dialogs/LoopProperties';
import UserInfo from './components/dialogs/UserInfo';
import LoopService from './api/LoopService';
+import PerformAction from './components/menu/PerformActions';
+import RefreshStatus from './components/menu/RefreshStatus';
const ProjectNameStyled = styled.a`
vertical-align: middle;
@@ -80,7 +82,7 @@ export default class LoopUI extends React.Component {
state = {
userName: null,
loopName: LoopUI.defaultLoopName,
- loopCache: new LoopCache({}),
+ loopCache: new LoopCache({})
};
constructor() {
@@ -102,7 +104,7 @@ export default class LoopUI extends React.Component {
renderMenuNavBar() {
return (
- <MenuBar loopCache={this.state.loopCache}/>
+ <MenuBar/>
);
}
@@ -155,6 +157,7 @@ export default class LoopUI extends React.Component {
return this.state.loopCache;
}
+
renderLoopViewer() {
return (
<LoopViewDivStyled>
@@ -169,7 +172,7 @@ export default class LoopUI extends React.Component {
this.setState({ loopName: this.state.loopCache.getLoopName() });
console.info(this.state.loopName+" loop loaded successfully");
}
-
+
loadLoop(loopName) {
LoopService.getLoop(loopName).then(loop => {
console.debug("Updating loopCache");
@@ -187,6 +190,12 @@ export default class LoopUI extends React.Component {
<Route path="/loopProperties" render={(routeProps) => (<LoopProperties {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} />
<Route path="/userInfo" render={(routeProps) => (<UserInfo {...routeProps} />)} />
<Route path="/closeLoop" render={(routeProps) => (<Redirect to='/'/>)} />
+ <Route path="/submit" render={(routeProps) => (<PerformAction {...routeProps} loopAction="submit" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
+ <Route path="/stop" render={(routeProps) => (<PerformAction {...routeProps} loopAction="stop" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
+ <Route path="/restart" render={(routeProps) => (<PerformAction {...routeProps} loopAction="restart" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
+ <Route path="/delete" render={(routeProps) => (<PerformAction {...routeProps} loopAction="delete" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
+ <Route path="/undeploy" render={(routeProps) => (<PerformAction {...routeProps} loopAction="undeploy" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
+ <Route path="/refreshStatus" render={(routeProps) => (<RefreshStatus {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache}/>)} />
<GlobalClampStyle />
{this.renderNavBar()}
{this.renderLoopViewer()}