cloudStack 3.0 new UI - zone chart - guest - network tab - guest network detail - edit - split network offerings into 2 fields: one is editable, the other one is not. Show editable now when network type is Isolated. Show the other one otherwise.

This commit is contained in:
Jessica Wang 2011-11-30 10:30:14 -08:00
parent 38355b0b44
commit dbb7f940bf

View File

@ -743,8 +743,10 @@
var array1 = [];
array1.push("&name=" + todb(args.data.name));
array1.push("&displaytext=" + todb(args.data.displaytext));
array1.push("&networkdomain=" + args.data.networkdomain);
array1.push("&networkofferingid=" + todb(args.data.networkofferingid)); //???
array1.push("&networkdomain=" + args.data.networkdomain);
//if(selectedGuestNetworkObj.type != "Isolated")
if(args.data.networkofferingid != null)
array1.push("&networkofferingid=" + todb(args.data.networkofferingid)); //???
$.ajax({
url: createURL("updateNetwork&id=" + args.context.networks[0].id + array1.join("")),
dataType: "json",
@ -810,7 +812,7 @@
tabs: {
details: {
title: 'Details',
preFilter: function(args) {
preFilter: function(args) { //???
var hiddenFields = [];
if(selectedZoneObj.networktype == "Basic") {
hiddenFields.push("account");
@ -818,7 +820,14 @@
hiddenFields.push("netmask");
hiddenFields.push("startip");
hiddenFields.push("endip");
}
}
if(selectedGuestNetworkObj.type == "Isolated") {
hiddenFields.push("networkofferingdisplaytext");
}
else {
hiddenFields.push("networkofferingid");
}
return hiddenFields;
},
fields: [
@ -840,7 +849,7 @@
},
vlan: { label: 'VLAN ID' },
//networkofferingdisplaytext: { label: 'Network offering' },
networkofferingdisplaytext: { label: 'Network offering name' },
networkofferingid: {
label: 'Network offering',
isEditable: true,