You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2012/10/06 00:32:46 UTC
[36/49] git commit: 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.
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/0dc7d653
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0dc7d653
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0dc7d653
Branch: refs/heads/maven-to-rpm
Commit: 0dc7d653e9d15d2172491e662845f97e79e663ef
Parents: eca4d6a
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Oct 4 12:33:13 2012 -0700
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Sat Oct 6 00:30:26 2012 +0200
----------------------------------------------------------------------
ui/scripts/instances.js | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0dc7d653/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
});
}
});