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/08/02 12:50:24 UTC

[GitHub] [brooklyn-ui] algairim opened a new pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   Signed-off-by: Mykola Mandra <my...@cloudsoft.io>


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] jathanasiou commented on a change in pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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



##########
File path: ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
##########
@@ -92,6 +92,8 @@ export function dslEditorDirective($rootScope, $filter, $log, brUtilsGeneral, bl
             let name = item.name;
             if (attrs.length > 0) {
                 name += ` (${attrs.join(', ')})`;
+            } else {

Review comment:
       Might be cleaner as
   
   ```
   let { name, entity, id } = item;
   name += (attrs.length > 0)
     ? ` (${attrs.join(', ')})`
     : ` (${entity.id || id})`;
   ```




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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] algairim commented on pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   @ahgittin, we can display ID for every item in the search result, like for `Basic Entity (ID: e1)`, at the moment it is displayed for `item.type === DSL_KINDS.ENTITY` only as on the screenshot.
   As for changing the DSL editor scope: click on the canvas destroys right-hand-side menu and draws a new one for the node clicked. It will cost some effort to re-design that behaviour.


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] algairim commented on a change in pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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



##########
File path: ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
##########
@@ -92,6 +92,8 @@ export function dslEditorDirective($rootScope, $filter, $log, brUtilsGeneral, bl
             let name = item.name;
             if (attrs.length > 0) {
                 name += ` (${attrs.join(', ')})`;
+            } else {

Review comment:
       Good suggestion, I'll take it if more changes will be required in this PR.




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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] algairim commented on pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   IDs are now displayed for every item in the search result.


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] ahgittin commented on pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   @algairim should we also improve the entity identifying info in the blocks underneath the dropdown (lower right, where it says just Basic Entity) ?
   
   ![image](https://user-images.githubusercontent.com/496540/127990585-22efcbd6-ebc9-430d-a2e5-10b040293500.png)
   
   in addition i wonder if it's not too hard and you think it would be useful -- could we intercept clicks on entities in the canvas when the DSL editor is open and use those clicks to change the DSL editor scope to the entity selected on canvas?


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] asfgit closed pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] algairim commented on a change in pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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



##########
File path: ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
##########
@@ -92,6 +92,8 @@ export function dslEditorDirective($rootScope, $filter, $log, brUtilsGeneral, bl
             let name = item.name;
             if (attrs.length > 0) {
                 name += ` (${attrs.join(', ')})`;
+            } else {

Review comment:
       Improved in a6899562a7a127dac99f64040f90f8441bc7d305.




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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] algairim commented on pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   Proposed improvement to distinguish nodes in the Scope dropdown menu:
   <img width="227" alt="Screenshot 2021-08-02 at 13 45 18" src="https://user-images.githubusercontent.com/81319331/127864790-cfaa99a7-9ed0-4a46-ae11-815a388a98b9.png">
   


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] ahgittin commented on pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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


   :+1:


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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [brooklyn-ui] jathanasiou commented on a change in pull request #256: Display node ID in the Scope dropdown menu of the DSL editor

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



##########
File path: ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
##########
@@ -92,6 +92,8 @@ export function dslEditorDirective($rootScope, $filter, $log, brUtilsGeneral, bl
             let name = item.name;
             if (attrs.length > 0) {
                 name += ` (${attrs.join(', ')})`;
+            } else {

Review comment:
       Addendum: if this is used, remember to adjust the return statement as well.
   ```
       return {
           id,
           label: name,
           scope: 'On specific entity',
       };
   ```




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

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org