diff --git a/ui/jsp/cluster.jsp b/ui/jsp/cluster.jsp
index 8649d43a172..237cb7e5b00 100644
--- a/ui/jsp/cluster.jsp
+++ b/ui/jsp/cluster.jsp
@@ -217,7 +217,42 @@ dictionary = {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/jsp/host.jsp b/ui/jsp/host.jsp
index bfef9257a8d..df8bcdb0770 100644
--- a/ui/jsp/host.jsp
+++ b/ui/jsp/host.jsp
@@ -768,7 +768,42 @@ dictionary = {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/jsp/pod.jsp b/ui/jsp/pod.jsp
index 922277dd049..f32c18e6e71 100644
--- a/ui/jsp/pod.jsp
+++ b/ui/jsp/pod.jsp
@@ -342,7 +342,42 @@ dictionary = {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/jsp/zone.jsp b/ui/jsp/zone.jsp
index fb8628c0b7f..970ce96815b 100644
--- a/ui/jsp/zone.jsp
+++ b/ui/jsp/zone.jsp
@@ -423,6 +423,41 @@ dictionary = {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js
index 9e3d3aff787..28ee2b6a3c5 100644
--- a/ui/scripts/cloud.core.pod.js
+++ b/ui/scripts/cloud.core.pod.js
@@ -461,10 +461,16 @@ function bindAddHostButton($leftmenuItem1) {
if(clusterObj.hypervisortype == "VMware") {
$('li[input_group="vmware"]', dialogAddHost).show();
$('li[input_group="general"]', dialogAddHost).hide();
- } else {
+ $('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();
+ }
});
$button.unbind("click").bind("click", function(event) {
@@ -521,10 +527,16 @@ 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 {
- 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"));
- }
+ 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"));
+ }
}
if (!isValid)
return;
@@ -537,7 +549,8 @@ function bindAddHostButton($leftmenuItem1) {
array1.push("&clusterid="+clusterId);
array1.push("&hypervisor=" + hypervisor);
var clustertype = clusterObj.clustertype;
- array1.push("&clustertype=" + 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));
diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js
index 401d5841b1f..2390af43d65 100644
--- a/ui/scripts/cloud.core.zone.js
+++ b/ui/scripts/cloud.core.zone.js
@@ -696,10 +696,16 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
if(clusterObj.hypervisortype == "VMware") {
$('li[input_group="vmware"]', $dialogAddHost).show();
$('li[input_group="general"]', $dialogAddHost).hide();
- } else {
+ $('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();
+ }
});
$button.unbind("click").bind("click", function(event) {
@@ -730,11 +736,17 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
isValid &= validateString("vCenter Password", $thisDialog.find("#host_vcenter_password"), $thisDialog.find("#host_vcenter_password_errormsg"));
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 {
- 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"));
- }
+ } 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"));
+ }
}
if (!isValid)
return;
@@ -758,7 +770,8 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
array1.push("&hypervisor="+hypervisor);
var clustertype = clusterObj.clustertype;
- array1.push("&clustertype=" + 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));