[PATCH] D51915: [LNT] Improve alignment of HTML report.

Martin Liška via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 1 05:28:21 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343464: Improve alignment of HTML report. (authored by marxin, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D51915?vs=164818&id=167711#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51915

Files:
  lnt/trunk/lnt/server/ui/static/lnt_run.css
  lnt/trunk/lnt/server/ui/templates/reporting/runs.html
  lnt/trunk/lnt/server/ui/templates/v4_run.html


Index: lnt/trunk/lnt/server/ui/static/lnt_run.css
===================================================================
--- lnt/trunk/lnt/server/ui/static/lnt_run.css
+++ lnt/trunk/lnt/server/ui/static/lnt_run.css
@@ -17,4 +17,8 @@
 
 .editable span {
     position: relative;
-}
\ No newline at end of file
+}
+
+tr > td.right {
+    text-align: right;
+}
Index: lnt/trunk/lnt/server/ui/templates/v4_run.html
===================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html
@@ -58,9 +58,9 @@
   {% endif %}
 
   {% if cell_color %}
-    <td style="background-color:{{ '#%02x%02x%02x' % cell_color }}">{{ run_cell_value }}</td>
+    <td class="right" style="background-color:{{ '#%02x%02x%02x' % cell_color }}">{{ run_cell_value }}</td>
   {% else %}
-    <td>{{run_cell_value}}</td>
+    <td class="right">{{run_cell_value}}</td>
   {% endif %}
 
   {% if test_status == analysis.UNCHANGED_PASS and
Index: lnt/trunk/lnt/server/ui/templates/reporting/runs.html
===================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/runs.html
+++ lnt/trunk/lnt/server/ui/templates/reporting/runs.html
@@ -11,11 +11,12 @@
 %}
 
 {% if bucket and bucket_name != 'Unchanged Tests' %}
+    {% set small_column_width = 'width: 7%;' %}
    <p>
-     <table style="{{ styles['table'] }}" class="{{ classes['table'] }}">
+     <table style="{{ styles['table'] }}; width: 1000px;" class="{{ classes['table'] }}">
        <thead>
        <tr>
-         <th style="{{ styles['th'] }}; width:500px">{{ bucket_name }} - {{ field_display_name }}</th>
+         <th style="{{ styles['th'] }}; width:40%">{{ bucket_name }} - {{ field_display_name }}</th>
        {% if not show_perf %}
          </tr>
          </thead>
@@ -26,13 +27,13 @@
          {% endfor %}
          </tbody>
        {% else %}
-         <th style="{{ styles['th'] }}">Δ {{ metric_field_suffix }}</th>
-         <th style="{{ styles['th'] }}">{{ metric_name }}</th>
-         <th style="{{ styles['th'] }}">Current</th>
-         <th style="{{ styles['th'] }}">σ {{ metric_field_suffix }}</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">Δ {{ metric_field_suffix }}</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">{{ metric_name }}</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">Current</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">σ {{ metric_field_suffix }}</th>
          {% if secondary_info %}
-         <th style="{{ styles['th'] }}">Δ {{ secondary_field_suffix }}</th>
-         <th style="{{ styles['th'] }}">σ {{ secondary_field_suffix }}</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">Δ {{ secondary_field_suffix }}</th>
+         <th style="{{ styles['th'] }}; {{ small_column_width }}">σ {{ secondary_field_suffix }}</th>
          {% endif %}
          </tr>
          </thead>
@@ -53,14 +54,14 @@
              {% endif %}
              {{ utils.render_profile_link(cr.cur_profile, cr.prev_profile, run.id, compare_to_id, test_id) }}
            </td>
-           {{ cr.pct_delta|aspctcell(style=styles['td'],reverse=cr.bigger_is_better)|safe }}
-           <td style="{{ styles['td'] }}">{{ "%.4f" | format(cr.previous) }}</td>
-           <td style="{{ styles['td'] }}">{{ "%.4f" | format(cr.current) }}</td>
-           <td style="{{ styles['td'] }}">{{ "%.4f" | format_or_default(cr.stddev, '-') }}</td>
+           {{ cr.pct_delta|aspctcell(style=styles['td'] + 'text-align: right;',reverse=cr.bigger_is_better)|safe }}
+           <td class="right" style="{{ styles['td'] }}">{{ "%.4f" | format(cr.previous) }}</td>
+           <td class="right" style="{{ styles['td'] }}">{{ "%.4f" | format(cr.current) }}</td>
+           <td class="right" style="{{ styles['td'] }}">{{ "%.4f" | format_or_default(cr.stddev, '-') }}</td>
            {% if secondary_info %}
              {% set a_cr = secondary_info[(name, field)] %}
-             {{ a_cr.pct_delta|aspctcell(style=styles['td'],reverse=cr.bigger_is_better)|safe }}
-             <td style="{{ styles['td'] }}">{{ "%.4f" | format_or_default(a_cr.stddev, '-') }}</td>
+             {{ a_cr.pct_delta|aspctcell(style=styles['td'] + 'text-align: right;',reverse=cr.bigger_is_better)|safe }}
+             <td class="right" style="{{ styles['td'] }}">{{ "%.4f" | format_or_default(a_cr.stddev, '-') }}</td>
            {% endif %}
          </tr>
          {% endfor %}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51915.167711.patch
Type: text/x-patch
Size: 4573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181001/5e20ef84/attachment.bin>


More information about the llvm-commits mailing list