mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-555:Uncaught TypeError: Cannot read property 0 of undefined in UI while navigating to ipAddresses section under VPC
This commit is contained in:
parent
1d0a1adb8e
commit
fb9c62ff1c
@ -1263,11 +1263,21 @@
|
|||||||
addRow: 'true',
|
addRow: 'true',
|
||||||
preFilter: function(args) {
|
preFilter: function(args) {
|
||||||
var zoneObj;
|
var zoneObj;
|
||||||
|
var dataObj = {};
|
||||||
|
if('vpc' in args.context) { //from VPC section
|
||||||
|
$.extend(dataObj, {
|
||||||
|
vpcid: args.context.vpc[0].id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if('networks' in args.context) { //from Guest Network section
|
||||||
|
$.extend(dataObj, {
|
||||||
|
networkid: args.context.networks[0].id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listZones'),
|
url: createURL('listZones'),
|
||||||
data: {
|
data: dataObj,
|
||||||
id: args.context.networks[0].zoneid
|
|
||||||
},
|
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
zoneObj = json.listzonesresponse.zone[0];
|
zoneObj = json.listzonesresponse.zone[0];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user