mirror of https://github.com/apache/cloudstack.git
new UI - Add Zone and Pod wizard - (1) basic mode: hide Zone VLAN Range in Add Zone step, show Guest IP Range in Add Pod step. (2) advanced mode: show Zone VLAN Range in Add Zone step, hide Guest IP Range in Add Pod step.
This commit is contained in:
parent
7f3f3226e0
commit
9c79acf050
|
|
@ -213,7 +213,7 @@
|
|||
<input class="text" type="text" id="add_zone_internaldns2"/>
|
||||
<div id="add_zone_internaldns2_errormsg" class="dialog_formcontent_errormsg" style="display:none;" ></div>
|
||||
</li>
|
||||
<li id="add_zone_container">
|
||||
<li id="add_zone_vlan_container">
|
||||
<label>Zone VLAN Range:</label>
|
||||
<input class="text" style="width:92px" type="text" name="add_zone_startvlan" id="add_zone_startvlan"/><span>-</span>
|
||||
<input class="text" style="width:92px" type="text" name="add_zone_endvlan" id="add_zone_endvlan"/>
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<label for="user_name" style="width: 115px;">
|
||||
Private IP Range:</label>
|
||||
Reserved System IP:</label>
|
||||
<input class="text" style="width: 92px" type="text" name="add_pod_startip" id="add_pod_startip" /><span>-</span>
|
||||
<input class="text" style="width: 92px" type="text" name="add_pod_endip" id="add_pod_endip" />
|
||||
<div id="add_pod_startip_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
|
|
|
|||
|
|
@ -365,11 +365,15 @@ function initAddZoneShortcut() {
|
|||
closeAddZoneWizard();
|
||||
break;
|
||||
|
||||
case "basic_mode":
|
||||
case "basic_mode": //create VLAN in pod-level
|
||||
//hide Zone VLAN Range in Add Zone(step 2), show Guest IP Range in Add Pod(step3)
|
||||
$thisWizard.find("#step2").find("#add_zone_vlan_container").hide();
|
||||
return true;
|
||||
break;
|
||||
|
||||
case "advanced_mode":
|
||||
case "advanced_mode": //create VLAN in zone-level
|
||||
//show Zone VLAN Range in Add Zone(step 2), hide Guest IP Range in Add Pod(step3)
|
||||
$thisWizard.find("#step2").find("#add_zone_vlan_container").show();
|
||||
return true;
|
||||
break;
|
||||
|
||||
|
|
@ -379,6 +383,9 @@ function initAddZoneShortcut() {
|
|||
break;
|
||||
|
||||
case "go_to_step_3": //step 2 => step 3
|
||||
var isValid = addZoneWizardValidateZond($thisWizard);
|
||||
if (!isValid)
|
||||
return;
|
||||
$thisWizard.find("#step2").hide();
|
||||
$thisWizard.find("#step3").show();
|
||||
break;
|
||||
|
|
@ -396,7 +403,7 @@ function initAddZoneShortcut() {
|
|||
case "submit_button": //step 3 => spinning wheel
|
||||
$thisWizard.find("#step3").hide();
|
||||
$thisWizard.find("#after_submit_screen").show();
|
||||
AddZoneWizardSubmit($thisWizard);
|
||||
addZoneWizardSubmit($thisWizard);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -404,9 +411,7 @@ function initAddZoneShortcut() {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function AddZoneWizardSubmit($thisWizard) {
|
||||
// validate values
|
||||
function addZoneWizardValidateZond($thisWizard) {
|
||||
var isValid = true;
|
||||
isValid &= validateString("Name", $thisWizard.find("#add_zone_name"), $thisWizard.find("#add_zone_name_errormsg"));
|
||||
isValid &= validateIp("DNS 1", $thisWizard.find("#add_zone_dns1"), $thisWizard.find("#add_zone_dns1_errormsg"), false); //required
|
||||
|
|
@ -418,9 +423,10 @@ function AddZoneWizardSubmit($thisWizard) {
|
|||
isValid &= validateString("Zone - End VLAN Range", $thisWizard.find("#add_zone_endvlan"), $thisWizard.find("#add_zone_endvlan_errormsg"), true); //optional
|
||||
}
|
||||
isValid &= validateCIDR("Guest CIDR", $thisWizard.find("#add_zone_guestcidraddress"), $thisWizard.find("#add_zone_guestcidraddress_errormsg"), false); //required
|
||||
if (!isValid)
|
||||
return;
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
function addZoneWizardSubmit($thisWizard) {
|
||||
$thisWizard.find("#spinning_wheel").show();
|
||||
|
||||
var moreCriteria = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue