Download:
child 55:119a07aacb84
parent 53:b4b32a8d2f4e
54:3fb3f68e9627
Anton Shestakov <av6@dwimlabs.net>, Wed, 06 Apr 2016 11:10:23 +0800
viewer: selecting no benchmark results (in addition to all results)

2 файлов изменено, 4 вставок(+), 3 удалений(-) [+]
templates/results.html file | annotate | diff | comparison | revisions
viewer.py file | annotate | diff | comparison | revisions
--- a/templates/results.html Mon Feb 08 01:20:57 2016 +0800
+++ b/templates/results.html Wed Apr 06 11:10:23 2016 +0800
@@ -63,6 +63,7 @@
+<a href="{{ setmarks(add=mark) }}" title="{{ desc }}">{{ mark }}</a>
{% end %}
*<a href="{{ setmarks() }}">all</a>
+ *<a href="{{ setmarks('') }}">none</a>
</p>
</header>
<table>
--- a/viewer.py Mon Feb 08 01:20:57 2016 +0800
+++ b/viewer.py Wed Apr 06 11:10:23 2016 +0800
@@ -73,8 +73,8 @@
return 'W/"{},{}"'.format(dbmt, repomt)
def getmarks(self):
- chosen = self.get_argument('marks', '')
- if chosen:
+ chosen = self.get_argument('marks', None)
+ if chosen is not None:
chosen = chosen.split(',')
marks = OrderedDict((mark, MARKS[mark]) for mark in chosen if mark in MARKS)
moremarks = OrderedDict((mark, desc) for mark, desc in MARKS.items() if mark not in chosen)
@@ -208,7 +208,7 @@
def fn(value=None, add=None, remove=None):
kwargs = self.request.arguments.copy()
if add is not None:
- kwargs['marks'] = kwargs['marks'] + [add]
+ kwargs['marks'] = marks.keys() + [add]
elif remove is not None:
kwargs['marks'] = [mark for mark in marks if mark != remove]
elif value is not None: