1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

B #2188: Fixed bug when tried to update address range with IP6_STATIC (#2195)

(cherry picked from commit c4f8935229)
This commit is contained in:
juanmont 2018-06-18 17:06:07 +02:00 committed by Ruben S. Montero
parent 3e3cd92de8
commit 12e1705e77
2 changed files with 20 additions and 2 deletions

View File

@ -110,6 +110,8 @@ define(function(require) {
function _onShow(){
this.securityGroupsTable.refreshResourceTableSelect();
$("input.slaac", this.ar_section).change();
}
function _retrieve_ar_tab_data(){
@ -144,7 +146,11 @@ define(function(require) {
var field=$(this);
if (field.val() != null && field.val().length){ //if has a length
data[field.attr('name')] = field.val();
if (field.attr('name') === "SLAAC" && field[0].checked) {
data[field.attr('name')] = "on";
} else {
data[field.attr('name')] = field.val();
}
}
});
@ -171,8 +177,20 @@ define(function(require) {
}
function _fill_ar_tab_data(ar_json){
if (ar_json["TYPE"] && ar_json["TYPE"].indexOf("_STATIC") >= 0 ){
ar_json["TYPE"] = ar_json["TYPE"].replace("_STATIC", "");
ar_json["SLAAC"] = "off";
}
WizardFields.fill(this.ar_section, ar_json);
if (ar_json["SLAAC"] && ar_json["SLAAC"] === "off"){
$("input.slaac", this.ar_section)[0].checked = false;
}
$("input.slaac", this.ar_section).prop("disabled", true);
var fields = $('[wizard_field]',this.ar_section);
fields.each(function(){

View File

@ -37,7 +37,7 @@
</div>
<div class="medium-6 columns collapse ar_input type_ip4_6 type_ip6 switch left">
<label for="{{str_ar_tab_id}}_">{{tr "SLAAC"}}</label>
<input class="switch-input slaac" id="{{str_ar_tab_id}}_slaac" type="checkbox">
<input class="switch-input slaac" id="{{str_ar_tab_id}}_slaac" name="SLAAC" type="checkbox">
<label class="switch-paddle" for="{{str_ar_tab_id}}_slaac"></label>
</div>
</div>