This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new 536582b  Display deployment metadata on the entity popover in App 
Inspector
     new f6a4766  This closes #248
536582b is described below

commit 536582b0f36d383f8ba5ece3e7ccf2ccf2db81d4
Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com>
AuthorDate: Thu Jul 15 09:40:28 2021 +0100

    Display deployment metadata on the entity popover in App Inspector
---
 .../app-inspector/app/components/entity-tree/entity-node.html | 11 +++++++++++
 .../app/components/entity-tree/entity-tree.directive.js       |  4 +++-
 .../app/components/providers/application-api.provider.js      |  4 ++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git 
a/ui-modules/app-inspector/app/components/entity-tree/entity-node.html 
b/ui-modules/app-inspector/app/components/entity-tree/entity-node.html
index c7e854a..eb36243 100644
--- a/ui-modules/app-inspector/app/components/entity-tree/entity-node.html
+++ b/ui-modules/app-inspector/app/components/entity-tree/entity-node.html
@@ -60,6 +60,17 @@
                 <td><b>Number of children</b></td>
                 <td>{{nodesInCurrentView()}}</td>
             </tr>
+            <tr ng-repeat="(key, value) in (entity.sensors && 
entity.sensors['deployment.metadata']) || [] track by key">
+                <td ng-switch="key">
+                    <strong ng-switch-when="user">Deployed by</strong>
+                    <strong ng-switch-when="deploy_time">Deployed at</strong>
+                    <strong ng-switch-default>{{key}}</strong>
+                </td>
+                <td ng-switch="key">
+                    <span ng-switch-when="deploy_time">{{value | 
timeAgoFilter}}</span>
+                    <span ng-switch-default>{{value}}</span>
+                </td>
+            </tr>
         </table>
     </script>
 </div>
diff --git 
a/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js 
b/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js
index 0736143..ba19860 100644
--- 
a/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js
+++ 
b/ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js
@@ -60,7 +60,9 @@ export function entityTreeDirective() {
 
         let observers = [];
 
-        applicationApi.applicationsTree().then((response)=> {
+        applicationApi.applicationsTree({
+            sensors: 'deployment.metadata'
+        }).then((response)=> {
             vm.applications = response.data;
             analyzeRelationships(vm.applications);
 
diff --git 
a/ui-modules/app-inspector/app/components/providers/application-api.provider.js 
b/ui-modules/app-inspector/app/components/providers/application-api.provider.js
index c9ad9c6..f60d319 100644
--- 
a/ui-modules/app-inspector/app/components/providers/application-api.provider.js
+++ 
b/ui-modules/app-inspector/app/components/providers/application-api.provider.js
@@ -41,8 +41,8 @@ function ApplicationApi($http) {
     function getApplications() {
         return $http.get('/v1/applications', {observable: true, 
ignoreLoadingBar: true});
     }
-    function getApplicationsTree() {
-        return $http.get('/v1/applications/fetch', {observable: true, 
ignoreLoadingBar: true});
+    function getApplicationsTree(opts = {}) {
+        return $http.get('/v1/applications/fetch', {params: opts, observable: 
true, ignoreLoadingBar: true});
     }
     function getApplication(applicationId) {
         return $http.get('/v1/applications/' + applicationId, {observable: 
true, ignoreLoadingBar: true});

Reply via email to