mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	bug 9549: CloudStack UI - deleteHost API now takes in new parameter "forced". Here is related UI change: a checkbox "Force Remove" has been added to Remove Host Confirmation Dialog.
This commit is contained in:
		
							parent
							
								
									27ca5cd625
								
							
						
					
					
						commit
						b91a319777
					
				@ -2,8 +2,10 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#Labels
 | 
			
		||||
force.remove=Force Remove
 | 
			
		||||
force.remove.host.warning=Warning: Choosing this option will cause CloudStack to forcefully stop all running virtual machines before removing this host from the cluster.
 | 
			
		||||
 | 
			
		||||
force.stop=Force Stop
 | 
			
		||||
force.stop.instance.warning=Warning: Forcing a stop on this instance should be your last option.  It can lead to data loss as well as inconsistent behavior of the virtual machine's state.  Please consult with the Administrator Guide or Cloud.com Support before executing this command.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,10 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#Labels
 | 
			
		||||
force.remove=Fuerza Retire
 | 
			
		||||
force.remove.host.warning=Advertencia: Si elige esta opción, CloudStack para detener la fuerza todas las máquinas virtuales en ejecución antes de retirar este host del clúster.
 | 
			
		||||
 | 
			
		||||
force.stop=Grupo de Alto
 | 
			
		||||
force.stop.instance.warning=Advertencia: Obligar a una parada en este caso debería ser su última opción. Puede conducir a la pérdida de datos, así como un comportamiento incoherente del estado de la máquina virtual. Por favor, consulte con la Guía del administrador o al Cloud.com antes de ejecutar este comando.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,10 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#Labels
 | 
			
		||||
force.remove=フォース削除
 | 
			
		||||
force.remove.host.warning=警告:CloudStack強制的にクラスタからこのホストを削除する前に、実行中のすべての仮想マシンを停止することが、このオプションを選択する。
 | 
			
		||||
 | 
			
		||||
force.stop=強制停止
 | 
			
		||||
force.stop.instance.warning=警告:あなたの最後のオプションである必要がありますこのインスタンスの停止を強制する。これは、データの損失だけでなく、仮想マシンの状態の一貫性のない動作につながることができます。このコマンドを実行する前に、管理者ガイド』または『Cloud.comサポートに相談してください。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,10 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#Labels
 | 
			
		||||
force.remove=强行移走
 | 
			
		||||
force.remove.host.warning=警告:选择此选项将导致CloudStack强行删除此之前停止从群集主机上的所有正在运行的虚拟机。
 | 
			
		||||
 | 
			
		||||
force.stop=强制停止
 | 
			
		||||
force.stop.instance.warning=警告:强制停止在这种情况下应该是你最后的选择。它可以导致数据丢失,以及虚拟机的状态不一致的行为。请与系统管理员指南或Cloud.com支援与顾问在执行此命令。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -853,6 +853,26 @@ dictionary = {
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<!-- Confirm to remove host (begin) -->
 | 
			
		||||
<div id="dialog_confirmation_remove_host" title='<fmt:message key="label.confirmation"/>' style="display: none">
 | 
			
		||||
 	<p> 
 | 
			
		||||
		<fmt:message key="message.action.remove.host" />
 | 
			
		||||
	</p> 		
 | 
			
		||||
    <div class="dialog_formcontent" id="force_remove_host_container" style="display:none">
 | 
			
		||||
        <form action="#" method="post" id="form_acquire">
 | 
			
		||||
        <ol>
 | 
			
		||||
            <li style="padding-top:10px">
 | 
			
		||||
                <input type="checkbox" class="checkbox" id="force_remove_host" /> 
 | 
			
		||||
                <p style="color:red"><fmt:message key="force.remove" /></p>		
 | 
			
		||||
            </li>
 | 
			
		||||
            <li>
 | 
			
		||||
                <p style="color:red"><fmt:message key="force.remove.host.warning" /></p>
 | 
			
		||||
            </li>
 | 
			
		||||
        </ol>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
<!-- Confirm to remove host (end) -->
 | 
			
		||||
 | 
			
		||||
<div id="hidden_container">
 | 
			
		||||
    <!-- advanced search popup (begin) -->
 | 
			
		||||
 | 
			
		||||
@ -49,7 +49,13 @@ function hostGetSearchParams() {
 | 
			
		||||
function afterLoadHostJSP() {    
 | 
			
		||||
    initDialog("dialog_add_host", 400);    
 | 
			
		||||
    initDialog("dialog_update_os");
 | 
			
		||||
         
 | 
			
		||||
    initDialog("dialog_confirmation_remove_host"); 
 | 
			
		||||
	
 | 
			
		||||
	var $dialogRemoveHost = $("#dialog_confirmation_remove_host");
 | 
			
		||||
	if(isAdmin()) {		
 | 
			
		||||
		$dialogRemoveHost.find("#force_remove_host_container").show();		   
 | 
			
		||||
	}  
 | 
			
		||||
    
 | 
			
		||||
    // switch between different tabs 
 | 
			
		||||
    var tabArray = [$("#tab_details"), $("#tab_instance"), $("#tab_router"), $("#tab_systemvm"), $("#tab_statistics")];
 | 
			
		||||
    var tabContentArray = [$("#tab_content_details"), $("#tab_content_instance"), $("#tab_content_router"), $("#tab_content_systemvm"), $("#tab_content_statistics")];
 | 
			
		||||
@ -656,13 +662,13 @@ function doForceReconnect($actionLink, $detailsTab, $midmenuItem1){
 | 
			
		||||
function doRemoveHost($actionLink, $detailsTab, $midmenuItem1){ 
 | 
			
		||||
    var jsonObj = $midmenuItem1.data("jsonObj");
 | 
			
		||||
       
 | 
			
		||||
    $("#dialog_confirmation")
 | 
			
		||||
    .text(dictionary["message.action.remove.host"])
 | 
			
		||||
    $("#dialog_confirmation_remove_host")    
 | 
			
		||||
    .dialog("option", "buttons", {	                    
 | 
			
		||||
         "OK": function() {
 | 
			
		||||
             $(this).dialog("close");      
 | 
			
		||||
             var id = jsonObj.id;
 | 
			
		||||
             var apiCommand = "command=deleteHost&id="+id;
 | 
			
		||||
             var id = jsonObj.id;
 | 
			
		||||
             var isForced = $("#dialog_confirmation_remove_host").find("#force_remove_host").attr("checked").toString();
 | 
			
		||||
             var apiCommand = "command=deleteHost&id="+id+"&forced="+isForced;                
 | 
			
		||||
    	     doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $detailsTab);		
 | 
			
		||||
         },
 | 
			
		||||
         "Cancel": function() {	                         
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user