X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Finstantiate%2FinstantiateStore.js;h=480781685305a1a614e6bfaa54562ebd298a5869;hp=69953d700e7e424335011f3a2e3f05794ce8a278;hb=aa69ba06ab35143e5858273ed7aeab70b624109b;hpb=edfa3480565a7c950a062d2f80f5c81de014bba4 diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js index 69953d700..480781685 100644 --- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js +++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js @@ -233,7 +233,7 @@ class LaunchNetworkServiceStore { if(v['vim-network-name']) { v.type = 'vim-network-name'; } else { - v.type = 'unknown'; + v.type = 'none'; } } return v; @@ -447,7 +447,7 @@ class LaunchNetworkServiceStore { } else { delete vld[i]['dns-server']; } - if(type == 'unknown') { + if(type == 'none') { delete vld[i]['ip-profile-ref']; delete vld[i]['vim-network-name']; } @@ -527,9 +527,9 @@ class LaunchNetworkServiceStore { let self = this; return function(e) { if(self.ipProfiles[i]['ip-profile-params']['dns-server']) { - self.ipProfiles[i]['ip-profile-params']['dns-server'].unshift('') + self.ipProfiles[i]['ip-profile-params']['dns-server'].unshift({}) } else { - self.ipProfiles[i]['ip-profile-params']['dns-server'] = ['']; + self.ipProfiles[i]['ip-profile-params']['dns-server'] = [{}]; } self.setState({ipProfiles:self.ipProfiles}); @@ -544,6 +544,14 @@ class LaunchNetworkServiceStore { } self.setState({ipProfiles:self.ipProfiles}); } + }, + updateDNS: (i, k) => { + let self = this; + return function(e) { + let value = e.target.value; + self.ipProfiles[i]['ip-profile-params']['dns-server'][k].address = value; + self.setState({ipProfiles:self.ipProfiles}); + } } } } @@ -666,7 +674,7 @@ class LaunchNetworkServiceStore { nsdPayload['vnf-placement-groups'] && delete nsdPayload['vnf-placement-groups']; nsdPayload.vld = this.state.vld; nsdPayload.vld && nsdPayload.vld.map(function(v){ - delete v['unknown']; + delete v['none']; delete v.type; }) }