You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/03/15 05:24:14 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 9d3559edd -> 1c67dfd66


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/1c67dfd6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c67dfd6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c67dfd6

Branch: refs/heads/branch-2.0.0
Commit: 1c67dfd66ef7db295801790485acfb0d8ffaef6e
Parents: 9d3559e
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Sat Mar 14 20:52:11 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Sat Mar 14 21:23:22 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/1c67dfd6/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 () {