[llvm-commits] [LNT] r162818 - /lnt/trunk/lnt/server/ui/views.py

Michael Gottesman mgottesman at apple.com
Tue Aug 28 18:27:46 PDT 2012


Author: mgottesman
Date: Tue Aug 28 20:27:46 2012
New Revision: 162818

URL: http://llvm.org/viewvc/llvm-project?rev=162818&view=rev
Log:
[LNT] GlobalStatus: Sort the primary fields of a sample type by name before using them to ensure consistent ui across different lnt installations.

This is a stylistic change so that in the Select a Comparison input, the field names are ordered
in the same manner on different servers. Since it is stylistic I did not modify the actual SampleField
class since this is a ui issue specific to this page.

Modified:
    lnt/trunk/lnt/server/ui/views.py

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=162818&r1=162817&r2=162818&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Tue Aug 28 20:27:46 2012
@@ -708,7 +708,8 @@
     from lnt.server.ui import util
 
     ts = request.get_testsuite()
-    primary_fields = list(ts.Sample.get_primary_fields())
+    primary_fields = sorted(list(ts.Sample.get_primary_fields()),
+                            key=lambda f: f.name)
     fields = dict((f.name, f) for f in primary_fields)
     
     # Get the latest run.





More information about the llvm-commits mailing list