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/09/01 09:17:06 UTC

[GitHub] [brooklyn-ui] iuliana opened a new pull request #274: Added proper display of locations to avoid confusions

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


   Displaying more location info in the location summary in app inspector. 


-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Should be equivalent to `item.config.address` and `.endpoint`.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
           <ul>
               <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```
   
   Same logic could be applied to the double spaces by further HTML element structuring, if necessary.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @iuliana not really but the dot syntax is considered the standard for JSON-like structures. They have no functional difference but essentially
   - dots look simpler
   - brackets allow for complex or dynamic keys eg `myObj[getKey()]`
   
   Brackets basically hint that you're either accessing an array or have complex index keys and need that syntax. For the sake of uniformity I consider dots better with brackets used only on these exceptional cases, but that's a bit subjective .




-- 
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] iuliana merged pull request #274: Added proper display of locations to avoid confusions

Posted by GitBox <gi...@apache.org>.
iuliana merged pull request #274:
URL: https://github.com/apache/brooklyn-ui/pull/274


   


-- 
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] iuliana merged pull request #274: Added proper display of locations to avoid confusions

Posted by GitBox <gi...@apache.org>.
iuliana merged pull request #274:
URL: https://github.com/apache/brooklyn-ui/pull/274


   


-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Should be equivalent to `item.config.address` and `.endpoint`.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
           <ul>
               <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       The following code is unreachable
   
   ```
   ... | specToLabel:vm.metadata}}
   ```
   
   because of `ng-if`




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is reachable.




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       The following code is unreachable
   
   ```
   ... | specToLabel:vm.metadata}}
   ```
   
   because of `ng-if`

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       To simplify? e.g.
   ```
   <li ng-if="item.name"> <span>Name:  {{item.name}}</span> </li>
   ```




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou  I also noticed that `[]` syntax is needed when property names have dots in them. So the a`item.config['spec.final']` stays. :)




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :|




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```
   
   Same logic could be applied to the double spaces by further HTML element structuring, if necessary.




-- 
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] iuliana merged pull request #274: Added proper display of locations to avoid confusions

Posted by GitBox <gi...@apache.org>.
iuliana merged pull request #274:
URL: https://github.com/apache/brooklyn-ui/pull/274


   


-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou I actually like the `item.config['address']` syntax better. Is there any advantage to using one or the other ?




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       To simplify? e.g.
   ```
   <li ng-if="item.name"> <span>Name:  {{item.name}}</span> </li>
   ```




-- 
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] jcabrerizo commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Does `spec.final` contains the environment? if yes, good to me, just checking 




-- 
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] iuliana commented on pull request #274: Added proper display of locations to avoid confusions

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


   All looking swell now. Merging.


-- 
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] iuliana commented on pull request #274: Added proper display of locations to avoid confusions

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


   All looking swell now. Merging.


-- 
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] jcabrerizo commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Does `spec.final` contains the environment? if yes, good to me, just checking 




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Yes, it returns `vphere` for VMware and ` jclouds:aws-ec2` for AWS.




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Yes, it returns `vphere` for VMware and ` jclouds:aws-ec2` for AWS.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :|

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is reachable.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou I actually like the `item.config['address']` syntax better. Is there any advantage to using one or the other ?

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is not reachable.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou  I also noticed that `[]` syntax is needed when property names have dots in them. So the a`item.config['spec.final']` stays. :)




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Yes, it returns `vphere` for VMware and ` jclouds:aws-ec2` for AWS.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :|

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is reachable.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou I actually like the `item.config['address']` syntax better. Is there any advantage to using one or the other ?

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is not reachable.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @jathanasiou  I also noticed that `[]` syntax is needed when property names have dots in them. So the a`item.config['spec.final']` stays. :)




-- 
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] iuliana commented on pull request #274: Added proper display of locations to avoid confusions

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


   All looking swell now. Merging.


-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Should be equivalent to `item.config.address` and `.endpoint`.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
           <ul>
               <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```
   
   Same logic could be applied to the double spaces by further HTML element structuring, if necessary.

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @iuliana not really but the dot syntax is considered the standard for JSON-like structures. They have no functional difference but essentially
   - dots look simpler
   - brackets allow for complex or dynamic keys eg `myObj[getKey()]`
   
   Brackets basically hint that you're either accessing an array or have complex index keys and need that syntax. For the sake of uniformity I consider dots better with brackets used only on these exceptional cases, but that's a bit subjective .




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.spec"> <span> Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.type"> <span> Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['address']"> <span> Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['endpoint']"> <span> Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @iuliana not really but the dot syntax is considered the standard for JSON-like structures. They have no functional difference but essentially
   - dots look simpler
   - brackets allow for complex or dynamic keys eg `myObj[getKey()]`
   
   Brackets basically hint that you're either accessing an array or have complex index keys and need that syntax. For the sake of uniformity I consider dots better with brackets used only on these exceptional cases, but that's a bit subjective .




-- 
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] iuliana commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       @algairim  I have no idea how but ... `specToLabelFilter` function in  `summary.controller.js` is called. :| So it is not reachable.




-- 
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] jcabrerizo commented on a change in pull request #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                            <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Does `spec.final` contains the environment? if yes, good to me, just checking 




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       The following code is unreachable
   
   ```
   ... | specToLabel:vm.metadata}}
   ```
   
   because of `ng-if`

##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,13 +86,28 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
-                <ul>
-                    <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
-                    </li>
-                </ul>
+                <p>This entity is associated with <ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location ', 'other': 'these locations'}"></ng-pluralize></p>
+                    <div ng-repeat="item in vm.location.items track by item.id">
+                        <div class="panel panel-default">
+                            <div class="panel-heading">
+                                <h3 class="panel-title">Location ID: <strong>{{item.id | specToLabel:vm.metadata}}</strong></h3>
+                            </div>
+                            <div class="panel-body">
+                                <ul>
+                                    <li ng-if="item.name"> <span>Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['spec.final']"> <span> Environment:  {{item.config['spec.final'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.spec"> <span>Spec:  {{item.spec | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.type"> <span>Type:  {{item.type | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['address']"> <span>Address:  {{item.config['address'] | specToLabel:vm.metadata}}</span> </li>
+                                    <li ng-if="item.config['endpoint']"> <span>Endpoint:  {{item.config['endpoint'] | specToLabel:vm.metadata}}</span> </li>

Review comment:
       To simplify? e.g.
   ```
   <li ng-if="item.name"> <span>Name:  {{item.name}}</span> </li>
   ```




-- 
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 #274: Added proper display of locations to avoid confusions

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



##########
File path: ui-modules/app-inspector/app/views/main/inspect/summary/summary.template.html
##########
@@ -86,11 +86,19 @@ <h2 ng-if="vm.entity" class="entity-name">
 
         <div ng-if="vm.location.items">
             <div ng-if="vm.location.items.length !== 0 || !vm.location.multi">
-                <p>This entity is running on <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': '{} location', 'other': '{} locations'}"></ng-pluralize></em></p>
+                <p>This entity is associated with <em><ng-pluralize count="vm.location.items.length" when="{'0': 'no locations', 'one': 'this location {} ', 'other': 'these locations'}"></ng-pluralize></em></p>
                 <ul>
                     <li ng-repeat="item in vm.location.items track by item.id">
-                        <strong>{{item.config['spec.final'] | specToLabel:vm.metadata}}</strong>
-                        <span ng-if="item.config.availabilityZone">in <code>{{item.config.availabilityZone}}</code> availability zone</span>
+                        <span ng-if="item.id"> Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong> </span>
+                        <ul>
+                            <li ng-if="item.name"> <span> Name:  {{item.name | specToLabel:vm.metadata}}</span> </li>

Review comment:
       Consider using CSS rules instead for spacing/padding eg
   
   ```
   <ul class="location-items">
       <li ng-repeat="item in vm.location.items track by item.id">
           <span ng-if="item.id">Location Id: <strong>{{item.id | specToLabel:vm.metadata}}</strong></span>
           <ul>
               <li ng-if="item.name"><span> Name:  {{item.name | specToLabel:vm.metadata}}</span></li>
   ...
   ```
   
   ```
   .location-items {
       li > span {
           padding: 0px 1em;
       }
   }
   ```




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