[LNT] r256210 - Separate out order rendering to its own file
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 21 15:04:15 PST 2015
Author: cmatthews
Date: Mon Dec 21 17:04:15 2015
New Revision: 256210
URL: http://llvm.org/viewvc/llvm-project?rev=256210&view=rev
Log:
Separate out order rendering to its own file
Added:
lnt/trunk/lnt/server/ui/templates/local.html
Modified:
lnt/trunk/lnt/server/ui/templates/utils.html
lnt/trunk/lnt/server/ui/templates/v4_machine.html
lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html
Added: lnt/trunk/lnt/server/ui/templates/local.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/local.html?rev=256210&view=auto
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/local.html (added)
+++ lnt/trunk/lnt/server/ui/templates/local.html Mon Dec 21 17:04:15 2015
@@ -0,0 +1,24 @@
+{# A file for putting site specific customizations. Ex 1234 #}
+
+{# This is what to draw before an order. #}
+{% set prefix = "" %}
+
+{% macro render_order_link(order) -%}
+ <a href="{{v4_url_for('v4_order', id=order.id)}}">{{ prefix }}{{order.llvm_project_revision}}</a>
+{%- endmacro %}
+
+{# Some example settings from llvm.org. #}
+{#
+ <!---On llvm.org we use SVN, so put an r in front. Ex. r1234 -->
+
+ {% set prefix = "r" %}
+
+
+ <!-- And link the the llvm.org viewvc. -->
+
+ {% macro render_order_link(order) -%}
+ <a href="{{v4_url_for('v4_order', id=order.id)}}">{{prefix}}{{order.llvm_project_revision}}</a>
+ <a href="http://llvm.org/viewvc/llvm-project?view=revision&revision={{order.llvm_project_revision}}">
+ <i class="icon-share-alt"></i></a>
+ {%- endmacro %}
+#}
Modified: lnt/trunk/lnt/server/ui/templates/utils.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/utils.html?rev=256210&r1=256209&r2=256210&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/utils.html (original)
+++ lnt/trunk/lnt/server/ui/templates/utils.html Mon Dec 21 17:04:15 2015
@@ -30,11 +30,6 @@
<a href="{{bug}}">{{bug}}</a>
{%- endmacro %}
-{% macro render_order_link(order) -%}
-<a href="{{v4_url_for('v4_order', id=order.id)}}">m{{order.llvm_project_revision}}</a> <a href="https://smooshbase.apple.com/am/r/{{order.llvm_project_revision}}">
-<i class="icon-share-alt"></i></a>
-{%- endmacro %}
-
{% macro regex_filter_box(input_id, selector, placeholder,
selector_part_to_search=None) -%}
Modified: lnt/trunk/lnt/server/ui/templates/v4_machine.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_machine.html?rev=256210&r1=256209&r2=256210&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_machine.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_machine.html Mon Dec 21 17:04:15 2015
@@ -1,5 +1,5 @@
{% import "utils.html" as utils %}
-
+{% import "local.html" as local %}
{% set ts = request.get_testsuite() %}
{% set machine = ts.getMachine(id) %}
@@ -75,7 +75,7 @@
{% for run in runs %}
<tr>
{% if loop.first %}
- <td rowspan="{{ runs|length }}" style="text-align:right">{{ order.as_ordered_string() }}</td>
+ <td rowspan="{{ runs|length }}" style="text-align:right">local.{{ order.as_ordered_string() }}</td>
{% endif %}
<td><span class="utctime">{{ run.start_time.isoformat() }}</span></td>
<td>{{ run.end_time - run.start_time }}s</td>
Modified: lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html?rev=256210&r1=256209&r2=256210&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html Mon Dec 21 17:04:15 2015
@@ -1,4 +1,5 @@
{% import "utils.html" as utils %}
+{% import "local.html" as local %}
{% set db = request.get_db() %}
{% extends "layout.html" %}
@@ -108,7 +109,7 @@ var changes = [
<td> {{ fc.ri.field.name }} </td>
{% set graph_base=v4_url_for('v4_graph', highlight_run=fc.run.id) %}
<td><a href="{{graph_base}}&plot.{{fc.ri.test.id}}={{ fc.ri.machine.id}}.{{fc.ri.test.id}}.{{fc.ri.field.index}}">{{ fc.ri.test.name }}</a></td>
- <td>m{{ fc.ri.start_order.llvm_project_revision }}, {{utils.render_order_link(fc.ri.end_order)}}</td>
+ <td>{{local.prefix}}{{ fc.ri.start_order.llvm_project_revision }}, {{local.render_order_link(fc.ri.end_order)}}</td>
<td>{{ fc.cr.previous }}</td><td>{{ fc.cr.current }}</td>
{{ utils.get_regression_cell_value(fc.cr, analysis)}}
<td>{{ fc.latest_cr.current }}</td>
More information about the llvm-commits
mailing list