Add a search page to the frontpage, since that's one of those things we want to encourage...
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 05 Jan 2009 14:04:57 -0500
changeset 12 0b5a89ccda6a
parent 11 240e28622925
child 13 e352aa637c0d
push id6
push userbsmedberg@mozilla.com
push date2009-01-05 19:05 +0000
Add a search page to the frontpage, since that's one of those things we want to encourage...
warning-ui/build.html
warning-ui/common.inc
warning-ui/index.html
warning-ui/search.html
--- a/warning-ui/build.html
+++ b/warning-ui/build.html
@@ -43,12 +43,12 @@
             <a href="${genlink('warning', signature=signature)}">${file}:${lineno} - ${msg}</a>
           </li>
         </ul>
       </div>
     </py:if>
 
     <h2>Search warnings:</h2>
 
-    ${searchform('', '', 'unused variable%')}
+    ${searchform(id, '', '', 'unused variable%')}
 
   </body>
 </html>
--- a/warning-ui/common.inc
+++ b/warning-ui/common.inc
@@ -1,14 +1,14 @@
 <!-- -*- Mode: XML -*- -->
 <?python from urllib import quote, urlencode ?>
 <div xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      py:strip="True">
-  <py:def function="searchform(user, path, msg)">
+  <py:def function="searchform(id, user, path, msg)">
     <form action="/search">
       User LIKE: <input type="text" name="user" size="25" value="${user}"/><br />
       Directory LIKE: <input type="text" name="path" size="25" value="${path}"/><br />
       Warning message LIKE: <input type="text" name="msg" size="30" value="${msg}"/><br />
       <input type="hidden" name="id" value="${id}" />
       <input type="submit" value="Search" />
     </form>
   </py:def>
--- a/warning-ui/index.html
+++ b/warning-ui/index.html
@@ -57,13 +57,17 @@ def convertx(x):
                 y="40">Rev: ${rev}</text>
           <circle class="mark"
                   cx="${convertx(i)}" cy="${converty(unique)}" r="${kSpacing / 2}" />
         </a>
       </py:for>
     </svg>
     </div>
     
+    <h2>Search Most Recent Build:</h2>
+    ${searchform(builds[0][0], '', '', '')}
+
+    <h2>Builds:</h2>
     <ul>
-      <li py:for="buildnumber, rev, unique in builds"><a href="build?id=${buildnumber}">${rev}</a></li>
+      <li py:for="buildnumber, rev, unique in builds"><a href="build?id=${buildnumber}">${rev}</a> - ${unique}</li>
     </ul>
   </body>
 </html>
--- a/warning-ui/search.html
+++ b/warning-ui/search.html
@@ -20,12 +20,12 @@
 
     <ul py:if="len(results)">
       <li py:for="signature, file, lineno, msg in results">
         <a href="${genlink('warning', signature=signature)}">${file}:${lineno} - ${msg}</a>
       </li>
     </ul>
 
     <h2>Search again:</h2>
-    ${searchform(user, path, msg)}
+    ${searchform(id, user, path, msg)}
 
   </body>
 </html>