Forráskód Böngészése

AMBARI-4695 When in Decommissioned" state and Maint, icon shows orange, not medbag. (ababiichuk)

aBabiichuk 11 éve
szülő
commit
5cd82eb233

+ 15 - 15
ambari-web/app/views/main/host/details/host_component_view.js

@@ -128,6 +128,21 @@ App.HostComponentView = Em.View.extend({
    * @type {String}
    */
   statusClass: function () {
+    //Class when install failed
+    if (this.get('workStatus') === App.HostComponentStatus.install_failed) {
+      return 'health-status-color-red icon-cog';
+    }
+
+    //Class when installing
+    if (this.get('workStatus') === App.HostComponentStatus.installing) {
+      return 'health-status-color-blue icon-cog';
+    }
+
+    //Class when maintenance
+    if (this.get('content.passiveState') != "ACTIVE") {
+      return 'icon-medkit';
+    }
+
     //If the component is DataNode
     if (this.get('isDataNode')) {
       if (this.get('isDataNodeRecommissionAvailable') && (this.get('isStart') || this.get('workStatus') == 'INSTALLED')) {
@@ -156,21 +171,6 @@ App.HostComponentView = Em.View.extend({
       }
     }
 
-    //Class when install failed
-    if (this.get('workStatus') === App.HostComponentStatus.install_failed) {
-      return 'health-status-color-red icon-cog';
-    }
-
-    //Class when installing
-    if (this.get('workStatus') === App.HostComponentStatus.installing) {
-      return 'health-status-color-blue icon-cog';
-    }
-
-    //Class when maintenance
-    if (this.get('content.passiveState') != "ACTIVE") {
-      return 'icon-medkit';
-    }
-
     //For all other cases
     return 'health-status-' + App.HostComponentStatus.getKeyName(this.get('workStatus'));