Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-ui/pull/63#discussion_r211312453
--- Diff:
ui-modules/blueprint-composer/app/components/dsl-viewer/dsl-viewer.js ---
@@ -51,7 +51,16 @@ export function dslViewerDirective() {
return [KIND.STRING, KIND.NUMBER].includes(dsl.kind);
};
scope.getRelatedEntity = () => {
- return scope.dsl.getRoot().relationships.find(entity =>
entity.id === scope.dsl.params[0].name);
+ if (scope.dsl.params.length > 0) {
+ // If the DSL is looking at an entity ID
+ return scope.dsl.getRoot().relationships.find(entity =>
scope.dsl.params.length > 0 && entity.id === scope.dsl.params[0].name)
--- End diff --
Ah good point, forgot to remove this, I'll do right now
---