mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	bug 7738: volume page - snapshot tab - create template from snapshot dialog - add isFeatured dropdown.
This commit is contained in:
		
							parent
							
								
									e4c3f556c2
								
							
						
					
					
						commit
						2e84e9fc92
					
				| @ -754,6 +754,13 @@ | ||||
| 						<option value="true">Yes</option> | ||||
| 					</select> | ||||
| 				</li> | ||||
| 				<li id="isfeatured_container" style="display:none"> | ||||
| 					<label>Featured?:</label> | ||||
| 					<select class="select" id="isfeatured"> | ||||
| 					    <option value="false">No</option> | ||||
| 						<option value="true">Yes</option>						 | ||||
| 					</select> | ||||
| 				</li>		 | ||||
| 			</ol> | ||||
| 		</form> | ||||
| 	</div> | ||||
|  | ||||
| @ -57,6 +57,11 @@ function afterLoadVolumeJSP() { | ||||
|     initDialog("dialog_create_template_from_snapshot", 450);     | ||||
| 	initDialog("dialog_confirmation_delete_snapshot"); | ||||
| 	initDialog("dialog_download_volume"); | ||||
| 	 | ||||
| 	if(isAdmin()) | ||||
| 	    $("#dialog_create_template_from_snapshot").find("#isfeatured_container").show(); | ||||
| 	else | ||||
| 	    $("#dialog_create_template_from_snapshot").find("#isfeatured_container").hide();		 | ||||
| 	         | ||||
|     $.ajax({ | ||||
|         data: createURL("command=listOsTypes"), | ||||
| @ -1046,6 +1051,11 @@ function doCreateTemplateFromSnapshotInVolumePage($actionLink, $subgridItem) { | ||||
|          var password = thisDialog.find("#password").val();	 | ||||
|          array1.push("&passwordEnabled="+password);                                          | ||||
|         | ||||
|          if(thisDialog.find("#isfeatured_container").css("display")!="none") {				 | ||||
| 		     var isFeatured = thisDialog.find("#isfeatured").val();						    	 | ||||
|              array1.push("&isfeatured="+isFeatured); | ||||
|          }	 | ||||
|         | ||||
|          var id = jsonObj.id; | ||||
|          var apiCommand = "command=createTemplate&snapshotid="+id+array1.join("");    	  | ||||
|     	 doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem);				 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user