diff options
author | xuegao <xg353y@intl.att.com> | 2019-08-06 13:03:53 +0200 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2019-08-08 09:35:53 +0200 |
commit | 5fe750cb519c88a5fd6c55a93670354b78b806dc (patch) | |
tree | 88975cb5316b58ecde1fe7834e44fb7b141e6c24 /ui-react/src/LoopUI.js | |
parent | 6cfa53edcefa8472ccbd3c2d3c075392e769f071 (diff) |
Rework action itmes
Rework the submit, stop, restart, delete, undeploy and refresh status
actions.
Issue-ID: CLAMP-441,CLAMP-442,CLAMP-443,CLAMP-444,CLAMP-446,CLAMP-448
Change-Id: I38aed3a06fdcdf0f53fc9b8f8d2d9072f0932d55
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/LoopUI.js')
-rw-r--r-- | ui-react/src/LoopUI.js | 15 |
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()} |