mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	cloudstack 3.0 new UI - instance page - change service - check if instance state is Stopped before proceeding to action.
This commit is contained in:
		
							parent
							
								
									fd86c25bc0
								
							
						
					
					
						commit
						39f03cf7c6
					
				| @ -1105,6 +1105,7 @@ | ||||
| 								cloudStack.dialog.notice({ message: 'Your instance must be stopped before attempting to change its current password' }); | ||||
| 								return false; | ||||
| 							} | ||||
| 							return true; | ||||
|             }, | ||||
| 												 | ||||
|             action: function(args) { | ||||
| @ -1174,6 +1175,16 @@ | ||||
|                 } | ||||
|               } | ||||
|             }, | ||||
| 												 | ||||
| 						preAction: function(args) {     | ||||
| 							var jsonObj = args.context.instances[0];							 | ||||
| 							if (jsonObj.state != 'Stopped') { | ||||
| 							  cloudStack.dialog.notice({ message: 'Your instance must be stopped before attempting to change its current service offering.' });							 | ||||
| 								return false; | ||||
| 							}               						 | ||||
|               return true;							 | ||||
|             }, | ||||
| 												 | ||||
|             action: function(args) { | ||||
|               $.ajax({ | ||||
|                 url: createURL("changeServiceForVirtualMachine&id=" + args.context.instances[0].id + "&serviceOfferingId=" + args.data.serviceOffering), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user