Skip to content

Commit 939e060

Browse files
author
Jessica Wang
committed
cloudstack UI - advanced search on instance page - domain field - add blank option, so admin has a choice to see all domains instead of being forced to stick with one domain for each search.
1 parent f7667e8 commit 939e060

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

‎ui/scripts/instances.js‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,20 @@
8888
select: function(args) {
8989
$.ajax({
9090
url: createURL('listDomains'),
91-
data: { listAll: true },
91+
data: {
92+
listAll: true,
93+
details: 'min'
94+
},
9295
success: function(json) {
96+
var array1 = [{id: '', description: ''}];
97+
var domains = json.listdomainsresponse.domain;
98+
if(domains != null && domains.length > 0) {
99+
for(var i = 0; i < domains.length; i++) {
100+
array1.push({id: domains[i].id, description: domains[i].path});
101+
}
102+
}
93103
args.response.success({
94-
data: $.map(json.listdomainsresponse.domain, function(domain) {
95-
return {
96-
id: domain.id,
97-
description: domain.path
98-
};
99-
})
104+
data: array1
100105
});
101106
}
102107
});

0 commit comments

Comments
 (0)