You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/20 00:11:22 UTC

git commit: AMBARI-2960. NameNode RPC widget on the dashboard always show red even though the value is 0 ms. (xiwang via yusaku)

Updated Branches:
  refs/heads/trunk 2191bd06e -> c94855f71


AMBARI-2960. NameNode RPC widget on the dashboard always show red even though the value is 0 ms. (xiwang via yusaku)


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

Branch: refs/heads/trunk
Commit: c94855f714d3b32f08170d7c88563014e996b4f8
Parents: 2191bd0
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Aug 19 15:10:52 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Aug 19 15:10:52 2013 -0700

----------------------------------------------------------------------
 .../app/views/main/dashboard/widgets/jobtracker_rpc.js       | 8 ++++++++
 ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js  | 8 ++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c94855f7/ambari-web/app/views/main/dashboard/widgets/jobtracker_rpc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/jobtracker_rpc.js b/ambari-web/app/views/main/dashboard/widgets/jobtracker_rpc.js
index 46780b3..8424f1b 100644
--- a/ambari-web/app/views/main/dashboard/widgets/jobtracker_rpc.js
+++ b/ambari-web/app/views/main/dashboard/widgets/jobtracker_rpc.js
@@ -35,6 +35,14 @@ App.JobTrackerRpcView = App.TextDashboardWidgetView.extend({
   thresh2: 2,
   maxValue: 'infinity',
 
+  isGreen: function () {
+    return (this.get('data') <= this.get('thresh1'));
+  }.property('data','thresh1'),
+
+  isRed: function () {
+    return (this.get('data') > this.get('thresh2'));
+  }.property('data','thresh2'),
+
   data: function (){
     if (this.get('model.jobTrackerRpc')) {
       return (this.get('model.jobTrackerRpc')).toFixed(2);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c94855f7/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js b/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
index 749d5d3..7f6c2fb 100644
--- a/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
+++ b/ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
@@ -35,6 +35,14 @@ App.NameNodeRpcView = App.TextDashboardWidgetView.extend({
   thresh2: 2,
   maxValue: 'infinity',
 
+  isGreen: function () {
+    return (this.get('data') <= this.get('thresh1'));
+  }.property('data','thresh1'),
+
+  isRed: function () {
+    return (this.get('data') > this.get('thresh2'));
+  }.property('data','thresh2'),
+
   data: function () {
     if (this.get('model.nameNodeRpc')) {
       return (this.get('model.nameNodeRpc')).toFixed(2);