diff -uprN ganglia-3.0.1.orig/web/functions.php ganglia-3.0.1/web/functions.php
--- ganglia-3.0.1.orig/web/functions.php 2005-02-02 10:24:14.000000000 -0800
+++ ganglia-3.0.1/web/functions.php 2005-04-26 12:49:10.422710592 -0700
@@ -234,7 +251,7 @@ function find_limits($nodes, $metricname
#
# Generates the colored Node cell HTML. Used in Physical
# view and others. Intended to be used to build a table, output
-# begins with "
| " and ends the same.
+# begins with " | " and ends with | .
function nodebox($hostname, $verbose, $title="", $extrarow="")
{
global $cluster, $clustername, $metrics, $hosts_up, $GHOME;
@@ -265,7 +282,7 @@ function nodebox($hostname, $verbose, $t
$host_url=rawurlencode($hostname);
$cluster_url=rawurlencode($clustername);
- $row1 = "
| \n".
+ $row1 = " | \n".
"".
"".
"$title \n";
@@ -316,7 +333,7 @@ function nodebox($hostname, $verbose, $t
if ($verbose>2)
$cell .= $row3;
- $cell .= " | \n";
+ $cell .= "\n";
return $cell;
}
diff -uprN ganglia-3.0.1.orig/web/physical_view.php ganglia-3.0.1/web/physical_view.php
--- ganglia-3.0.1.orig/web/physical_view.php 2005-02-02 10:24:14.000000000 -0800
+++ ganglia-3.0.1/web/physical_view.php 2005-04-26 12:49:10.423710433 -0700
@@ -52,6 +52,7 @@ function showrack($ID)
{
global $verbose, $racks, $metrics, $cluster, $hosts_up, $hosts_down;
global $cluster_url, $tpl, $clusters;
+ global $hostcols;
if ($ID>=0) {
$tpl->assign("RackID","| Rack $ID | ");
@@ -60,10 +61,15 @@ function showrack($ID)
# A string of node HTML for the template.
$nodes="";
+ $i=1;
foreach ($racks[$ID] as $name)
{
$nodes .= nodebox($name, $verbose);
+ if (! ($i++ % $hostcols)) {
+ $nodes .= "\n";
+ }
}
+ $nodes .= " ";
return $nodes;
}
|