[LNT] r256321 - Fix error rendering graph in json and add a test

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 22:16:15 PST 2015


Author: cmatthews
Date: Wed Dec 23 00:16:15 2015
New Revision: 256321

URL: http://llvm.org/viewvc/llvm-project?rev=256321&view=rev
Log:
Fix error rendering graph in json and add a test

This should have been tested to start with!

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

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=256321&r1=256320&r2=256321&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Wed Dec 23 00:16:15 2015
@@ -902,13 +902,13 @@ def v4_graph():
         json_obj['data'] = graph_plots
         # Flatten ORM machine objects to their string names.
         simple_type_legend = []
-        for machine, test, unit, color in legend:
+        for machine, test, unit, color, url in legend:
             # Flatten name, make color a dict.
             new_entry = {'name': machine.name,
                          'test': test,
                          'unit': unit,
                          'color': util.toColorString(color),
-                         'url': None}
+                         'url': url}
             simple_type_legend.append(new_entry)
         json_obj['legend'] = simple_type_legend
         json_obj['revision_range'] = revision_range

Modified: lnt/trunk/tests/server/ui/V4Pages.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/ui/V4Pages.py?rev=256321&r1=256320&r2=256321&view=diff
==============================================================================
--- lnt/trunk/tests/server/ui/V4Pages.py (original)
+++ lnt/trunk/tests/server/ui/V4Pages.py Wed Dec 23 00:16:15 2015
@@ -219,7 +219,7 @@ def main():
                expected_code=HTTP_NOT_FOUND)
     check_code(client, '/v4/nts/graph?plot.0=1.3.9999',
                expected_code=HTTP_NOT_FOUND)
-
+    check_code(client, '/v4/nts/graph?plot.9999=1.3.2&json=True')
     # Get the mean graph page.
     check_code(client, '/v4/nts/graph?mean=1.2')
     # Don't crash when requesting non-existing data




More information about the llvm-commits mailing list