bug 8655: Add Zone Wizard - step 1 - implement Isolation Mode: virtual, security group.

This commit is contained in:
Jessica Wang 2011-02-24 18:03:46 -08:00
parent ddee65162e
commit 309dae765d
6 changed files with 35 additions and 8 deletions

View File

@ -16,6 +16,9 @@ label.cpu.utilized=CPU Utilized
label.cpu.allocated.for.VMs=CPU Allocated for VMs
label.not.found=Not Found
label.security.groups.enabled=Security Groups Enabled
label.isolation.mode=Isolation Mode
label.virtual=Virtual
label.security.group=Security Group
#Labels
label.cpu.allocated=CPU Allocated

View File

@ -16,6 +16,9 @@ label.cpu.utilized=CPU Utilizado
label.cpu.allocated.for.VMs=CPU asignado para máquinas virtuales
label.not.found=No se ha encontrado
label.security.groups.enabled=Los grupos de seguridad habilitado
label.isolation.mode=modo de aislamiento
label.virtual=virtuales
label.security.group=grupos de seguridad
#Labels
label.cpu.allocated = CPU asignado

View File

@ -16,6 +16,9 @@ label.cpu.utilized=CPUが活用さ
label.cpu.allocated.for.VMs=CPUはVMの割り当て
label.not.found=が見つかりません
label.security.groups.enabled=セキュリティグループが有効になって
label.isolation.mode=分離モード
label.virtual=仮想
label.security.group=セキュリティグループ
#Labels
label.cpu.allocated = CPU割り当て

View File

@ -16,6 +16,9 @@ label.cpu.utilized=CPU的利用率
label.cpu.allocated.for.VMs=分配给虚拟机的CPU
label.not.found=找不到
label.security.groups.enabled=安全组启用
label.isolation.mode=隔离模式
label.virtual=虚拟
label.security.group=安全组
#Labels
label.cpu.allocated = 已分配CPU

View File

@ -184,20 +184,20 @@
<fmt:message key="message.advanced.mode.desc"/>
</p>
<div class="zonepopup_subselectionbox_helptext">Islolation Mode</div>
<div class="zonepopup_subselectionbox_helptext">Isolation Mode</div>
<div class="zonepopup_subselectionbox">
<form>
<ol>
<li>
<input type="radio" name="basic_advanced" value="Advanced" id="Advanced" class="radio" />
<label class="label">Virtual</label>
<input type="radio" name="isolation_mode" value="false" id="isolation_mode_virtual" class="radio" />
<label class="label"><fmt:message key="label.virtual"/></label>
<span>Some description will appear here. Some description will appear here. Some description will appear here..</span>
</li>
<li>
<input type="radio" name="basic_advanced" value="Advanced" id="Advanced" class="radio" />
<label class="label">Security Group</label>
<input type="radio" name="isolation_mode" value="true" id="isolation_mode_securitygroup" class="radio" />
<label class="label"><fmt:message key="label.security.group"/></label>
<span>Some description will appear here. Some description will appear here. Some description will appear here..</span>
</li>
</ol>

View File

@ -1086,7 +1086,7 @@ function closeAddZoneWizard() {
function initAddZoneWizard() {
var $addZoneWizard = $("#add_zone_wizard");
$addZoneWizard.draggable();
//$addZoneWizard.draggable();
$addZoneWizard.find("#add_zone_public").unbind("change").bind("change", function(event) {
if($(this).val() == "true") { //public zone
@ -1152,7 +1152,9 @@ function initAddZoneWizard() {
closeAddZoneWizard();
break;
case "Basic": //create VLAN in pod-level
case "Basic": //create VLAN in pod-level
$thisWizard.find("#step1").find("input[name=isolation_mode]").removeAttr("checked"); //uncheck all radio buttons under Isolation Mode
//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, #add_zone_guestcidraddress_container").hide();
@ -1162,7 +1164,9 @@ function initAddZoneWizard() {
return true;
break;
case "Advanced": //create VLAN in zone-level
case "Advanced": //create VLAN in zone-level
$thisWizard.find("#step1").find("input[name=isolation_mode]:eq(0)").attr("checked", true); //check the 1st radio button under Insolation Mode
//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, #add_zone_guestcidraddress_container").show();
@ -1174,6 +1178,14 @@ function initAddZoneWizard() {
return true;
break;
case "isolation_mode_virtual":
return true;
break;
case "isolation_mode_securitygroup":
return true;
break;
case "go_to_step_2": //step 1 => step 2
$thisWizard.find("#step1").hide();
$thisWizard.find("#step2").show();
@ -1330,6 +1342,9 @@ function addZoneWizardSubmit($thisWizard) {
var networktype = $thisWizard.find("#step1").find("input:radio[name=basic_advanced]:checked").val(); //"Basic", "Advanced"
moreCriteria.push("&networktype="+todb(networktype));
if(networktype == "Advanced")
moreCriteria.push("&securitygroupenabled="+$thisWizard.find("#step1").find("input[name=isolation_mode]:checked").val());
var name = trim($thisWizard.find("#add_zone_name").val());
moreCriteria.push("&name="+todb(name));