aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Loop/OpenLoopModal.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-02-18 02:00:11 -0800
committerSébastien Determe <sebastien.determe@intl.att.com>2020-02-25 10:57:35 +0000
commitaa486be66b1c29ad2e953cb44d105ca1bde40b1c (patch)
treeb5893560b1eee8f1e456104deec7924f05e4fbfb /ui-react/src/components/dialogs/Loop/OpenLoopModal.js
parent4e8e11afced0693e24074fd6bb8d5b2cace98ab6 (diff)
Modify the Ui
Modify the Ui to have a modify option in the menu so that the user can tune the loop instance Issue-ID: CLAMP-648 Change-Id: I57523bc1c3afaf5ca5a2acf5c59823df06fd4cd9 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/Loop/OpenLoopModal.js')
-rw-r--r--ui-react/src/components/dialogs/Loop/OpenLoopModal.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui-react/src/components/dialogs/Loop/OpenLoopModal.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js
index fbfc727e..4e8d9782 100644
--- a/ui-react/src/components/dialogs/Loop/OpenLoopModal.js
+++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js
@@ -68,15 +68,16 @@ export default class OpenLoopModal extends React.Component {
getLoopNames() {
LoopService.getLoopNames().then(loopNames => {
- const loopOptions = loopNames.map((loopName) => { return { label: loopName, value: loopName } });
- this.setState({ loopNames: loopOptions })
+ if (Object.entries(loopNames).length !== 0) {
+ const loopOptions = loopNames.filter(loopName => loopName!=='undefined').map((loopName) => { return { label: loopName, value: loopName } });
+ this.setState({ loopNames: loopOptions })
+ }
});
}
handleOpen() {
console.info("Loop " + this.state.chosenLoopName + " is chosen");
- this.setState({ show: false });
- this.props.history.push('/');
+ this.handleClose();
this.props.loadLoopFunction(this.state.chosenLoopName);
}