freebsd-ports/sysutils/ganglia-webfrontend/files/patch-cluster__view.php
Brooks Davis ab348058e8 Populate the node list dropdown on the cluster view page when the user
has turned off show hosts.  It's nice not to have to load 190+ images
just so I can select a host from the dropdown.

Do some general cleanup of the port infrastructure.
 - Install into a staging directory in the build target and install
   that.
 - Add a target to generate the plist from the staging directory
   rather than doing it by hand.
 - Use a pkg-install script to copy conf.php.sample to conf.php as
   needed instead of some bits in the make file and different ones
   in the plist.
 - Use SUB_FILES to handle pkg-message rather than hand-rolled sed.
2005-04-27 20:36:33 +00:00

22 lines
1,014 B
PHP

$FreeBSD$
--- cluster_view.php.orig
+++ cluster_view.php
@@ -6,11 +6,11 @@
$tpl->assign("images","./templates/$template_name/images");
-$cpu_num = !$showhosts ? $metrics["cpu_num"][SUM] : cluster_sum("cpu_num", $metrics);
-$load_one_sum = !$showhosts ? $metrics["load_one"][SUM] : cluster_sum("load_one", $metrics);
-$load_five_sum = !$showhosts ? $metrics["load_five"][SUM] : cluster_sum("load_five", $metrics);
-$load_fifteen_sum = !$showhosts ? $metrics["load_fifteen"][SUM] : cluster_sum("load_fifteen", $metrics);
-$units = !$showhosts ? $metrics[$metricname][UNITS] : $metrics[key($metrics)][$metricname][UNITS];
+$cpu_num = cluster_sum("cpu_num", $metrics);
+$load_one_sum = cluster_sum("load_one", $metrics);
+$load_five_sum = cluster_sum("load_five", $metrics);
+$load_fifteen_sum = cluster_sum("load_fifteen", $metrics);
+$units = $metrics[key($metrics)][$metricname][UNITS];
$tpl->assign("num_nodes", intval($cluster[HOSTS_UP]));
$tpl->assign("num_dead_nodes", intval($cluster[HOSTS_DOWN]));