Index: /trunk/web/addons/job_monarch/overview.php
===================================================================
--- /trunk/web/addons/job_monarch/overview.php	(revision 207)
+++ /trunk/web/addons/job_monarch/overview.php	(revision 208)
@@ -456,5 +456,20 @@
 	$used_nodes = 0;
 
+	$queued_jobs = 0;
+	$queued_nodes = 0;
+	$queued_cpus = 0;
+
+	$total_nodes = 0;
+	$total_cpus = 0;
+	$total_jobs = 0;
+
 	$all_used_nodes = array();
+	$total_used_nodes = array();
+
+	$running_name_nodes = array();
+
+	$running_nodes = 0;
+	$running_jobs = 0;
+	$running_cpus = 0;
 
 	$avail_nodes = count( $gnodes );
@@ -465,5 +480,9 @@
 	$view_nodes = 0;
 
-	$view_used_nodes = array();
+	$all_nodes = 0;
+	$all_jobs = 0;
+	$all_cpus = 0;
+
+	$view_name_nodes = array();
 
 	foreach( $sorted_jobs as $jobid => $sortdec ) {
@@ -471,19 +490,34 @@
 		$report_time = $jobs[$jobid][reported];
 
-		$nodes = count( $jobs[$jobid][nodes] );
+		if( $jobs[$jobid][status] == 'R' )
+			$nodes = count( $jobs[$jobid][nodes] );
+		else if( $jobs[$jobid][status] == 'Q' )
+			$nodes = $jobs[$jobid][nodes];
+
 		$ppn = (int) $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1;
 		$cpus = $nodes * $ppn;
 
-		foreach( $jobs[$jobid][nodes] as $tempnode )
-			$all_used_nodes[] = $tempnode;
-
-		if( $jobs[$jobid][status] == 'R' ) {
+		if( $report_time == $heartbeat ) {
+
+			$display_job = 1;
+
+			foreach( $jobs[$jobid][nodes] as $tempnode )
+				$all_used_nodes[] = $tempnode;
+
 			$used_cpus += $cpus;
-			$used_jobs++;
-		}
-
-		if( $report_time == $heartbeat ) {
-
-			$display_job = 1;
+
+			if( $jobs[$jobid][status] == 'R' ) {
+				$running_cpus += $cpus;
+				$running_jobs++;
+
+				foreach( $jobs[$jobid][nodes] as $tempnode )
+					$running_name_nodes[] = $tempnode;
+			}
+
+			if( $jobs[$jobid][status] == 'Q' ) {
+				$queued_cpus += $cpus;
+				$queued_nodes += $nodes;
+				$queued_jobs++;
+			}
 
 			foreach( $filter as $filtername=>$filtervalue ) {
@@ -512,8 +546,4 @@
 				$tpl->assign("req_memory", $jobs[$jobid][requested_memory] );
 
-				if( $jobs[$jobid][status] == 'R' )
-					$nodes = count( $jobs[$jobid][nodes] );
-				else if( $jobs[$jobid][status] == 'Q' )
-					$nodes = $jobs[$jobid][nodes];
 
 				$ppn = (int) $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1;
@@ -529,7 +559,7 @@
 				if( $jobs[$jobid][status] == 'R' )
 					foreach( $jobs[$jobid][nodes] as $tempnode )
-						$view_used_nodes[] = $tempnode;
+						$view_name_nodes[] = $tempnode;
 				else if( $jobs[$jobid][status] == 'Q' )
-					$view_nodes += $jobs[$jobid][nodes];
+					$view_nodes += (int) $jobs[$jobid][nodes];
 
 				if( $even ) {
@@ -554,7 +584,14 @@
 	}
 	array_unique( $all_used_nodes );
-	array_unique( $view_used_nodes );
+	array_unique( $view_name_nodes );
+	array_unique( $running_name_nodes );
+
 	$used_nodes = count( $all_used_nodes );
-	$view_nodes += count( $view_used_nodes );
+	$view_nodes += count( $view_name_nodes );
+	$running_nodes += count( $running_name_nodes );
+
+	$total_nodes = $queued_nodes + $running_nodes;
+	$total_cpus = $queued_cpus + $running_cpus;
+	$total_jobs = $queued_jobs + $running_jobs;
 
 	//$tpl->assignGlobal("cpus_nr", $overview_cpus );
@@ -563,8 +600,26 @@
 	$tpl->assignGlobal("avail_nodes", $avail_nodes );
 	$tpl->assignGlobal("avail_cpus", $avail_cpus );
+
+	$tpl->assignGlobal("queued_nodes", $queued_nodes );
+	$tpl->assignGlobal("queued_jobs", $queued_jobs );
+	$tpl->assignGlobal("queued_cpus", $queued_cpus );
+
+	$tpl->assignGlobal("total_nodes", $total_nodes );
+	$tpl->assignGlobal("total_jobs", $total_jobs );
+	$tpl->assignGlobal("total_cpus", $total_cpus );
+
+	$tpl->assignGlobal("running_nodes", $running_nodes );
+	$tpl->assignGlobal("running_jobs", $running_jobs );
+	$tpl->assignGlobal("running_cpus", $running_cpus );
 
 	$tpl->assignGlobal("used_nodes", $used_nodes );
 	$tpl->assignGlobal("used_jobs", $used_jobs );
 	$tpl->assignGlobal("used_cpus", $used_cpus );
+
+	$free_nodes = $avail_nodes - $used_nodes;
+	$free_cpus = $avail_cpus - $used_cpus;
+
+	$tpl->assignGlobal("free_nodes", $free_nodes );
+	$tpl->assignGlobal("free_cpus", $free_cpus );
 
 	$tpl->assignGlobal("view_nodes", $view_nodes );
Index: /trunk/web/addons/job_monarch/styles.css
===================================================================
--- /trunk/web/addons/job_monarch/styles.css	(revision 207)
+++ /trunk/web/addons/job_monarch/styles.css	(revision 208)
@@ -181,5 +181,45 @@
 }
 
-tr.toga th
+table.overview
+{
+   border-collapse: collapse;
+}
+
+*#kol1
+{
+   border-right-style: solid;
+   border-right-color: rgb(204,204,204);
+}
+
+*#selected
+{
+   background: rgb(153,204,255);
+}
+
+tr.overview_header
+{
+   font: bold 10pt/12pt helvetica, sans-serif;
+   text-align: right;
+   border-collapse: collapse;
+   border-bottom-style: solid; 
+   border-bottom-color: rgb(0,0,0);
+}
+
+tr.overview_line
+{
+   font: 10pt/12pt helvetica, sans-serif;
+   text-align: right;
+   border-collapse: collapse;
+   border-bottom-style: dotted;
+   border-bottom-color: rgb(204,204,204);
+}
+
+tr.overview td
+{
+   font: 10pt/12pt helvetica, sans-serif;
+   text-align: right;
+}
+
+tr.monarch th
 {
    font: bold 12pt/14pt helvetica, sans-serif;
@@ -191,4 +231,25 @@
 }
 
+.red
+{
+	color: rgb(204,51,0);
+}
+.blue
+{
+	color: rgb(0,0,153);
+}
+.brown
+{
+	color: rgb(102,102,0);
+}
+.gray
+{
+	color: rgb(204,204,204);
+}
+.green
+{
+	color: rgb(0,204,102);
+}
+
 td em
 {
Index: /trunk/web/addons/job_monarch/templates/overview.tpl
===================================================================
--- /trunk/web/addons/job_monarch/templates/overview.tpl	(revision 207)
+++ /trunk/web/addons/job_monarch/templates/overview.tpl	(revision 208)
@@ -2,21 +2,118 @@
 
 <CENTER>
-<TABLE>
+<TABLE cellpadding="15">
 <TR>
-  <TD ALIGN="CENTER">
+
+  <TD>
+
+<TABLE ALIGN=CENTER class="overview" cellpadding="5">
+
+<COL id="kol1">
+<COL id="kol2">
+<COL id="kol3">
+<COL id="kol4">
+
+<TR class="overview_header">
+<TD>Batch</TD>
+<TD>Jobs</TD>
+<TD>Nodes</TD>
+<TD>Cpus</TD>
+</TR>
+
+<TR class="overview_line">
+<TD class="blue">
+Capacity
+</TD>
+<TD class="blue">
+</TD>
+<TD class="blue">
+{avail_nodes}
+</TD>
+<TD class="blue">
+{avail_cpus}
+</TD>
+</TR>
+
+
+<TR class="overview">
+<TD class="red">
+Running
+</TD>
+<TD class="red">
+{running_jobs}
+</TD>
+<TD class="red">
+{running_nodes}
+</TD>
+<TD class="red">
+{running_cpus}
+</TD>
+</TR>
+
+<TR class="overview_line">
+<TD class="gray">
+Queued
+</TD>
+<TD class="gray">
+{queued_jobs}
+</TD>
+<TD class="gray">
+{queued_nodes}
+</TD>
+<TD class="gray">
+{queued_cpus}
+</TD>
+</TR>
+
+<TR class="overview">
+<TD class="brown">
+Total
+</TD>
+<TD class="brown">
+{total_jobs}
+</TD>
+<TD class="brown">
+{total_nodes}
+</TD>
+<TD class="brown">
+{total_cpus}
+</TD>
+</TR>
+
+<TR class="overview">
+<TD class="green">
+Free
+</TD>
+<TD class="green">
+</TD>
+<TD class="green">
+{free_nodes}
+</TD>
+<TD class="green">
+{free_cpus}
+</TD>
+</TR>
+
+<TR class="overview" id="selected">
+<TD>
+View
+</TD>
+<TD>
+{view_jobs}
+</TD>
+<TD>
+{view_nodes}
+</TD>
+<TD>
+{view_cpus}
+</TD>
+</TR>
+
+</TABLE>
+
+  <TD ALIGN="CENTER"><CENTER>
     <IMG SRC="{clusterimage}"><BR>
-
-<TABLE ALIGN=CENTER>
-<TR>
-<TD><FONT SIZE="-1" class=footer>Last updated:</FONT></TD><TD><FONT SIZE="-1" class=footer>{report_time}</TD>
-</TR><TR>
-<TD><FONT SIZE="-1" class=footer>Available:</FONT></TD><TD><FONT SIZE="-1" class=footer>{avail_nodes} nodes / {avail_cpus} cpu's</FONT></TD>
-</TR><TR>
-<TD><FONT SIZE="-1" class=footer>Usage:</FONT></TD><TD><FONT SIZE="-1" class=footer>{used_jobs} jobs - {used_nodes} nodes / {used_cpus} cpu's</FONT></TD>
-</TR><TR>
-<TD><FONT SIZE="-1" class=footer>View:</FONT></TD><TD><FONT SIZE="-1" class=footer>{view_jobs} jobs - {view_nodes} nodes / {view_cpus} cpu's</FONT></TD>
-</TR>
-</TABLE>
-</FONT>
+<FONT class="footer">Last updated: {report_time}</FONT></CENTER>
+  </TD>
 
   </TD>
@@ -41,5 +138,5 @@
 
 <TABLE WIDTH="90%" CELLPADDING="8" CELLSPACING="3" BORDER=0>
-<TR CLASS="toga">
+<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>
