mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3753: UI > Infrastructure > zone detail > physical network > guest > (1) remove Delete VLAN Range action. (2) change Add VLAN Range action to pass new VLAN range + exisitng VLAN range(s) to API. This is corresponding UI change to updatePhysicalNetwork API change that removevlan property has been removed and definition of vlan property has been changed.
This commit is contained in:
parent
7bf37c1202
commit
4f51d21908
|
|
@ -1151,11 +1151,13 @@
|
|||
},
|
||||
|
||||
action: function(args) {
|
||||
|
||||
var array1 = [];
|
||||
var array1 = [];
|
||||
if (args.data.startvlan != "" && args.data.endvlan != "") {
|
||||
array1.push("&vlan=" + todb(args.data.startvlan) + "-" + todb(args.data.endvlan));
|
||||
|
||||
var newVlanRange = todb(args.data.startvlan) + "-" + todb(args.data.endvlan);
|
||||
if(selectedPhysicalNetworkObj.vlan == "")
|
||||
array1.push("&vlan=" + newVlanRange);
|
||||
else
|
||||
array1.push("&vlan=" + selectedPhysicalNetworkObj.vlan + "," + newVlanRange);
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id + array1.join("")),
|
||||
|
|
@ -1168,85 +1170,15 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
error: function(json) {
|
||||
args.response.error(parseXMLHttpResponse(json));
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
removeVlanRange: {
|
||||
label: 'Remove VLAN Range',
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Are you sure you want to remove an existing VLAN Range from this guest network?';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'VLAN Range removed';
|
||||
}
|
||||
},
|
||||
|
||||
createForm: {
|
||||
title: 'Remove VLAN Range',
|
||||
fields: {
|
||||
startvlan: {
|
||||
label: 'Vlan Start',
|
||||
validation: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
endvlan: {
|
||||
label: 'Vlan End',
|
||||
validation: {
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
action: function(args) {
|
||||
|
||||
var array1 = [];
|
||||
if (args.data.startvlan != "" && args.data.endvlan != "") {
|
||||
array1.push("&removevlan=" + args.data.startvlan + "-" + args.data.endvlan);
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
args.response.success({
|
||||
_custom: {
|
||||
jobId: jobId
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
error: function(json) {
|
||||
args.response.error(parseXMLHttpResponse(json));
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
tabFilter: function(args) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue