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/15 19:34:57 UTC

git commit: AMBARI-2912. YARN summary values show up as null when service stopped. (onechiporenko via yusaku)

Updated Branches:
  refs/heads/trunk e5286e04b -> aa5933a5a


AMBARI-2912. YARN summary values show up as null when service stopped. (onechiporenko 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/aa5933a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/aa5933a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/aa5933a5

Branch: refs/heads/trunk
Commit: aa5933a5a1cafaf4573f157f695078ca30535c5e
Parents: e5286e0
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Aug 15 10:34:46 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Aug 15 10:34:46 2013 -0700

----------------------------------------------------------------------
 .../app/views/main/dashboard/service/yarn.js    | 30 ++++++++++++++------
 1 file changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/aa5933a5/ambari-web/app/views/main/dashboard/service/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/yarn.js b/ambari-web/app/views/main/dashboard/service/yarn.js
index bedc02c..91e7c4f 100644
--- a/ambari-web/app/views/main/dashboard/service/yarn.js
+++ b/ambari-web/app/views/main/dashboard/service/yarn.js
@@ -50,11 +50,7 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   }.property(),
 
   hasManyYarnClients: function () {
-    if(this.get('service.yarnClientNodes') > 1){
-      return true;
-    }else{
-      return false;
-    }
+    return (this.get('service.yarnClientNodes') > 1);
   }.property('service.yarnClientNodes'),
 
   nodeUptime: function () {
@@ -97,7 +93,13 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
     var nmUnhealthy = this.get('service.nodeManagersCountUnhealthy');
     var nmRebooted = this.get('service.nodeManagersCountRebooted');
     var nmDecom = this.get('service.nodeManagersCountDecommissioned');
-    return this.t('dashboard.services.yarn.nodeManagers.status.msg').format(nmActive, nmLost, nmUnhealthy, nmRebooted, nmDecom);
+    return this.t('dashboard.services.yarn.nodeManagers.status.msg').format(
+      this.formatUnavailable(nmActive),
+      this.formatUnavailable(nmLost),
+      this.formatUnavailable(nmUnhealthy),
+      this.formatUnavailable(nmRebooted),
+      this.formatUnavailable(nmDecom)
+    );
   }.property('service.nodeManagersCountActive', 'service.nodeManagersCountLost', 
       'service.nodeManagersCountUnhealthy', 'service.nodeManagersCountRebooted', 'service.nodeManagersCountDecommissioned'),
 
@@ -105,7 +107,11 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
     var allocated = this.get('service.containersAllocated');
     var pending = this.get('service.containersPending');
     var reserved = this.get('service.containersReserved');
-    return this.t('dashboard.services.yarn.containers.msg').format(allocated, pending, reserved);
+    return this.t('dashboard.services.yarn.containers.msg').format(
+      this.formatUnavailable(allocated),
+      this.formatUnavailable(pending),
+      this.formatUnavailable(reserved)
+    );
   }.property('service.containersAllocated', 'service.containersPending', 'service.containersReserved'),
 
   apps: function () {
@@ -115,7 +121,13 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
     var appsCompleted = this.get('service.appsCompleted');
     var appsKilled = this.get('service.appsKilled');
     var appsFailed = this.get('service.appsFailed');
-    return this.t('dashboard.services.yarn.apps.msg').format(appsSubmitted, appsRunning, appsPending, appsCompleted, appsKilled, appsFailed);
+    return this.t('dashboard.services.yarn.apps.msg').format(
+      this.formatUnavailable(appsSubmitted),
+      this.formatUnavailable(appsRunning),
+      this.formatUnavailable(appsPending),
+      this.formatUnavailable(appsCompleted),
+      this.formatUnavailable(appsKilled),
+      this.formatUnavailable(appsFailed));
   }.property('service.appsSubmitted', 'service.appsRunning', 'service.appsPending', 'service.appsCompleted', 'service.appsKilled', 'service.appsFailed'),
 
   memory: function () {
@@ -126,7 +138,7 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   }.property('service.allocatedMemory', 'service.reservedMemory', 'service.availableMemory'),
 
   queues: function() {
-    return Em.I18n.t('dashboard.services.yarn.queues.msg').format(this.get('service.queuesCount'));
+    return Em.I18n.t('dashboard.services.yarn.queues.msg').format(this.formatUnavailable(this.get('service.queuesCount')));
   }.property('service.queuesCount'),
   
   didInsertElement: function(){