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 2021/06/04 11:59:40 UTC

[GitHub] [brooklyn-ui] algairim commented on a change in pull request #212: Made sure the .config.bundle is initialized correctly and thus a corr…

algairim commented on a change in pull request #212:
URL: https://github.com/apache/brooklyn-ui/pull/212#discussion_r645514669



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
##########
@@ -101,9 +101,10 @@ export function saveToCatalogModalDirective($rootScope, $uibModal, $injector, $f
                     $scope.config.version = entity.version || metadata.get('version');
                 }
                 if (!$scope.config.bundle) {
-                    if ($scope.config.symbolicName) {
-                        $scope.config.bundle = $scope.config.symbolicName;
+                    if (!$scope.config.symbolicName) {
+                        $scope.config.symbolicName =  $scope.config.name;

Review comment:
       There is a lot of logic tied up to `symbolicName` and to its absence. It effects the behaviour of c`omposer-blueprint-name-validator` directive a well, the absence of any tests makes it harder to see. I would not initialise `symbolicName` here but assign the `conig.name` to `config.bundle` directly, if `symbolicName` is not initialised.
   `symbolicName` is initialized in couple of places already.




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