Skip to content

Commit 94d5d3d

Browse files
committed
CLOUDSTACK-2166:UI Support for remove Vlan for the non-contiguous vlan support
1 parent 932946b commit 94d5d3d

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

ui/css/cloudstack3.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11853,6 +11853,17 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
1185311853
background-position: -37px -62px;
1185411854
}
1185511855

11856+
.removeVlanRange .icon {
11857+
11858+
background-position: 1px -92px;
11859+
}
11860+
11861+
.removeVlanRange:hover .icon{
11862+
11863+
background-position: 1px -92px;
11864+
}
11865+
11866+
1185611867
.resize .icon,
1185711868
.updateResourceCount .icon {
1185811869
background-position: -167px -66px;

ui/scripts/system.js

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,50 @@
10361036
notification:{poll:pollAsyncJobResult}
10371037

10381038

1039-
}
1039+
},
1040+
1041+
removeVlanRange:{
1042+
label:'Remove VLAN Range',
1043+
messages: {
1044+
confirm: function(args) {
1045+
return 'Are you sure you want to remove an existing VLAN Range from this guest network?';
1046+
},
1047+
notification: function(args) {
1048+
return 'VLAN Range removed';
1049+
}
1050+
},
10401051

1052+
createForm:{
1053+
title:'Remove VLAN Range',
1054+
fields:{
1055+
startvlan: {label:'Vlan Start', validation:{required:true}},
1056+
endvlan:{label:'Vlan End', validation:{required:true}}
1057+
}
1058+
1059+
},
1060+
1061+
action:function(args){
1062+
1063+
var array1=[];
1064+
if(args.data.startvlan != "" && args.data.endvlan != ""){
1065+
array1.push("&removevlan=" + args.data.startvlan + "-" + args.data.endvlan);
1066+
}
1067+
$.ajax({
1068+
url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id + array1.join("")),
1069+
dataType: "json",
1070+
success: function(json) {
1071+
var jobId = json.updatephysicalnetworkresponse.jobid;
1072+
var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest');
1073+
updateTrafficLabels(trafficType, args.data, function() {
1074+
args.response.success({ _custom: { jobId: jobId }});
1075+
});
1076+
}
1077+
});
1078+
1079+
},
1080+
notification:{poll:pollAsyncJobResult}
1081+
1082+
}
10411083

10421084
},
10431085

@@ -1120,7 +1162,7 @@
11201162

11211163
args.response.success({
11221164
actionFilter: function() {
1123-
var allowedActions = ['edit' , 'addVlanRange'];
1165+
var allowedActions = ['edit' , 'addVlanRange','removeVlanRange'];
11241166
return allowedActions;
11251167
},
11261168
data: selectedPhysicalNetworkObj

0 commit comments

Comments
 (0)