Index: trunk/web/addons/toga/footer.php
===================================================================
--- trunk/web/addons/toga/footer.php	(revision 113)
+++ trunk/web/addons/toga/footer.php	(revision 113)
@@ -0,0 +1,21 @@
+<?php
+$tpl = new TemplatePower( "templates/footer.tpl" );
+$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");
+
+if ($version["gmetad"]) {
+   $tpl->assign("webbackend-component", "gmetad");
+   $tpl->assign("webbackend-version",$version["gmetad"]);
+}
+elseif ($version["gmond"]) {
+   $tpl->assign("webbackend-component", "gmond");
+   $tpl->assign("webbackend-version", $version["gmond"]);
+}
+
+$tpl->assign("parsetime", sprintf("%.4f", $parsetime) . "s");
+
+$tpl->printToScreen();
+?>
Index: trunk/web/addons/toga/header.php
===================================================================
--- trunk/web/addons/toga/header.php	(revision 113)
+++ trunk/web/addons/toga/header.php	(revision 113)
@@ -0,0 +1,151 @@
+<?php
+# Check if this context is private.
+include_once "$GANGLIA_PATH/auth.php";
+checkcontrol();
+checkprivate();
+
+if ( $context == "control" && $controlroom < 0 )
+      $header = "header-nobanner";
+else
+      $header = "header";
+
+$tpl = new TemplatePower( "templates/header.tpl" );
+$tpl->prepare();
+
+# Maintain our path through the grid tree.
+$me = $self . "@" . $grid[$self][AUTHORITY];
+if ($initgrid)
+   {
+      $gridstack = array();
+      $gridstack[] = $me;
+   }
+else if ($gridwalk=="fwd")
+   {
+      # push our info on gridstack, format is "name@url>name2@url".
+      if (end($gridstack) != $me)
+         {
+            $gridstack[] = $me;
+         }
+   }
+else if ($gridwalk=="back")
+   {
+      # pop a single grid off stack.
+      if (end($gridstack) != $me)
+         {
+            array_pop($gridstack);
+         }
+   }
+$gridstack_str = join(">", $gridstack);
+$gridstack_url = rawurlencode($gridstack_str);
+
+if ($initgrid or $gridwalk)
+   {
+      # Use cookie so we dont have to pass gridstack around within this site.
+      # Cookie values are automatically urlencoded. Expires in a day.
+      setcookie("gs", $gridstack_str, time() + 86400);
+   }
+
+# Invariant: back pointer is second-to-last element of gridstack. Grid stack never
+# has duplicate entries.
+list($parentgrid, $parentlink) = explode("@", $gridstack[count($gridstack)-2]);
+
+# Setup a redirect to a remote server if you choose a grid from pulldown menu. Tell
+# destination server that we're walking foward in the grid tree.
+if (strstr($clustername, "http://"))
+   {
+      $tpl->assign("refresh", "0");
+      $tpl->assign("redirect", ";URL=$clustername?gw=fwd&gs=$gridstack_url");
+      echo "<h2>Redirecting, please wait...</h2>";
+      $tpl->printToScreen();
+      exit;
+   }
+$tpl->assign("refresh", $default_refresh);
+
+$tpl->assign( "date", date("r"));
+$tpl->assign( "page_title", $title );
+
+# The page to go to when "Get Fresh Data" is pressed.
+if (isset($page))
+      $tpl->assign("page",$page);
+else
+      $tpl->assign("page","./");
+
+# Templated Logo image
+$tpl->assign("images","./templates/$template_name/images");
+
+#
+# Used when making graphs via graph.php. Included in most URLs
+#
+$sort_url=rawurlencode($sort);
+$get_metric_string = "m=$metric&r=$range&s=$sort_url&hc=$hostcols";
+if ($jobrange and $jobstart)
+        $get_metric_string .= "&jr=$jobrange&js=$jobstart";
+
+# Set the Alternate view link.
+$cluster_url=rawurlencode($clustername);
+$node_url=rawurlencode($hostname);
+
+# Make some information available to templates.
+$tpl->assign("cluster_url", $cluster_url);
+
+# Build the node_menu
+$node_menu = "";
+
+if ($parentgrid)
+   {
+      $node_menu .= "<B><A HREF=\"$parentlink?gw=back&gs=$gridstack_url\">".
+         "$parentgrid $meta_designator</A></B> ";
+      $node_menu .= "<B>&gt;</B>\n";
+   }
+
+# Show grid.
+$mygrid =  ($self == "unspecified") ? "" : $self;
+$node_menu .= "<B><A HREF=\"./?$get_metric_string\">$mygrid $meta_designator</A> ";
+$node_menu .= "<B>&gt;</B>\n";
+
+if ($physical)
+   $node_menu .= hiddenvar("p", $physical);
+
+if ( $clustername )
+   {
+      $url = rawurlencode($clustername);
+      $node_menu .= "<B><A HREF=\"./?c=$url&$get_metric_string\">$clustername</A></B> ";
+      //$node_menu .= "<B>&gt;</B>\n";
+      $node_menu .= hiddenvar("c", $clustername);
+   }
+else
+   {
+      # No cluster has been specified, so drop in a list
+      $node_menu .= "<SELECT NAME=\"c\" OnChange=\"ganglia_form.submit();\">\n";
+      $node_menu .= "<OPTION VALUE=\"\">--Choose a Source\n";
+      ksort($grid);
+      foreach( $grid as $k => $v )
+         {
+            if ($k==$self) continue;
+            if ($v[GRID])
+               {
+                  $url = $v[AUTHORITY];
+                  $node_menu .="<OPTION VALUE=\"$url\">$k $meta_designator\n";
+               }
+            else
+               {
+                  $url = rawurlencode($k);
+                  $node_menu .="<OPTION VALUE=\"$url\">$k\n";
+               }
+         }
+      $node_menu .= "</SELECT>\n";
+   }
+
+$tpl->assign("node_menu", $node_menu);
+
+# Make sure that no data is cached..
+header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    # Date in the past
+header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); # always modified
+header ("Cache-Control: no-cache, must-revalidate");  # HTTP/1.1
+header ("Pragma: no-cache");                          # HTTP/1.0
+
+$tpl->printToScreen();
+
+
+
+?>
Index: trunk/web/addons/toga/index.php
===================================================================
--- trunk/web/addons/toga/index.php	(revision 113)
+++ trunk/web/addons/toga/index.php	(revision 113)
@@ -0,0 +1,20 @@
+<?php
+
+$my_dir = getcwd();
+
+include_once "./libtoga.php";
+
+global $GANGLIA_PATH, $context;
+chdir( $GANGLIA_PATH );
+$context = 'cluster';
+
+$title = "Torque Report";
+include_once "./get_context.php";
+include_once "./class.TemplatePower.inc.php";
+chdir( $my_dir );
+include_once "header.php";
+
+include_once "overview.php";
+
+include_once "footer.php";
+?>
Index: trunk/web/addons/toga/overview.php
===================================================================
--- trunk/web/addons/toga/overview.php	(revision 113)
+++ trunk/web/addons/toga/overview.php	(revision 113)
@@ -0,0 +1,2 @@
+<?php
+?>
Index: trunk/web/addons/toga/styles.css
===================================================================
--- trunk/web/addons/toga/styles.css	(revision 113)
+++ trunk/web/addons/toga/styles.css	(revision 113)
@@ -0,0 +1,186 @@
+/* The Ganglia Web-frontend Cascading Style Sheet. */
+
+A:link
+{
+   color: rgb(32,41,204);
+   text-decoration: none;
+}
+
+A:visited
+{
+   color: rgb(51,51,204);
+   text-decoration: none;
+}
+
+A:active
+{
+   color: rgb(204,205,226);
+   text-decoration: none;
+}
+
+h1 
+{
+   font: bold 18pt/22pt helvetica, sans-serif;
+   color: rgb(12,17,142);
+   margin-bottom: 2mm;
+}
+
+h2
+{
+   font: bold 14pt/16pt helvetica;
+   color: rgb(12,17,142); 
+   margin-left: 0.1em;
+   margin-right: 0.1em;
+}
+
+h3
+{
+   font: bold 12pt/15pt helvetica, sans-serif;
+   text-align: left;
+   margin-left: 3mm;
+   color: rgb(247,142,14);
+}
+
+h4
+{
+   font: bold 12pt/14pt helvetica;
+   color: rgb(12,17,142); 
+   margin-left: 0.1em;
+   margin-right: 0.1em;
+}
+
+small
+{
+   font: 10pt/12pt arial, helvetica, sans-serif;
+}
+
+td.title
+{
+   font-size: larger;
+   font-weight: normal;
+   background: rgb(238,238,238);
+   text-align: center;
+}
+
+td.metric
+{
+   background: rgb(217,218,224);
+   padding: 2mm;
+}
+
+td.cluster
+{
+   background: rgb(238,238,238);
+   /* padding: 1mm; */
+}
+
+td.grid
+{
+   vertical-align: top;
+   background: rgb(204,204,255);
+}
+
+td.self
+{
+   vertical-align: top;
+   text-align: center;
+   background: rgb(255,153,153);
+}
+
+td.even
+{
+   background: rgb(201,205,234);
+}
+
+td.odd
+{
+   background: rgb(217,218,224);
+}
+
+td.small
+{
+   font: 10pt/12pt times, serif;
+}
+
+td.L1
+{
+   background: rgb(184,249,119);
+}
+
+td.L2
+{
+   background: rgb(213,249,119);
+}
+
+td.L3
+{
+   background: rgb(228,249,119);
+}
+
+td.L4
+{
+   background: rgb(245,249,119);
+}
+
+td.L5
+{
+   background: rgb(249,239,119);
+}
+
+td.L6
+{
+   background: rgb(249,219,119);
+}
+
+td.L7
+{
+   background: rgb(249,202,119);
+}
+
+td.L8
+{
+   background: rgb(249,182,119);
+}
+
+td.L9
+{
+   background: rgb(249,152,119);
+}
+
+td.L10
+{
+   background: rgb(249,124,119);
+}
+
+td.down
+{
+   background: rgb(255,153,153);
+}
+
+th 
+{
+   font: bold 12pt/14pt helvetica, sans-serif;
+   color: rgb(238,238,238);
+   background: rgb(80,80,80);
+   border: thin solid rgb(47,47,47);
+}
+
+td em
+{
+   font: 8pt/10pt helvetica, sans-serif;
+   color: rgb(31,31,112);
+   font-style: normal;
+}
+
+td strong
+{
+   color: rgb(31,31,112);
+   font-style: normal;
+}
+
+.footer
+{
+      font: 10pt/12pt helvetica, sans-serif;
+      color: rgb(100,100,100);
+}
+
Index: trunk/web/addons/toga/templates/footer.tpl
===================================================================
--- trunk/web/addons/toga/templates/footer.tpl	(revision 113)
+++ trunk/web/addons/toga/templates/footer.tpl	(revision 113)
@@ -0,0 +1,28 @@
+<HR>
+<CENTER>
+<FONT SIZE="-1" class=footer>
+Toga Web Frontend version {togaweb-version}
+<A HREF="http://toga.sourceforge.net/">Check for Updates.</A><BR>
+
+Toga Archive Daemon <i>(tarchd)</i> version {togaarch-version}
+<A HREF="http://toga.sourceforge.net/">Check for Updates.</A><BR>
+
+Toga Plugin Daemon <i>(tplugd)</i> version {togaplug-version}
+<A HREF="http://toga.sourceforge.net/">Check for Updates.</A><BR>
+
+Gmetad Web Frontend version {webfrontend-version}
+<A HREF="http://ganglia.sourceforge.net/downloads.php?component=ganglia-webfrontend&amp;
+version={webfrontend-version}">Check for Updates.</A><BR>
+
+Gmetad Web Backend <i>({webbackend-component})</i> version {webbackend-version}
+<A HREF="http://ganglia.sourceforge.net/downloads.php?component={webbackend-component}&amp;
+version={webbackend-version}">Check for Updates.</A><BR>
+
+Downloading and parsing ganglia's XML tree took {parsetime}.<BR>
+Images created with <A HREF="http://www.rrdtool.com/">RRDTool</A>.<BR>
+</FONT>
+</CENTER>
+
+</FORM>
+</BODY>
+</HTML>
Index: trunk/web/addons/toga/templates/header.tpl
===================================================================
--- trunk/web/addons/toga/templates/header.tpl	(revision 113)
+++ trunk/web/addons/toga/templates/header.tpl	(revision 113)
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Ganglia:: {page_title}</TITLE>
+<META http-equiv="Content-type" content="text/html; charset=utf-8">
+<META http-equiv="refresh" content="{refresh}{redirect}" >
+<LINK rel="stylesheet" href="./styles.css" type="text/css">
+</HEAD>
+<BODY BGCOLOR="#FFFFFF">
+
+<FORM ACTION="{page}" METHOD="GET" NAME="ganglia_form">
+<TABLE WIDTH="100%">
+<TR>
+  <TD ROWSPAN="2" WIDTH="150">
+  <A HREF="http://monitor2.irc.sara.nl/ganglia/">
+  <IMG SRC="./logo_ned.gif" 
+      ALT="Ganglia" BORDER="0"></A>
+  </TD>
+  <TD VALIGN="TOP">
+
+  <TABLE WIDTH="100%" CELLPADDING="8" CELLSPACING="0" BORDER=0>
+  <TR BGCOLOR="#DDDDDD">
+     <TD BGCOLOR="#DDDDDD">
+     <FONT SIZE="+1">
+     <B>{page_title} for {date}</B>
+     </FONT>
+     </TD>
+     <TD BGCOLOR="#DDDDDD" ALIGN="RIGHT">
+     <INPUT TYPE="SUBMIT" VALUE="Get Fresh Data">
+     </TD>
+  </TR>
+  <TR>
+     <TD COLSPAN="1">
+     {metric_menu} &nbsp;&nbsp;
+     {range_menu}&nbsp;&nbsp;
+     {sort_menu}
+     </TD>
+     <TD>
+      <B>{alt_view}</B>
+     </TD>
+  </TR>
+  </TABLE>
+
+  </TD>
+</TR>
+</TABLE> 
+
+<FONT SIZE="+1">
+{node_menu}
+</FONT>
+<HR SIZE="1" NOSHADE>
Index: trunk/web/templates/toga/cluster_extra.tpl
===================================================================
--- trunk/web/templates/toga/cluster_extra.tpl	(revision 112)
+++ trunk/web/templates/toga/cluster_extra.tpl	(revision 113)
@@ -3,10 +3,10 @@
 <tr>
  <td valign=center>
-  <a href="./addons/toga/overview.php?c={cluster}"><b>Torque Job's</b></a>
+  <a href="./addons/toga/?c={cluster}"><b>Torque Job's</b></a>
  </td>
 </tr>
 <tr>
  <td>
-  <a href="./addons/toga/overview.php?c={cluster}">
+  <a href="./addons/toga/?c={cluster}">
   <IMG SRC="./addons/toga/image.php?c={cluster}&view=small-clusterimage" BORDER=0>
   </a>
