Index: graph.php
===================================================================
--- graph.php (revision 852)
+++ graph.php (working copy)
@@ -27,6 +27,8 @@
escapeshellcmd( rawurldecode( $_GET["vl"] )) : NULL;
$sourcetime = isset($_GET["st"]) ?
escapeshellcmd($_GET["st"]) : NULL;
+$summary = isset($_GET["su"]) ?
+ escapeshellcmd($_GET["su"]) : NULL;
# RFM - Define these variables to avoid "Undefined variable" errors being
# reported in ssl_error_log.
@@ -54,6 +56,14 @@
$fudge_1 = 14;
$fudge_2 = 28;
}
+else if ($size == "large")
+ {
+ $height = 600;
+ $width = 800;
+ $fudge_0 = 0;
+ $fudge_1 = 0;
+ $fudge_2 = 0;
+ }
else
{
$height = 100;
@@ -240,7 +276,7 @@
$subtitle = $metricname;
if ($context == "host")
{
- if ($size == "small")
+ if ($summary)
$prefix = $metricname;
else
$prefix = $hostname;
@@ -292,16 +328,16 @@
}
else
{
+ # Value for this graph define a background color.
+ if (!$load_color) $load_color = "ffffff";
+ $background = "--color BACK#'$load_color'";
+
if ($size == "small")
- {
- # Value for this graph define a background color.
- if (!$load_color) $load_color = "ffffff";
- $background = "--color BACK#'$load_color'";
-
$title = $hostname;
- }
else if ($style)
$title = "$hostname $style last $range";
+ else if ($summary)
+ $title = "$hostname";
else
$title = $metricname;
}
Index: templates/default/cluster_view.tpl
===================================================================
--- templates/default/cluster_view.tpl (revision 852)
+++ templates/default/cluster_view.tpl (working copy)
@@ -58,6 +58,7 @@
|
Columns {cols_menu}
+ Size {size_menu}
Index: cluster_view.php
===================================================================
--- cluster_view.php (revision 852)
+++ cluster_view.php (working copy)
@@ -71,8 +71,10 @@
$tpl->assign("sort", $sort);
$tpl->assign("range", $range);
# Host columns menu defined in header.php
-if ($showhosts)
+if ($showhosts) {
$tpl->assign("cols_menu", $cols_menu);
+ $tpl->assign("size_menu", $size_menu);
+}
$tpl->assign("checked$showhosts", "checked");
$sorted_hosts = array();
@@ -211,12 +213,13 @@
else
{
$load_color = load_color($host_load[$host]);
+ $size = isset($clustergraphsize) ? $clustergraphsize : 'small';
$graphargs = (isset($reports[$metricname]) and
$reports[$metricname]) ?
"g=$metricname&" : "m=$metricname&";
- $graphargs .= "z=small&c=$cluster_url&h=$host_url"
+ $graphargs .= "z=$size&c=$cluster_url&h=$host_url"
."&l=$load_color&v=$val[VAL]&x=$max&n=$min"
- ."&r=$range&st=$cluster[LOCALTIME]";
+ ."&r=$range&su=1&st=$cluster[LOCALTIME]";
}
}
Index: get_context.php
===================================================================
--- get_context.php (revision 852)
+++ get_context.php (working copy)
@@ -37,6 +37,9 @@
# The direction we are travelling in the grid tree
$gridwalk = isset($_GET["gw"]) ?
escapeshellcmd($_GET["gw"]) : NULL;
+# Size oft he host graphs in the cluster view
+$clustergraphsize = isset($_GET["z"]) ?
+ escapeshellcmd($_GET["z"]) : NULL;
# A stack of grid parents. Prefer a GET variable, default to cookie.
if (isset($_GET["gs"]) and $_GET["gs"])
$gridstack = explode(">", rawurldecode($_GET["gs"]));
Index: header.php
===================================================================
--- header.php (revision 852)
+++ header.php (working copy)
@@ -334,7 +334,19 @@
$cols_menu .= ">$cols\n";
}
$cols_menu .= "\n";
-
+
+ $size_menu = '