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 2019/12/05 12:36:46 UTC

[GitHub] [brooklyn-ui] tbouron commented on a change in pull request #150: add time information to application data to allow ordering launch time

tbouron commented on a change in pull request #150: add time information to application data to allow ordering launch time
URL: https://github.com/apache/brooklyn-ui/pull/150#discussion_r354286363
 
 

 ##########
 File path: ui-modules/app-inspector/app/components/entity-tree/entity-tree.directive.js
 ##########
 @@ -43,19 +43,25 @@ export function entityTreeDirective() {
     return {
         restrict: 'E',
         template: entityTreeTemplate,
-        controller: ['$scope', '$state', 'applicationApi', 'iconService', 'brWebNotifications', controller],
+        controller: ['$scope', '$state', 'applicationApi', 'entityApi', 'iconService', 'brWebNotifications', controller],
         controllerAs: 'vm'
     };
 
-    function controller($scope, $state, applicationApi, iconService, brWebNotifications) {
+    function controller($scope, $state, applicationApi, entityApi, iconService, brWebNotifications) {
         $scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
 
         let vm = this;
 
         let observers = [];
 
+        let timeData = [];
+
         applicationApi.applicationsTree().then((response)=> {
             vm.applications = response.data;
+            vm.applications.forEach(app => {
+                getTimeData(app);
 
 Review comment:
   I'm wondering if getting the time of the first activity is really necessary. `applicationApi.applicationsTree()` API returns the list of applications already ordered by age (older first). So theoretically, the only thing you need to is add an index to each application object to be able to sort ascending or descending.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services