summaryrefslogtreecommitdiffstats
path: root/ui-react
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2019-10-09 16:12:37 +0200
committersebdet <sebastien.determe@intl.att.com>2019-10-09 17:39:12 +0200
commitac42c4b3e7161a76bfa67cae9636ea63d7bd81f8 (patch)
treecad986dd9544bb349c5b7d255063b528879b6e4f /ui-react
parent4a00d035390b67c175669fb22e2455ce3e8bb667 (diff)
Fix policy status issue
Change the initial status of policy from SENT_AND_DEPLOYED to NOT_SENT. Issue-ID: CLAMP-533 Change-Id: If4fa22fc2e3fb33500502bab41e49de9000dd7e7 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react')
-rw-r--r--ui-react/src/LoopUI.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js
index ad970d811..ff3c4445a 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('/');
+ });
});
}