瀏覽代碼

AMBARI-5015 Host Details: Put the "Delete" action last in the Actions pulldowns for Host and Host Components.(ababiichuk)

aBabiichuk 11 年之前
父節點
當前提交
e1035d145f

+ 7 - 7
ambari-web/app/templates/main/host/details/host_component.hbs

@@ -60,13 +60,6 @@
             </a>
           </li>
         {{/if}}
-        {{#if view.isDeletableComponent}}
-          <li {{bindAttr class="view.isDeleteComponentDisabled:disabled"}}>
-            <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}>
-              {{t common.delete}}
-            </a>
-          </li>
-        {{/if}}
         {{#if view.isRestartableComponent}}
           <li {{bindAttr class="view.isRestartComponentDisabled:hidden"}}>
             <a href="javascript:void(null)" data-toggle="modal" {{action "restartComponent" view.content target="controller"}}>
@@ -124,6 +117,13 @@
             </li>
           {{/if}}
         {{/unless}}
+        {{#if view.isDeletableComponent}}
+            <li {{bindAttr class="view.isDeleteComponentDisabled:disabled"}}>
+                <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}>
+                  {{t common.delete}}
+                </a>
+            </li>
+        {{/if}}
       </ul>
     </div>
   {{/if}}

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

@@ -36,8 +36,8 @@ App.MainHostDetailsView = Em.View.extend({
       {action: 'startAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-play', 'label': this.t('hosts.host.details.startAllComponents')},
       {action: 'stopAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-stop', 'label': this.t('hosts.host.details.stopAllComponents')},
       {action: 'restartAllComponents', liClass: (this.get('controller.content.isNotHeartBeating')?'disabled':'enabled'), cssClass: 'icon-repeat', 'label': this.t('hosts.host.details.restartAllComponents')},
-      {action: 'deleteHost', liClass:'', cssClass: 'icon-remove', 'label': this.t('hosts.host.details.deleteHost')},
-      {action: 'onOffPassiveModeForHost', liClass:'', cssClass: 'icon-medkit', active:this.get('isActive'), 'label': this.t('passiveState.turn' + onOff)}];
+      {action: 'onOffPassiveModeForHost', liClass:'', cssClass: 'icon-medkit', active:this.get('isActive'), 'label': this.t('passiveState.turn' + onOff)},
+      {action: 'deleteHost', liClass:'', cssClass: 'icon-remove', 'label': this.t('hosts.host.details.deleteHost')}];
   }.property('controller.content','isActive', 'controller.content.isNotHeartBeating'),
   didInsertElement: function() {
     App.tooltip($("[rel='HealthTooltip']"));