AMBARI-23728 Group HDFS components into the components section of the ambari service...
authorababiichuk <ababiichuk@hortonworks.com>
Wed, 2 May 2018 13:03:24 +0000 (16:03 +0300)
committeraBabiichuk <ababiichuk@hortonworks.com>
Wed, 2 May 2018 16:16:33 +0000 (19:16 +0300)
13 files changed:
ambari-web/app/assets/test/tests.js
ambari-web/app/templates/main/service/info/summary/hdfs/slaves.hbs [new file with mode: 0644]
ambari-web/app/templates/main/service/info/summary/hdfs/widgets.hbs
ambari-web/app/templates/main/service/info/summary/master_components.hbs
ambari-web/app/templates/main/service/services/hdfs.hbs
ambari-web/app/views.js
ambari-web/app/views/main/service/info/components_list_view.js
ambari-web/app/views/main/service/info/summary.js
ambari-web/app/views/main/service/info/summary/hdfs/slaves.js [new file with mode: 0644]
ambari-web/app/views/main/service/info/summary/hdfs/widgets.js
ambari-web/app/views/main/service/services/hdfs.js
ambari-web/test/views/main/service/info/summary/hdfs/slaves_test.js [new file with mode: 0644]
ambari-web/test/views/main/service/services/hdfs_test.js

index 8da6044..482f046 100644 (file)
@@ -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 (file)
index 0000000..5ce4cc9
--- /dev/null
@@ -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>
index 0c59549..58e9814 100644 (file)
   </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">
index 7549caf..f604e40 100644 (file)
@@ -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}}
index 1b11143..d3a5a62 100644 (file)
 <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>
index 8af9edd..59094d3 100644 (file)
@@ -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');
index 524be23..9d0f6c4 100644 (file)
@@ -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: []
index 35f0486..df7dc91 100644 (file)
@@ -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 (file)
index 0000000..176a624
--- /dev/null
@@ -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()
+});
+
index ae6fbab..4e03db9 100644 (file)
@@ -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) {
index bce9690..485e448 100644 (file)
 
 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 (file)
index 0000000..cb780ae
--- /dev/null
@@ -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;
+    });
+  });
+
+});
index 21fefb9..d2814fa 100644 (file)
@@ -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;
-    });
-  });
-
 });