[LNT] r282527 - Put run dates next to orders in Matrix view

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 12:05:22 PDT 2016


Author: cmatthews
Date: Tue Sep 27 14:05:21 2016
New Revision: 282527

URL: http://llvm.org/viewvc/llvm-project?rev=282527&view=rev
Log:
Put run dates next to orders in Matrix view

Modified:
    lnt/trunk/lnt/server/ui/templates/v4_matrix.html
    lnt/trunk/lnt/server/ui/views.py

Modified: lnt/trunk/lnt/server/ui/templates/v4_matrix.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_matrix.html?rev=282527&r1=282526&r2=282527&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_matrix.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_matrix.html Tue Sep 27 14:05:21 2016
@@ -61,7 +61,10 @@
         {% for order in orders: %}
             {% set baseline_class = "info" if order == baseline_rev else "" %}
             <tr class="{{baseline_class}}">
-                <td><a href="{{v4_url_for('v4_order', id=order_to_id[order])}}">{{order}}</a></td>
+                <td><a href="{{v4_url_for('v4_order', id=order_to_id[order])}}">{{order}}</a>
+                    <br>
+                <span class="shortDateFormat" data-toggle="tooltip" title="{{order_to_date[order]}}">{{ order_to_date[order].isoformat() }}</span>
+                </td>
                 {% for req in associated_runs: %}
                     {{ get_cell_value(req.change.get(order)) }}
                 {% endfor %}
@@ -81,8 +84,6 @@
     });
 
 
-
-
 </script>
 
  {% endblock %}

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=282527&r1=282526&r2=282527&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Tue Sep 27 14:05:21 2016
@@ -1467,6 +1467,16 @@ def v4_matrix():
                 order_to_geomean[order] = PrecomputedCR(curr_geomean,
                                                         curr_geomean,
                                                         False)
+    # Calculate the date of each order.
+    order_to_date = {}
+
+    runs = ts.query(ts.Run.start_time, ts.Order.llvm_project_revision) \
+            .join(ts.Order) \
+            .filter(ts.Order.llvm_project_revision.in_(all_orders)) \
+            .all()
+
+    order_to_date = dict([(x[1],x[0]) for x in runs])
+    print order_to_date
 
     class FakeOptions(object):
         show_small_diff = False
@@ -1489,4 +1499,5 @@ def v4_matrix():
                            form=form,
                            baseline_rev=baseline_rev,
                            machine_name_common=machine_name_common,
-                           machine_id_common=machine_id_common)
+                           machine_id_common=machine_id_common,
+                           order_to_date=order_to_date)




More information about the llvm-commits mailing list