Skip to content

Commit fe6f65c

Browse files
committed
UI: Display drop down list for VPN customer gateway selection
1 parent 1771727 commit fe6f65c

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

ui/scripts/network.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5792,6 +5792,66 @@
57925792
}
57935793
},
57945794

5795+
advSearchFields: {
5796+
name: {
5797+
label: 'label.name'
5798+
},
5799+
domainid: {
5800+
label: 'label.domain',
5801+
select: function(args) {
5802+
if (isAdmin() || isDomainAdmin()) {
5803+
$.ajax({
5804+
url: createURL('listDomains'),
5805+
data: {
5806+
listAll: true,
5807+
details: 'min'
5808+
},
5809+
success: function(json) {
5810+
var array1 = [{
5811+
id: '',
5812+
description: ''
5813+
}];
5814+
var domains = json.listdomainsresponse.domain;
5815+
if (domains != null && domains.length > 0) {
5816+
for (var i = 0; i < domains.length; i++) {
5817+
array1.push({
5818+
id: domains[i].id,
5819+
description: domains[i].path
5820+
});
5821+
}
5822+
}
5823+
array1.sort(function(a, b) {
5824+
return a.description.localeCompare(b.description);
5825+
});
5826+
args.response.success({
5827+
data: array1
5828+
});
5829+
}
5830+
});
5831+
} else {
5832+
args.response.success({
5833+
data: null
5834+
});
5835+
}
5836+
},
5837+
isHidden: function(args) {
5838+
if (isAdmin() || isDomainAdmin())
5839+
return false;
5840+
else
5841+
return true;
5842+
}
5843+
},
5844+
account: {
5845+
label: 'Account',
5846+
isHidden: function(args) {
5847+
if (isAdmin() || isDomainAdmin())
5848+
return false;
5849+
else
5850+
return true;
5851+
}
5852+
}
5853+
},
5854+
57955855
dataProvider: function(args) {
57965856
var data = {};
57975857
listViewDataProvider(args, data);

0 commit comments

Comments
 (0)