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_r235936483
  
    --- 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 --
    
    @tbouron noted to me
    
    > Hum but the parameters are already definitions, we just need to add them into the model which Aled did. There is no need to loop over the parameters to add them again
    
    i think that makes sense so he is right, let's remove this method @aledsage -- and be sure to test DSL when we have parameters defined via the UI


---