changeset 43:4e8c839dcdec

filter by disabled
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 12 Aug 2012 23:27:28 -0700
parents cc0edf61ab21
children 10e59c3ae847
files talosnames/templates/index.html talosnames/web.py
diffstat 2 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/talosnames/templates/index.html	Sun Aug 12 23:10:16 2012 -0700
+++ b/talosnames/templates/index.html	Sun Aug 12 23:27:28 2012 -0700
@@ -47,6 +47,10 @@
 color: blue;
 }
 
+.disabled {
+background-color: #888;
+}
+
 </style>
 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
 
@@ -103,8 +107,9 @@
 </head>
 <body>
 <table id="data">
+
 <tr>
-  <th class="buildbot">Buildbot Suite</th>
+g  <th class="buildbot">Buildbot Suite</th>
   <th class="command">Buildbot PerfConfigurator Command</th>
   <th class="tbpl">TBPL Name</th>
   <th class="paint">Paint</th>
@@ -112,8 +117,18 @@
   <th class="tests">Talos Tests</th>
 </tr>
 {{for suite in suites}}
+{{if enabled[suite]}}
 <tr>
-  <td class="buildbot"><a name="{{suite}}"></a><a class="anchor" href="#{{suite}}">{{suite}}</a></td>
+{{else}}
+<tr class="disabled">
+{{endif}}
+
+  <td class="buildbot">
+    <a name="{{suite}}"></a><a class="anchor" href="#{{suite}}">{{suite}}</a>
+    {{if not enabled[suite]}}
+    <i><span>(disabled)</span></i>
+    {{endif}}
+  </td>
   <td class="command">{{list2cmdline(commands[suite])}}</tt></td>
   <td class="tbpl">{{tbpl[suite]}}</td>
   <td class="paint"><span title="Paint">{{paint.get(suite, '')}}</span></td>
--- a/talosnames/web.py	Sun Aug 12 23:10:16 2012 -0700
+++ b/talosnames/web.py	Sun Aug 12 23:27:28 2012 -0700
@@ -92,7 +92,11 @@
         return response(environ, start_response)
 
     def render(self, request=None):
+
+        # 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'):
@@ -104,6 +108,7 @@
                 if value in tbplnames:
                     suites.append(suite)
             data['suites'] = sorted(suites)
+
         contents = file(template).read()
         _template = tempita.HTMLTemplate(contents)
         return _template.substitute(data)