From 8666fb3fc4b74d83e29d5fe71c99f5cd2b2797f6 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 23 Nov 2010 16:55:36 -0800 Subject: [PATCH] new UI - Add Direct IP Range dialog box - add new field "guest gateway". (merge from 2.2.beta1 branch to master branch) --- ui/jsp/pod.jsp | 7 +++++++ ui/scripts/cloud.core.pod.js | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/jsp/pod.jsp b/ui/jsp/pod.jsp index 988b67d577a..8e0486fd9d7 100644 --- a/ui/jsp/pod.jsp +++ b/ui/jsp/pod.jsp @@ -402,6 +402,13 @@ + +
  • + + + +
  • + diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index 6971dc9c9d0..d935c17671b 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -584,6 +584,7 @@ function initAddPodVLANButton($button) { // validate values var isValid = true; isValid &= validateIp("Netmask", $thisDialog.find("#netmask"), $thisDialog.find("#netmask_errormsg")); + isValid &= validateIp("Gateway", $thisDialog.find("#guestgateway"), $thisDialog.find("#guestgateway_errormsg")); isValid &= validateIp("Start IP Range", $thisDialog.find("#startip"), $thisDialog.find("#startip_errormsg")); //required isValid &= validateIp("End IP Range", $thisDialog.find("#endip"), $thisDialog.find("#endip_errormsg"), true); //optional if (!isValid) @@ -592,6 +593,7 @@ function initAddPodVLANButton($button) { $thisDialog.find("#spinning_wheel").show(); var netmask = trim($thisDialog.find("#netmask").val()); + var guestgateway = trim($thisDialog.find("#guestgateway").val()); var startip = trim($thisDialog.find("#startip").val()); var endip = trim($thisDialog.find("#endip").val()); @@ -600,7 +602,7 @@ function initAddPodVLANButton($button) { array1.push("&zoneid=" + zoneId); array1.push("&podId=" + podId); array1.push("&forVirtualNetwork=false"); //direct VLAN - array1.push("&gateway="+encodeURIComponent(podObj.gateway)); + array1.push("&gateway="+encodeURIComponent(guestgateway)); array1.push("&netmask="+encodeURIComponent(netmask)); array1.push("&startip="+encodeURIComponent(startip)); if(endip != null && endip.length > 0)