Merging master to master_vca_intg
[osm/UI.git] / skyquake / plugins / composer / src / src / libraries / model / DescriptorModelMetaFactory.js
index 258b894..b8624ec 100644 (file)
@@ -14,6 +14,7 @@ const assign = Object.assign;
 
 const exportInnerTypesMap = {
        'constituent-vnfd': 'nsd.constituent-vnfd',
+    'config-parameter-map': 'nsd.config-parameter-map',
        'vdu': 'vnfd.vdu'
 };
 
@@ -82,7 +83,20 @@ export default {
                // resolve paths like 'nsd' or 'vnfd.vdu' or 'nsd.constituent-vnfd'
                const found = utils.resolvePath(modelMetaByPropertyNameMap, getPathForType(typeOrPath));
                if (found) {
-                       return found[':meta'].properties.map(p => p.name);
+                       let result = [];
+                       found[':meta'].properties.map((p) => {
+                               // if(false) {
+                               if(p.type == 'choice') {
+                                       result.push(p.name)
+                                       return p.properties.map(function(q){
+                                               result.push(q.properties[0].name);
+                                       })
+
+                               } else  {
+                                       return result.push(p.name);
+                               }
+                       })
+                       return result;
                }
                console.warn('no model uiState found for type', typeOrPath);
        }