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.
This commit is contained in:
Remi Bergsma 2015-04-12 23:20:29 -05:00 committed by Remi Bergsma
parent c158cff68c
commit a7f8059fd3
11 changed files with 72 additions and 3 deletions

View File

@ -1561,6 +1561,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});

View File

@ -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
});

View File

@ -573,6 +573,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -1220,6 +1223,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -1893,6 +1899,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});

View File

@ -301,6 +301,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -236,6 +236,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});
@ -1758,6 +1761,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -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
});
@ -5254,6 +5260,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -734,6 +734,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -377,6 +377,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -483,6 +483,9 @@ var addGuestNetworkDialog = {
}
});
}
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});

View File

@ -467,6 +467,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});
@ -1743,6 +1746,9 @@
});
}
}
array1.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: array1
});

View File

@ -7958,7 +7958,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -13246,6 +13249,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -13461,7 +13467,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -14059,7 +14068,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -14614,6 +14626,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -15501,6 +15516,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -15831,6 +15849,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items