osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-ui pull request #112: DSL editor: support referencing `brooklyn.par...


Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/112#discussion_r235929789
  
    --- Diff: ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js ---
    @@ -512,6 +514,16 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
             entity.miscData.set('config', allConfig);
         }
     
    +    function addUnlistedParameterDefinitions(entity) {
    +        let allParams = entity.miscData.get('parameters') || [];
    +        entity.parameters.forEach((param) => {
    +            if (!allParams.some((e) => e.name === param.name)) {
    +                allParams.push(param);
    +            }
    +        });
    +        entity.miscData.set('parameters', allParams);
    +    }
    --- End diff --
    
    it's doing the same as `addUnlistedConfigKeyDefinition` -- although why it is needed I'm not clear, feels like it should be the responsibility of `miscData` to populate those, not this code here.
    
    worth a comment to explain but not needed for this PR.
    
    i say this is good to merge.


---