[LNT] r332218 - Make new Run template in Compare To in v4_run.html view.

Martin Liska via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 00:47:35 PDT 2018


Author: marxin
Date: Mon May 14 00:47:35 2018
New Revision: 332218

URL: http://llvm.org/viewvc/llvm-project?rev=332218&view=rev
Log:
Make new Run template in Compare To in v4_run.html view.

Differential Revision: https://reviews.llvm.org/D44011

Modified:
    lnt/trunk/lnt/server/ui/templates/local.html
    lnt/trunk/lnt/server/ui/templates/v4_run.html

Modified: lnt/trunk/lnt/server/ui/templates/local.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/local.html?rev=332218&r1=332217&r2=332218&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/local.html (original)
+++ lnt/trunk/lnt/server/ui/templates/local.html Mon May 14 00:47:35 2018
@@ -7,6 +7,10 @@
     <a href="{{v4_url_for('.v4_order', id=order.id)}}">{{ prefix }}{{order.llvm_project_revision}}</a>
 {%- endmacro %}
 
+{% macro render_compare_to_run(run, url) -%}
+<a href="{{url}}"><span class="utctime">{{ run.start_time.isoformat() }}</span></a>
+{%- endmacro %}
+
 {# Some example settings from llvm.org. #}
 {#
     <!---On llvm.org we use SVN, so put an r in front. Ex. r1234 -->

Modified: lnt/trunk/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_run.html?rev=332218&r1=332217&r2=332218&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Mon May 14 00:47:35 2018
@@ -1,4 +1,5 @@
 {% import "utils.html" as utils %}
+{% import "local.html" as local %}
 
 {% set hash_field = ts.Sample.get_hash_of_binary_field() %}
 {% set machine = run.machine %}
@@ -114,7 +115,7 @@ $('.profile-prev-only').tooltip();
   {% for r in neighboring_runs %}
     <li>
       {{ "<b>"|safe if r.id == run.id else "" }}
-      <a href="{{v4_url_for('.v4_run', id=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
+      {{ local.render_compare_to_run(r, v4_url_for('.v4_run', id=r.id)) }}
       {{ "</b>"|safe if r.id == run.id else "" }}
     </li>
   {% endfor %}
@@ -126,7 +127,7 @@ $('.profile-prev-only').tooltip();
     {% for r in comparison_neighboring_runs %}
       <li>
         {{ "<b>"|safe if compare_to and r.id == compare_to.id else "" }}
-        <a href="{{v4_url_for('.v4_run', id=run.id, compare_to=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
+        {{ local.render_compare_to_run(r, v4_url_for('.v4_run', id=run.id, compare_to=r.id)) }}
         {{ "</b>"|safe if compare_to and r.id == compare_to.id else "" }}
       </li>
     {% endfor %}




More information about the llvm-commits mailing list