Instantiate placement groups input fix
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Fri, 9 Jun 2017 13:39:34 +0000 (09:39 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Fri, 9 Jun 2017 13:39:34 +0000 (09:39 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx
skyquake/plugins/launchpad/src/instantiate/instantiateStore.js

index 6273d8c..5ffb4bc 100644 (file)
@@ -168,8 +168,8 @@ export default class InstantiateInputParams extends Component {
                             return (
 
                                   <div className="input_group" key={j}>
-                                    <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
-                                    <TextInput type="text" onChange={props.nsFn.placementGroupUpdate.bind(self, i, j, 'value')} placeholder="VALUE"  value={value} />
+                                    <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'key')} placeholder="KEY" value={key} />
+                                    <TextInput type="text" onChange={props.nsFn.hostAggregateUpdate.bind(self, i, j, 'value')} placeholder="VALUE"  value={value} />
                                     <span onClick={props.nsFn.removeHostAggregate.bind(self, i, j)} className="removeInput"><img src={imgRemove} />Remove</span>
                                   </div>
                             )
index 0d9e1b6..dcf6e9e 100644 (file)
@@ -310,14 +310,16 @@ class LaunchNetworkServiceStore {
                     dataCenterID: JSON.parse(dataCenter.target.value)
                 });
             },
-            placementGroupUpdate: (i, k, value) => {
+            placementGroupUpdate: (i, k, event) => {
+                let value = event.target.value;
                 let pg = self['ns-placement-groups'];
                 pg[i][k] = value;
                 self.setState({
                     'ns-placement-groups': pg
                 })
             },
-            hostAggregateUpdate: (pgi, hai, k, value) => {
+            hostAggregateUpdate: (pgi, hai, k, event) => {
+                let value = event.target.value;
                 let pg = self['ns-placement-groups'];
                 let ha = pg[pgi]['host-aggregate'][hai];
                 ha[k] = value;
@@ -349,14 +351,16 @@ class LaunchNetworkServiceStore {
     vnfFn = () => {
         let self = this;
         return {
-            placementGroupUpdate: (i, k, value) => {
+            placementGroupUpdate: (i, k, event) => {
+                let value = event.target.value;
                 let pg = self['vnf-placement-groups'];
                 pg[i][k] = value;
                 self.setState({
                     'vnf-placement-groups': pg
                 })
             },
-            hostAggregateUpdate: (pgi, hai, k, value) => {
+            hostAggregateUpdate: (pgi, hai, k, event) => {
+                let value = event.target.value;
                 let pg = self['vnf-placement-groups'];
                 let ha = pg[pgi]['host-aggregate'][hai];
                 ha[k] = value;