mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	bug 8898: Change Service and Reset Password will now be always visible when VM is running. However, we will now prompt a dialog that explains that the VM must first be stopped before allowing this.
Merge from master
This commit is contained in:
		
							parent
							
								
									1eba5ea7a7
								
							
						
					
					
						commit
						f8c5a56d03
					
				| @ -734,6 +734,9 @@ message.zone.step.2.desc=Please enter the following info to add a new zone | |||||||
| message.zone.step.3.desc=Please enter the following info to add a new pod  | message.zone.step.3.desc=Please enter the following info to add a new pod  | ||||||
| message.apply.snapshot.policy=You have successfully updated your current snapshot policy. | message.apply.snapshot.policy=You have successfully updated your current snapshot policy. | ||||||
| message.disable.snapshot.policy=You have successfully disabled your current snapshot policy. | message.disable.snapshot.policy=You have successfully disabled your current snapshot policy. | ||||||
|  | message.action.change.service.warning=Your instance must be stopped before attempting to change its current service offering. | ||||||
|  | message.action.reset.password.warning=Your instance must be stopped before attempting to change its current password. | ||||||
|  | message.action.reset.password.off=Your instance currently does not support this feature. | ||||||
| 
 | 
 | ||||||
| #Errors | #Errors | ||||||
| error.login=Your username/password does not match our records. | error.login=Your username/password does not match our records. | ||||||
|  | |||||||
| @ -734,6 +734,9 @@ message.zone.step.2.desc = Por favor ingrese los siguientes datos para agregar u | |||||||
| message.zone.step.3.desc = Por favor ingrese los siguientes datos para agregar una vaina nueva | message.zone.step.3.desc = Por favor ingrese los siguientes datos para agregar una vaina nueva | ||||||
| message.apply.snapshot.policy = Ha actualizado su política instantánea actual. | message.apply.snapshot.policy = Ha actualizado su política instantánea actual. | ||||||
| message.disable.snapshot.policy = Ha desactivado su política instantánea actual. | message.disable.snapshot.policy = Ha desactivado su política instantánea actual. | ||||||
|  | message.action.change.service.warning = Su ejemplo debe ser detenido antes de intentar cambiar su oferta de servicios actual. | ||||||
|  | message.action.reset.password.warning = Su ejemplo debe ser detenido antes de intentar cambiar su contraseña actual. | ||||||
|  | message.action.reset.password.off = Su ejemplo en la actualidad no es compatible con esta función. | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #Errors | #Errors | ||||||
|  | |||||||
| @ -734,6 +734,9 @@ message.zone.step.2.desc=新しいZoneを追加するために、次の情報を | |||||||
| message.zone.step.3.desc=新しいPodを追加するために、次の情報を入力してください。 | message.zone.step.3.desc=新しいPodを追加するために、次の情報を入力してください。 | ||||||
| message.apply.snapshot.policy=あなたが正常に現在のスナップショットのポリシーを更新している。 | message.apply.snapshot.policy=あなたが正常に現在のスナップショットのポリシーを更新している。 | ||||||
| message.disable.snapshot.policy=あなたが正常に現在のスナップショットのポリシーを無効にしている。 | message.disable.snapshot.policy=あなたが正常に現在のスナップショットのポリシーを無効にしている。 | ||||||
|  | message.action.change.service.warning=あなたのインスタンスは、現在のサービスの提供を変更する前に停止する必要があります。 | ||||||
|  | message.action.reset.password.warning=あなたのインスタンスは、その現在のパスワードを変更しようとする前に停止する必要があります。 | ||||||
|  | message.action.reset.password.off=あなたのインスタンスは、現在この機能をサポートしていません。 | ||||||
| 
 | 
 | ||||||
| #Errors | #Errors | ||||||
| error.login=ユーザ名/パスワードが記録と一致しません | error.login=ユーザ名/パスワードが記録と一致しません | ||||||
|  | |||||||
| @ -734,6 +734,9 @@ message.zone.step.2.desc =请输入下面的信息以添加一个新的Zone | |||||||
| message.zone.step.3.desc =请输入下面的信息以添加一个新的Pod | message.zone.step.3.desc =请输入下面的信息以添加一个新的Pod | ||||||
| message.apply.snapshot.policy=您已成功更新您的当前快照的政策。 | message.apply.snapshot.policy=您已成功更新您的当前快照的政策。 | ||||||
| message.disable.snapshot.policy=你已经成功停用了您的当前快照的政策。 | message.disable.snapshot.policy=你已经成功停用了您的当前快照的政策。 | ||||||
|  | message.action.change.service.warning=您的实例之前,必须停止试图改变其目前提供的服务。 | ||||||
|  | message.action.reset.password.warning=您的实例之前,必须停止试图改变其目前的密码。 | ||||||
|  | message.action.reset.password.off=您的实例目前不支持此功能。 | ||||||
| 
 | 
 | ||||||
| #Errors | #Errors | ||||||
| error.login=您的用户名/密码与我们的记录不匹配。 | error.login=您的用户名/密码与我们的记录不匹配。 | ||||||
|  | |||||||
| @ -46,7 +46,10 @@ dictionary = { | |||||||
| 	'label.root.disk.offering': '<fmt:message key="label.root.disk.offering"/>', | 	'label.root.disk.offering': '<fmt:message key="label.root.disk.offering"/>', | ||||||
| 	'label.full': '<fmt:message key="label.full"/>', | 	'label.full': '<fmt:message key="label.full"/>', | ||||||
| 	'label.available': '<fmt:message key="label.available"/>', | 	'label.available': '<fmt:message key="label.available"/>', | ||||||
| 	'message.launch.vm.on.private.network': '<fmt:message key="message.launch.vm.on.private.network"/>' | 	'message.launch.vm.on.private.network': '<fmt:message key="message.launch.vm.on.private.network"/>', | ||||||
|  | 	'message.action.change.service.warning': '<fmt:message key="message.action.change.service.warning"/>', | ||||||
|  | 	'message.action.reset.password.warning': '<fmt:message key="message.action.reset.password.warning"/>', | ||||||
|  | 	'message.action.reset.password.off': '<fmt:message key="message.action.reset.password.off"/>' | ||||||
| };	 | };	 | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1607,13 +1607,34 @@ function doDetachISO($actionLink, $detailsTab, $midmenuItem1) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function doResetPassword($actionLink, $detailsTab, $midmenuItem1) {  | function doResetPassword($actionLink, $detailsTab, $midmenuItem1) {  | ||||||
|  | 	var jsonObj = $midmenuItem1.data("jsonObj"); | ||||||
|  | 	 | ||||||
|  | 	if (jsonObj.passwordenabled == false) { | ||||||
|  | 		$("#dialog_info") | ||||||
|  | 			.text(dictionary["message.action.reset.password.off"])     | ||||||
|  | 			.dialog('option', 'buttons', { 	 | ||||||
|  | 			"OK": function() {  | ||||||
|  | 				$(this).dialog("close");  | ||||||
|  | 			}	  | ||||||
|  | 		}).dialog("open"); | ||||||
|  | 		return; | ||||||
|  | 	} else if (jsonObj.state != 'Stopped') { | ||||||
|  | 		$("#dialog_info") | ||||||
|  | 			.text(dictionary["message.action.reset.password.warning"])     | ||||||
|  | 			.dialog('option', 'buttons', { 	 | ||||||
|  | 			"OK": function() {  | ||||||
|  | 				$(this).dialog("close");  | ||||||
|  | 			}	  | ||||||
|  | 		}).dialog("open"); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  |   		 | ||||||
| 	$("#dialog_confirmation") | 	$("#dialog_confirmation") | ||||||
| 	.text(dictionary["message.action.instance.reset.password"])	 | 	.text(dictionary["message.action.instance.reset.password"])	 | ||||||
| 	.dialog('option', 'buttons', { 						 | 	.dialog('option', 'buttons', { 						 | ||||||
| 		"Yes": function() {  | 		"Yes": function() {  | ||||||
| 			$(this).dialog("close");  | 			$(this).dialog("close");  | ||||||
| 						 | 						 | ||||||
| 			var jsonObj = $midmenuItem1.data("jsonObj");				 |  | ||||||
| 			if(jsonObj.passwordenabled != true) { | 			if(jsonObj.passwordenabled != true) { | ||||||
| 			    var $afterActionInfoContainer = $("#right_panel_content #after_action_info_container_on_top"); | 			    var $afterActionInfoContainer = $("#right_panel_content #after_action_info_container_on_top"); | ||||||
| 			    $afterActionInfoContainer.find("#after_action_info").text("Reset password failed. Reason: This instance is not using a template that has the password reset feature enabled.  If you have forgotten your root password, please contact support.");   | 			    $afterActionInfoContainer.find("#after_action_info").text("Reset password failed. Reason: This instance is not using a template that has the password reset feature enabled.  If you have forgotten your root password, please contact support.");   | ||||||
| @ -1635,6 +1656,17 @@ function doChangeService($actionLink, $detailsTab, $midmenuItem1) { | |||||||
|     var jsonObj = $midmenuItem1.data("jsonObj"); |     var jsonObj = $midmenuItem1.data("jsonObj"); | ||||||
| 	var id = jsonObj.id; | 	var id = jsonObj.id; | ||||||
| 	 | 	 | ||||||
|  | 	if (jsonObj.state != 'Stopped') { | ||||||
|  | 		$("#dialog_info") | ||||||
|  | 			.text(dictionary['message.action.change.service.warning'])     | ||||||
|  | 			.dialog('option', 'buttons', { 	 | ||||||
|  | 			"OK": function() {  | ||||||
|  | 				$(this).dialog("close");  | ||||||
|  | 			}	  | ||||||
|  | 		}).dialog("open"); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	$.ajax({	    | 	$.ajax({	    | ||||||
| 	    data: createURL("command=listServiceOfferings&VirtualMachineId="+id),  | 	    data: createURL("command=listServiceOfferings&VirtualMachineId="+id),  | ||||||
| 		dataType: "json", | 		dataType: "json", | ||||||
| @ -1905,6 +1937,7 @@ function vmBuildActionMenu(jsonObj, $thisTab, $midmenuItem1) { | |||||||
| 			buildActionLinkForTab("label.action.detach.iso", vmActionMap, $actionMenu, $midmenuItem1, $thisTab);	 | 			buildActionLinkForTab("label.action.detach.iso", vmActionMap, $actionMenu, $midmenuItem1, $thisTab);	 | ||||||
| 			 | 			 | ||||||
| 		buildActionLinkForTab("label.action.reset.password", vmActionMap, $actionMenu, $midmenuItem1, $thisTab); | 		buildActionLinkForTab("label.action.reset.password", vmActionMap, $actionMenu, $midmenuItem1, $thisTab); | ||||||
|  | 		buildActionLinkForTab("label.action.change.service", vmActionMap, $actionMenu, $midmenuItem1, $thisTab); | ||||||
| 		noAvailableActions = false;	 | 		noAvailableActions = false;	 | ||||||
| 	}  | 	}  | ||||||
| 	else if (jsonObj.state == 'Stopped') {	     | 	else if (jsonObj.state == 'Stopped') {	     | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user