Index: /trunk/web/addons/toga/conf.php
===================================================================
--- /trunk/web/addons/toga/conf.php	(revision 128)
+++ /trunk/web/addons/toga/conf.php	(revision 129)
@@ -1,3 +1,6 @@
 <?php
+// Show hosts in a jobview by default?
+//
+$default_showhosts = 1;
 
 // Path to Ganglia's web frontend root
@@ -15,9 +18,5 @@
 
 // How to mark nodes with a job in clusterimage
-// allcpus when all cpu's are in use
-// singlecpu when less than all cpus are in use
 //
-//$JOB_NODE_MARKING_ALLCPUS = "J";
-//$JOB_NODE_MARKING_SINGLECPU = "j";
 $JOB_NODE_MARKING = "J";
 
@@ -27,3 +26,7 @@
 $DATA_SOURCE = '127.0.0.1:8649';
 
+// Is there a jobarchive?
+//
+$TARCHD = 1;
+
 ?>
Index: /trunk/web/addons/toga/index.php
===================================================================
--- /trunk/web/addons/toga/index.php	(revision 128)
+++ /trunk/web/addons/toga/index.php	(revision 129)
@@ -37,4 +37,5 @@
 	global $self, $filter, $cluster_url, $get_metric_string;
 	global $metrics, $reports, $m, $default_metric;
+	global $default_refresh;
 
 	if( isset($default_metric) and !isset($m) )
@@ -46,18 +47,13 @@
 			$metricname = "load_one";
 
-	//$metricname = ($m) ? $m : $default_metric;
-	//printf( "m = %s, metricname = %s, default_metric = %s\n", $m, $metricname, $default_metric );
-	if ( $context == "control" && $controlroom < 0 )
-		$header = "header-nobanner";
-	else
-		$header = "header";
+	$header = "header";
 
 	# Maintain our path through the grid tree.
 	$me = $self . "@" . $grid[$self][AUTHORITY];
 
-	if ($initgrid) {
-		$gridstack = array();
-		$gridstack[] = $me;
-	} else if ($gridwalk=="fwd") {
+	$gridstack = array();
+	$gridstack[] = $me;
+
+	if ($gridwalk=="fwd") {
 		# push our info on gridstack, format is "name@url>name2@url".
 		if (end($gridstack) != $me) {
@@ -99,8 +95,5 @@
 
 	# The page to go to when "Get Fresh Data" is pressed.
-	if (isset($page))
-		$tpl->assign("page",$page);
-	else
-		$tpl->assign("page","./");
+	$tpl->assign("page","./");
 
 	# Templated Logo image
@@ -169,26 +162,4 @@
 
 	if( array_key_exists( "id", $filter ) ) {
-		//$context_ranges[]="hour";
-		//$context_ranges[]="day";
-		//$context_ranges[]="week";
-		//$context_ranges[]="month";
-		//$context_ranges[]="year";
-		//if ($jobrange)
-		//	$context_ranges[]="job";
-
-		//$range_menu = "<B>Last</B>&nbsp;&nbsp;"
-		//	."<SELECT NAME=\"r\" OnChange=\"toga_form.submit();\">\n";
-		//foreach ($context_ranges as $v) {
-		//	$url=rawurlencode($v);
-	//		$range_menu .= "<OPTION VALUE=\"$url\" ";
-	//		if ($v == $range)
-	//			 $range_menu .= "SELECTED";
-	//		$range_menu .= ">$v\n";
-	//	}
-	//	$range_menu .= "</SELECT>\n";
-
-	//	$tpl->assign("range_menu", $range_menu);
-
-		//$metricname = $m;
 
 		if (is_array($context_metrics) ) {
@@ -237,8 +208,16 @@
 }
 
-function includeJobview() {
+function includeSearchpage() {
 	global $tpl;
 
-	$tpl->assignInclude( "main", "templates/jobview.tpl" );
+	$tpl->assignInclude( "main", "templates/search.tpl" );
+
+}
+
+function includeSearchThumb() {
+	global $tpl;
+
+	$tpl->assignInclude( "archive", "templates/inc_search.tpl" );
+
 }
 
@@ -249,8 +228,4 @@
 }
 
-function makeJobview() {
-
-}
-
 $tpl = new TemplatePower( "templates/index.tpl" );
 
@@ -262,10 +237,12 @@
 
 		includeOverview();
-		break;
-
-	//case "jobview":
-
-	//	includeJobview();
-	//	break;
+		if( $TARCHD )
+			includeSearchThumb();
+		break;
+
+	case "search":
+
+		includeSearchPage();
+		break;
 
 	default:
@@ -280,4 +257,6 @@
 $title = "Torque Report";
 makeHeader();
+$tpl->assign("cluster_url", rawurlencode($clustername) );
+$tpl->assign("cluster", $clustername );
 
 switch( $view ) {
@@ -289,8 +268,9 @@
 		break;
 
-	//case "jobview":
-
-	//	makeJobview();
-	//	break;
+	case "search":
+
+		include "./search.php";
+		makeSearchPage();
+		break;
 
 	default:
Index: /trunk/web/addons/toga/libtoga.php
===================================================================
--- /trunk/web/addons/toga/libtoga.php	(revision 128)
+++ /trunk/web/addons/toga/libtoga.php	(revision 129)
@@ -60,8 +60,10 @@
 chdir( $GANGLIA_PATH );
 
+$context = 'cluster';
+
 include_once "./conf.php";
 include_once "./functions.php";
 include_once "./ganglia.php";
-include_once "./get_context.php";
+//include_once "./get_context.php";
 include_once "./get_ganglia.php";
 
@@ -76,7 +78,6 @@
 //
 global $context, $clustername, $reports;
+
 //$clustername = $httpvars->getClusterName();
-//$context = 'cluster';
-
 
 global $default_metric;
Index: /trunk/web/addons/toga/overview.php
===================================================================
--- /trunk/web/addons/toga/overview.php	(revision 128)
+++ /trunk/web/addons/toga/overview.php	(revision 129)
@@ -7,4 +7,7 @@
 //$tpl->assign( "self", "./index.php" );
 $tpl->assign( "clustername", $clustername );
+
+if( $TARCHD )
+	$tpl->assign( "cluster_url", rawurlencode($clustername) );
 
 $data_gatherer->parseXML();
@@ -426,5 +429,5 @@
 	global $sortorder, $sortby, $filter, $sh, $hc, $m;
 	global $cluster_url, $get_metric_string, $host_url, $metrics;
-	global $start, $end, $reports, $gnodes;
+	global $start, $end, $reports, $gnodes, $default_showhosts;
 
 	$metricname = $m;
@@ -523,5 +526,5 @@
 	$tpl->assignGlobal("f_jobs_nr", $f_jobs );
 
-	if( array_key_exists( "id", $filter ) ) {
+	if( array_key_exists( "id", $filter ) and $start_time ) {
 		$tpl->newBlock( "showhosts" );
 
@@ -545,6 +548,6 @@
 		$tpl->assign("cols_menu", $cols_menu);
 
-		if( $sh) $showhosts = $sh;
-		if( !$showhosts) $showhosts = 0;
+		$showhosts = isset($sh) ? $sh : $default_showhosts;
+		//if( !$showhosts) $showhosts = $default_showhosts;
 		$tpl->assign("checked$showhosts", "checked");
 
Index: /trunk/web/addons/toga/templates/header.tpl
===================================================================
--- /trunk/web/addons/toga/templates/header.tpl	(revision 128)
+++ /trunk/web/addons/toga/templates/header.tpl	(revision 129)
@@ -29,7 +29,8 @@
      <INPUT TYPE="SUBMIT" VALUE="Get Fresh Data">
      </TD>
+     <TD></TD>
   </TR>
   <TR>
-     <TD COLSPAN="1">
+     <TD COLSPAN=1>
      {metric_menu} &nbsp;&nbsp;
      {range_menu}&nbsp;&nbsp;
@@ -39,4 +40,5 @@
       <B>{alt_view}</B>
      </TD>
+<!-- INCLUDE BLOCK : archive -->
   </TR>
   </TABLE>
Index: /trunk/web/templates/toga/cluster_extra.tpl
===================================================================
--- /trunk/web/templates/toga/cluster_extra.tpl	(revision 128)
+++ /trunk/web/templates/toga/cluster_extra.tpl	(revision 129)
@@ -3,5 +3,5 @@
 <tr>
  <td valign=center>
-  <a href="./addons/toga/?c={cluster}"><b>Torque Job's</b></a>
+  <a href="./addons/toga/?c={cluster}"><b>Joblist</b></a>
  </td>
 </tr>
