mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	bug 8208: Finished the rest of the dialogs in the various resource pages for BareMetal install.
This commit is contained in:
		
							parent
							
								
									b8a2b766da
								
							
						
					
					
						commit
						7f595871f8
					
				| @ -217,6 +217,41 @@ dictionary = { | ||||
|                 <input class="text" type="text" name="host_vcenter_host" id="host_vcenter_host" /> | ||||
|                 <div id="host_vcenter_host_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpucores"> | ||||
|                     # of CPU Cores:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpucores" id="host_baremetal_cpucores" /> | ||||
|                 <div id="host_baremetal_cpucores_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpu"> | ||||
|                     CPU (in MHz):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpu" id="host_baremetal_cpu" /> | ||||
|                 <div id="host_baremetal_cpu_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_memory"> | ||||
|                     Memory (in MB):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_memory" id="host_baremetal_memory" /> | ||||
|                 <div id="host_baremetal_memory_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_mac"> | ||||
|                     Host MAC:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_mac" id="host_baremetal_mac" /> | ||||
|                 <div id="host_baremetal_mac_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li> | ||||
|                 <label input_group="general"> | ||||
|                     Tags:</label> | ||||
|                 <input class="text" type="text" name="host_tags" id="host_tags" /> | ||||
|                 <div id="host_tags_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
|         </ol> | ||||
|         </form> | ||||
|  | ||||
| @ -768,6 +768,41 @@ dictionary = { | ||||
|                 <input class="text" type="text" name="host_vcenter_host" id="host_vcenter_host" /> | ||||
|                 <div id="host_vcenter_host_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpucores"> | ||||
|                     # of CPU Cores:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpucores" id="host_baremetal_cpucores" /> | ||||
|                 <div id="host_baremetal_cpucores_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpu"> | ||||
|                     CPU (in MHz):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpu" id="host_baremetal_cpu" /> | ||||
|                 <div id="host_baremetal_cpu_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_memory"> | ||||
|                     Memory (in MB):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_memory" id="host_baremetal_memory" /> | ||||
|                 <div id="host_baremetal_memory_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_mac"> | ||||
|                     Host MAC:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_mac" id="host_baremetal_mac" /> | ||||
|                 <div id="host_baremetal_mac_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li> | ||||
|                 <label input_group="general"> | ||||
|                     Tags:</label> | ||||
|                 <input class="text" type="text" name="host_tags" id="host_tags" /> | ||||
|                 <div id="host_tags_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
|         </ol> | ||||
|         </form> | ||||
|  | ||||
| @ -342,6 +342,41 @@ dictionary = { | ||||
|                 <input class="text" type="text" name="host_vcenter_host" id="host_vcenter_host" /> | ||||
|                 <div id="host_vcenter_host_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpucores"> | ||||
|                     # of CPU Cores:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpucores" id="host_baremetal_cpucores" /> | ||||
|                 <div id="host_baremetal_cpucores_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpu"> | ||||
|                     CPU (in MHz):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpu" id="host_baremetal_cpu" /> | ||||
|                 <div id="host_baremetal_cpu_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_memory"> | ||||
|                     Memory (in MB):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_memory" id="host_baremetal_memory" /> | ||||
|                 <div id="host_baremetal_memory_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_mac"> | ||||
|                     Host MAC:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_mac" id="host_baremetal_mac" /> | ||||
|                 <div id="host_baremetal_mac_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li> | ||||
|                 <label input_group="general"> | ||||
|                     Tags:</label> | ||||
|                 <input class="text" type="text" name="host_tags" id="host_tags" /> | ||||
|                 <div id="host_tags_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
|         </ol> | ||||
|         </form> | ||||
|  | ||||
| @ -423,6 +423,41 @@ dictionary = { | ||||
|                 <input class="text" type="text" name="host_vcenter_host" id="host_vcenter_host" /> | ||||
|                 <div id="host_vcenter_host_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpucores"> | ||||
|                     # of CPU Cores:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpucores" id="host_baremetal_cpucores" /> | ||||
|                 <div id="host_baremetal_cpucores_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_cpu"> | ||||
|                     CPU (in MHz):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_cpu" id="host_baremetal_cpu" /> | ||||
|                 <div id="host_baremetal_cpu_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_memory"> | ||||
|                     Memory (in MB):</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_memory" id="host_baremetal_memory" /> | ||||
|                 <div id="host_baremetal_memory_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li input_group="baremetal" style="display: none;"> | ||||
|                 <label for="host_baremetal_mac"> | ||||
|                     Host MAC:</label> | ||||
|                 <input class="text" type="text" name="host_baremetal_mac" id="host_baremetal_mac" /> | ||||
|                 <div id="host_baremetal_mac_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
| 			<li> | ||||
|                 <label input_group="general"> | ||||
|                     Tags:</label> | ||||
|                 <input class="text" type="text" name="host_tags" id="host_tags" /> | ||||
|                 <div id="host_tags_errormsg" class="dialog_formcontent_errormsg" style="display: none;"> | ||||
|                 </div> | ||||
|             </li> | ||||
|         </ol> | ||||
|         </form> | ||||
|  | ||||
| @ -461,9 +461,15 @@ function bindAddHostButton($leftmenuItem1) { | ||||
|     	if(clusterObj.hypervisortype == "VMware") { | ||||
|     		$('li[input_group="vmware"]', dialogAddHost).show(); | ||||
|     		$('li[input_group="general"]', dialogAddHost).hide(); | ||||
| 			$('li[input_group="baremetal"]', dialogAddHost).hide(); | ||||
|     	} else if (clusterObj.hypervisortype == "BareMetal") { | ||||
| 			$('li[input_group="vmware"]', dialogAddHost).hide(); | ||||
|     		$('li[input_group="general"]', dialogAddHost).show(); | ||||
| 			$('li[input_group="baremetal"]', dialogAddHost).show(); | ||||
| 		} else { | ||||
|     		$('li[input_group="vmware"]', dialogAddHost).hide(); | ||||
|     		$('li[input_group="general"]', dialogAddHost).show(); | ||||
| 			$('li[input_group="baremetal"]', dialogAddHost).hide(); | ||||
|     	}   | ||||
|     }); | ||||
|      | ||||
| @ -521,6 +527,12 @@ function bindAddHostButton($leftmenuItem1) { | ||||
| 			            isValid &= validateString("vCenter Datacenter", $thisDialog.find("#host_vcenter_dc"), $thisDialog.find("#host_vcenter_dc_errormsg"));	 | ||||
| 			            isValid &= validateString("vCenter Host", $thisDialog.find("#host_vcenter_host"), $thisDialog.find("#host_vcenter_host_errormsg"));	 | ||||
| 		            } else { | ||||
| 						if (hypervisor == "BareMetal") { | ||||
| 							isValid &= validateString("CPU Cores", $thisDialog.find("#host_baremetal_cpucores"), $thisDialog.find("#host_baremetal_cpucores_errormsg")); | ||||
| 							isValid &= validateString("CPU", $thisDialog.find("#host_baremetal_cpu"), $thisDialog.find("#host_baremetal_cpu_errormsg")); | ||||
| 							isValid &= validateString("Memory", $thisDialog.find("#host_baremetal_memory"), $thisDialog.find("#host_baremetal_memory_errormsg")); | ||||
| 							isValid &= validateString("MAC", $thisDialog.find("#host_baremetal_mac"), $thisDialog.find("#host_baremetal_mac_errormsg"));	 | ||||
| 						}  | ||||
| 						isValid &= validateString("Host name", $thisDialog.find("#host_hostname"), $thisDialog.find("#host_hostname_errormsg")); | ||||
| 						isValid &= validateString("User name", $thisDialog.find("#host_username"), $thisDialog.find("#host_username_errormsg")); | ||||
| 						isValid &= validateString("Password", $thisDialog.find("#host_password"), $thisDialog.find("#host_password_errormsg"));	 | ||||
| @ -538,6 +550,7 @@ function bindAddHostButton($leftmenuItem1) { | ||||
|                 array1.push("&hypervisor=" + hypervisor);    | ||||
|                 var clustertype = clusterObj.clustertype; | ||||
|                 array1.push("&clustertype=" + clustertype); | ||||
| 				array1.push("&hosttags=" + todb(trim($thisDialog.find("#host_tags").val()))); | ||||
| 		        	 | ||||
| 			    if(hypervisor == "VMware") { | ||||
| 			        var username = trim($thisDialog.find("#host_vcenter_username").val()); | ||||
| @ -557,6 +570,19 @@ function bindAddHostButton($leftmenuItem1) { | ||||
| 			            url = hostname; | ||||
| 			        array1.push("&url="+todb(url)); | ||||
| 			    } else { | ||||
| 					if (hypervisor == "BareMetal") { | ||||
| 						var cpuCores = trim($thisDialog.find("#host_baremetal_cpucores").val()); | ||||
| 						array1.push("&cpunumber="+todb(cpuCores)); | ||||
| 						 | ||||
| 						var cpuSpeed = trim($thisDialog.find("#host_baremetal_cpu").val()); | ||||
| 						array1.push("&cpuspeeed="+todb(cpuSpeed)); | ||||
| 						 | ||||
| 						var memory = trim($thisDialog.find("#host_baremetal_memory").val()); | ||||
| 						array1.push("&memory="+todb(memory)); | ||||
| 						 | ||||
| 						var mac = trim($thisDialog.find("#host_baremetal_mac").val()); | ||||
| 						array1.push("&hostmac="+todb(mac)); | ||||
| 					} | ||||
| 			        var username = trim($thisDialog.find("#host_username").val()); | ||||
| 			        array1.push("&username="+todb(username)); | ||||
| 					 | ||||
|  | ||||
| @ -696,9 +696,15 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { | ||||
|     	if(clusterObj.hypervisortype == "VMware") { | ||||
|     		$('li[input_group="vmware"]', $dialogAddHost).show(); | ||||
|     		$('li[input_group="general"]', $dialogAddHost).hide(); | ||||
| 			$('li[input_group="baremetal"]', $dialogAddHost).hide(); | ||||
|     	} else if (clusterObj.hypervisortype == "BareMetal") { | ||||
| 			$('li[input_group="vmware"]', $dialogAddHost).hide(); | ||||
|     		$('li[input_group="general"]', $dialogAddHost).show(); | ||||
| 			$('li[input_group="baremetal"]', $dialogAddHost).show(); | ||||
| 		} else { | ||||
|     		$('li[input_group="vmware"]', $dialogAddHost).hide(); | ||||
|     		$('li[input_group="general"]', $dialogAddHost).show(); | ||||
| 			$('li[input_group="baremetal"]', $dialogAddHost).hide(); | ||||
|     	}  | ||||
|     }); | ||||
|       | ||||
| @ -731,6 +737,12 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { | ||||
| 			            isValid &= validateString("vCenter Datacenter", $thisDialog.find("#host_vcenter_dc"), $thisDialog.find("#host_vcenter_dc_errormsg"));	 | ||||
| 			            isValid &= validateString("vCenter Host", $thisDialog.find("#host_vcenter_host"), $thisDialog.find("#host_vcenter_host_errormsg"));	 | ||||
| 		            } else { | ||||
| 						if (hypervisor == "BareMetal") { | ||||
| 							isValid &= validateString("CPU Cores", $thisDialog.find("#host_baremetal_cpucores"), $thisDialog.find("#host_baremetal_cpucores_errormsg")); | ||||
| 							isValid &= validateString("CPU", $thisDialog.find("#host_baremetal_cpu"), $thisDialog.find("#host_baremetal_cpu_errormsg")); | ||||
| 							isValid &= validateString("Memory", $thisDialog.find("#host_baremetal_memory"), $thisDialog.find("#host_baremetal_memory_errormsg")); | ||||
| 							isValid &= validateString("MAC", $thisDialog.find("#host_baremetal_mac"), $thisDialog.find("#host_baremetal_mac_errormsg"));	 | ||||
| 						}  | ||||
| 						isValid &= validateString("Host name", $thisDialog.find("#host_hostname"), $thisDialog.find("#host_hostname_errormsg")); | ||||
| 						isValid &= validateString("User name", $thisDialog.find("#host_username"), $thisDialog.find("#host_username_errormsg")); | ||||
| 						isValid &= validateString("Password", $thisDialog.find("#host_password"), $thisDialog.find("#host_password_errormsg"));	 | ||||
| @ -759,6 +771,7 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { | ||||
| 			    array1.push("&hypervisor="+hypervisor);			     | ||||
| 			    var clustertype = clusterObj.clustertype; | ||||
|                 array1.push("&clustertype=" + clustertype); | ||||
| 				array1.push("&hosttags=" + todb(trim($thisDialog.find("#host_tags").val())));			     | ||||
| 
 | ||||
| 			    if(hypervisor == "VMware") { | ||||
| 			        var username = trim($thisDialog.find("#host_vcenter_username").val()); | ||||
| @ -779,6 +792,20 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) { | ||||
| 			        array1.push("&url="+todb(url)); | ||||
| 			    	 | ||||
| 			    } else { | ||||
| 					if (hypervisor == "BareMetal") { | ||||
| 						var cpuCores = trim($thisDialog.find("#host_baremetal_cpucores").val()); | ||||
| 						array1.push("&cpunumber="+todb(cpuCores)); | ||||
| 						 | ||||
| 						var cpuSpeed = trim($thisDialog.find("#host_baremetal_cpu").val()); | ||||
| 						array1.push("&cpuspeeed="+todb(cpuSpeed)); | ||||
| 						 | ||||
| 						var memory = trim($thisDialog.find("#host_baremetal_memory").val()); | ||||
| 						array1.push("&memory="+todb(memory)); | ||||
| 						 | ||||
| 						var mac = trim($thisDialog.find("#host_baremetal_mac").val()); | ||||
| 						array1.push("&hostmac="+todb(mac)); | ||||
| 					} | ||||
| 					 | ||||
| 			        var username = trim($thisDialog.find("#host_username").val()); | ||||
| 			        array1.push("&username="+todb(username)); | ||||
| 					 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user