Index: tags/0.1.1/CHANGELOG
===================================================================
--- tags/0.1.1/CHANGELOG	(revision 252)
+++ tags/0.1.1/CHANGELOG	(revision 252)
@@ -0,0 +1,30 @@
+0.1.1:
+
+	web)
+
+		- fixed: misc. layout bugs for overview & search
+		- fixed: bug that occured when calculating the number of nodes when there
+		         was more than one job running on a machine
+
+		- changed: column requested memory is now optional through conf.php
+		- changed: search and overview tables are now full screen (100%)
+		- changed: overview jobnames are now cutoff at max 9 characters
+		           to prevent (layout) scews in the tables
+		- changed: overview graphs are no longer downsized
+
+		- added: (optional) column 'queued' (since) in overview
+		- added: search results (can) now have a SEARCH_RESULT_LIMIT
+		         this increases performance of the query's significantly!
+		- added: date/time format as displayed is now configurable through conf.php
+
+	jobmond)
+
+		- added: now reports 'queued since' (or creation time) of jobs
+
+	documentation)
+
+		- fixed: wrong e-mail adress in INSTALL (doh!)
+
+0.1.0:
+
+	- First public release
Index: tags/0.1.1/jobmond/jobmond.py
===================================================================
--- trunk/jobmond/jobmond.py	(revision 235)
+++ tags/0.1.1/jobmond/jobmond.py	(revision 252)
@@ -287,4 +287,6 @@
 			status = self.getAttr( attrs, 'job_state' )
 
+			queued_timestamp = self.getAttr( attrs, 'ctime' )
+
 			if status == 'R':
 				start_timestamp = self.getAttr( attrs, 'mtime' )
@@ -355,4 +357,5 @@
 			myAttrs['status'] = status
 			myAttrs['start_timestamp'] = start_timestamp
+			myAttrs['queued_timestamp'] = queued_timestamp
 			myAttrs['reported'] = str( int( int( self.cur_time ) + int( self.timeoffset ) ) )
 			myAttrs['nodes'] = nodeslist
@@ -421,4 +424,7 @@
 		if jobattrs['start_timestamp'] != '':
 			appendList.append( 'start_timestamp=' + jobattrs['start_timestamp'] )
+			
+		if jobattrs['queued_timestamp'] != '':
+			appendList.append( 'queued_timestamp=' + jobattrs['queued_timestamp'] )
 
 		appendList.append( 'reported=' + jobattrs['reported'] )
Index: tags/0.1.1/web/addons/job_monarch/conf.php
===================================================================
--- trunk/web/addons/job_monarch/conf.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/conf.php	(revision 252)
@@ -4,7 +4,23 @@
 $default_showhosts = 1;
 
+// Stop displaying archive search results after SEARCH_RESULT_LIMIT
+//
+$SEARCH_RESULT_LIMIT = 20;
+
+// Show the column job attribute 'requested memory'?
+//
+$COLUMN_REQUESTED_MEMORY = 0;
+
+// Show the column job attribute 'queued' (since)?
+//
+$COLUMN_QUEUED = 1;
+
 // Path to Ganglia's web frontend root
 //
 $GANGLIA_PATH = "/var/www/ganglia";
+
+// Format of how to display a date and time in human readable format
+//
+$DATETIME_FORMAT = "%a %d %b %Y %H:%M:%S";
 
 // Max size of small clusterimage
Index: tags/0.1.1/web/addons/job_monarch/footer.php
===================================================================
--- trunk/web/addons/job_monarch/footer.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/footer.php	(revision 252)
@@ -26,7 +26,7 @@
 $tpl->prepare();
 $tpl->assign("webfrontend-version",$version["webfrontend"]);
-$tpl->assign("togaweb-version", "0.1");
-$tpl->assign("togaarch-version", "0.1");
-$tpl->assign("togaplug-version", "0.1");
+//$tpl->assign("togaweb-version", "0.1.1");
+//$tpl->assign("togaarch-version", "0.1.1");
+//$tpl->assign("togaplug-version", "0.1.1");
 
 if ($version["gmetad"]) {
Index: tags/0.1.1/web/addons/job_monarch/libtoga.php
===================================================================
--- trunk/web/addons/job_monarch/libtoga.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/libtoga.php	(revision 252)
@@ -25,10 +25,4 @@
 
 
-// If php is compiled without globals
-//
-//if ( !empty( $_GET ) ) {
-//        extract( $_GET );
-//}
-
 class HTTPVariables {
 
@@ -116,4 +110,11 @@
 global $metrics, $hosts_up;
 
+global $DATETIME_FORMAT;
+
+function makeDate( $time ) {
+	global $DATETIME_FORMAT;
+	return strftime( $DATETIME_FORMAT, $time );
+}
+
 class TarchDbase {
 
@@ -141,7 +142,10 @@
 	function searchDbase( $id = null, $queue = null, $user = null, $name = null, $start_from_time = null, $start_to_time = null, $end_from_time = null, $end_to_time = null ) {
 
-		if( $id ) 
-			$query = "SELECT job_id FROM jobs WHERE job_id = '$id' AND job_status = 'F'";
-		else {
+		global $SEARCH_RESULT_LIMIT;
+
+		if( $id ) {
+			$select_query = "SELECT job_id FROM jobs WHERE job_id = '$id' AND job_status = 'F'";
+			$this->resultcount = 1;
+		} else {
 			$query_args = array();
 			
@@ -161,5 +165,5 @@
 				$query_args[] = "job_stop_timestamp <= $end_to_time";
 
-			$query = "SELECT job_id FROM jobs WHERE job_status = 'F' AND ";
+			$query = "FROM jobs WHERE job_status = 'F' AND ";
 			$extra_query_args = '';
 
@@ -172,7 +176,17 @@
 			}
 			$query .= $extra_query_args;
-		}
-
-		$ids = $this->queryDbase( $query );
+
+			$count_result_idname = "COUNT(job_id)";
+			$select_result_idname = "job_id";
+
+			$count_query = "SELECT " . $count_result_idname . " " . $query;
+
+			$count_result = $this->queryDbase( $count_query );
+			$this->resultcount = (int) $count_result[0][count];
+
+			$select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id LIMIT " . $SEARCH_RESULT_LIMIT;
+		}
+
+		$ids = $this->queryDbase( $select_query );
 
 		$ret = array();
Index: tags/0.1.1/web/addons/job_monarch/overview.php
===================================================================
--- trunk/web/addons/job_monarch/overview.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/overview.php	(revision 252)
@@ -24,5 +24,5 @@
 
 global $GANGLIA_PATH, $clustername, $tpl, $filter, $cluster, $get_metric_string, $cluster_url, $sh;
-global $hosts_up, $m, $start, $end, $filterorder;
+global $hosts_up, $m, $start, $end, $filterorder, $COLUMN_REQUESTED_MEMORY, $COLUMN_QUEUED;
 
 //$tpl->assign("_ROOT.summary", "" );
@@ -168,7 +168,7 @@
 }
 
-function makeDate( $time ) {
-	return strftime( "%a %d %b %Y %H:%M:%S", $time );
-}
+//function makeDate( $time ) {
+//	return strftime( "%a %d %b %Y %H:%M:%S", $time );
+//}
 
 function colorRed( $color ) {
@@ -396,4 +396,5 @@
                         $ppn = (int) $jobattrs[ppn] ? $jobattrs[ppn] : 1;
                         $cpus = $nodes * $ppn;
+			$queued_time = (int) $jobattrs[queued_timestamp];
                         $start_time = (int) $jobattrs[start_timestamp];
 			$runningtime = $report_time - $start_time;
@@ -434,4 +435,8 @@
 				case "cpus":
 					$sorted[$jobid] = $cpus;
+					break;
+
+				case "queued":
+					$sorted[$jobid] = $queued_time;
 					break;
 
@@ -465,5 +470,5 @@
 	global $cluster_url, $get_metric_string, $host_url, $metrics;
 	global $start, $end, $reports, $gnodes, $default_showhosts;
-
+	global $COLUMN_QUEUED, $COLUMN_REQUESTED_MEMORY;
 	$metricname = $m;
 
@@ -508,4 +513,12 @@
 
 	$view_name_nodes = array();
+
+	if( $COLUMN_REQUESTED_MEMORY ) {
+		$tpl->newBlock( "column_header_req_mem" );
+	}
+
+	if( $COLUMN_QUEUED ) {
+		$tpl->newBlock( "column_header_queued" );
+	}
 
 	foreach( $sorted_jobs as $jobid => $sortdec ) {
@@ -562,11 +575,52 @@
 				$tpl->assign("id", $jobid );
 				$tpl->assign("state", $jobs[$jobid][status] );
+
+				$fullstate = '';
+				if( $jobs[$jobid][status] == 'R' ) {
+					$fullstate = "Running";
+				} else if( $jobs[$jobid][status] == 'Q' ) {
+					$fullstate = "Queued";
+				}
+
+				$tpl->assign("fullstate", $fullstate );
+				
 				$tpl->assign("user", $jobs[$jobid][owner] );
 				$tpl->assign("queue", $jobs[$jobid][queue] );
-				$tpl->assign("name", $jobs[$jobid][name] );
+
+				$fulljobname = $jobs[$jobid][name];
+				$shortjobname = '';
+
+				$tpl->assign("fulljobname", $fulljobname );
+
+				if( mb_strwidth( $fulljobname ) > 10 ) {
+					$tpl->newBlock("jobname_hint_start");
+					$tpl->gotoBlock("node");
+
+					$shortjobname = mb_strimwidth( $fulljobname, 0, 9 ) . '..';
+				} else {
+					$shortjobname = $fulljobname;
+				}
+				
+				$tpl->assign("name", $shortjobname );
+
+				if( strlen( $fulljobname ) > 10 ) {
+					$tpl->newBlock("jobname_hint_end");
+					$tpl->gotoBlock("node");
+				}
+
 				$domain = $jobs[$jobid][domain];
 				$tpl->assign("req_cpu", makeTime( timeToEpoch( $jobs[$jobid][requested_time] ) ) );
-				$tpl->assign("req_memory", $jobs[$jobid][requested_memory] );
-
+
+				if( $COLUMN_REQUESTED_MEMORY ) {
+					$tpl->newBlock( "column_req_mem" );
+					$tpl->assign( "req_memory", $jobs[$jobid][requested_memory] );
+					$tpl->gotoBlock( "node" );
+				}
+
+				if( $COLUMN_QUEUED ) {
+					$tpl->newBlock( "column_queued" );
+					$tpl->assign( "queued", makeDate( $jobs[$jobid][queued_timestamp] ) );
+					$tpl->gotoBlock( "node" );
+				}
 
 				$ppn = (int) $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1;
@@ -606,7 +660,7 @@
 		}
 	}
-	array_unique( $all_used_nodes );
-	array_unique( $view_name_nodes );
-	array_unique( $running_name_nodes );
+	$all_used_nodes = array_unique( $all_used_nodes );
+	$view_name_nodes = array_unique( $view_name_nodes );
+	$running_name_nodes = array_unique( $running_name_nodes );
 
 	$used_nodes = count( $all_used_nodes );
@@ -770,5 +824,5 @@
 					$cell="<td class=$class>".  "<b><a href=$host_link>$host</a></b><br>".  "<i>$metricname:</i> <b>$textval</b></td>";
 				} else {
-					$cell="<td><a href=$host_link>".  "<img src=\"../../graph.php?$graphargs\" ".  "alt=\"$host\" height=112 width=225 border=0></a></td>";
+					$cell="<td><a href=$host_link>".  "<img src=\"../../graph.php?$graphargs\" ".  "alt=\"$host\" border=0></a></td>";
 				}
 
Index: tags/0.1.1/web/addons/job_monarch/search.php
===================================================================
--- trunk/web/addons/job_monarch/search.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/search.php	(revision 252)
@@ -154,7 +154,7 @@
 }
 
-function makeDate( $time ) {
-        return strftime( "%a %d %b %Y %H:%M:%S", $time );
-}
+//function makeDate( $time ) {
+//        return strftime( "%a %d %b %Y %H:%M:%S", $time );
+//}
 
 function datetimeToEpoch( $datetime ) {
@@ -324,5 +324,6 @@
 	global $clustername, $tpl, $id, $user, $name, $start_from_time, $start_to_time, $queue;
 	global $end_from_time, $end_to_time, $filter, $default_showhosts, $m, $hosts_up;
-	global $period_start, $period_stop, $sortby, $sortorder;
+	global $period_start, $period_stop, $sortby, $sortorder, $COLUMN_REQUESTED_MEMORY;
+	global $SEARCH_RESULT_LIMIT;
 
 	$metricname = $m;
@@ -352,6 +353,15 @@
 		$search_ids = $tdb->searchDbase( $id, $queue, $user, $name, $start_from_time, $start_to_time, $end_from_time, $end_to_time );
 
+		if( ($tdb->resultcount) > (int) $SEARCH_RESULT_LIMIT ) {
+			$tpl->gotoBlock( "_ROOT" );
+		
+			$tpl->assign( "form_error_msg", "Got " . $tdb->resultcount . " search results, output limited to last " . $SEARCH_RESULT_LIMIT . " jobs." );
+			$tpl->gotoBlock( "search_results" );
+		}
+
 		$jobs = array();
 		$nodes = array();
+
+		$even = 1;
 
 		//print_r( $search_ids );
@@ -362,4 +372,8 @@
 			$jobs[$myid] = $tdb->getJobArray( $myid );
 			$nodes[$myid] = $tdb->getNodesForJob( $myid );
+		}
+
+		if( $COLUMN_REQUESTED_MEMORY ) {
+			$tpl->newBlock( "column_header_req_mem" );
 		}
 
@@ -385,7 +399,23 @@
 			$tpl->assign( "name", $job[name] );
 			$tpl->assign( "req_cpu", makeTime( TimeToEpoch( $job[requested_time] ) ) );
-			$tpl->assign( "req_memory", $job[requested_memory] );
+
+			if( $COLUMN_REQUESTED_MEMORY ) {
+				$tpl->newBlock( "column_req_mem" );
+				$tpl->assign( "req_memory", $jobs[$jobid][requested_memory] );
+				$tpl->gotoBlock( "node" );
+			}
 
 			$nodes_nr = count( $nodes[$foundid] );
+
+			if( $even ) {
+
+				$tpl->assign("nodeclass", "even");
+				$even = 0;
+			} else {
+
+				$tpl->assign("nodeclass", "odd");
+				$even = 1;
+			}
+
 
 			// need to replace later with domain stored from dbase
Index: tags/0.1.1/web/addons/job_monarch/styles.css
===================================================================
--- trunk/web/addons/job_monarch/styles.css	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/styles.css	(revision 252)
@@ -231,4 +231,10 @@
 }
 
+.jobname_hint
+{
+   border-bottom: thin dotted;
+   border-bottom-color: rgb(255,0,0);
+}
+
 .red
 {
Index: tags/0.1.1/web/addons/job_monarch/templates/overview.tpl
===================================================================
--- trunk/web/addons/job_monarch/templates/overview.tpl	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/templates/overview.tpl	(revision 252)
@@ -137,14 +137,19 @@
 <INPUT TYPE="HIDDEN" NAME="filterorder" VALUE="{f_order}">
 
-<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
+<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="2" BORDER=0>
 <TR CLASS="monarch">
-<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'id' )" ALT="Jobid" TITLE="Jobid">Id</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'state' )" ALT="State" TITLE="State">S</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'name' )" ALT="Jobname" TITLE="Jobname">Name</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )" ALT="Requested CPU Time (walltime)" TITLE="Requested CPU Time (walltime)">Req. CPU time</A></B></TH>
+<!-- START BLOCK : column_header_req_mem -->
+<TH><B><A HREF="#" onClick="setSort( 'req_mem' )" ALT="Requested Memory" TITLE="Requested Memory">Req. Memory</A></B></TH>
+<!-- END BLOCK : column_header_req_mem -->
+<TH><B><A HREF="#" onClick="setSort( 'nodes' )" ALT="Nodes" TITLE="Nodes">N</A>/<A HREF="#" onClick="setSort( 'cpus' )" ALT="Processors" TITLE="Processors">P</A></B></TH>
+<!-- START BLOCK : column_header_queued -->
+<TH><B><A HREF="#" onClick="setSort( 'queued' )">Queued</A></B></TH>
+<!-- END BLOCK : column_header_queued -->
 <TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'runningtime' )">Runningtime</A></B></TH>
@@ -154,11 +159,24 @@
   <TR CLASS="{nodeclass}">
     <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( 'state', '{state}' )" ALT="{fullstate}" TITLE="{fullstate}">{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 ALT="{fulljobname}" TITLE="{fulljobname}">
+<!-- START BLOCK : jobname_hint_start -->
+    <FONT CLASS="jobname_hint">
+<!-- END BLOCK : jobname_hint_start -->
+    {name}
+<!-- START BLOCK : jobname_hint_end -->
+    </FONT>
+<!-- END BLOCK : jobname_hint_end -->
+    </TD>
     <TD>{req_cpu}</TD>
+<!-- START BLOCK : column_req_mem -->
     <TD>{req_memory}</TD>
+<!-- END BLOCK : column_req_mem -->
     <TD>{nodes}/{cpus}</TD>
+<!-- START BLOCK : column_queued -->
+    <TD>{queued}</TD>
+<!-- END BLOCK : column_queued -->
     <TD>{started}</TD>
     <TD>{runningtime}</TD>
Index: tags/0.1.1/web/addons/job_monarch/templates/search.tpl
===================================================================
--- trunk/web/addons/job_monarch/templates/search.tpl	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/templates/search.tpl	(revision 252)
@@ -57,5 +57,5 @@
 <BR><BR>
 
-<TABLE WIDTH="90%">
+<TABLE WIDTH="100%">
 
 <TR>
@@ -202,15 +202,16 @@
 <INPUT TYPE="HIDDEN" NAME="filterorder" VALUE="{f_order}">
 
-<TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
-<TR CLASS="toga">
-<TH><B><A HREF="#" onClick="setSort( 'id' )">Id</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'state' )">State</A></B></TH>
+<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="2" BORDER=0>
+<TR CLASS="monarch">
+<TH><B><A HREF="#" onClick="setSort( 'id' )" ALT="Jobid" TITLE="Jobid">Id</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'state' )" ALT="State" TITLE="State">S</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'user' )">User</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'queue' )">Queue</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'name' )">Name</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )">Req. CPU time</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'req_mem' )">Req. Memory</A></B></TH>
-<TH><B><A HREF="#" onClick="setSort( 'nodes' )">Nodes</A>/<A HREF="#" onClick="setSort( 'cpus' )">Cpus</A></
-B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'name' )" ALT="Jobname" TITLE="Jobname">Name</A></B></TH>
+<TH><B><A HREF="#" onClick="setSort( 'req_cpu' )" ALT="Requested CPU Time (walltime)" TITLE="Requested CPU Time (walltime)">Req. CPU time</A></B></TH>
+<!-- START BLOCK : column_header_req_mem -->
+<TH><B><A HREF="#" onClick="setSort( 'req_mem' )" ALT="Requested Memory" TITLE="Requested Memory">Req. Memory</A></B></TH>
+<!-- END BLOCK : column_header_req_mem -->
+<TH><B><A HREF="#" onClick="setSort( 'nodes' )" ALT="Nodes" TITLE="Nodes">N</A>/<A HREF="#" onClick="setSort( 'cpus' )" ALT="Processors" TITLE="Processors">P</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'start' )">Started</A></B></TH>
 <TH><B><A HREF="#" onClick="setSort( 'finished' )">Finished</A></B></TH>
@@ -224,7 +225,17 @@
     <TD><A HREF="#" onClick="setFilter( 'user', '{user}' )">{user}</A></TD>
     <TD><A HREF="#" onClick="setFilter( 'queue', '{queue}' )">{queue}</A></TD>
-    <TD>{name}</TD>
+    <TD ALT="{fulljobname}" TITLE="{fulljobname}">
+<!-- START BLOCK : jobname_hint_start -->
+    <FONT CLASS="jobname_hint">
+<!-- END BLOCK : jobname_hint_start -->
+    {name}
+<!-- START BLOCK : jobname_hint_end -->
+    </FONT>
+<!-- END BLOCK : jobname_hint_end -->
+    </TD>
     <TD>{req_cpu}</TD>
+<!-- START BLOCK : column_req_mem -->
     <TD>{req_memory}</TD>
+<!-- END BLOCK : column_req_mem -->
     <TD>{nodes}/{cpus}</TD>
     <TD>{started}</TD>
Index: tags/0.1.1/web/addons/job_monarch/version.php
===================================================================
--- trunk/web/addons/job_monarch/version.php	(revision 235)
+++ tags/0.1.1/web/addons/job_monarch/version.php	(revision 252)
@@ -22,4 +22,4 @@
  */
 
-$monarchversion = "0.1";
+$monarchversion = "0.1.1";
 ?>
