mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2166:UI Support for remove Vlan for the non-contiguous vlan support
This commit is contained in:
parent
932946bbe2
commit
94d5d3de50
@ -11853,6 +11853,17 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
|
||||
background-position: -37px -62px;
|
||||
}
|
||||
|
||||
.removeVlanRange .icon {
|
||||
|
||||
background-position: 1px -92px;
|
||||
}
|
||||
|
||||
.removeVlanRange:hover .icon{
|
||||
|
||||
background-position: 1px -92px;
|
||||
}
|
||||
|
||||
|
||||
.resize .icon,
|
||||
.updateResourceCount .icon {
|
||||
background-position: -167px -66px;
|
||||
|
||||
@ -1036,8 +1036,50 @@
|
||||
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;
|
||||
var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest');
|
||||
updateTrafficLabels(trafficType, args.data, function() {
|
||||
args.response.success({ _custom: { jobId: jobId }});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
notification:{poll:pollAsyncJobResult}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -1120,7 +1162,7 @@
|
||||
|
||||
args.response.success({
|
||||
actionFilter: function() {
|
||||
var allowedActions = ['edit' , 'addVlanRange'];
|
||||
var allowedActions = ['edit' , 'addVlanRange','removeVlanRange'];
|
||||
return allowedActions;
|
||||
},
|
||||
data: selectedPhysicalNetworkObj
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user