From: KIRAN KASHALKAR Date: Tue, 31 Jan 2017 05:35:09 +0000 (-0500) Subject: RIFT-15502: Create Virtual Link does not work after the first VL create X-Git-Tag: v1.1.0~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F1051%2F1;p=osm%2FUI.git RIFT-15502: Create Virtual Link does not work after the first VL create Signed-off-by: KIRAN KASHALKAR --- diff --git a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreate.jsx b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreate.jsx index 30f76942f..d3dc011f1 100644 --- a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreate.jsx +++ b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreate.jsx @@ -39,6 +39,7 @@ class NsVirtualLinkCreate extends React.Component { componentWillMount() { (!this.state.nsrId && this.props.nsrId) && this.Store.saveNSRId(this.props.nsrId); this.Store.saveMode(this.props.mode); + this.Store.saveOnSuccess(this.props.onSuccess); switch (this.props.mode) { case 'creating': if (!this.state.vld) { diff --git a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreateStore.js b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreateStore.js index 61ebe3d86..dbd7f58d4 100644 --- a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreateStore.js +++ b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinkCreateStore.js @@ -84,7 +84,8 @@ class NSVirtualLinkCreateStore { saveVnfdIdRefs: this.saveVnfdIdRefs, saveIpProfileNames: this.saveIpProfileNames, removeVirtualLink: this.removeVirtualLink, - saveMode: this.saveMode + saveMode: this.saveMode, + saveOnSuccess: this.saveOnSuccess }); } @@ -97,6 +98,12 @@ class NSVirtualLinkCreateStore { }); } + saveOnSuccess = (onSuccess) => { + this.setState({ + onSuccess: onSuccess + }) + } + saveMode = (mode) => { this.setState({ mode: mode @@ -240,22 +247,13 @@ class NSVirtualLinkCreateStore { } createVirtualLinkSuccess(data) { - this.setState({ - // vld: this.vld, - mode: 'editing', - isLoading: false - }); + this.onSuccess(); } editVirtualLinkSuccess(data) { - this.setState({ - mode: 'editing', - isLoading: false - }); + this.onSuccess(); } deleteVirtualLinkSuccess(data) { - this.setState({ - deleteState: 'success' - }); + this.onSuccess(); } cleanupPayload = (mode, vld) => { diff --git a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx index 8870dfc19..fa09d9ffa 100644 --- a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx +++ b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx @@ -137,7 +137,7 @@ class NsVirtualLinks extends React.Component { let nsd = nsr.nsd && nsr.nsd; nsr['decorated-vlrs'] && nsr['decorated-vlrs'].map((vlr, vlrIndex) => { - let name = vlr.name || 'New virtual link being created'; + let name = vlr.name || 'Undergoing virtual link operation'; let operationalStatus = vlr['operational-status']; let vlrId = vlr['id']; let vldId = vlr['vld-ref']; @@ -208,7 +208,7 @@ class NsVirtualLinks extends React.Component {
VLD DETAILS
{ - + } );