Updated Branches:
  refs/heads/trunk 301fba80d -> c309d2272

AMBARI-2978. HDFS Summary: JournalNodes should not show if none is installed 
(total is 0). (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/c309d227
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/c309d227
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/c309d227

Branch: refs/heads/trunk
Commit: c309d22722fff0979de995cba093153b91fa6d66
Parents: 301fba8
Author: Yusaku Sako <[email protected]>
Authored: Wed Aug 21 10:56:13 2013 -0700
Committer: Yusaku Sako <[email protected]>
Committed: Wed Aug 21 10:56:13 2013 -0700

----------------------------------------------------------------------
 .../templates/main/dashboard/service/hdfs.hbs   | 28 +++++++++++---------
 .../app/views/main/dashboard/service/hdfs.js    |  6 ++++-
 2 files changed, 20 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c309d227/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 8e68727..895ec8a 100644
--- a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
+++ b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
@@ -58,19 +58,21 @@
         </td>
       </tr>
       <!-- Journal Nodes -->
-      <tr>
-        <td>{{t dashboard.services.hdfs.journalnodes}}</td>
-        <td>
-              <span>
-                {{#view view.journalNodesLiveTextView}}
-                  {{view.liveComponents}}/{{view.totalComponents}}
-                {{/view}}
-              </span>  {{t services.service.summary.JournalNodesLive}}
-          <div class="summary-view-host">
-            <a href="#" {{action filterHosts 
view.journalNodeComponent}}>{{view.journalNodeHostText}}</a>
-          </div>
-        </td>
-      </tr>
+      {{#if view.showJournalNodes}}
+        <tr>
+          <td>{{t dashboard.services.hdfs.journalnodes}}</td>
+          <td>
+                <span>
+                  {{#view view.journalNodesLiveTextView}}
+                    {{view.liveComponents}}/{{view.totalComponents}}
+                  {{/view}}
+                </span>  {{t services.service.summary.JournalNodesLive}}
+            <div class="summary-view-host">
+              <a href="#" {{action filterHosts 
view.journalNodeComponent}}>{{view.journalNodeHostText}}</a>
+            </div>
+          </td>
+        </tr>
+      {{/if}}
       <!-- NameNode Uptime -->
       <tr>
         <td>{{t dashboard.services.hdfs.nodes.uptime}}</td>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c309d227/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 89c04d3..d45b7b1 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -61,6 +61,10 @@ App.MainDashboardServiceHdfsView = 
App.MainDashboardServiceView.extend({
     }
   }.property("service"),
 
+  showJournalNodes: function () {
+    return App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').get('length') > 0;
+  }.property('service.hostComponents.@each'),
+
   journalNodeHostText: function () {
     if(this.get("service.journalNodes").content.length > 1){
       return Em.I18n.t('services.service.summary.viewHosts');
@@ -165,7 +169,7 @@ App.MainDashboardServiceHdfsView = 
App.MainDashboardServiceView.extend({
     return App.HostComponent.find().findProperty('componentName', 'DATANODE');
   }.property(),
 
-   journalNodeComponent: function () {
+  journalNodeComponent: function () {
     return App.HostComponent.find().findProperty('componentName', 
'JOURNALNODE');
   }.property(),
 

Reply via email to