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 Daan Hoogland
parent 024a2924b7
commit befa28251d
10 changed files with 69 additions and 3 deletions

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

@ -486,6 +486,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -1100,6 +1103,9 @@
description: this.path
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -1707,6 +1713,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

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

View File

@ -723,6 +723,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

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

View File

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

View File

@ -7283,7 +7283,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -12107,6 +12110,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -12322,7 +12328,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -12922,7 +12931,10 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
});
@ -13458,6 +13470,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -14291,6 +14306,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items
@ -14573,6 +14591,9 @@
description: this.name
});
});
items.sort(function(a, b) {
return a.description.localeCompare(b.description);
});
args.response.success({
data: items