X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Finstantiate%2FinstantiateStore.js;h=0d9e1b6e4ed26279ecd83761d2dbf1d3c435dcdd;hp=0e91ee38419017665bd772a30d9401fc2cfe2e1d;hb=c09a6948835c9e519829e44f20d649a0dc555f3e;hpb=97a42df90e3612d2342f4ae2bbcf19879830313e diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js index 0e91ee384..0d9e1b6e4 100644 --- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js +++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js @@ -140,7 +140,7 @@ class LaunchNetworkServiceStore { Alt.actions.global.showNotification.defer({type: 'warning', msg: 'One or more VIM accounts have failed to connect'}); } if(cloudAccounts && cloudAccounts.length > 0) { - newState.selectedCloudAccount = cloudAccounts[0]; + newState.selectedCloudAccount = newState.cloudAccounts[0]; if (cloudAccounts[0]['account-type'] == 'openstack') { newState.displayPlacementGroups = true; } else { @@ -191,6 +191,9 @@ class LaunchNetworkServiceStore { } launchNSRError(data) { var msg = 'Something went wrong while trying to instantiate. Check the error logs for more information'; + if(data) { + msg = data; + } if (data.error) { msg = data.error; } @@ -707,6 +710,10 @@ class LaunchNetworkServiceStore { if (this.state.ro && this.state.ro['account-type'] == 'openmano') { payload['om-datacenter'] = this.state.dataCenterID; } else { + if(!this.state.selectedCloudAccount) { + Alt.actions.global.showNotification.defer("No VIM Account Selected"); + return; + } payload["cloud-account"] = this.state.selectedCloudAccount.name; } if (this.state.hasConfigureNSD) {