]> git.pld-linux.org Git - packages/cacti.git/commitdiff
*** empty log message ***
authorGrzegorz Sterniczuk <grzegorz@sterniczuk.eu>
Mon, 9 Mar 2009 19:47:04 +0000 (19:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cacti-page_length_graph_view.patch -> 1.1
    graph_search.patch -> 1.1
    ping_timeout.patch -> 1.1

cacti-page_length_graph_view.patch [new file with mode: 0644]
graph_search.patch [new file with mode: 0644]
ping_timeout.patch [new file with mode: 0644]

diff --git a/cacti-page_length_graph_view.patch b/cacti-page_length_graph_view.patch
new file mode 100644 (file)
index 0000000..9e6a39c
--- /dev/null
@@ -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'>
diff --git a/graph_search.patch b/graph_search.patch
new file mode 100644 (file)
index 0000000..4a18b25
--- /dev/null
@@ -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'>
diff --git a/ping_timeout.patch b/ping_timeout.patch
new file mode 100644 (file)
index 0000000..b0a16cd
--- /dev/null
@@ -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");
This page took 0.056956 seconds and 4 git commands to generate.