bug 8335: Fixed UI to make use of the change from securitygrouplist to securitygroupids

This commit is contained in:
will 2011-02-08 10:38:34 -08:00
parent 169ac1ce57
commit 22d15d2624
5 changed files with 19 additions and 5 deletions

View File

@ -134,7 +134,7 @@ public class ApiConstants {
public static final String SCHEDULE = "schedule";
public static final String SCOPE = "scope";
public static final String SECRET_KEY = "secretkey";
public static final String SECURITY_GROUP_ID_LIST = "securitygroupidlist";
public static final String SECURITY_GROUP_IDS = "securitygroupids";
public static final String SECURITY_GROUP_NAME = "securitygroupname";
public static final String SECURITY_GROUP_ID = "securitygroupid";
public static final String SENT = "sent";

View File

@ -71,7 +71,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
@Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor on which to deploy the virtual machine")
private String hypervisor;
@Parameter(name=ApiConstants.SECURITY_GROUP_ID_LIST, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is created from service offering with Direct Attach Network support")
@Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is created from a zone with Basic Network support")
private List<Long> securityGroupIdList;
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the ID of the service offering for the virtual machine")

View File

@ -1318,6 +1318,20 @@ a:hover {
color:#333;
}
.multiple {
background-color: #e9f6ff;
font: normal 12px Arial, Helvetica, sans-serif;
font-weight:normal;
float:left;
border: 1px solid #61869b;
padding:2px 2px 0 2px;
height: 80px;
width: 400px;
margin:0;
padding:0;
color:#333;
}
.rev_wizformarea .select {
background-color: #e9f6ff;
font: normal 12px Arial, Helvetica, sans-serif;

View File

@ -682,7 +682,7 @@ dictionary = {
<div id="for_basic_zone" style="display:none">
<h3><fmt:message key="label.security.groups"/></h3>
<span id="not_available_message" style="display:none"><fmt:message key="label.no.security.groups"/></span>
<ol id="security_group_section" style="display:none">
<ol id="security_group_section" style="display:none; float:left; list-style:none">
<li>
<select id="security_group_dropdown" class="multiple" multiple="multiple" size="15">
</select>

View File

@ -384,7 +384,7 @@ function initVMWizard() {
var $securityGroupDropdown = $vmPopup.find("#security_group_dropdown").empty();
if (items != null && items.length > 0) {
for (var i = 0; i < items.length; i++) {
$securityGroupDropdown.append("<option value='" + fromdb(items[i].name) + "'>" + fromdb(items[i].name) + "</option>");
$securityGroupDropdown.append("<option value='" + fromdb(items[i].id) + "'>" + fromdb(items[i].name) + "</option>");
}
}
}
@ -1121,7 +1121,7 @@ function initVMWizard() {
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));
moreCriteria.push("&securitygroupids="+securityGroupList);
}
}
}