You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/06/02 08:07:19 UTC

[GitHub] [brooklyn-ui] algairim commented on a change in pull request #210: blueprint composer can show annotations

algairim commented on a change in pull request #210:
URL: https://github.com/apache/brooklyn-ui/pull/210#discussion_r643750100



##########
File path: ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
##########
@@ -670,6 +685,46 @@ export function D3Blueprint(container, options) {
             .attr('transform', 'scale(0)')
             .remove();
         appendElement(adjunctData.enter(), 'rect', _configHolder.nodes.adjunct.rect);
+
+        let annotationElement = nodeGroup.append('g')
+            .attr('class', 'node-annotation');
+        let annotationData = nodeData.select('g.node-annotation')
+            .selectAll('foreignObject.node-annotation')
+            .data((d)=>{
+                let tags = d.data.metadata && d.data.metadata.get("brooklyn.tags");
+                if (tags) {
+                    let annotations = tags.map(tag => typeof tag === "object" && Object.keys(tag) && Object.keys(tag).length === 1 && tag["ui-composer-annotation"]).filter(x => x);

Review comment:
       Is `filter` at the end required?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org