WebPagetest Forums
Result filtering - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: Result filtering (/showthread.php?tid=7)

Result filtering - pmeenan - 04-06-2009 03:19 AM

(thread migrated from sourceforge forum - originally posted 8/16/2008)

Hi Pat,

Here's a simple jquery results filter which, if implemented, may be of benifit to other users:


fieldset {border:0 solid}
.even {background:#f7f7f7}


<form id="filter" action="#" onsubmit="filter(); return false;">
<label for="filterTerm">Show only result URIs containing text:</label>
<input id="filterTerm" value="websemantics" type="text" />
<input id="submit" value="Filter" type="submit" />
<p id="results">Note filtering a large data set will take time.<br />
Narrow reports first: <a href="/testlog/1/">1 Day</a>, <a href="/testlog/7/">7 Days</a>, <a href="/testlog/30/">30 Days</a>, <a href="/testlog/182/">6 Months</a>, <a href="/testlog/365/">1 Year</a>.</p>


<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
<script type="text/javascript">

function filter(){
var txt=$('#filterTerm').val(), total=0, count=0;
if ($(this).text().match(txt)){

$('#results').html('Showing <strong>'+count+'</strong> results from <strong>'+total+'</strong> entries.');
$('tbody tr:even').addClass('even');
$('#submit').val('Filter results further');



RE: Result filtering - pmeenan - 04-06-2009 03:19 AM

Sorry for the delay, wasn't ignoring your suggestion (and thanks for the code).

I figured it would be a bit cleaner to implement the filtering on the back-end and just pushed the code so feel free to give it a whirl. One of the benefits of doing it on the back-end (besides the speed) is that you end up with urls that you can bookmark if you just want to see the results from your properties.


RE: Result filtering - pmeenan - 04-06-2009 03:19 AM

Hi Pat,

Came to use the tool today and noticed the filtering, thanks dude that makes my life a little simpler.

Sorry to say but there appears to be an issue with 6 month / 1 year filtering.
Selecting 1 year seems to only produce 6 months of results?


RE: Result filtering - pmeenan - 04-06-2009 03:20 AM

The 1 year filtering works. I expect whatever you were looking for just wasn't tested that far back. The site only came online in February and if you do a 1 year filter for http://www.yahoo.com you will see tests going back that far:




RE: Result filtering - pmeenan - 04-06-2009 03:20 AM

Sorry Pat,

I could've sworn I started testing earlier than listed.
Well that proves one immediate benefit of the filtering.

Nice one.