Skip to content

Commit e1b1246

Browse files
Forward merge #2464 merged on '4.11' branch
[4.11] CLOUDSTACK-10299: UI: fix error in network listing in project mode
2 parents bb607d0 + 0bb20a7 commit e1b1246

1 file changed

Lines changed: 10 additions & 74 deletions

File tree

ui/scripts/network.js

Lines changed: 10 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@
8686
});
8787

8888
} else { //non-portable IP which has only one NIC
89-
/*
90-
var nic = $.grep(instance.nic, function(nic) {
91-
return nic.networkid == network.id;
92-
})[0];
93-
*/
94-
9589
// Get NIC IPs
9690
$.ajax({
9791
url: createURL('listNics'),
@@ -170,12 +164,6 @@
170164
});
171165

172166
} else { //non-portable IP which has only one NIC
173-
/*
174-
var nic = $.grep(instance.nic, function(nic) {
175-
return nic.networkid == network.id;
176-
})[0];
177-
*/
178-
179167
// Get NIC IPs
180168
$.ajax({
181169
url: createURL('listNics'),
@@ -412,8 +400,6 @@
412400
$.ajax({
413401
url: createURL('listRemoteAccessVpns'),
414402
data: {
415-
account: g_account,
416-
domainid: g_domainid,
417403
listAll: true
418404
},
419405
async: false,
@@ -1995,8 +1981,6 @@
19951981
$.ajax({
19961982
url: createURL('listZones'),
19971983
data: dataObj,
1998-
// id: args.context.networks[0].zoneid
1999-
// },
20001984
async: false,
20011985
success: function(json) {
20021986
zoneObj = json.listzonesresponse.zone[0];
@@ -3524,7 +3508,7 @@
35243508

35253509
var stickyData = $.extend(true, {}, args.data.sticky);
35263510
var certificateData = $.extend(true, {}, args.data.sslcertificate);
3527-
3511+
35283512
//***** create new LB rule > Add VMs *****
35293513
$.ajax({
35303514
url: createURL('createLoadBalancerRule'),
@@ -3537,70 +3521,27 @@
35373521
var lbID = data.createloadbalancerruleresponse.id;
35383522

35393523
var inputData = {
3540-
id: data.createloadbalancerruleresponse.id
3541-
};
3542-
3524+
id: data.createloadbalancerruleresponse.id
3525+
};
3526+
35433527
var selectedVMs = args.itemData;
35443528
if (selectedVMs != null) {
35453529
var vmidipmapIndex = 0;
3546-
for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) {
3530+
for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) {
35473531
var selectedIPs = selectedVMs[vmIndex]._subselect;
35483532
for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) {
35493533
inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id;
3550-
3534+
35513535
if (args.context.ipAddresses[0].isportable) {
3552-
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1];
3536+
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1];
35533537
} else {
35543538
inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex];
35553539
}
3556-
3540+
35573541
vmidipmapIndex++;
3558-
}
3542+
}
35593543
}
3560-
}
3561-
3562-
/*$.ajax({
3563-
url: createURL('assignCertToLoadBalancer'),
3564-
data: {certid: certificateData.certificate, lbruleid: lbID},
3565-
success: function(data) {
3566-
var jobID = data.assigncerttoloadbalancerresponse.jobid;
3567-
var lbProtocolCreated = false;
3568-
3569-
args.response.success({
3570-
_custom: {
3571-
jobId: jobID
3572-
},
3573-
notification: {
3574-
label: 'label.add.certificate',
3575-
poll: function(args) {
3576-
var complete = args.complete;
3577-
var error = args.error;
3578-
3579-
pollAsyncJobResult({
3580-
_custom: {
3581-
jobId: jobID
3582-
},
3583-
complete: function(args) {
3584-
if (lbProtocolCreated) return;
3585-
3586-
lbProtocolCreated = true;
3587-
3588-
if (certificateData && certificateData.certificate) {
3589-
cloudStack.lbCertificatePolicy.actions.add(lbID, certificateData, complete, error);
3590-
} else {
3591-
complete();
3592-
}
3593-
},
3594-
error: error
3595-
});
3596-
}
3597-
}
3598-
});
3599-
},
3600-
error: function(data) {
3601-
args.response.error(parseXMLHttpResponse(data));
3602-
}
3603-
});*/
3544+
}
36043545

36053546
$.ajax({
36063547
url: createURL('assignToLoadBalancerRule'),
@@ -5974,11 +5915,6 @@
59745915
docID: 'helpVPNGatewayIKEDH',
59755916
select: function(args) {
59765917
var items = [];
5977-
// StrongSwan now requires a DH group to be specified...
5978-
//items.push({
5979-
// id: '',
5980-
// description: _l('label.none')
5981-
//});
59825918
items.push({
59835919
id: 'modp1536',
59845920
description: 'Group 5(modp1536)'

0 commit comments

Comments
 (0)