ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-17341 Hosts sorting works for Load avg only in some cases (akovalenko)
Date Wed, 22 Jun 2016 11:22:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b156a7d1b -> 22b989644


AMBARI-17341 Hosts sorting works for Load avg only in some cases	(akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22b98964
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22b98964
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22b98964

Branch: refs/heads/trunk
Commit: 22b98964426a244627433bc3592360070c6cd8f6
Parents: b156a7d
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Tue Jun 21 18:44:14 2016 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Jun 22 14:22:47 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/global/update_controller.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/22b98964/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index f2ca75b..98f528f 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -232,7 +232,9 @@ App.UpdateController = Em.Controller.extend({
         mainHostController = App.router.get('mainHostController'),
         sortProperties = mainHostController.getSortProps(),
         loggingResource = ',host_components/logging',
-        isHostsLoaded = false;
+        isHostsLoaded = false,
+        // load hosts metrics separately of lazyLoadMetrics=true, but metrics in current
request if we are sorting
+        loadMetricsSeparately = lazyLoadMetrics && !(sortProperties.length &&
['loadAvg', 'diskUsage'].contains(sortProperties[0].name));
     this.get('queryParams').set('Hosts', mainHostController.getQueryParameters(true));
     if (App.router.get('currentState.parentState.name') === 'hosts') {
       App.updater.updateInterval('updateHost', App.get('contentUpdateInterval'));
@@ -263,7 +265,7 @@ App.UpdateController = Em.Controller.extend({
     }
 
     realUrl = realUrl.replace("<stackVersions>", stackVersionInfo);
-    realUrl = realUrl.replace("<metrics>", lazyLoadMetrics ? "" : "metrics/disk,metrics/load/load_one,");
+    realUrl = realUrl.replace("<metrics>", loadMetricsSeparately ? "" : "metrics/disk,metrics/load/load_one,");
     realUrl = realUrl.replace('<hostDetailsParams>', hostDetailsParams);
     if (App.get('supports.logSearch')) {
       realUrl += loggingResource;
@@ -272,7 +274,7 @@ App.UpdateController = Em.Controller.extend({
     var clientCallback = function (skipCall, queryParams) {
       var completeCallback = function () {
         callback();
-        if (lazyLoadMetrics) {
+        if (loadMetricsSeparately) {
           self.loadHostsMetric(queryParams);
         }
       };


Mime
View raw message