ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-10073. Get all host cpu metrics query made every 10 seconds from dashboard page. (jaimin)
Date Sun, 15 Mar 2015 04:25:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7a23cdaf6 -> 0082ca1aa


AMBARI-10073. Get all host cpu metrics query made every 10 seconds from dashboard page. (jaimin)


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

Branch: refs/heads/trunk
Commit: 0082ca1aa70fa23582a2e6401669b048224c934c
Parents: 7a23cda
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Sat Mar 14 20:52:11 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Sat Mar 14 20:52:11 2015 -0700

----------------------------------------------------------------------
 .../app/views/main/dashboard/widgets/namenode_cpu.js      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0082ca1a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
index b44fcbf..5559a94 100644
--- a/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
+++ b/ambari-web/app/views/main/dashboard/widgets/namenode_cpu.js
@@ -42,9 +42,13 @@ App.NameNodeCpuPieChartView = App.PieChartDashboardWidgetView.extend({
     }else{
      this.set('nnHostName', this.get('model').get('nameNode.hostName'));
     }
-    this.getValue();
-    intervalId = setInterval(function() {self.getValue()}, App.componentsUpdateInterval);
-    this.set('intervalId', intervalId);
+    if (this.get('nnHostName')) {
+      this.getValue();
+      intervalId = setInterval(function () {
+        self.getValue()
+      }, App.componentsUpdateInterval);
+      this.set('intervalId', intervalId);
+    }
   },
 
   getValue: function () {


Mime
View raw message