Repository: cloudstack
Updated Branches:
refs/heads/4.5 c9fd57fff -> 9a8ee5664
CLOUDSTACK-6543 Sort domain lists in UI
As recently discussed on the dev list:
This sorts the domain lists based on their path.
Especially handy when having a lot of domains,
like in a public cloud.
Cherry-picked to 4.5 branch since commit exists in 4.4 and master branch.
(cherry picked from commit befa28251d0e250f07c52a9a2cd4441cc8bd86d8)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9a8ee566
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9a8ee566
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9a8ee566
Branch: refs/heads/4.5
Commit: 9a8ee5664f583f8be20331f36295fc6672b07778
Parents: c9fd57f
Author: Remi Bergsma <rb...@schubergphilis.com>
Authored: Sun Apr 12 23:20:29 2015 -0500
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Apr 17 15:18:16 2015 +0200
----------------------------------------------------------------------
ui/scripts/accountsWizard.js | 3 +++
ui/scripts/configuration.js | 9 +++++++++
ui/scripts/events.js | 3 +++
ui/scripts/instances.js | 6 ++++++
ui/scripts/network.js | 9 +++++++++
ui/scripts/projects.js | 3 +++
ui/scripts/regions.js | 3 +++
ui/scripts/sharedFunctions.js | 3 +++
ui/scripts/storage.js | 6 ++++++
ui/scripts/system.js | 27 ++++++++++++++++++++++++---
10 files changed, 69 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/accountsWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accountsWizard.js b/ui/scripts/accountsWizard.js
index 6b0dd19..82e7eab 100644
--- a/ui/scripts/accountsWizard.js
+++ b/ui/scripts/accountsWizard.js
@@ -92,6 +92,9 @@
if (this.level === 0)
rootDomainId = this.id;
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 724fcf7..1f5de9e 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -552,6 +552,9 @@
description: this.path
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
@@ -1192,6 +1195,9 @@
description: this.path
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
@@ -1857,6 +1863,9 @@
description: this.path
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/events.js
----------------------------------------------------------------------
diff --git a/ui/scripts/events.js b/ui/scripts/events.js
index ea4b940..b3c6912 100644
--- a/ui/scripts/events.js
+++ b/ui/scripts/events.js
@@ -301,6 +301,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index eb30ee0..b8d1299 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -230,6 +230,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
@@ -1632,6 +1635,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 4366943..9eaa33a 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -656,6 +656,9 @@
description: this.path
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
@@ -830,6 +833,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
@@ -5222,6 +5228,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/projects.js
----------------------------------------------------------------------
diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js
index 7453b53..f6c9136 100644
--- a/ui/scripts/projects.js
+++ b/ui/scripts/projects.js
@@ -734,6 +734,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 9f3de5f..6e91f81 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -377,6 +377,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 2ab4ca9..1e1514b 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -483,6 +483,9 @@ var addGuestNetworkDialog = {
}
});
}
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 3d3db82..d56835c 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -429,6 +429,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
@@ -1680,6 +1683,9 @@
});
}
}
+ array1.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: array1
});
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a8ee566/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index bd9e9ca..7169a95 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7920,7 +7920,10 @@
description: this.name
});
});
-
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
+
args.response.success({
data: items
});
@@ -13170,6 +13173,9 @@
description: this.name
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
@@ -13385,7 +13391,10 @@
description: this.name
});
});
-
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
+
args.response.success({
data: items
});
@@ -13983,7 +13992,10 @@
description: this.name
});
});
-
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
+
args.response.success({
data: items
});
@@ -14510,6 +14522,9 @@
description: this.name
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
@@ -15341,6 +15356,9 @@
description: this.name
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items
@@ -15655,6 +15673,9 @@
description: this.name
});
});
+ items.sort(function(a, b) {
+ return a.description.localeCompare(b.description);
+ });
args.response.success({
data: items