[llvm-commits] [zorg] r131775 - in /zorg/trunk/lnt/lnt/server/ui: templates/simple_run.html views.py
Daniel Dunbar
daniel at zuster.org
Fri May 20 17:49:51 PDT 2011
Author: ddunbar
Date: Fri May 20 19:49:51 2011
New Revision: 131775
URL: http://llvm.org/viewvc/llvm-project?rev=131775&view=rev
Log:
LNT/simple: Add view options for hiding the report by default and for selecting to show only certain tests.
Modified:
zorg/trunk/lnt/lnt/server/ui/templates/simple_run.html
zorg/trunk/lnt/lnt/server/ui/views.py
Modified: zorg/trunk/lnt/lnt/server/ui/templates/simple_run.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/templates/simple_run.html?rev=131775&r1=131774&r2=131775&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/templates/simple_run.html (original)
+++ zorg/trunk/lnt/lnt/server/ui/templates/simple_run.html Fri May 20 19:49:51 2011
@@ -118,6 +118,14 @@
<input type="checkbox" name="show_graphs" value="yes" {{
"checked" if options.show_graphs }}><br>
+<b>Hide Report By Default:</b>
+<input type="checkbox" name="hide_report_by_default" value="yes" {{
+ "checked" if options.hide_report_by_default }}><br>
+
+<b>Test Filter (regexp):</b>
+<input type="text" name="test_filter" value="{{
+ options.test_filter }}"><br>
+
<input type="submit" name="submit" value="Update">
</form>
{{ utils.render_popup_end() }}
@@ -126,7 +134,8 @@
<pre>{{ text_report }}</pre>
{{ utils.render_popup_end() }}
-{{ utils.render_popup_begin('html_report', 'Report (HTML)', false) }}
+{{ utils.render_popup_begin('html_report', 'Report (HTML)',
+ options.hide_report_by_default) }}
{{html_report|safe}}
{{ utils.render_popup_end() }}
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=131775&r1=131774&r2=131775&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Fri May 20 19:49:51 2011
@@ -1,4 +1,5 @@
import os
+import re
import tempfile
import time
@@ -280,11 +281,19 @@
options['show_all_samples'] = bool(request.args.get('show_all_samples'))
options['show_sample_counts'] = bool(request.args.get('show_sample_counts'))
options['show_graphs'] = show_graphs = bool(request.args.get('show_graphs'))
+ options['hide_report_by_default'] = bool(
+ request.args.get('hide_report_by_default'))
try:
num_comparison_runs = int(request.args.get('num_comparison_runs'))
except:
num_comparison_runs = 10
options['num_comparison_runs'] = num_comparison_runs
+ options['test_filter'] = test_filter_str = request.args.get(
+ 'test_filter', '')
+ if test_filter_str:
+ test_filter_re = re.compile(test_filter_str)
+ else:
+ test_filter_re = None
_, text_report, html_report = NTEmailReport.getSimpleReport(
None, db, run, str("%s/db_%s/") % (current_app.old_config.zorgURL,
@@ -306,6 +315,12 @@
interesting_runs.append(compare_to.id)
test_names = ts_summary.get_test_names_in_runs(db, interesting_runs)
+ # Filter the list of tests, if requested.
+ if test_filter_re:
+ test_names = [test
+ for test in test_names
+ if test_filter_re.search(test)]
+
# Gather the runs to use for statistical data, if enabled.
cur_id = run.id
comparison_window = []
More information about the llvm-commits
mailing list