[llvm-commits] [LNT] r161816 - in /lnt/trunk/lnt/server/ui: templates/v4_global_status.html views.py
Michael Gottesman
mgottesman at apple.com
Mon Aug 13 17:26:06 PDT 2012
Author: mgottesman
Date: Mon Aug 13 19:26:06 2012
New Revision: 161816
URL: http://llvm.org/viewvc/llvm-project?rev=161816&view=rev
Log:
[LNT] Added code which generates css class groupings and appends them to our data cells/headers
so we can easily hide/show columns by toggling css classes on the parent container of v4_global_status.html.
Modified:
lnt/trunk/lnt/server/ui/templates/v4_global_status.html
lnt/trunk/lnt/server/ui/views.py
Modified: lnt/trunk/lnt/server/ui/templates/v4_global_status.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_global_status.html?rev=161816&r1=161815&r2=161816&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_global_status.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_global_status.html Mon Aug 13 19:26:06 2012
@@ -19,7 +19,7 @@
<th class="label-header">Test</th>
<th id="worst-time-header" class="data-header worst-time">Worst Time</th>
{% for m in machines %}
- <th class="data-header">{{ m.name }}</th>
+ <th class="data-header {{ machine_groups_map[m] }}">{{ m.name }}</th>
{% endfor %}
</tr>
{% for row in tests %}
@@ -29,7 +29,7 @@
</td>
{{ row[1]|aspctcell("data-cell worst-time")|safe }}
{% for cr in row[2:] %}
- {{ cr.pct_delta|aspctcell("data-cell worst-time")|safe }}
+ {{ cr.pct_delta|aspctcell("data-cell worst-time " + machine_groups_map[machines[loop.index0]])|safe }}
{% endfor %}
</tr>
{% endfor %}
Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=161816&r1=161815&r2=161816&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Mon Aug 13 19:26:06 2012
@@ -668,6 +668,10 @@
# over.
machine_run_info = []
reported_run_ids = []
+
+ # Create groupings based off of the names of our input machines.
+ grouping_set = set()
+ machine_groups_map = {}
for machine in recent_machines:
runs = recent_runs_by_machine[machine]
@@ -682,6 +686,26 @@
reported_run_ids.append(baseline.id)
reported_run_ids.append(run.id)
+ machine_groupings = machine.name.split('.')
+ machine_groups_map[machine] = machine_groupings
+ grouping_set = grouping_set.union(machine_groupings)
+
+ # Invert machine name to groupings map and add in inverse names as classname with the not-prefix. This allows
+ # us to hide certain columns by changing the class on the table.
+ for machine in machine_groups_map:
+ groups = machine_groups_map[machine]
+
+ # If a machine does not have O0 or Os in its name,
+ # we treat it as an O3 run. This is to be compatible
+ # with our current naming scheme.
+ if not 'O0' in groups and not 'Os' in groups:
+ groups.append('O3')
+
+ # Add in inverse groups.
+ groups.extend("not-" + x for x in grouping_set.difference(groups))
+
+ machine_groups_map[machine] = ' '.join(groups)
+
# Get the set all tests reported in the recent runs.
reported_tests = ts.query(ts.Test.id, ts.Test.name).filter(
sqlalchemy.sql.exists('*', sqlalchemy.sql.and_(
@@ -716,6 +740,7 @@
ts=ts,
tests=test_table,
machines=recent_machines,
+ machine_groups_map=machine_groups_map,
selected_field=field)
@v4_route("/daily_report/<int:year>/<int:month>/<int:day>")
More information about the llvm-commits
mailing list