SOURCES: ping_timeout.patch (NEW), graph_search.patch (NEW), cacti-page_len...
grzegorz
grzegorz at pld-linux.org
Mon Mar 9 20:47:10 CET 2009
Author: grzegorz Date: Mon Mar 9 19:47:10 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
---- Files affected:
SOURCES:
ping_timeout.patch (NONE -> 1.1) (NEW), graph_search.patch (NONE -> 1.1) (NEW), cacti-page_length_graph_view.patch (NONE -> 1.1) (NEW), page_length_graph_view.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/ping_timeout.patch
diff -u /dev/null SOURCES/ping_timeout.patch:1.1
--- /dev/null Mon Mar 9 20:47:10 2009
+++ SOURCES/ping_timeout.patch Mon Mar 9 20:47:03 2009
@@ -0,0 +1,33 @@
+--- cacti-0.8.7d/lib/ping.php 2009-02-11 21:55:50.000000000 -0500
++++ cacti-patched/lib/ping.php 2009-02-17 20:32:21.000000000 -0500
+@@ -238,22 +238,23 @@
+ /* we have to use the real ping */
+ $pattern = bin2hex("cacti-monitoring-system"); // the actual test data
+
++ /* host timeout given in ms, recalculate to sec, but make it an integer */
+ if (substr_count(strtolower(PHP_OS), "sun")) {
+ $result = shell_exec("ping " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "hpux")) {
+- $result = shell_exec("ping -m " . $this->timeout . " -n 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -m " . ceil($this->timeout/1000) . " -n " . $this->retries . " " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "mac")) {
+- $result = shell_exec("ping -t " . $this->timeout . " -c 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -t " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "freebsd")) {
+- $result = shell_exec("ping -t " . $this->timeout . " -c 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -t " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "darwin")) {
+- $result = shell_exec("ping -t " . $this->timeout . " -c 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -t " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "bsd")) {
+- $result = shell_exec("ping -w " . $this->timeout . " -c 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -w " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
+ }else if (substr_count(strtolower(PHP_OS), "aix")) {
+- $result = shell_exec("ping -i " . $this->timeout . " -c 1 " . $this->host["hostname"]);
++ $result = shell_exec("ping -i " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
+ }else{
+- $result = shell_exec("ping -W " . $this->timeout . " -c 1 -p " . $pattern . " " . $this->host["hostname"]);
++ $result = shell_exec("ping -W " . ceil($this->timeout/1000) . " -c " . $this->retries . " -p " . $pattern . " " . $this->host["hostname"]);
+ }
+
+ $position = strpos($result, "min/avg/max");
================================================================
Index: SOURCES/graph_search.patch
diff -u /dev/null SOURCES/graph_search.patch:1.1
--- /dev/null Mon Mar 9 20:47:11 2009
+++ SOURCES/graph_search.patch Mon Mar 9 20:47:04 2009
@@ -0,0 +1,11 @@
+--- cacti-0.8.7d/lib/html_tree.php 2009-02-11 21:55:50.000000000 -0500
++++ cacti-patched/lib/html_tree.php 2009-03-02 20:00:38.000000000 -0500
+@@ -1216,7 +1216,7 @@
+
+ /* generate page list */
+ if ($total_rows > get_request_var_request("graphs")) {
+- $url_page_select = get_page_list(get_request_var_request("page"), MAX_DISPLAY_PAGES, get_request_var_request("graphs"), $total_rows, "graph_view.php?action=tree&tree_id=" . $tree_id . "&leaf_id=" . $leaf_id . (isset($_REQUEST["host_group_data"]) ? "&host_group_data=" . get_request_var_request("host_group_data") : "") . "&filter=" . get_request_var_request("filter"));
++ $url_page_select = get_page_list(get_request_var_request("page"), MAX_DISPLAY_PAGES, get_request_var_request("graphs"), $total_rows, "graph_view.php?action=tree&tree_id=" . $tree_id . "&leaf_id=" . $leaf_id . (isset($_REQUEST["host_group_data"]) ? "&host_group_data=" . get_request_var_request("host_group_data") : ""));
+
+ $nav = "<tr bgcolor='#" . $colors["header"] . "'>
+ <td colspan='11'>
================================================================
Index: SOURCES/cacti-page_length_graph_view.patch
diff -u /dev/null SOURCES/cacti-page_length_graph_view.patch:1.1
--- /dev/null Mon Mar 9 20:47:12 2009
+++ SOURCES/cacti-page_length_graph_view.patch Mon Mar 9 20:47:04 2009
@@ -0,0 +1,12 @@
+diff -urN cacti-0.8.7d.orig/lib/html.php cacti-0.8.7d/lib/html.php
+--- cacti-0.8.7d.orig/lib/html.php 2009-03-09 20:24:47.000000000 +0100
++++ cacti-0.8.7d/lib/html.php 2009-03-09 20:34:09.000000000 +0100
+@@ -143,7 +143,7 @@
+ <table align='center' cellpadding='0'>
+ <tr>
+ <td align='center'>
+- <a href='<?php print $config['url_path']; ?>graph.php?action=view&local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=all'><img class='graphimage' id='graph_<?php print $graph["local_graph_id"] ?>' src='<?php print $config['url_path']; ?>graph_image.php?local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=0<?php print (($extra_url_args == "") ? "" : "&$extra_url_args");?>' border='0' alt='<?php print $graph["title_cache"];?>'></a>
++ <div style="min-height: <?php echo (1.6 * read_config_option("export_default_height")) . "px"?>;"><a href='<?php print $config['url_path'];?>graph.php?action=view&local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=all'><img class='graphimage' id='graph_<?php print $graph["local_graph_id"] ?>' src='<?php print $config['url_path']; ?>graph_image.php?local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=0<?php print (($extra_url_args == "") ? "" : "&$extra_url_args");?>' border='0' alt='<?php print $graph["title_cache"];?>'></a></div>
+ <?php print (read_graph_config_option("show_graph_title") == "on" ? "<p style='font-size: 10;' align='center'><strong>" . $graph["title_cache"] . "</strong></p>" : "");?>
+ </td>
+ <td valign='top' style='align: left; padding: 3px;' class='noprint'>
================================================================
Index: SOURCES/page_length_graph_view.patch
diff -u /dev/null SOURCES/page_length_graph_view.patch:1.1
--- /dev/null Mon Mar 9 20:47:12 2009
+++ SOURCES/page_length_graph_view.patch Mon Mar 9 20:47:04 2009
@@ -0,0 +1,11 @@
+--- cacti-0.8.7d/lib/html.php 2009-02-11 21:55:50.000000000 -0500
++++ cacti-patched/lib/html.php 2009-03-02 20:00:38.000000000 -0500
+@@ -142,7 +142,7 @@
+ <table align='center' cellpadding='0'>
+ <tr>
+ <td align='center'>
+- <a href='graph.php?action=view&local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=all'><img class='graphimage' id='graph_<?php print $graph["local_graph_id"] ?>' src='graph_image.php?local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=0<?php print (($extra_url_args == "") ? "" : "&$extra_url_args");?>' border='0' alt='<?php print $graph["title_cache"];?>'></a>
++ <div style="min-height: <?php echo (1.6 * read_config_option("export_default_height")) . "px"?>;"><a href='graph.php?action=view&local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=all'><img class='graphimage' id='graph_<?php print $graph["local_graph_id"] ?>' src='graph_image.php?local_graph_id=<?php print $graph["local_graph_id"];?>&rra_id=0<?php print (($extra_url_args == "") ? "" : "&$extra_url_args");?>' border='0' alt='<?php print $graph["title_cache"];?>'></a></div>
+ <?php print (read_graph_config_option("show_graph_title") == "on" ? "<p style='font-size: 10;' align='center'><strong>" . $graph["title_cache"] . "</strong></p>" : "");?>
+ </td>
+ <td valign='top' style='align: left; padding: 3px;' class='noprint'>
================================================================
More information about the pld-cvs-commit
mailing list