osdir.com


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

[GitHub] brooklyn-ui pull request #107: Use checkboxes for blueprint type in save mod...


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

    https://github.com/apache/brooklyn-ui/pull/107#discussion_r232603612
  
    --- Diff: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js ---
    @@ -162,9 +163,15 @@ export function CatalogItemModalController($scope, blueprintService, paletteApi,
     
             let bomItem = {
                 id: $scope.config.symbolicName,
    -            itemType: $scope.config.itemType,
                 item: blueprint
             };
    +
    +        // Set the itemType to the correct value or leave out entirely if config undefined
    +        let itemType = $scope.config.entity ? 'entity' : $scope.config.template ? 'template' : undefined;
    --- End diff --
    
    this logic is not what the use of checkboxes implies.  also, if nothing is selected `undefined` will generate invalild catalog BOM, no?
    
    suggest leaving it as radiobuttons with a variable `$scope.config.itemType` defaulting to `template ?


---