Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C1E051065E for ; Mon, 19 Aug 2013 19:15:38 +0000 (UTC) Received: (qmail 6705 invoked by uid 500); 19 Aug 2013 19:15:38 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 6652 invoked by uid 500); 19 Aug 2013 19:15:38 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 6645 invoked by uid 99); 19 Aug 2013 19:15:37 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2013 19:15:37 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A6F958BFCE8; Mon, 19 Aug 2013 19:15:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yusaku@apache.org To: ambari-commits@incubator.apache.org Message-Id: <973447b728224aa796ae83148921b125@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-2956. NameNode HA: Show HA info in Services > HDFS > Summary. (Aleksandr Kovalenko via yusaku) Date: Mon, 19 Aug 2013 19:15:37 +0000 (UTC) Updated Branches: refs/heads/trunk fb20eab51 -> a62956823 AMBARI-2956. NameNode HA: Show HA info in Services > HDFS > Summary. (Aleksandr Kovalenko 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/a6295682 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a6295682 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a6295682 Branch: refs/heads/trunk Commit: a6295682347bbc84c556f60f77b0937a36b268f2 Parents: fb20eab Author: Yusaku Sako Authored: Mon Aug 19 12:15:06 2013 -0700 Committer: Yusaku Sako Committed: Mon Aug 19 12:15:06 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/messages.js | 2 ++ .../templates/main/dashboard/service/hdfs.hbs | 14 +++++++++ .../app/views/main/dashboard/service/hdfs.js | 32 +++++++++++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index ebf9d08..fba4ab3 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -803,6 +803,7 @@ Em.I18n.translations = { 'services.service.summary.viewHost':'View Host', 'services.service.summary.viewHosts':'View Hosts', 'services.service.summary.DataNodesLive':'DataNodes Live', + 'services.service.summary.JournalNodesLive':'JournalNodes Live', 'services.service.summary.mapreduce2.client':'MapReduce2 Client', 'services.service.summary.mapreduce2.clients':'MapReduce2 Clients', 'services.service.summary.nodeManagersLive':'NodeManagers Live', @@ -1244,6 +1245,7 @@ Em.I18n.translations = { 'dashboard.services.hdfs.summary':'{0} of {1} nodes live, {2}% capacity used', 'dashboard.services.hdfs.nanmenode':'NameNode', 'dashboard.services.hdfs.snanmenode':'Secondary NameNode', + 'dashboard.services.hdfs.journalnodes':'JournalNodes', 'dashboard.services.hdfs.capacity':'HDFS Disk Capacity', 'dashboard.services.hdfs.capacityUsed':'{0} / {1} ({2}% used)', 'dashboard.services.hdfs.totalFilesAndDirs':'Total Files + Directories', http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/templates/main/dashboard/service/hdfs.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs index 645729f..8e68727 100644 --- a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs +++ b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs @@ -57,6 +57,20 @@ + + + {{t dashboard.services.hdfs.journalnodes}} + + + {{#view view.journalNodesLiveTextView}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + {{t services.service.summary.JournalNodesLive}} + + + {{t dashboard.services.hdfs.nodes.uptime}} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/views/main/dashboard/service/hdfs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js index c914932..89c04d3 100644 --- a/ambari-web/app/views/main/dashboard/service/hdfs.js +++ b/ambari-web/app/views/main/dashboard/service/hdfs.js @@ -37,6 +37,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ }.property('service.capacityUsed', 'service.capacityTotal') }), + dashboardMasterComponentView: Em.View.extend({ + templateName: require('templates/main/service/info/summary/master_components'), + mastersComp : function() { + return this.get('parentView.service.hostComponents').filter(function(comp){ + return comp.get('isMaster') && comp.get('componentName') !== 'JOURNALNODE'; + }); + }.property("service") + }), + dataNodesLive: function(){ return App.HostComponent.find().filterProperty('componentName', 'DATANODE').filterProperty("workStatus","STARTED"); }.property('service.hostComponents.@each'), @@ -45,7 +54,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ }.property('service.hostComponents.@each'), dataNodeHostText: function () { - if(this.get("service.dataNodes") > 1){ + if(this.get("service.dataNodes").content.length > 1){ + return Em.I18n.t('services.service.summary.viewHosts'); + }else{ + return Em.I18n.t('services.service.summary.viewHost'); + } + }.property("service"), + + journalNodeHostText: function () { + if(this.get("service.journalNodes").content.length > 1){ return Em.I18n.t('services.service.summary.viewHosts'); }else{ return Em.I18n.t('services.service.summary.viewHost'); @@ -61,6 +78,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ }.property("service.dataNodes.length") }), + journalNodesLiveTextView: App.ComponentLiveTextView.extend({ + liveComponents: function() { + return App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').filterProperty("workStatus","STARTED").get("length"); + }.property("service.hostComponents.@each"), + totalComponents: function() { + return this.get("service.journalNodes.length"); + }.property("service.journalNodes.length") + }), + dfsTotalBlocks: function(){ return this.formatUnavailable(this.get('service.dfsTotalBlocks')); }.property('service.dfsTotalBlocks'), @@ -139,6 +165,10 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ return App.HostComponent.find().findProperty('componentName', 'DATANODE'); }.property(), + journalNodeComponent: function () { + return App.HostComponent.find().findProperty('componentName', 'JOURNALNODE'); + }.property(), + isSafeMode: function () { var safeMode = this.get('service.safeModeStatus'); return safeMode != null && safeMode.length > 0;