X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2FLoopUI.js;h=ff3c4445aa136b85bf02d1d91a5bbfc5793eb0b7;hb=ac42c4b3e7161a76bfa67cae9636ea63d7bd81f8;hp=ad970d811c174dcd4837bbc67d02e1a8a7c14166;hpb=4a00d035390b67c175669fb22e2455ce3e8bb667;p=clamp.git diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js index ad970d81..ff3c4445 100644 --- a/ui-react/src/LoopUI.js +++ b/ui-react/src/LoopUI.js @@ -33,6 +33,7 @@ import LoopLogs from './components/loop_viewer/logs/LoopLogs'; import LoopStatus from './components/loop_viewer/status/LoopStatus'; import UserService from './api/UserService'; import LoopCache from './api/LoopCache'; +import LoopActionService from './api/LoopActionService'; import { Route } from 'react-router-dom' import OpenLoopModal from './components/dialogs/OpenLoop/OpenLoopModal'; @@ -227,7 +228,14 @@ export default class LoopUI extends React.Component { loadLoop(loopName) { LoopService.getLoop(loopName).then(loop => { console.debug("Updating loopCache"); - this.updateLoopCache(loop); + LoopActionService.refreshStatus(loopName).then(data => { + this.updateLoopCache(data); + this.props.history.push('/'); + }) + .catch(error => { + this.updateLoopCache(loop); + this.props.history.push('/'); + }); }); }