Index: /branches/0.4/web/addons/job_monarch/graph.php
===================================================================
--- /branches/0.4/web/addons/job_monarch/graph.php	(revision 758)
+++ /branches/0.4/web/addons/job_monarch/graph.php	(revision 759)
@@ -441,7 +441,14 @@
 }
 
-if ($graph == "job_report")
-{
-    $title = "Last: $j_title";
+if($graph == "job_report")
+{
+    if($range == 'job' )
+    {
+        $title = "Last: $j_title";
+    }
+    else
+    {
+        $title = "Last: $range";
+    }
 }
 else
Index: /branches/0.4/web/addons/job_monarch/host_view.php
===================================================================
--- /branches/0.4/web/addons/job_monarch/host_view.php	(revision 758)
+++ /branches/0.4/web/addons/job_monarch/host_view.php	(revision 759)
@@ -31,10 +31,13 @@
 $context = 'cluster';
 
-chdir( $GANGLIA_PATH );
-
-include "./ganglia.php";
-include "./get_ganglia.php";
-
-chdir( $my_dir );
+if( $view == "overview-host" )
+{
+    chdir( $GANGLIA_PATH );
+
+    include "./ganglia.php";
+    include "./get_ganglia.php";
+
+    chdir( $my_dir );
+}
 
 function datetimeToEpoch( $datetime ) 
@@ -68,8 +71,11 @@
 {
 
-    global $tpl, $metrics, $clustername, $hostname;
+    global $dwoo, $metrics, $clustername, $hostname;
     global $cluster_ul, $hosts_up, $get_metric_string;
     global $cluster, $period_start, $period_stop;
     global $job_start, $job_stop, $view, $conf, $range;
+
+    $tpl = new Dwoo_Template_File("templates/host_view.tpl");
+    $tpl_data = new Dwoo_Data();
 
     $rrdirs = array();
@@ -124,9 +130,9 @@
     $hosts_up = $hosts_up[$hostname];
 
-    $tpl->assign("cluster", $clustername);
-    $tpl->assign("host", $hostname);
-    $tpl->assign("node_image", "../../".node_image($metrics));
-    $tpl->assign("sort",$sort);
-    $tpl->assign("range",$range);
+    $tpl_data->assign("cluster", $clustername);
+    $tpl_data->assign("host", $hostname);
+    $tpl_data->assign("node_image", "../../".node_image($metrics));
+    $tpl_data->assign("sort",$sort);
+    $tpl_data->assign("range",$range);
 
     if( !is_numeric( $period_start ) ) 
@@ -140,10 +146,10 @@
 
     if($hosts_up)
-          $tpl->assign("node_msg", "This host is up and running."); 
+          $tpl_data->assign("node_msg", "This host is up and running."); 
     else
-          $tpl->assign("node_msg", "This host is down."); 
+          $tpl_data->assign("node_msg", "This host is down."); 
 
     $cluster_url=rawurlencode($clustername);
-    $tpl->assign("cluster_url", $cluster_url);
+    $tpl_data->assign("cluster_url", $cluster_url);
 
     $graphargs = "h=$hostname&r=$range&job_start=$job_start&job_stop=$job_stop";
@@ -159,10 +165,10 @@
     }
 
-    $tpl->assign("graphargs", "$graphargs");
+    $tpl_data->assign("graphargs", "$graphargs");
 
     # For the node view link.
-    $tpl->assign("node_view","./?p=2&c=$cluster_url&h=$hostname");
-
-    $tpl->assign("ip", $hosts_up[IP]);
+    $tpl_data->assign("node_view","./?p=2&c=$cluster_url&h=$hostname");
+
+    $tpl_data->assign("ip", $hosts_up[IP]);
 
     #print_r( $mymetrics );
@@ -221,17 +227,20 @@
     {
         ksort($s_metrics);
+        $string_metric_info_loop = array();
         foreach ($s_metrics as $name => $v )
         {
-            $tpl->newBlock("string_metric_info");
-            $tpl->assign("name", $name);
+            $metric_info = array();
+            $metric_info["name"] = $name;
             if( $v[TYPE]=="timestamp" or $always_timestamp[$name])
             {
-                $tpl->assign("value", date("r", $v[VAL]));
+                $metric_info["value"] = date("r", $v[VAL]);
             }
             else
             {
-                $tpl->assign("value", "$v[VAL] $v[UNITS]");
-            }
-        }
+                $metric_info["value"] = "$v[VAL] $v[UNITS]";
+            }
+            $string_metric_info_loop[] = $metric_info;
+        }
+        $tpl_data->assign("string_metric_info", $string_metric_info_loop );
     }
 
@@ -240,10 +249,13 @@
     {
         ksort($c_metrics);
+        $const_metric_info_loop = array();
         foreach ($c_metrics as $name => $v )
         {
-            $tpl->newBlock("const_metric_info");
-            $tpl->assign("name", $name);
-            $tpl->assign("value", "$v[VAL] $v[UNITS]");
-        }
+            $const_info = array();
+            $const_infp["name"] = $name;
+            $const_info["value"] = "$v[VAL] $v[UNITS]";
+            $const_metric_info_loop[] = $const_info;
+        }
+        $tpl_data->assign("const_metric_info", $const_metric_info_loop );
     }
 
@@ -252,17 +264,17 @@
     {
         ksort($g_metrics);
+        $vol_metric_info_loop = array();
 
         $i = 0;
         foreach ( $g_metrics as $name => $v )
         {
-            $tpl->newBlock("vol_metric_info");
-            $tpl->assign("graphargs", $v[graph]);
-            $tpl->assign("alt", "$hostname $name");
-            if($i++ %2)
-            {
-                $tpl->assign("br", "<BR>");
-            }
-         }
-    }
+            $metric_info = array();
+            $metric_info["graphargs"] = $v[graph];
+            $metric_info["alt"] = "$hostname $name";
+            $vol_metric_info_loop[] = $metric_info;
+        } 
+        $tpl_data->assign("vol_metric_info", $vol_metric_info_loop );
+    }
+    $dwoo->output($tpl, $tpl_data);
 }
 
Index: /branches/0.4/web/addons/job_monarch/libtoga.php
===================================================================
--- /branches/0.4/web/addons/job_monarch/libtoga.php	(revision 758)
+++ /branches/0.4/web/addons/job_monarch/libtoga.php	(revision 759)
@@ -751,7 +751,4 @@
             $metrics[$hostname]['last_reported']['VAL'] = $attrs['REPORTED'];
             $metrics[$hostname]['last_reported']['TYPE'] = "string";
-            $metrics[$hostname]['last_reported_timestamp']['NAME'] = "REPORTED TIMESTAMP";
-            $metrics[$hostname]['last_reported_timestamp']['VAL'] = $attrs['REPORTED'];
-            $metrics[$hostname]['last_reported_timestamp']['TYPE'] = "uint32";
             $metrics[$hostname]['ip_address']['NAME'] = "IP";
             $metrics[$hostname]['ip_address']['VAL'] = $attrs['IP'];
Index: /branches/0.4/web/addons/job_monarch/templates/host_view.tpl
===================================================================
--- /branches/0.4/web/addons/job_monarch/templates/host_view.tpl	(revision 758)
+++ /branches/0.4/web/addons/job_monarch/templates/host_view.tpl	(revision 759)
@@ -2,5 +2,5 @@
 <TR>
   <TD COLSPAN="2" BGCOLOR="#EEEEEE" ALIGN="CENTER">
-  <FONT SIZE="+2">{host} Overview</FONT>
+  <FONT SIZE="+2">{$host} Overview</FONT>
   </TD>
 </TR>
@@ -9,6 +9,6 @@
  <TD ALIGN="LEFT" VALIGN="TOP">
 
-<IMG SRC="{node_image}" HEIGHT="60" WIDTH="30" ALT="{host}" BORDER="0">
-{node_msg}
+<IMG SRC="{$node_image}" HEIGHT="60" WIDTH="30" ALT="{$host}" BORDER="0">
+{$node_msg}
 <P>
 
@@ -18,9 +18,9 @@
 </TR>
 
-<!-- START BLOCK : string_metric_info -->
+{loop $string_metric_info}
 <TR>
- <TD CLASS=footer WIDTH=30%>{name}</TD><TD>{value}</TD>
+ <TD CLASS=footer WIDTH=30%>{$name}</TD><TD>{$value}</TD>
 </TR>
-<!-- END BLOCK : string_metric_info -->
+{/loop}
 
 <TR><TD>&nbsp;</TD></TR>
@@ -30,9 +30,9 @@
 </TR>
 
-<!-- START BLOCK : const_metric_info -->
+{loop $const_metric_info}
 <TR>
- <TD CLASS=footer WIDTH=30%>{name}</TD><TD>{value}</TD>
+ <TD CLASS=footer WIDTH=30%>{$name}</TD><TD>{$value}</TD>
 </TR>
-<!-- END BLOCK : const_metric_info -->
+{/loop}
 
 <TR><TD>&nbsp;</TD></TR>
@@ -40,11 +40,11 @@
 <TR>
  <TD COLSPAN=2 CLASS=title>
- <a href="../../host_gmetrics.php?c={cluster_url}&h={host}">Gmetrics</a>
+ <a href="../../host_gmetrics.php?c={$cluster_url}&h={$host}">Gmetrics</a>
  </TD>
 </TR>
 </TABLE>
 
-<a href="./?c={cluster}&h={host}">
-<IMG SRC="./image.php?c={cluster}&h={host}&j_view=hostimage" BORDER=0>
+<a href="./?c={$cluster}&h={$host}">
+<IMG SRC="./image.php?c={$cluster}&h={$host}&j_view=hostimage" BORDER=0>
 </a>
 <hr>
@@ -53,15 +53,11 @@
 
 <TD ALIGN="CENTER" VALIGN="TOP" WIDTH="395">
-<IMG ALT="{cluster_url} LOAD"
-   SRC="./graph.php?g=load_report&z=overview-medium&c={cluster_url}&{graphargs}">
-<IMG ALT="{cluster_url} MEM"
-   SRC="./graph.php?g=mem_report&z=overview-medium&c={cluster_url}&{graphargs}">
-<IMG ALT="{cluster_url} CPU"
-   SRC="./graph.php?g=cpu_report&z=overview-medium&c={cluster_url}&{graphargs}">
-<IMG ALT="{cluster_url} NETWORK"
-   SRC="./graph.php?g=network_report&z=overview-medium&c={cluster_url}&{graphargs}">
-<IMG ALT="{cluster_url} PACKETS"
-   SRC="./graph.php?g=packet_report&z=overview-medium&c={cluster_url}&{graphargs}">
-
+<div id="monarchimage">
+<IMG ALT="{$cluster_url} LOAD" SRC="./graph.php?g=load_report&z=overview-medium&c={$cluster_url}&{$graphargs}" WIDTH=381 HEIGHT=148>
+<IMG ALT="{$cluster_url} MEM" SRC="./graph.php?g=mem_report&z=overview-medium&c={$cluster_url}&{$graphargs}" WIDTH=381 HEIGHT=148>
+<IMG ALT="{$cluster_url} CPU" SRC="./graph.php?g=cpu_report&z=overview-medium&c={$cluster_url}&{$graphargs}" WIDTH=381 HEIGHT=148>
+<IMG ALT="{$cluster_url} NETWORK" SRC="./graph.php?g=network_report&z=overview-medium&c={$cluster_url}&{$graphargs}" WIDTH=381 HEIGHT=148>
+<IMG ALT="{$cluster_url} PACKETS" SRC="./graph.php?g=packet_report&z=overview-medium&c={$cluster_url}&{$graphargs}" WIDTH=381 HEIGHT=148>
+</div>
 </TD>
 </TR>
@@ -72,7 +68,7 @@
 <TR>
   <TD CLASS=title>
-  {host} <strong>graphs</strong>
-  last <strong>{range}</strong>
-  sorted <strong>{sort}</strong>
+  {$host} <strong>graphs</strong>
+  last <strong>{$range}</strong>
+  sorted <strong>{$sort}</strong>
   </TD>
 </TR>
@@ -84,7 +80,9 @@
  <TD>
 
-<!-- START BLOCK : vol_metric_info -->
-<IMG ALT="{alt}" SRC="./graph.php?{graphargs}">{br}
-<!-- END BLOCK : vol_metric_info -->
+<div id="monarchimage">
+{loop $vol_metric_info}
+<IMG ALT="{$alt}" SRC="./graph.php?{$graphargs}" WIDTH=381 HEIGHT=148>
+{/loop}
+</div>
 
  </TD>
