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 2019/03/07 11:41:29 UTC

[GitHub] [brooklyn-ui] tbouron commented on a change in pull request #124: DSL Viewer ignored literals; this fixes that and tidies the code a bit

tbouron commented on a change in pull request #124: DSL Viewer ignored literals; this fixes that and tidies the code a bit
URL: https://github.com/apache/brooklyn-ui/pull/124#discussion_r263346080
 
 

 ##########
 File path: ui-modules/blueprint-composer/app/components/dsl-viewer/dsl-viewer.js
 ##########
 @@ -42,18 +42,24 @@ export function dslViewerDirective() {
     };
 
     function link(scope) {
-        scope.isTargetDsl = (dsl) => {
-            return dsl.kind === KIND.TARGET;
+        
+        scope.getIcon = (dsl) => {
 
 Review comment:
   Good point regarding the mode vs name. However, I strongly disagree about doing this in Javascript. This is not the angular way because of performances. Calling the method in `ng-class` will force angular to compute this data on every digest cycle, whereas doing it in the HTML will trigger the evaluation only if the DSL name changes.

----------------------------------------------------------------
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


With regards,
Apache Git Services