mirror of https://github.com/apache/cloudstack.git
bug 7134: VM Wizard - step 4 - for basic zone - show "security group is currently not available" if getDirectAttachSecurityGroupsEnabled() is not true or hypervisor of selected template is VmWare.
This commit is contained in:
parent
a8da46845d
commit
00e34cd146
|
|
@ -638,77 +638,79 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringpanel" style="position:relative;">
|
||||
<div class="vmpopup_offeringbox" id="network_virtual_container" style="display:none">
|
||||
<input type="checkbox" id="network_virtual" name="network_virtual_checkbox" class="radio" checked="checked" />
|
||||
<label class="label" id="network_virtual_name">Virtual Network</label>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p id="network_virtual_desc">
|
||||
A dedicated virtualized network for your account. The broadcast domain is contrained within a VLAN and all public network access is routed out by a virtual router.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="network_direct_container"></div>
|
||||
<!--
|
||||
<div class="vmpopup_offeringbox">
|
||||
<input type="radio" name="radiogroup" class="radio" selected />
|
||||
<label class="label">
|
||||
My Virtual Network with Guest CIDR support. Specify guest CIDR:
|
||||
</label>
|
||||
<input type="text" name="disksize" class="text" />
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A virtual private network that is fronted by a virtual router. An optional guest CIDR can be specified.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringbox" style="margin-top: 15px;">
|
||||
<input type="radio" name="radiogroup" class="radio" />
|
||||
<label class="label">
|
||||
My Direct Network:</label>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A network where the virtual instance is directly assigned an IP from.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringbox" style="margin-top: 15px;">
|
||||
<input type="radio" name="radiogroup" class="radio" />
|
||||
<label class="label">
|
||||
My Direct Shared Network: </label>
|
||||
<select class="select">
|
||||
<option>VLAN 100</option>
|
||||
<option>VLAN 101</option>
|
||||
<option>VLAN 102</option>
|
||||
</select>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A network where the virtual instance is directly assigned an IP from. A VLAN must be selected.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div id="for_basic_zone" style="display: none">
|
||||
<h3>Security Groups</h3>
|
||||
<ol>
|
||||
<div id="for_advanced_zone" style="display: none;">
|
||||
<div class="vmpopup_offeringbox" id="network_virtual_container" style="display:none">
|
||||
<input type="checkbox" id="network_virtual" name="network_virtual_checkbox" class="radio" checked="checked" />
|
||||
<label class="label" id="network_virtual_name">Virtual Network</label>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p id="network_virtual_desc">
|
||||
A dedicated virtualized network for your account. The broadcast domain is contrained within a VLAN and all public network access is routed out by a virtual router.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="network_direct_container"></div>
|
||||
<!--
|
||||
<div class="vmpopup_offeringbox">
|
||||
<input type="radio" name="radiogroup" class="radio" selected />
|
||||
<label class="label">
|
||||
My Virtual Network with Guest CIDR support. Specify guest CIDR:
|
||||
</label>
|
||||
<input type="text" name="disksize" class="text" />
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A virtual private network that is fronted by a virtual router. An optional guest CIDR can be specified.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringbox" style="margin-top: 15px;">
|
||||
<input type="radio" name="radiogroup" class="radio" />
|
||||
<label class="label">
|
||||
My Direct Network:</label>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A network where the virtual instance is directly assigned an IP from.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringbox" style="margin-top: 15px;">
|
||||
<input type="radio" name="radiogroup" class="radio" />
|
||||
<label class="label">
|
||||
My Direct Shared Network: </label>
|
||||
<select class="select">
|
||||
<option>VLAN 100</option>
|
||||
<option>VLAN 101</option>
|
||||
<option>VLAN 102</option>
|
||||
</select>
|
||||
<div class="vmpopup_offdescriptionbox">
|
||||
<div class="vmpopup_offdescriptionbox_top">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot">
|
||||
<p>
|
||||
A network where the virtual instance is directly assigned an IP from. A VLAN must be selected.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div id="for_basic_zone" style="display:none">
|
||||
<h3>Security Groups</h3>
|
||||
<span id="not_available_message" style="display:none">security group is currently not available</span>
|
||||
<ol id="security_group_section" style="display:none">
|
||||
<li>
|
||||
<select id="wizard_security_groups" class="multiple" multiple="multiple" size="15">
|
||||
<select id="security_group_dropdown" class="multiple" multiple="multiple" size="15">
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -391,10 +391,10 @@ function initVMWizard() {
|
|||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listsecuritygroupsresponse.securitygroup;
|
||||
var $securityGroupSelect = $vmPopup.find("#wizard_security_groups").empty();
|
||||
var $securityGroupDropdown = $vmPopup.find("#security_group_dropdown").empty();
|
||||
if (items != null && items.length > 0) {
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
$securityGroupSelect.append("<option value='" + fromdb(items[i].name) + "'>" + fromdb(items[i].name) + "</option>");
|
||||
$securityGroupDropdown.append("<option value='" + fromdb(items[i].name) + "'>" + fromdb(items[i].name) + "</option>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -834,8 +834,10 @@ function initVMWizard() {
|
|||
|
||||
//Setup Networking before showing it. This only applies to zones with Advanced Networking support.
|
||||
var zoneObj = $thisPopup.find("#wizard_zone option:selected").data("zoneObj");
|
||||
if (zoneObj.networktype == "Advanced") {
|
||||
$thisPopup.find("#step4").find("#for_basic_zone").hide();
|
||||
if (zoneObj.networktype == "Advanced") {
|
||||
$thisPopup.find("#step4").find("#for_advanced_zone").show();
|
||||
$thisPopup.find("#step4").find("#for_basic_zone").hide();
|
||||
|
||||
var networkName = "Virtual Network";
|
||||
var networkDesc = "A dedicated virtualized network for your account. The broadcast domain is contrained within a VLAN and all public network access is routed out by a virtual router.";
|
||||
$.ajax({
|
||||
|
|
@ -939,12 +941,20 @@ function initVMWizard() {
|
|||
}
|
||||
}
|
||||
});
|
||||
$thisPopup.find("#wizard_review_network").text(networkName);
|
||||
$thisPopup.find("#step5").find("#wizard_review_network").text(networkName);
|
||||
}
|
||||
else { // Basic Network
|
||||
if(getDirectAttachSecurityGroupsEnabled() == "true" && $selectedVmWizardTemplate.data("hypervisor") != "VmWare" ) {
|
||||
$thisPopup.find("#step4").find("#for_basic_zone").show();
|
||||
$thisPopup.find("#wizard_review_network").text("Basic Network");
|
||||
$thisPopup.find("#step4").find("#for_basic_zone").show();
|
||||
$thisPopup.find("#step4").find("#for_advanced_zone").hide();
|
||||
if(getDirectAttachSecurityGroupsEnabled() == "true" && $selectedVmWizardTemplate.data("hypervisor") != "VmWare" ) {
|
||||
$thisPopup.find("#step4").find("#security_group_section").show();
|
||||
$thisPopup.find("#step4").find("#not_available_message").hide();
|
||||
$thisPopup.find("#step5").find("#wizard_review_network").text("Basic Network");
|
||||
}
|
||||
else {
|
||||
$thisPopup.find("#step4").find("#not_available_message").show();
|
||||
$thisPopup.find("#step4").find("#security_group_section").hide();
|
||||
$thisPopup.find("#step5").find("#wizard_review_network").text("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1033,9 +1043,9 @@ function initVMWizard() {
|
|||
moreCriteria.push("&networkIds="+networkIds);
|
||||
}
|
||||
else { //Basic zone
|
||||
if($thisPopup.find("#step4").find("#for_basic_zone").css("style") != "none") {
|
||||
if($thisPopup.find("#wizard_security_groups").val() != null && $thisPopup.find("#wizard_security_groups").val().length > 0) {
|
||||
var securityGroupList = $thisPopup.find("#wizard_security_groups").val().join(",");
|
||||
if($thisPopup.find("#step4").find("#security_group_section").css("display") != "none") {
|
||||
if($thisPopup.find("#security_group_dropdown").val() != null && $thisPopup.find("#security_group_dropdown").val().length > 0) {
|
||||
var securityGroupList = $thisPopup.find("#security_group_dropdown").val().join(",");
|
||||
moreCriteria.push("&securitygrouplist="+encodeURIComponent(securityGroupList));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue