# HG changeset patch # User Jeff Hammel # Date 1344840336 25200 # Node ID 10e59c3ae847de2e1445bb051feaeec2c2a695da # Parent 4e8c839dcdecff71fa7177869b0e0a130ded1cb7 filter by active/disabled diff -r 4e8c839dcdec -r 10e59c3ae847 talosnames/templates/index.html --- a/talosnames/templates/index.html Sun Aug 12 23:27:28 2012 -0700 +++ b/talosnames/templates/index.html Sun Aug 12 23:45:36 2012 -0700 @@ -48,7 +48,7 @@ } .disabled { -background-color: #888; +background-color: #AAA; } @@ -109,7 +109,7 @@ -g + diff -r 4e8c839dcdec -r 10e59c3ae847 talosnames/web.py --- a/talosnames/web.py Sun Aug 12 23:27:28 2012 -0700 +++ b/talosnames/web.py Sun Aug 12 23:45:36 2012 -0700 @@ -96,18 +96,30 @@ # make a local copy of the data data = self.data.copy() - # filter by TBPL letter - if request and 'tbpl' in request.GET: - tbplnames = [] - for name in request.GET.getall('tbpl'): - if not name.startswith('Talos'): - name = 'Talos ' + name - tbplnames.append(name) - suites = [] - for suite, value in self.data['tbpl'].items(): - if value in tbplnames: - suites.append(suite) - data['suites'] = sorted(suites) + if request : + # filter by TBPL letter + if 'tbpl' in request.GET: + tbplnames = [] + for name in request.GET.getall('tbpl'): + if not name.startswith('Talos'): + name = 'Talos ' + name + tbplnames.append(name) + suites = [] + for suite, value in self.data['tbpl'].items(): + if value in tbplnames: + suites.append(suite) + data['suites'] = sorted(suites) + + # filter by disabled + if 'show' in request.GET: + show = request.GET['show'] + if show == 'active': + data['suites'] = [i for i in data['suites'] + if data['enabled'][i]] + elif show == 'disabled': + data['suites'] = [i for i in data['suites'] + if not data['enabled'][i]] + contents = file(template).read() _template = tempita.HTMLTemplate(contents)
Buildbot SuiteBuildbot Suite Buildbot PerfConfigurator Command TBPL Name Paint