ソースを参照

AMBARI-2729. While a host component is being installed (INSTALLING state), it does not show up in the Host Detail page. (Andrii Babiichuk via yusaku)

Yusaku Sako 12 年 前
コミット
7d02e73758

+ 29 - 27
ambari-web/app/templates/main/host/summary.hbs

@@ -71,34 +71,36 @@
                       </li>
                     {{/if}}
                   {{/if}}
-                  {{#if view.isStart}}
-                    <li {{bindAttr class=" view.isDecommissioning:hidden view.noActionAvailable"}}>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
-                        {{t common.stop}}
-                      </a>
-                    </li>
-                  {{/if}}
-                  {{#unless view.isStart}}
-                    <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
-                        {{t common.start}}
-                      </a>
-                    </li>
+                  {{#unless view.isInstalling}}
+                    {{#if view.isStart}}
+                      <li {{bindAttr class=" view.isDecommissioning:hidden view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
+                          {{t common.stop}}
+                        </a>
+                      </li>
+                    {{/if}}
+                    {{#unless view.isStart}}
+                      <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
+                          {{t common.start}}
+                        </a>
+                      </li>
+                    {{/unless}}
+                    {{#if view.isUpgradeFailed}}
+                      <li {{bindAttr class="view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
+                          {{t common.reUpgrade}}
+                        </a>
+                      </li>
+                    {{/if}}
+                    {{#if view.isInstallFailed}}
+                      <li {{bindAttr class="view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
+                          {{t common.reinstall}}
+                        </a>
+                      </li>
+                    {{/if}}
                   {{/unless}}
-                  {{#if view.isUpgradeFailed}}
-                    <li {{bindAttr class="view.noActionAvailable"}}>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
-                        {{t common.reUpgrade}}
-                      </a>
-                    </li>
-                  {{/if}}
-                  {{#if view.isInstallFailed}}
-                    <li {{bindAttr class="view.noActionAvailable"}}>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
-                        {{t common.reinstall}}
-                      </a>
-                    </li>
-                  {{/if}}
                 </ul>
               </div>
               {{/if}}

+ 8 - 8
ambari-web/app/views/main/host/summary.js

@@ -95,14 +95,11 @@ App.MainHostSummaryView = Em.View.extend({
     var slaveComponents = [];
     var masterComponents = [];
     this.get('content.hostComponents').forEach(function (component) {
-      if (component.get('workStatus') != 'INSTALLING') {
-        if (component.get('isMaster')) {
-          masterComponents.push(component);
-        } else if (component.get('isSlave')) {
-          slaveComponents.push(component);
-        }
+      if (component.get('isMaster')) {
+        masterComponents.push(component);
+      } else if (component.get('isSlave')) {
+        slaveComponents.push(component);
       }
-
     }, this);
     return masterComponents.concat(slaveComponents);
   }.property('content', 'content.hostComponents.length'),
@@ -253,7 +250,7 @@ App.MainHostSummaryView = Em.View.extend({
     doBlinking: function () {
       var workStatus = this.get('workStatus');
       var self = this;
-      var pulsate = [ App.HostComponentStatus.starting, App.HostComponentStatus.stopping ].contains(workStatus);
+      var pulsate = [ App.HostComponentStatus.starting, App.HostComponentStatus.stopping, App.HostComponentStatus.installing].contains(workStatus);
       if (!pulsate && this.get('isDataNode')) {
         var dataNodeComponent = this.get('content');
         if (dataNodeComponent && workStatus != "INSTALLED") {
@@ -281,6 +278,9 @@ App.MainHostSummaryView = Em.View.extend({
       return (this.get('workStatus') == App.HostComponentStatus.started || this.get('workStatus') == App.HostComponentStatus.starting);
     }.property('workStatus'),
 
+    isInstalling: function () {
+      return (this.get('workStatus') == App.HostComponentStatus.installing);
+    }.property('workStatus'),
     /**
      * No action available while component is starting/stopping/unknown
      */