Prechádzať zdrojové kódy

AMBARI-5050 Host Details page: "Delete" action is temporarily not available even though the NodeManager is in Decommissioned state. (ababiichuk)

aBabiichuk 11 rokov pred
rodič
commit
731c1f19ba

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

@@ -225,8 +225,8 @@ App.HostComponentView = Em.View.extend({
    * @type {bool}
    */
   isDeleteComponentDisabled: function () {
-    return ![App.HostComponentStatus.stopped, App.HostComponentStatus.unknown, App.HostComponentStatus.install_failed, App.HostComponentStatus.upgrade_failed, App.HostComponentStatus.init].contains(this.get('workStatus'));
-  }.property('workStatus'),
+    return !(this.get('isComponentRecommissionAvailable') || [App.HostComponentStatus.stopped, App.HostComponentStatus.unknown, App.HostComponentStatus.install_failed, App.HostComponentStatus.upgrade_failed, App.HostComponentStatus.init].contains(this.get('workStatus')));
+  }.property('workStatus','isComponentRecommissionAvailable'),
 
   /**
    * Check if component may be reassinged to another host