This is an automated email from the ASF dual-hosted git repository.

ababiichuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1ab8001  AMBARI-23728 Group HDFS components into the components 
section of the ambari service summary page. (ababiichuk)
1ab8001 is described below

commit 1ab8001adf30a50bfe76c661d2ae0a66780285cd
Author: ababiichuk <ababiic...@hortonworks.com>
AuthorDate: Wed May 2 16:03:24 2018 +0300

    AMBARI-23728 Group HDFS components into the components section of the 
ambari service summary page. (ababiichuk)
---
 ambari-web/app/assets/test/tests.js                |   1 +
 .../main/service/info/summary/hdfs/slaves.hbs      | 141 +++++++++++++++++++++
 .../main/service/info/summary/hdfs/widgets.hbs     |   4 +
 .../service/info/summary/master_components.hbs     |   7 +-
 .../app/templates/main/service/services/hdfs.hbs   | 128 +------------------
 ambari-web/app/views.js                            |   1 +
 .../main/service/info/components_list_view.js      |   3 +
 ambari-web/app/views/main/service/info/summary.js  |   3 +-
 .../views/main/service/info/summary/hdfs/slaves.js |  63 +++++++++
 .../main/service/info/summary/hdfs/widgets.js      |   5 +
 ambari-web/app/views/main/service/services/hdfs.js |  41 +-----
 .../main/service/info/summary/hdfs/slaves_test.js  |  79 ++++++++++++
 .../test/views/main/service/services/hdfs_test.js  |  40 ------
 13 files changed, 311 insertions(+), 205 deletions(-)

diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 8da6044..482f046 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -353,6 +353,7 @@ var files = [
   'test/views/main/service/info/component_list_view_test',
   'test/views/main/service/info/metrics/ambari_metrics/regionserver_base_test',
   
'test/views/main/service/info/metrics/flume/flume_agent_metrics_section_test',
+  'test/views/main/service/info/summary/hdfs/slaves_test',
   'test/views/main/service/services/hdfs_test',
   'test/views/main/service/services/hbase_test',
   'test/views/main/service/services/ranger_test',
diff --git a/ambari-web/app/templates/main/service/info/summary/hdfs/slaves.hbs 
b/ambari-web/app/templates/main/service/info/summary/hdfs/slaves.hbs
new file mode 100644
index 0000000..5ce4cc9
--- /dev/null
+++ b/ambari-web/app/templates/main/service/info/summary/hdfs/slaves.hbs
@@ -0,0 +1,141 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<div class="col-md-12">
+  <div class="col-md-2">
+    {{#if view.showTitle}}
+      {{t dashboard.services.hdfs.summary.components}}
+    {{/if}}
+  </div>
+  <div class="col-md-10">
+    {{! Data Nodes }}
+    {{#if view.isDataNodeCreated}}
+      <div {{bindAttr class=":row :component :col-md-3 
view.dataNodeComponent.componentName"}}>
+        <div class="summary-value main-info">
+          {{#if App.router.clusterController.isServiceContentFullyLoaded}}
+            <span>
+              {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.service.dataNodesStarted" 
totalComponentsBinding="view.service.dataNodesTotal"}}
+                {{view.liveComponents}}/{{view.totalComponents}}
+              {{/view}}
+            </span>
+            {{t common.started}}
+          {{else}}
+            {{t common.loading.eclipses}}
+          {{/if}}
+        </div>
+        <div class="summary-label">
+          <a href="#" {{action filterHosts view.dataNodeComponent}}>{{t 
dashboard.services.hdfs.datanodes}}</a>
+        </div>
+      </div>
+    {{/if}}
+    {{! JournalNodes }}
+    {{#if view.isJournalNodeCreated}}
+      <div {{bindAttr class=":row :component :col-md-3 
view.journalNodeComponent.componentName"}}>
+        <div class="summary-value main-info">
+          {{#if App.router.clusterController.isComponentsStateLoaded}}
+            <span>
+              {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.journalNodesLive" 
totalComponentsBinding="view.journalNodesTotal"}}
+                {{view.liveComponents}}/{{view.totalComponents}}
+              {{/view}}
+            </span>
+            <span> {{t common.live}} </span>
+          {{else}}
+            {{t common.loading.eclipses}}
+          {{/if}}
+        </div>
+        <div class="summary-label">
+          <a
+            href="#" {{action filterHosts view.journalNodeComponent}}>{{t 
dashboard.services.hdfs.journalnodes}}</a>
+        </div>
+      </div>
+    {{/if}}
+    {{! NFS Gateway }}
+    {{#if view.isNfsInStack}}
+      <div {{bindAttr class=":row :component :col-md-3 
view.nfsGatewayComponent.componentName"}}>
+        <div class="summary-value main-info">
+          {{#if App.router.clusterController.isServiceContentFullyLoaded}}
+            <span>
+              {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.service.nfsGatewaysStarted" 
totalComponentsBinding="view.service.nfsGatewaysTotal"}}
+                {{view.liveComponents}}/{{view.totalComponents}}
+              {{/view}}
+            </span>
+            {{t common.started}}
+          {{else}}
+            {{t common.loading.eclipses}}
+          {{/if}}
+        </div>
+        <div class="summary-label">
+          <a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t 
dashboard.services.hdfs.nfsgateways}}</a>
+        </div>
+      </div>
+    {{/if}}
+    {{! indent next row}}
+    <div class="row"></div>
+    {{! Data Node Counts live }}
+    <div class="row datanode-count-live col-md-3">
+      <div class="summary-value">
+        {{#if view.service.metricsNotAvailable}}
+          <div class="main-info">
+            {{t services.service.summary.notAvailable}}
+          </div>
+        {{else}}
+          <span class="main-info" rel="tooltip"
+            {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live" }}>
+            {{view.service.liveDataNodes.length}}
+          </span>
+          <div class="info-desc">{{t dashboard.services.hdfs.nodes.live}}</div>
+        {{/if}}
+      </div>
+      <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
+    </div>
+    {{! Data Node Counts dead }}
+    <div class="row datanode-count-dead col-md-3">
+      <div class="summary-value">
+        {{#if view.service.metricsNotAvailable}}
+          <div class="main-info">
+            {{t services.service.summary.notAvailable}}
+          </div>
+        {{else}}
+          <span class="main-info" rel="tooltip"
+            {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead" }}>
+            {{view.service.deadDataNodes.length}}
+          </span>
+          <div class="info-desc">{{t dashboard.services.hdfs.nodes.dead}}</div>
+        {{/if}}
+      </div>
+      <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
+    </div>
+    {{! Data Node Counts decommission }}
+    <div class="row datanode-count-decommission col-md-3">
+      <div class="summary-value">
+        {{#if view.service.metricsNotAvailable}}
+          <div class="main-info">
+            {{t services.service.summary.notAvailable}}
+          </div>
+        {{else}}
+          <span class="main-info" rel="tooltip"
+            {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission"
 }}>
+            {{view.service.decommissionDataNodes.length}}
+          </span>
+          <div class="info-desc">{{t 
dashboard.services.hdfs.nodes.decom}}</div>
+        {{/if}}
+      </div>
+      <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
+    </div>
+  </div>
+</div>
diff --git 
a/ambari-web/app/templates/main/service/info/summary/hdfs/widgets.hbs 
b/ambari-web/app/templates/main/service/info/summary/hdfs/widgets.hbs
index 0c59549..58e9814 100644
--- a/ambari-web/app/templates/main/service/info/summary/hdfs/widgets.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/hdfs/widgets.hbs
@@ -34,6 +34,10 @@
   </div>
 </div>
 
+{{#if view.showSlaveComponents}}
+  {{view view.slaveComponentsView 
summaryViewBinding="view.parentView.summaryView"}}
+{{/if}}
+
 {{! Service Metrics Section }}
 <div {{bindAttr class=":col-md-12 :metrics-summary 
view.isNonFederatedHDFS::multiple-master-groups"}}>
   <div class="col-md-2">
diff --git 
a/ambari-web/app/templates/main/service/info/summary/master_components.hbs 
b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
index 7549caf..f604e40 100644
--- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
@@ -32,8 +32,9 @@
         {{#each comp in group.components}}
           <div {{bindAttr class="comp.isSubComponent:component-small 
:component :col-md-3 comp.componentName :row"}}>
             <div {{bindAttr class=":summary-value 
comp.summaryValueClassName"}}>
-        <span rel='SummaryComponentHealthTooltip'
-          {{bindAttr class="comp.statusClass comp.statusIconClass" 
data-original-title="comp.passiveTooltip"}}></span>
+              <span rel='SummaryComponentHealthTooltip'
+                {{bindAttr class="comp.statusClass comp.statusIconClass"
+                  data-original-title="comp.passiveTooltip"}}></span>
               <span class="main-info">{{comp.componentTextStatus}}</span>
               {{#if comp.alertsCount}}
                 <span {{action "showServiceAlertsPopup" comp 
target="controller"}}
@@ -57,7 +58,7 @@
       </div>
     </div>
     {{#if group.componentWidgetsView}}
-      {{view group.componentWidgetsView}}
+      {{view group.componentWidgetsView 
slaveComponentsViewBinding="view.slaveComponentsView"}}
     {{/if}}
   {{/if}}
 {{/each}}
diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs 
b/ambari-web/app/templates/main/service/services/hdfs.hbs
index 1b11143..d3a5a62 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -19,129 +19,9 @@
 <div class="row">
   {{! Component Section }}
   <div class="component-summary">
-    {{view view.dashboardMasterComponentView}}
-    <div class="col-md-12">
-      <div class="col-md-2">
-        {{#if view.hasMultipleMasterGroups}}
-          {{t dashboard.services.hdfs.summary.components}}
-        {{/if}}
-      </div>
-      <div class="col-md-10">
-        {{! Data Nodes }}
-        {{#if view.isDataNodeCreated}}
-          <div {{bindAttr class=":row :component :col-md-3 
view.dataNodeComponent.componentName"}}>
-            <div class="summary-value main-info">
-              {{#if App.router.clusterController.isServiceContentFullyLoaded}}
-                <span>
-                  {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.service.dataNodesStarted" 
totalComponentsBinding="view.service.dataNodesTotal"}}
-                    {{view.liveComponents}}/{{view.totalComponents}}
-                  {{/view}}
-                </span>
-                {{t common.started}}
-              {{else}}
-                {{t common.loading.eclipses}}
-              {{/if}}
-            </div>
-            <div class="summary-label">
-              <a href="#" {{action filterHosts view.dataNodeComponent}}>{{t 
dashboard.services.hdfs.datanodes}}</a>
-            </div>
-          </div>
-        {{/if}}
-        {{! JournalNodes }}
-        {{#if view.isJournalNodeCreated}}
-          <div {{bindAttr class=":row :component :col-md-3 
view.journalNodeComponent.componentName"}}>
-            <div class="summary-value main-info">
-              {{#if App.router.clusterController.isComponentsStateLoaded}}
-                <span>
-                  {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.journalNodesLive" 
totalComponentsBinding="view.journalNodesTotal"}}
-                    {{view.liveComponents}}/{{view.totalComponents}}
-                  {{/view}}
-                </span>
-                <span> {{t common.live}} </span>
-              {{else}}
-                {{t common.loading.eclipses}}
-              {{/if}}
-            </div>
-            <div class="summary-label">
-              <a
-                href="#" {{action filterHosts view.journalNodeComponent}}>{{t 
dashboard.services.hdfs.journalnodes}}</a>
-            </div>
-          </div>
-        {{/if}}
-        {{! NFS Gateway }}
-        {{#if view.isNfsInStack}}
-          <div {{bindAttr class=":row :component :col-md-3 
view.nfsGatewayComponent.componentName"}}>
-            <div class="summary-value main-info">
-              {{#if App.router.clusterController.isServiceContentFullyLoaded}}
-                <span>
-                  {{#view App.ComponentLiveTextView 
liveComponentsBinding="view.service.nfsGatewaysStarted" 
totalComponentsBinding="view.service.nfsGatewaysTotal"}}
-                    {{view.liveComponents}}/{{view.totalComponents}}
-                  {{/view}}
-                </span>
-                {{t common.started}}
-              {{else}}
-                {{t common.loading.eclipses}}
-              {{/if}}
-            </div>
-            <div class="summary-label">
-              <a href="#" {{action filterHosts view.nfsGatewayComponent}}>{{t 
dashboard.services.hdfs.nfsgateways}}</a>
-            </div>
-          </div>
-        {{/if}}
-        {{! indent next row}}
-        <div class="row"></div>
-        {{! Data Node Counts live }}
-        <div class="row datanode-count-live col-md-3">
-          <div class="summary-value">
-            {{#if view.service.metricsNotAvailable}}
-              <div class="main-info">
-                {{t services.service.summary.notAvailable}}
-              </div>
-            {{else}}
-              <span class="main-info" rel="tooltip"
-                {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live" }}>
-                {{view.service.liveDataNodes.length}}
-              </span>
-              <div class="info-desc">{{t 
dashboard.services.hdfs.nodes.live}}</div>
-            {{/if}}
-          </div>
-          <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
-        </div>
-        {{! Data Node Counts dead }}
-        <div class="row datanode-count-dead col-md-3">
-          <div class="summary-value">
-            {{#if view.service.metricsNotAvailable}}
-              <div class="main-info">
-                {{t services.service.summary.notAvailable}}
-              </div>
-            {{else}}
-              <span class="main-info" rel="tooltip"
-                {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead" }}>
-                {{view.service.deadDataNodes.length}}
-              </span>
-              <div class="info-desc">{{t 
dashboard.services.hdfs.nodes.dead}}</div>
-            {{/if}}
-          </div>
-          <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
-        </div>
-        {{! Data Node Counts decommission }}
-        <div class="row datanode-count-decommission col-md-3">
-          <div class="summary-value">
-            {{#if view.service.metricsNotAvailable}}
-              <div class="main-info">
-                {{t services.service.summary.notAvailable}}
-              </div>
-            {{else}}
-              <span class="main-info" rel="tooltip"
-                {{translateAttr 
data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission"
 }}>
-                {{view.service.decommissionDataNodes.length}}
-              </span>
-              <div class="info-desc">{{t 
dashboard.services.hdfs.nodes.decom}}</div>
-            {{/if}}
-          </div>
-          <div class="summary-label">{{t 
dashboard.services.hdfs.datanodecounts}}</div>
-        </div>
-      </div>
-    </div>
+    {{view view.dashboardMasterComponentView 
slaveComponentsViewBinding="view.slaveComponentsView" 
summaryViewBinding="view"}}
+    {{#if view.hasMultipleMasterGroups}}
+      {{view view.slaveComponentsView 
slaveComponentsViewBinding="view.slaveComponentsView" summaryViewBinding="view" 
showTitle=true}}
+    {{/if}}
   </div>
 </div>
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 8af9edd..59094d3 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -312,6 +312,7 @@ require('views/main/service/reconfigure');
 require('views/main/service/info/components_list_view');
 require('views/main/service/info/menu');
 require('views/main/service/info/summary');
+require('views/main/service/info/summary/hdfs/slaves');
 require('views/main/service/info/summary/hdfs/widgets');
 require('views/main/service/info/configs');
 require('views/main/service/info/metric_graphs_view');
diff --git a/ambari-web/app/views/main/service/info/components_list_view.js 
b/ambari-web/app/views/main/service/info/components_list_view.js
index 524be23..9d0f6c4 100644
--- a/ambari-web/app/views/main/service/info/components_list_view.js
+++ b/ambari-web/app/views/main/service/info/components_list_view.js
@@ -21,6 +21,9 @@ var App = require('app');
 App.SummaryMasterComponentsView = Em.View.extend({
   templateName: 
require('templates/main/service/info/summary/master_components'),
 
+  // should be bound to App.MainDashboardServiceHdfsView instance
+  summaryView: null,
+
   mastersComp: [
     {
       components: []
diff --git a/ambari-web/app/views/main/service/info/summary.js 
b/ambari-web/app/views/main/service/info/summary.js
index 35f0486..df7dc91 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -462,7 +462,8 @@ App.MainServiceInfoSummaryView = Em.View.extend({
                 groups.push({
                   components: [],
                   componentWidgetsView: App.HDFSSummaryWidgetsView.extend({
-                    nameSpace: component.get('haNameSpace') || 'default'
+                    nameSpace: component.get('haNameSpace') || 'default',
+                    showSlaveComponents: true
                   })
                 });
               }
diff --git a/ambari-web/app/views/main/service/info/summary/hdfs/slaves.js 
b/ambari-web/app/views/main/service/info/summary/hdfs/slaves.js
new file mode 100644
index 0000000..176a624
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/summary/hdfs/slaves.js
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App.HDFSSlaveComponentsView = Em.View.extend({
+  templateName: require('templates/main/service/info/summary/hdfs/slaves'),
+
+  showTitle: false,
+
+  // should be bound to App.MainDashboardServiceHdfsView instance
+  summaryView: null,
+
+  dataNodeComponent: Em.Object.create({
+    componentName: 'DATANODE'
+  }),
+
+  journalNodeComponent: Em.Object.create({
+    componentName: 'JOURNALNODE'
+  }),
+
+  nfsGatewayComponent: Em.Object.create({
+    componentName: 'NFS_GATEWAY'
+  }),
+
+  service: Em.computed.alias('summaryView.service'),
+
+  isDataNodeCreated: function () {
+    return this.get('summaryView') ? 
this.get('summaryView').isServiceComponentCreated('DATANODE') : false;
+  }.property('App.router.clusterController.isComponentsStateLoaded'),
+
+  isJournalNodeCreated: function () {
+    return this.get('summaryView') ? 
this.get('summaryView').isServiceComponentCreated('JOURNALNODE') : false;
+  }.property('App.router.clusterController.isComponentsStateLoaded'),
+
+  journalNodesLive: function () {
+    return this.get('service.journalNodes').filterProperty('workStatus', 
'STARTED').get('length');
+  }.property('service.journalNodes.@each.workStatus'),
+
+  journalNodesTotal: Em.computed.alias('service.journalNodes.length'),
+
+  /**
+   * Define if NFS_GATEWAY is present in the installed stack
+   * @type {Boolean}
+   */
+  isNfsInStack: function () {
+    return App.StackServiceComponent.find().someProperty('componentName', 
'NFS_GATEWAY');
+  }.property()
+});
+
diff --git a/ambari-web/app/views/main/service/info/summary/hdfs/widgets.js 
b/ambari-web/app/views/main/service/info/summary/hdfs/widgets.js
index ae6fbab..4e03db9 100644
--- a/ambari-web/app/views/main/service/info/summary/hdfs/widgets.js
+++ b/ambari-web/app/views/main/service/info/summary/hdfs/widgets.js
@@ -53,6 +53,11 @@ App.HDFSSummaryWidgetsView = 
Em.View.extend(App.NameNodeWidgetMixin, {
 
   subGroupId: Em.computed.alias('nameSpace'),
 
+  showSlaveComponents: false,
+
+  // should be bound to App.HDFSSlaveComponentsView instance
+  slaveComponentsView: null,
+
   nodeUptime: function () {
     const uptime = 
this.get('model.nameNodeStartTimeValues')[this.get('hostName')];
     if (uptime && uptime > 0) {
diff --git a/ambari-web/app/views/main/service/services/hdfs.js 
b/ambari-web/app/views/main/service/services/hdfs.js
index bce9690..485e448 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -17,11 +17,14 @@
 
 var App = require('app');
 var date = require('utils/date/date');
+require('views/main/service/info/summary/hdfs/slaves');
 
 App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
   templateName: require('templates/main/service/services/hdfs'),
   serviceName: 'HDFS',
 
+  slaveComponentsView: App.HDFSSlaveComponentsView.extend(),
+
   metricsNotAvailableObserver: function () {
     if(!this.get("service.metricsNotAvailable")) {
       App.tooltip($("[rel='tooltip']"));
@@ -30,41 +33,5 @@ App.MainDashboardServiceHdfsView = 
App.MainDashboardServiceView.extend({
 
   willDestroyElement: function() {
     $("[rel='tooltip']").tooltip('destroy');
-  },
-
-  dataNodesDead: Em.computed.alias('service.dataNodesInstalled'),
-
-  journalNodesLive: function () {
-    return this.get('service.journalNodes').filterProperty("workStatus", 
"STARTED").get("length");
-  }.property("service.journalNodes.@each.workStatus"),
-
-  journalNodesTotal: Em.computed.alias('service.journalNodes.length'),
-
-  dataNodeComponent: Em.Object.create({
-    componentName: 'DATANODE'
-  }),
-
-  nfsGatewayComponent: Em.Object.create({
-    componentName: 'NFS_GATEWAY'
-  }),
-
-  /**
-   * Define if NFS_GATEWAY is present in the installed stack
-   * @type {Boolean}
-   */
-  isNfsInStack: function () {
-    return App.StackServiceComponent.find().someProperty('componentName', 
'NFS_GATEWAY');
-  }.property(),
-
-  journalNodeComponent: Em.Object.create({
-    componentName: 'JOURNALNODE'
-  }),
-
-  isDataNodeCreated: function () {
-    return this.isServiceComponentCreated('DATANODE');
-  }.property('App.router.clusterController.isComponentsStateLoaded'),
-
-  isJournalNodeCreated: function () {
-    return this.isServiceComponentCreated('JOURNALNODE');
-  }.property('App.router.clusterController.isComponentsStateLoaded')
+  }
 });
diff --git 
a/ambari-web/test/views/main/service/info/summary/hdfs/slaves_test.js 
b/ambari-web/test/views/main/service/info/summary/hdfs/slaves_test.js
new file mode 100644
index 0000000..cb780ae
--- /dev/null
+++ b/ambari-web/test/views/main/service/info/summary/hdfs/slaves_test.js
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+require('/views/main/service/info/summary/hdfs/slaves');
+
+function getView(options) {
+  return App.HDFSSlaveComponentsView.create(options || {});
+}
+
+describe('App.HDFSSlaveComponentsView', function () {
+  var view;
+
+  beforeEach(function () {
+    view = getView({
+      service: Em.Object.create()
+    });
+  });
+
+  App.TestAliases.testAsComputedAlias(getView(), 'journalNodesTotal', 
'service.journalNodes.length', 'number');
+
+  describe('#journalNodesLive', function () {
+
+    it('should return live journal nodes count', function () {
+      view.set('service', Em.Object.create({
+        journalNodes: [
+          Em.Object.create({
+            workStatus: 'STARTED'
+          }),
+          Em.Object.create()
+        ]
+      }));
+      view.propertyDidChange('journalNodesLive');
+      expect(view.get('journalNodesLive')).to.be.equal(1);
+    });
+  });
+
+  describe('#isNfsInStack', function () {
+
+    beforeEach(function () {
+      this.mock = sinon.stub(App.StackServiceComponent, 'find');
+    });
+    afterEach(function () {
+      this.mock.restore();
+    });
+
+    it('no NFS_GATEWAY component', function () {
+      this.mock.returns([]);
+      view.propertyDidChange('isNfsInStack');
+      expect(view.get('isNfsInStack')).to.be.false;
+    });
+
+    it('NFS_GATEWAY component present', function () {
+      this.mock.returns([
+        {
+          componentName: 'NFS_GATEWAY'
+        }
+      ]);
+      view.propertyDidChange('isNfsInStack');
+      expect(view.get('isNfsInStack')).to.be.true;
+    });
+  });
+
+});
diff --git a/ambari-web/test/views/main/service/services/hdfs_test.js 
b/ambari-web/test/views/main/service/services/hdfs_test.js
index 21fefb9..d2814fa 100644
--- a/ambari-web/test/views/main/service/services/hdfs_test.js
+++ b/ambari-web/test/views/main/service/services/hdfs_test.js
@@ -31,10 +31,6 @@ describe('App.MainDashboardServiceHdfsView', function () {
     view = getView({service: Em.Object.create()});
   });
 
-  App.TestAliases.testAsComputedAlias(getView(), 'dataNodesDead', 
'service.dataNodesInstalled', 'boolean');
-
-  App.TestAliases.testAsComputedAlias(getView(), 'journalNodesTotal', 
'service.journalNodes.length', 'number');
-
   describe("#metricsNotAvailableObserver()", function() {
 
     beforeEach(function() {
@@ -72,40 +68,4 @@ describe('App.MainDashboardServiceHdfsView', function () {
     });
   });
 
-  describe("#journalNodesLive", function() {
-
-    it("should return live journal nodes count", function() {
-      view.set('service', Em.Object.create({
-        journalNodes: [
-          Em.Object.create({workStatus: 'STARTED'}),
-          Em.Object.create()
-        ]
-      }));
-      view.propertyDidChange('journalNodesLive');
-      expect(view.get('journalNodesLive')).to.be.equal(1);
-    });
-  });
-
-  describe("#isNfsInStack", function() {
-
-    beforeEach(function() {
-      this.mock = sinon.stub(App.StackServiceComponent, 'find');
-    });
-    afterEach(function() {
-      this.mock.restore();
-    });
-
-    it("no NFS_GATEWAY component", function() {
-      this.mock.returns([]);
-      view.propertyDidChange('isNfsInStack');
-      expect(view.get('isNfsInStack')).to.be.false;
-    });
-
-    it("NFS_GATEWAY component present", function() {
-      this.mock.returns([{componentName: 'NFS_GATEWAY'}]);
-      view.propertyDidChange('isNfsInStack');
-      expect(view.get('isNfsInStack')).to.be.true;
-    });
-  });
-
 });

-- 
To stop receiving notification emails like this one, please contact
ababiic...@apache.org.

Reply via email to