better feedback for search results
authorMike Shaver <shaver@mozilla.org>
Sun, 23 Jan 2011 02:19:39 +0000
changeset 22 4dc922da2bbae58a12df8c29c3ae0ae566cbc7ad
parent 21 0e5b01c322805c02afe733b50baaa149844a4a83
child 23 efa9c804c4f2f9ba285eadf1156c06ed2f7e9dff
push id20
push usershaver@mozilla.com
push dateSun, 23 Jan 2011 02:20:58 +0000
better feedback for search results
server/entry.html
--- a/server/entry.html
+++ b/server/entry.html
@@ -1,16 +1,16 @@
 <!doctype html>
 <html>
   <head>
     <title>Bugzilla fastness</title>
 <style>
 #matchingbugs {
   font-family: helvetica, arial, sans-serif;
-  font-size: .8em;
+/*  font-size: .8em; */
   padding-bottom: 40px;
 }
 </style>
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
 <script src="/socket.io/socket.io.js"></script>
   </head>
   <body>
 <div id="controls">
@@ -52,17 +52,17 @@ var results;
     $("#matchingbugs").html(data);
   };
 
   conn = new io.Socket(document.domain, { rememberTransport: false });
   conn.on("connecting", function(type) { $("#matchingbugs").html("Trying <i>" + type + "</i>"); });
   conn.on("message",  function(data) {
   results = JSON.parse(data);
       var div = $("#matchingbugs");
-      div.html("results for '" + $("#keywords").val() + "' in " +  (Date.now() - conn.sendTime) + " (total)/" +
+      div.html(results.bugs.length + " results for '" + $("#keywords").val() + "' in " +  (Date.now() - conn.sendTime) + " (total)/" +
                results.times.server + " (server)/" + results.times.redis + " (redis) ms<br>");
 
       results.bugs.forEach(function (v) { div.append("<a href='https://bugzilla.mozilla.org/show_bug.cgi?id=" + v.id + "'>" + v.id + "</a>: ");
 div.append(document.createTextNode(v.summary)); div.append("<br>"); });
       if (results.hasMore)
          div.append("<br>(Showing " + results.bugs.length + " of " + results.totalResults + " results)<br>");
     });
   conn.connect();