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/09 14:38:55 UTC

[GitHub] [brooklyn-ui] iuliana opened a new pull request #216: Generate the catalog url

iuliana opened a new pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216


   ... when item is added from tha yaml editor. 


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



[GitHub] [brooklyn-ui] asfgit closed pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216


   


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



[GitHub] [brooklyn-ui] algairim commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
algairim commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648380810



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.modal.template.html
##########
@@ -122,7 +122,7 @@ <h3>You're all set!</h3>
             <p>What would you like to do next?</p>
             <button class="btn btn-default btn-block" ng-click="$dismiss('Continue editing')">Continue to edit this blueprint</button>
             <button class="btn btn-info btn-block" ng-click="$close(REASONS.new)">Create a new blueprint</button>
-            <a class="btn btn-primary btn-block" ng-href="/brooklyn-ui-catalog/#!/bundles/catalog-bom-{{catalogBundleId}}/{{config.version}}/types/{{catalogBundleBase}}/{{config.version}}">View in catalog</a>
+            <a class="btn btn-primary btn-block" ng-href="{{getCatalogURL()}}">View in catalog</a>

Review comment:
       No need to how this button if URL is not available or not valid, consider `ng-if` to hide it until it URL is valid, or at least disable.




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



[GitHub] [brooklyn-ui] iuliana commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648475752



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.modal.template.html
##########
@@ -122,7 +122,7 @@ <h3>You're all set!</h3>
             <p>What would you like to do next?</p>
             <button class="btn btn-default btn-block" ng-click="$dismiss('Continue editing')">Continue to edit this blueprint</button>
             <button class="btn btn-info btn-block" ng-click="$close(REASONS.new)">Create a new blueprint</button>
-            <a class="btn btn-primary btn-block" ng-href="/brooklyn-ui-catalog/#!/bundles/catalog-bom-{{catalogBundleId}}/{{config.version}}/types/{{catalogBundleBase}}/{{config.version}}">View in catalog</a>
+            <a class="btn btn-primary btn-block" ng-href="{{getCatalogURL()}}">View in catalog</a>

Review comment:
       @algairim I gave up the `ng-if`  because I noticed the modal title doesn't do it either. Sample: 
   ` <h3 class="modal-title">{{getTitle()}}</h3>`




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



[GitHub] [brooklyn-ui] algairim commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
algairim commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648520292



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
##########
@@ -157,6 +155,15 @@ export function CatalogItemModalController($scope, $filter, blueprintService, pa
                 return `${$scope.config.name || $scope.config.symbolicName || 'Blueprint'} ${$scope.isUpdate() ? 'updated' : 'saved'}`;
         }
     };
+    $scope.getCatalogURL = () => {
+        switch ($scope.state.view) {
+            case VIEWS.form:
+                return '';

Review comment:
       `null` makes sense if you apply any sort of `if` condition to result of `getCatalogURL()`, either implicit or explicit. No need to change it otherwise.




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



[GitHub] [brooklyn-ui] algairim commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
algairim commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648381587



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
##########
@@ -157,6 +155,15 @@ export function CatalogItemModalController($scope, $filter, blueprintService, pa
                 return `${$scope.config.name || $scope.config.symbolicName || 'Blueprint'} ${$scope.isUpdate() ? 'updated' : 'saved'}`;
         }
     };
+    $scope.getCatalogURL = () => {
+        switch ($scope.state.view) {
+            case VIEWS.form:
+                return '';

Review comment:
       return null? so it can be used in `ng-if="getCatalogURL()"`




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



[GitHub] [brooklyn-ui] iuliana commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648475752



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.modal.template.html
##########
@@ -122,7 +122,7 @@ <h3>You're all set!</h3>
             <p>What would you like to do next?</p>
             <button class="btn btn-default btn-block" ng-click="$dismiss('Continue editing')">Continue to edit this blueprint</button>
             <button class="btn btn-info btn-block" ng-click="$close(REASONS.new)">Create a new blueprint</button>
-            <a class="btn btn-primary btn-block" ng-href="/brooklyn-ui-catalog/#!/bundles/catalog-bom-{{catalogBundleId}}/{{config.version}}/types/{{catalogBundleBase}}/{{config.version}}">View in catalog</a>
+            <a class="btn btn-primary btn-block" ng-href="{{getCatalogURL()}}">View in catalog</a>

Review comment:
       @algairim  I cannot call a function as argument in an `ng-if`. I gave up the `ng-if`  because I noticed the modal title doesn't do it either. Sample: 
   ` <h3 class="modal-title">{{getTitle()}}</h3>`




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



[GitHub] [brooklyn-ui] ahgittin commented on pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
ahgittin commented on pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#issuecomment-858136924


   lgtm


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



[GitHub] [brooklyn-ui] iuliana commented on a change in pull request #216: Generate the catalog url

Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #216:
URL: https://github.com/apache/brooklyn-ui/pull/216#discussion_r648476593



##########
File path: ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
##########
@@ -157,6 +155,15 @@ export function CatalogItemModalController($scope, $filter, blueprintService, pa
                 return `${$scope.config.name || $scope.config.symbolicName || 'Blueprint'} ${$scope.isUpdate() ? 'updated' : 'saved'}`;
         }
     };
+    $scope.getCatalogURL = () => {
+        switch ($scope.state.view) {
+            case VIEWS.form:
+                return '';

Review comment:
       @algairim This url is not shown when the modal is in `form` state so its value is useless here. I can return `null` sure.




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