Index: trunk/web/addons/toga/index.php
===================================================================
--- trunk/web/addons/toga/index.php	(revision 118)
+++ trunk/web/addons/toga/index.php	(revision 119)
@@ -19,7 +19,13 @@
 $view = $httpvars->getHttpVar( "view" );
 
+$filter = array();
+
 if( !isset($view) ) $view = "overview";
 if( !isset($sortorder) ) $sortorder = "asc";
 if( !isset($sortby) ) $sortby = "id";
+if( isset($id) && ($id!='')) $filter[id]=$id;
+if( isset($state) && ($state!='')) $filter[state]=$state;
+if( isset($user) && ($user!='')) $filter[user]=$user;
+if( isset($queue) && ($queue!='')) $filter[queue]=$queue;
 
 function makeHeader() {
@@ -29,5 +35,5 @@
 	global $page, $gridwalk, $clustername;
 	global $parentgrid, $physical, $hostname;
-	global $self;
+	global $self, $filter;
 
 	if ( $context == "control" && $controlroom < 0 )
@@ -115,5 +121,5 @@
 	# Show grid.
 	$mygrid =  ($self == "unspecified") ? "" : $self;
-	$node_menu .= "<B>$mygrid $meta_designator</A> ";
+	$node_menu .= "<B>$mygrid $meta_designator</B> ";
 	$node_menu .= "<B>&gt;</B>\n";
 
@@ -123,7 +129,16 @@
 	if ( $clustername ) {
 		$url = rawurlencode($clustername);
-		$node_menu .= "<B>$clustername</B> ";
+		$node_menu .= "<B><A HREF=\"./?c=".rawurlencode($clustername)."\">$clustername</A></B> ";
 		//$node_menu .= "<B>&gt;</B>\n";
 		$node_menu .= hiddenvar("c", $clustername);
+	}
+
+	if( count( $filter ) > 0 ) {
+
+		foreach( $filter as $filtername => $filterval ) {
+
+			$node_menu .= "<B>&gt;</B>\n";
+			$node_menu .= "<B>'$filtername': $filterval</B> ";
+		}
 	}
 
@@ -172,40 +187,4 @@
 }
 
-//function makeOverview() {
-//
-//	global $jobs, $nodes, $heartbeat, $clustername;
-
-//	foreach( $jobs as $jobid => $jobattrs ) {
-//
-//		$report_time = $jobattrs[reported];
-
-//		if( $report_time == $heartbeat ) {
-
-//			$tpl->newBlock("node");
-//			$tpl->assign( "clustername", $clustername );
-//			$tpl->assign("id", $jobid );
-//			$tpl->assign("state", $jobattrs[status] );
-//			$tpl->assign("user", $jobattrs[owner] );
-//			$tpl->assign("queue", $jobattrs[queue] );
-//			$tpl->assign("name", $jobattrs[name] );
-//			$tpl->assign("req_cpu", $jobattrs[requested_time] );
-//			$tpl->assign("req_memory", $jobattrs[requested_memory] );
-//			$nodes = count( $jobattrs[nodes] );
-//			$ppn = (int) $jobattrs[ppn] ? $jobattrs[ppn] : 1;
-//			$cpus = $nodes * $ppn;
-//			$tpl->assign("nodes", $nodes );
-//			$tpl->assign("cpus", $cpus );
-//			$start_time = (int) $jobattrs[start_timestamp];
-
-//			if( $start_time ) {
-
-//				$runningtime = makeTime( $report_time - $start_time );
-//				$tpl->assign("started", makeDate( $start_time ) );
-//				$tpl->assign("runningtime", $runningtime );
-//			}
-//		}
-//	}
-//}
-
 $tpl = new TemplatePower( "templates/index.tpl" );
 
Index: trunk/web/addons/toga/overview.php
===================================================================
--- trunk/web/addons/toga/overview.php	(revision 118)
+++ trunk/web/addons/toga/overview.php	(revision 119)
@@ -1,4 +1,4 @@
 <?php
-global $GANGLIA_PATH, $clustername, $tpl;
+global $GANGLIA_PATH, $clustername, $tpl, $filter;
 
 $data_gatherer = new DataGatherer();
@@ -13,4 +13,8 @@
 $jobs = $data_gatherer->getJobs();
 $nodes = $data_gatherer->getNodes();
+
+foreach( $filter as $filtername => $filtervalue ) {
+	$tpl->assign( "f_".$filtername, $filtervalue );
+}
 
 $tpl->assign("heartbeat", makeDate( $heartbeat ) );
@@ -285,5 +289,5 @@
 
 	global $jobs, $nodes, $heartbeat, $clustername, $tpl;
-	global $sortorder, $sortby;
+	global $sortorder, $sortby, $filter;
 
 	$tpl->assign("sortorder", $sortorder );
@@ -300,35 +304,55 @@
 		if( $report_time == $heartbeat ) {
 
-			$tpl->newBlock("node");
-			$tpl->assign( "clustername", $clustername );
-			$tpl->assign("id", $jobid );
-			$tpl->assign("state", $jobs[$jobid][status] );
-			$tpl->assign("user", $jobs[$jobid][owner] );
-			$tpl->assign("queue", $jobs[$jobid][queue] );
-			$tpl->assign("name", $jobs[$jobid][name] );
-			$tpl->assign("req_cpu", $jobs[$jobid][requested_time] );
-			$tpl->assign("req_memory", $jobs[$jobid][requested_memory] );
-			$nodes = count( $jobs[$jobid][nodes] );
-			$ppn = (int) $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1;
-			$cpus = $nodes * $ppn;
-			$tpl->assign("nodes", $nodes );
-			$tpl->assign("cpus", $cpus );
-			$start_time = (int) $jobs[$jobid][start_timestamp];
-
-			if( $even ) {
-
-				$tpl->assign("nodeclass", "even");
-				$even = 0;
-			} else {
-
-				$tpl->assign("nodeclass", "odd");
-				$even = 1;
+			if( count( $filter ) == 0 )
+				$display_job = 1;
+			else
+				$display_job = 0;
+
+			foreach( $filter as $filtername=>$filtervalue ) {
+
+				if( $filtername == 'id' && $jobid == $filtervalue )
+					$display_job = 1;
+				else if( $filtername == 'state' && $jobs[$jobid][status] == $filtervalue )
+					$display_job = 1;
+				else if( $filtername == 'queue' && $jobs[$jobid][queue] == $filtervalue )
+					$display_job = 1;
+				else if( $filtername == 'user' && $jobs[$jobid][owner] == $filtervalue )
+					$display_job = 1;
 			}
 
-			if( $start_time ) {
-
-				$runningtime = makeTime( $report_time - $start_time );
-				$tpl->assign("started", makeDate( $start_time ) );
-				$tpl->assign("runningtime", $runningtime );
+			if( $display_job ) {
+
+				$tpl->newBlock("node");
+				$tpl->assign( "clustername", $clustername );
+				$tpl->assign("id", $jobid );
+				$tpl->assign("state", $jobs[$jobid][status] );
+				$tpl->assign("user", $jobs[$jobid][owner] );
+				$tpl->assign("queue", $jobs[$jobid][queue] );
+				$tpl->assign("name", $jobs[$jobid][name] );
+				$tpl->assign("req_cpu", $jobs[$jobid][requested_time] );
+				$tpl->assign("req_memory", $jobs[$jobid][requested_memory] );
+				$nodes = count( $jobs[$jobid][nodes] );
+				$ppn = (int) $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1;
+				$cpus = $nodes * $ppn;
+				$tpl->assign("nodes", $nodes );
+				$tpl->assign("cpus", $cpus );
+				$start_time = (int) $jobs[$jobid][start_timestamp];
+
+				if( $even ) {
+
+					$tpl->assign("nodeclass", "even");
+					$even = 0;
+				} else {
+
+					$tpl->assign("nodeclass", "odd");
+					$even = 1;
+				}
+
+				if( $start_time ) {
+
+					$runningtime = makeTime( $report_time - $start_time );
+					$tpl->assign("started", makeDate( $start_time ) );
+					$tpl->assign("runningtime", $runningtime );
+				}
 			}
 		}
Index: trunk/web/addons/toga/templates/overview.tpl
===================================================================
--- trunk/web/addons/toga/templates/overview.tpl	(revision 118)
+++ trunk/web/addons/toga/templates/overview.tpl	(revision 119)
@@ -34,4 +34,18 @@
 		document.forms['toga_form'].submit();
 	}
+
+	function setFilter( filtername, filterval ) {
+
+		document.toga_form.id.value = '';
+		document.toga_form.queue.value = '';
+		document.toga_form.state.value = '';
+		document.toga_form.user.value = '';
+
+		if( document.toga_form.elements[filtername] ) {
+			document.toga_form.elements[filtername].value = filterval;
+		}
+
+		document.forms['toga_form'].submit();
+	}
 </SCRIPT>
 
@@ -41,5 +55,8 @@
 <INPUT TYPE="HIDDEN" NAME="sortorder" VALUE="{sortorder}">
 <INPUT TYPE="HIDDEN" NAME="c" VALUE="{clustername}">
-<INPUT TYPE="HIDDEN" NAME="jobid" VALUE="{jobid}">
+<INPUT TYPE="HIDDEN" NAME="id" VALUE="{f_id}">
+<INPUT TYPE="HIDDEN" NAME="queue" VALUE="{f_queue}">
+<INPUT TYPE="HIDDEN" NAME="state" VALUE="{f_state}">
+<INPUT TYPE="HIDDEN" NAME="user" VALUE="{f_user}">
 
 </FORM>
@@ -61,8 +78,8 @@
 <!-- START BLOCK : node -->
   <TR CLASS="{nodeclass}">
-    <TD><A HREF="">{id}</A></TD>
-    <TD><A HREF="">{state}</A></TD>
-    <TD><A HREF="{togasorted}&user={user}">{user}</A></TD>
-    <TD><A HREF="{togasorted}&queue={queue}">{queue}</A></TD>
+    <TD><A HREF="#" onClick="setFilter( 'id', '{id}' )">{id}</A></TD>
+    <TD><A HREF="#" onClick="setFilter( 'state', '{state}' )">{state}</A></TD>
+    <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
+    <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
     <TD>{name}</TD>
     <TD>{req_cpu}</TD>
