algairim commented on a change in pull request #229:
URL: https://github.com/apache/brooklyn-ui/pull/229#discussion_r656007008
##########
File path:
ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
##########
@@ -93,22 +117,10 @@ export function saveToCatalogModalDirective($rootScope,
$uibModal, $injector, $f
}
if (!$scope.isNewFromTemplate()) {
// (these should only be set if not making something new from
a template, as the entity items will refer to the template)
-
- // the name and the ID can be set in the UI,
- // or all can be inherited if root node is a known application
type we are editting
- // (normally in those cases $scope.config will already be set
by caller, but maybe not always)
- if (!$scope.config.name && entity.hasName()) {
- $scope.config.name = entity.name;
- }
- if (!$scope.config.symbolicName && (entity.hasId() ||
metadata.has('id'))) {
- $scope.config.symbolicName = entity.id ||
metadata.get('id');
- }
+ (composerOverrides.getConfigNameFromEntity ||
getConfigNameFromEntity)(entity, $scope);
+ (composerOverrides.getSuggestedSymbolicNameFromBlueprint ||
getSuggestedSymbolicNameFromBlueprint)(entity, metadata, $scope);
(composerOverrides.getSuggestedVersionToSaveFromBlueprint ||
getSuggestedVersionToSaveFromBlueprint)(entity, metadata, $scope);
- if (!$scope.config.bundle) {
- if ($scope.config.symbolicName) {
- $scope.config.bundle = $scope.config.symbolicName;
- }
- }
+ (composerOverrides.getConfigBundleNameFromScope ||
getConfigBundleNameFromScope)($scope);
Review comment:
Grouping them together looks better.
--
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:
[email protected]