NO TICKET: Support for leaf lists in composer 06/806/1
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 13 Dec 2016 14:13:14 +0000 (09:13 -0500)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 14 Dec 2016 16:25:01 +0000 (11:25 -0500)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/composer/src/src/libraries/model/DescriptorModelMetaProperty.js

index efd06c0..67f34e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * 
+ *
  *   Copyright 2016 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   Copyright 2016 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,10 +35,10 @@ export default {
                return /leaf|choice/.test(property.type);
        },
        isList(property = {}) {
                return /leaf|choice/.test(property.type);
        },
        isList(property = {}) {
-               return /list|leaf-list/.test(property.type);
+        return /list|leaf_list/.test(property.type);
        },
        isLeafList(property = {}) {
        },
        isLeafList(property = {}) {
-               return property.type === 'leaf-list';
+        return property.type === 'leaf_list';
        },
        isArray(property = {}) {
                // give '1' or '0..N' or '0..1' or '0..5' determine if represents an array
        },
        isArray(property = {}) {
                // give '1' or '0..N' or '0..1' or '0..5' determine if represents an array
@@ -58,7 +58,7 @@ export default {
                return /^1/.test(property.cardinality);
        },
        isObject(property = {}) {
                return /^1/.test(property.cardinality);
        },
        isObject(property = {}) {
-               return !/^(leaf|leaf-list)$/.test(property.type);
+        return !/^(leaf|leaf_list)$/.test(property.type);
        },
        isSimpleList(property = {}) {
                return _.contains(DescriptorModelFields.simpleList, property.name);
        },
        isSimpleList(property = {}) {
                return _.contains(DescriptorModelFields.simpleList, property.name);