mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1669:UI for non-contiguous VLAN ranges
This commit is contained in:
parent
4f9bdba281
commit
bb841d6011
|
|
@ -11761,6 +11761,15 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
|
|||
.updateResourceLimits:hover .icon {
|
||||
background-position: -100px -614px;
|
||||
}
|
||||
|
||||
.addVlanRange .icon {
|
||||
background-position: -168px -31px;
|
||||
}
|
||||
|
||||
|
||||
.addVlanRange:hover .icon {
|
||||
background-position: -168px -613px;
|
||||
}
|
||||
|
||||
.resize .icon,
|
||||
.updateResourceCount .icon {
|
||||
|
|
|
|||
|
|
@ -898,7 +898,59 @@
|
|||
});
|
||||
},
|
||||
notification: { poll: pollAsyncJobResult }
|
||||
}
|
||||
},
|
||||
|
||||
addVlanRange:{
|
||||
label:'Add VLAN Range',
|
||||
title:'Add VLAN Range',
|
||||
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Are you sure you want to add another VLAN Range to this guest network?';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'VLAN Range added';
|
||||
}
|
||||
},
|
||||
|
||||
createForm:{
|
||||
title:'Add 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("&vlan=" + todb(args.data.startvlan) + "-" + todb(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}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
tabFilter: function(args) {
|
||||
|
|
@ -980,7 +1032,7 @@
|
|||
|
||||
args.response.success({
|
||||
actionFilter: function() {
|
||||
var allowedActions = ['edit'];
|
||||
var allowedActions = ['edit' , 'addVlanRange'];
|
||||
return allowedActions;
|
||||
},
|
||||
data: selectedPhysicalNetworkObj
|
||||
|
|
|
|||
Loading…
Reference in New Issue