cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/4.7 to 4b974c5
Date Mon, 11 Jan 2016 15:19:05 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.7 456d85448 -> 4b974c599


CLOUDSTACK-9220 Sort list of domains on Domain tab in UI


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/93bbc1af
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93bbc1af
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93bbc1af

Branch: refs/heads/4.7
Commit: 93bbc1afb7986282d6f6ded7ecd373e558f519cc
Parents: 456d854
Author: Remi Bergsma <github@remi.nl>
Authored: Sat Jan 9 21:02:38 2016 +0100
Committer: Remi Bergsma <github@remi.nl>
Committed: Sat Jan 9 21:02:38 2016 +0100

----------------------------------------------------------------------
 ui/scripts/domains.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93bbc1af/ui/scripts/domains.js
----------------------------------------------------------------------
diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js
index dcec93d..9dc801b 100644
--- a/ui/scripts/domains.js
+++ b/ui/scripts/domains.js
@@ -722,6 +722,11 @@
                         async: false,
                         success: function(json) {
                             var domainObjs = json.listdomainsresponse.domain;
+                            if (domainObjs != null && domainObjs.length > 0) {
+                                domainObjs.sort(function(a, b) {
+                                    return a.name.localeCompare(b.name);
+                                });
+                            }
                             args.response.success({
                                 actionFilter: domainActionfilter,
                                 data: domainObjs
@@ -735,6 +740,11 @@
                         async: false,
                         success: function(json) {
                             var domainObjs = json.listdomainchildrenresponse.domain;
+                            if (domainObjs != null && domainObjs.length > 0) {
+                                domainObjs.sort(function(a, b) {
+                                    return a.name.localeCompare(b.name);
+                                });
+                            }
                             args.response.success({
                                 actionFilter: domainActionfilter,
                                 data: domainObjs


Mime
View raw message