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/12/12 14:55:07 UTC

[GitHub] [brooklyn-ui] frogfather commented on a change in pull request #154: add custom onChange directive to correct file uploader bug

frogfather commented on a change in pull request #154: add custom onChange directive to correct file uploader bug
URL: https://github.com/apache/brooklyn-ui/pull/154#discussion_r357189050
 
 

 ##########
 File path: ui-modules/utils/catalog-uploader/catalog-uploader.js
 ##########
 @@ -120,7 +121,9 @@ export function catalogUploaderDirective($compile, brooklynCatalogUploader) {
         };
 
         scope.getCatalogItemUrl = (item)=> {
-            return item.supertypes.includes('org.apache.brooklyn.api.location.Location')
+            let itemTraits = item.tags? item.tags.find(item => item.hasOwnProperty("traits")) : {"traits":[]};
+            return (item.supertypes ? item.supertypes : itemTraits.traits)
+                .includes('org.apache.brooklyn.api.location.Location')
 
 Review comment:
   @tbouron  Strictly not, but it was a minor bug we corrected at the same time. Can make it into a separate PR if 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


With regards,
Apache Git Services