mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	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:
		
							parent
							
								
									c158cff68c
								
							
						
					
					
						commit
						a7f8059fd3
					
				@ -1561,6 +1561,9 @@
 | 
				
			|||||||
                                                                description: this.path
 | 
					                                                                description: this.path
 | 
				
			||||||
                                                            });
 | 
					                                                            });
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
					                                                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: items
 | 
					                                                            data: items
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
				
			|||||||
@ -92,6 +92,9 @@
 | 
				
			|||||||
                                if (this.level === 0)
 | 
					                                if (this.level === 0)
 | 
				
			||||||
                                    rootDomainId = this.id;
 | 
					                                    rootDomainId = this.id;
 | 
				
			||||||
                            });
 | 
					                            });
 | 
				
			||||||
 | 
					                            items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                            });
 | 
				
			||||||
                            args.response.success({
 | 
					                            args.response.success({
 | 
				
			||||||
                                data: items
 | 
					                                data: items
 | 
				
			||||||
                            });
 | 
					                            });
 | 
				
			||||||
 | 
				
			|||||||
@ -573,6 +573,9 @@
 | 
				
			|||||||
                                                            description: this.path
 | 
					                                                            description: this.path
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
@ -1220,6 +1223,9 @@
 | 
				
			|||||||
                                                            description: this.path
 | 
					                                                            description: this.path
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
@ -1893,6 +1899,9 @@
 | 
				
			|||||||
                                                            description: this.path
 | 
					                                                            description: this.path
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
				
			|||||||
@ -301,6 +301,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
 | 
				
			|||||||
@ -236,6 +236,9 @@
 | 
				
			|||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
                                        }
 | 
					                                        }
 | 
				
			||||||
                                    }
 | 
					                                    }
 | 
				
			||||||
 | 
					                                    array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                    });
 | 
				
			||||||
                                    args.response.success({
 | 
					                                    args.response.success({
 | 
				
			||||||
                                        data: array1
 | 
					                                        data: array1
 | 
				
			||||||
                                    });
 | 
					                                    });
 | 
				
			||||||
@ -1758,6 +1761,9 @@
 | 
				
			|||||||
            				                            });
 | 
					            				                            });
 | 
				
			||||||
            				                        }
 | 
					            				                        }
 | 
				
			||||||
            				                    }
 | 
					            				                    }
 | 
				
			||||||
 | 
					                                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                            });
 | 
				
			||||||
            				                    args.response.success({
 | 
					            				                    args.response.success({
 | 
				
			||||||
            				                        data: array1
 | 
					            				                        data: array1
 | 
				
			||||||
            				                    });
 | 
					            				                    });
 | 
				
			||||||
 | 
				
			|||||||
@ -656,6 +656,9 @@
 | 
				
			|||||||
                                                                description: this.path
 | 
					                                                                description: this.path
 | 
				
			||||||
                                                            });
 | 
					                                                            });
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
					                                                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: items
 | 
					                                                            data: items
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
@ -830,6 +833,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
@ -5254,6 +5260,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
 | 
				
			|||||||
@ -734,6 +734,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
 | 
				
			|||||||
@ -377,6 +377,9 @@
 | 
				
			|||||||
                                                                });
 | 
					                                                                });
 | 
				
			||||||
                                                            }
 | 
					                                                            }
 | 
				
			||||||
                                                        }
 | 
					                                                        }
 | 
				
			||||||
 | 
					                                                        array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: array1
 | 
					                                                            data: array1
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
				
			|||||||
@ -483,6 +483,9 @@ var addGuestNetworkDialog = {
 | 
				
			|||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            });
 | 
					                            });
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                        });
 | 
				
			||||||
                        args.response.success({
 | 
					                        args.response.success({
 | 
				
			||||||
                            data: items
 | 
					                            data: items
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
 | 
				
			|||||||
@ -467,6 +467,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
@ -1743,6 +1746,9 @@
 | 
				
			|||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                }
 | 
					                                                }
 | 
				
			||||||
                                            }
 | 
					                                            }
 | 
				
			||||||
 | 
					                                            array1.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                            });
 | 
				
			||||||
                                            args.response.success({
 | 
					                                            args.response.success({
 | 
				
			||||||
                                                data: array1
 | 
					                                                data: array1
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
 | 
				
			|||||||
@ -7958,7 +7958,10 @@
 | 
				
			|||||||
                                                                        description: this.name
 | 
					                                                                        description: this.name
 | 
				
			||||||
                                                                    });
 | 
					                                                                    });
 | 
				
			||||||
                                                                });
 | 
					                                                                });
 | 
				
			||||||
                                                                
 | 
					                                                                items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                                    return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                                args.response.success({
 | 
					                                                                args.response.success({
 | 
				
			||||||
                                                                    data: items
 | 
					                                                                    data: items
 | 
				
			||||||
                                                                });
 | 
					                                                                });
 | 
				
			||||||
@ -13246,6 +13249,9 @@
 | 
				
			|||||||
                                                            description: this.name
 | 
					                                                            description: this.name
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
                                                    
 | 
					                                                    
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
@ -13461,7 +13467,10 @@
 | 
				
			|||||||
                                                                description: this.name
 | 
					                                                                description: this.name
 | 
				
			||||||
                                                            });
 | 
					                                                            });
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                        
 | 
					                                                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: items
 | 
					                                                            data: items
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
@ -14059,7 +14068,10 @@
 | 
				
			|||||||
                                                            description: this.name
 | 
					                                                            description: this.name
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
                                                    
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
@ -14614,6 +14626,9 @@
 | 
				
			|||||||
                                                                description: this.name
 | 
					                                                                description: this.name
 | 
				
			||||||
                                                            });
 | 
					                                                            });
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
					                                                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
                                                        
 | 
					                                                        
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: items
 | 
					                                                            data: items
 | 
				
			||||||
@ -15501,6 +15516,9 @@
 | 
				
			|||||||
                                                            description: this.name
 | 
					                                                            description: this.name
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
                                                    });
 | 
					                                                    });
 | 
				
			||||||
 | 
					                                                    items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                        return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                    });
 | 
				
			||||||
                                                    
 | 
					                                                    
 | 
				
			||||||
                                                    args.response.success({
 | 
					                                                    args.response.success({
 | 
				
			||||||
                                                        data: items
 | 
					                                                        data: items
 | 
				
			||||||
@ -15831,6 +15849,9 @@
 | 
				
			|||||||
                                                                description: this.name
 | 
					                                                                description: this.name
 | 
				
			||||||
                                                            });
 | 
					                                                            });
 | 
				
			||||||
                                                        });
 | 
					                                                        });
 | 
				
			||||||
 | 
					                                                        items.sort(function(a, b) {
 | 
				
			||||||
 | 
					                                                            return a.description.localeCompare(b.description);
 | 
				
			||||||
 | 
					                                                        });
 | 
				
			||||||
                                                        
 | 
					                                                        
 | 
				
			||||||
                                                        args.response.success({
 | 
					                                                        args.response.success({
 | 
				
			||||||
                                                            data: items
 | 
					                                                            data: items
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user