X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Finstantiate%2FinstantiateStore.js;h=2e6e24236fd867a584c19e4876ecce15d2c58c96;hb=9e66a7588db120992b341274de308c69ac0e9ff7;hp=a2152307b535df5b10848e5338851c5157777b21;hpb=6d5875bc7dc0c978ea27725e0425dff98d77d7f8;p=osm%2FUI.git diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js index a2152307b..2e6e24236 100644 --- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js +++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js @@ -131,7 +131,13 @@ class LaunchNetworkServiceStore { } getLaunchCloudAccountSuccess(cloudAccounts) { let newState = {}; - newState.cloudAccounts = cloudAccounts || []; + newState.cloudAccounts = cloudAccounts.filter(function(v) { + console.log(v) + return v['connection-status'].status == 'success'; + }) || []; + if(cloudAccounts.length != newState.cloudAccounts.length) { + 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]; if (cloudAccounts[0]['account-type'] == 'openstack') { @@ -156,7 +162,7 @@ class LaunchNetworkServiceStore { let newState = { dataCenters: dataCenters || [] }; - if (this.state.ro && this.state.ro['account-type'] == 'openmano') { + if (this.ro && this.ro['account-type'] == 'openmano') { newState.dataCenterID = dataCenters[this.ro.name][0].uuid } this.setState(newState) @@ -184,9 +190,9 @@ class LaunchNetworkServiceStore { } launchNSRError(error) { var msg = 'Something went wrong while trying to instantiate. Check the error logs for more information'; - // if(error) { - // msg = error; - // } + if(error) { + msg = error; + } Alt.actions.global.showNotification.defer(msg); Alt.actions.global.hideScreenLoader.defer(); this.setState({