1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #3175: Fix SG tables after merge

This commit is contained in:
Carlos Martín 2014-10-24 15:32:13 +02:00
parent f97743eae9
commit 577d8c0a9e
3 changed files with 16 additions and 6 deletions

View File

@ -1700,7 +1700,11 @@ function fill_nic_tab_data(template_json, context){
var secgroups = template_json["SECURITY_GROUPS"].split(",");
selectSecurityGroupTableSelect(context, "vm_create_nic_"+str_nic_tab_id, secgroups);
selectSecurityGroupTableSelect(
context,
"vm_create_nic_"+str_nic_tab_id,
{ids: secgroups});
} else {
refreshSecurityGroupTableSelect(context, "vm_create_nic_"+str_nic_tab_id);
}

View File

@ -1462,7 +1462,12 @@ function fillVNetUpdateFormPanel(vnet, dialog){
vnet.TEMPLATE["SECURITY_GROUPS"].length != 0){
var secgroups = vnet.TEMPLATE["SECURITY_GROUPS"].split(",");
selectSecurityGroupTableSelect($("#vnetCreateSecurityTab", dialog), "vnet_create", secgroups);
selectSecurityGroupTableSelect(
$("#vnetCreateSecurityTab", dialog),
"vnet_create",
{ ids: secgroups });
} else {
refreshSecurityGroupTableSelect(dialog, "vnet_create");
}
@ -1693,7 +1698,8 @@ function fill_ar_tab_data(ar_json, ar_section){
ar_json["SECURITY_GROUPS"].length != 0){
var secgroups = ar_json["SECURITY_GROUPS"].split(",");
selectSecurityGroupTableSelect(ar_section, "update_ar", secgroups);
selectSecurityGroupTableSelect(ar_section, "update_ar", {ids: secgroups});
}
delete ar_json["SECURITY_GROUPS"];

View File

@ -6426,9 +6426,9 @@ function retrieveSecurityGroupTableSelect(section, context_id){
}
// Clears the current selection, and selects the given IDs
// ids must be a single ID, or an array of IDs for options.multiple_choice
function selectSecurityGroupTableSelect(section, context_id, ids){
return selectResourceTableSelect(section, context_id, ids);
// opts.ids must be a single ID, or an array of IDs for options.multiple_choice
function selectSecurityGroupTableSelect(section, context_id, opts){
return selectResourceTableSelect(section, context_id, opts);
}
function generateResourceTableSelect(context_id, columns, options){