Merge “Support new package file management scheme” into master
authorBob Gallagher <bob.gallagher@riftio.com>
Wed, 3 May 2017 21:37:52 +0000 (17:37 -0400)
committerBob Gallagher <bob.gallagher@riftio.com>
Wed, 3 May 2017 21:40:51 +0000 (17:40 -0400)
* commit '6051adb19db86ff89f3b0ce0a339c2f5ccea9522':

Signed-off-by: Bob Gallagher <bob.gallagher@riftio.com>
skyquake/plugins/composer/src/src/libraries/model/DescriptorModelMetaFactory.js
skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx
skyquake/plugins/launchpad/src/instantiate/instantiateStore.js

index 69098ec..1ba8912 100644 (file)
@@ -102,19 +102,15 @@ function serialize_leaf_empty(data) {
 function serialize_leaf_list(data) {
        data = data[this.name];
        if (data) {
-               commaSeparatedValues = data.reduce((d, v) => {
-                       let leaf = Serializer.leaf.call(this, d);
-                       let value = leaf & leaf[this.name];
-                       if (value && value.length) {
-                               if (v.length) {
-                                       v += ', ';
-                               }
-                               v += value;
+               data = data.reduce((result, value) => {
+                       if (value !== '' && value !== null && value !== undefined && typeof value !== 'object') {
+                               result.push(value);
                        }
-               }, "");
-               if (commaSeparatedValues.length) {
+                       return result;
+               }, []);
+               if (data.length){
                        let obj = {};
-                       obj[this.name] = commaSeparatedValues;
+                       obj[this.name] = data;
                        return obj;
                }
        }
index d1e295c..6273d8c 100644 (file)
@@ -105,12 +105,13 @@ export default class InstantiateInputParams extends Component {
   }
   inputParametersHTML = (props) => {
     let inputParameters = props.inputParameters;
+    const handleChange = (i, event) => props.updateInputParam(i, event.target.value);
     return inputParameters && inputParameters.map(function(input, i) {
         return (
                 <div className="configure-nsd_section" key={i}>
                   <h3 className="launchpadCard_title">Input Parameters</h3>
                   <div className="inputControls">
-                      <TextInput label={ input.label || input.xpath } type="text" onChange={props.updateInputParam.bind(self, i)} />
+                      <TextInput label={ input.label || input.xpath } type="text" onChange={handleChange.bind(this, i)} />
                   </div>
                 </div>
         )
index 3ec2a80..0e91ee3 100644 (file)
@@ -189,10 +189,10 @@ class LaunchNetworkServiceStore {
         });
         return window.location.hash = 'launchpad/' + tokenizedHash[2];
     }
-    launchNSRError(error) {
+    launchNSRError(data) {
         var msg = 'Something went wrong while trying to instantiate. Check the error logs for more information';
-        if(error) {
-            msg = error;
+        if (data.error) {
+            msg = data.error;
         }
         Alt.actions.global.showNotification.defer(msg);
         Alt.actions.global.hideScreenLoader.defer();