Repository: brooklyn-ui
Updated Branches:
  refs/heads/master add0cd481 -> fb77f723f


DSL editor: allow ref to entity anywhere


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/e8762af2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/e8762af2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/e8762af2

Branch: refs/heads/master
Commit: e8762af21c1567493d491a2e4a5ff26384026941
Parents: 88c36c3
Author: Aled Sage <[email protected]>
Authored: Wed Oct 24 10:09:18 2018 +0100
Committer: Aled Sage <[email protected]>
Committed: Wed Oct 24 10:09:18 2018 +0100

----------------------------------------------------------------------
 .../app/components/dsl-editor/dsl-editor.js         | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/e8762af2/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
----------------------------------------------------------------------
diff --git 
a/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js 
b/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
index 3545ae5..707560b 100644
--- a/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
+++ b/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
@@ -319,15 +319,13 @@ export function dslEditorDirective($rootScope, $filter, 
$log, brUtilsGeneral, bl
     function getEntityItems(entity, type) {
         let entities = [];
 
-        if (entity.miscData.get('traits').some(trait => trait.match(type)) || 
!angular.isDefined(type)) {
-            entities.push({
-                id: entity._id,
-                type: DSL_KINDS.ENTITY,
-                entity: entity,
-                name: entity.miscData.get('typeName') || 
$filter('entityName')(entity) || 'New application',
-                description: entity.description
-            });
-        }
+        entities.push({
+            id: entity._id,
+            type: DSL_KINDS.ENTITY,
+            entity: entity,
+            name: entity.miscData.get('typeName') || 
$filter('entityName')(entity) || 'New application',
+            description: entity.description
+        });
 
         entities = 
Object.values(entity.getClusterMemberspecEntities()).reduce((acc, spec) => {
             return acc.concat(getEntityItems(spec, type));

Reply via email to