Updated Branches: refs/heads/master f7667e8a8 -> 939e060e2
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. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/939e060e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/939e060e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/939e060e Branch: refs/heads/master Commit: 939e060e2e74414b2ab08fabd018686c08ad0802 Parents: f7667e8 Author: Jessica Wang <[email protected]> Authored: Thu Oct 4 12:33:13 2012 -0700 Committer: Jessica Wang <[email protected]> Committed: Thu Oct 4 12:34:30 2012 -0700 ---------------------------------------------------------------------- ui/scripts/instances.js | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/939e060e/ui/scripts/instances.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index d0675ac..baa4b72 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -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 }); } });
