mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Feature #3175: Update sec groups in Template nic
This commit is contained in:
1 parent
e0c31a7dda
commit
944f7ba89c
1 file changed
+16
-2
@@ -1826,7 +1826,9 @@ function retrieve_nic_tab_data(context){
|
||||
var secgroups = retrieveSecurityGroupTableSelect(context,
|
||||
"vm_create_nic_"+str_nic_tab_id);
|
||||
|
||||
data["SECURITY_GROUPS"] = secgroups.join(",");
|
||||
if (secgroups != undefined && secgroups.length != 0){
|
||||
data["SECURITY_GROUPS"] = secgroups.join(",");
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
@@ -1861,6 +1863,18 @@ function fill_nic_tab_data(template_json, context){
|
||||
var field = $("#icmp_type", context);
|
||||
$("#icmp_type", context).attr('checked','checked');
|
||||
}
|
||||
|
||||
var str_nic_tab_id = $("div[str_nic_tab_id]", context).attr("str_nic_tab_id");
|
||||
|
||||
if (template_json["SECURITY_GROUPS"] != undefined &&
|
||||
template_json["SECURITY_GROUPS"].length != 0){
|
||||
|
||||
var secgroups = template_json["SECURITY_GROUPS"].split(",");
|
||||
|
||||
selectSecurityGroupTableSelect(context, "vm_create_nic_"+str_nic_tab_id, secgroups);
|
||||
} else {
|
||||
refreshSecurityGroupTableSelect(context, "vm_create_nic_"+str_nic_tab_id);
|
||||
}
|
||||
}
|
||||
|
||||
function setup_nic_tab_content(nic_section, str_nic_tab_id, str_datatable_id) {
|
||||
@@ -3179,7 +3193,7 @@ function add_nic_tab(nic_id, dialog) {
|
||||
var str_nic_tab_id = 'nic' + nic_id;
|
||||
var str_datatable_id = 'datatable_template_networks' + nic_id;
|
||||
|
||||
var html_tab_content = '<div id="'+str_nic_tab_id+'Tab" class="nic wizard_internal_tab content">'+
|
||||
var html_tab_content = '<div id="'+str_nic_tab_id+'Tab" class="nic wizard_internal_tab content" str_nic_tab_id="'+str_nic_tab_id+'">'+
|
||||
generate_nic_tab_content(str_nic_tab_id, str_datatable_id) +
|
||||
'</div>'
|
||||
|
||||
|
||||
Reference in new issue
Block a user