mirror of https://github.com/apache/cloudstack.git
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.
This commit is contained in:
parent
f7667e8a88
commit
939e060e2e
|
|
@ -88,15 +88,20 @@
|
|||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: { listAll: true },
|
||||
data: {
|
||||
listAll: true,
|
||||
details: 'min'
|
||||
},
|
||||
success: function(json) {
|
||||
var array1 = [{id: '', description: ''}];
|
||||
var domains = json.listdomainsresponse.domain;
|
||||
if(domains != null && domains.length > 0) {
|
||||
for(var i = 0; i < domains.length; i++) {
|
||||
array1.push({id: domains[i].id, description: domains[i].path});
|
||||
}
|
||||
}
|
||||
args.response.success({
|
||||
data: $.map(json.listdomainsresponse.domain, function(domain) {
|
||||
return {
|
||||
id: domain.id,
|
||||
description: domain.path
|
||||
};
|
||||
})
|
||||
data: array1
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue