]> git.pld-linux.org Git - packages/cacti.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 28 Oct 2008 11:14:40 +0000 (11:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cacti-rrdtool-1.3.patch -> 1.1

cacti-rrdtool-1.3.patch [new file with mode: 0644]

diff --git a/cacti-rrdtool-1.3.patch b/cacti-rrdtool-1.3.patch
new file mode 100644 (file)
index 0000000..6c6485c
--- /dev/null
@@ -0,0 +1,134 @@
+Index: graph.php
+===================================================================
+--- graph.php  (wersja 4583)
++++ graph.php  (wersja 4584)
+@@ -174,7 +174,7 @@
+       $graph_height = $graph["height"];
+       $graph_width = $graph["width"];
+-      if ((read_config_option("rrdtool_version")) == "rrd-1.2.x") {
++      if ((read_config_option("rrdtool_version")) != "rrd-1.0.x") {
+               if (read_graph_config_option("title_font") == "") {
+                       if (read_config_option("title_font") == "") {
+                               $title_font_size = 10;
+Index: lib/rrd.php
+===================================================================
+--- lib/rrd.php        (wersja 4583)
++++ lib/rrd.php        (wersja 4584)
+@@ -610,7 +610,7 @@
+                               }
+                               break;
+                       case "3": /* autoscale-min, accepts a given upper limit */
+-                              if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                              if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                                       $scale = "--alt-autoscale-min" . RRD_NL;
+                                       if ( is_numeric($graph["upper_limit"])) {
+                                               $scale .= "--upper-limit=" . $graph["upper_limit"] . RRD_NL;
+@@ -647,7 +647,7 @@
+       }
+       if (!empty($graph["unit_value"])) {
+-              if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++              if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                       $unit_value = "--y-grid=" . $graph["unit_value"] . RRD_NL;
+               }else{
+                       $unit_value = "--unit=" . $graph["unit_value"] . RRD_NL;
+@@ -743,13 +743,13 @@
+       /* display the timespan for zoomed graphs */
+       if ((isset($graph_data_array["graph_start"])) && (isset($graph_data_array["graph_end"]))) {
+               if (($graph_data_array["graph_start"] < 0) && ($graph_data_array["graph_end"] < 0)) {
+-                      if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                      if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                               $graph_legend .= "COMMENT:\"From " . str_replace(":", "\:", date($graph_date, time()+$graph_data_array["graph_start"])) . " To " . str_replace(":", "\:", date($graph_date, time()+$graph_data_array["graph_end"])) . "\\c\"" . RRD_NL . "COMMENT:\"  \\n\"" . RRD_NL;
+                       }else {
+                               $graph_legend .= "COMMENT:\"From " . date($graph_date, time()+$graph_data_array["graph_start"]) . " To " . date($graph_date, time()+$graph_data_array["graph_end"]) . "\\c\"" . RRD_NL . "COMMENT:\"  \\n\"" . RRD_NL;
+                       }
+               }else if (($graph_data_array["graph_start"] >= 0) && ($graph_data_array["graph_end"] >= 0)) {
+-                      if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                      if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                               $graph_legend .= "COMMENT:\"From " . str_replace(":", "\:", date($graph_date, $graph_data_array["graph_start"])) . " To " . str_replace(":", "\:", date($graph_date, $graph_data_array["graph_end"])) . "\\c\"" . RRD_NL . "COMMENT:\"  \\n\"" . RRD_NL;
+                       }else {
+                               $graph_legend .= "COMMENT:\"From " . date($graph_date, $graph_data_array["graph_start"]) . " To " . date($graph_date, $graph_data_array["graph_end"]) . "\\c\"" . RRD_NL . "COMMENT:\"  \\n\"" . RRD_NL;
+@@ -774,14 +774,14 @@
+               "--vertical-label=\"" . $graph["vertical_label"] . "\"" . RRD_NL;
+       /* rrdtool 1.2.x does not provide smooth lines, let's force it */
+-      if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++      if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+               if ($graph["slope_mode"] == "on") {
+                       $graph_opts .= "--slope-mode" . RRD_NL;
+               }
+       }
+       /* rrdtool 1.2 font options */
+-      if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++      if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+               /* title fonts */
+               $graph_opts .= rrdtool_set_font("title", ((!empty($graph_data_array["graph_nolegend"])) ? $graph_data_array["graph_nolegend"] : ""));
+@@ -1129,7 +1129,7 @@
+               $need_rrd_nl = TRUE;
+               if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") {
+-                      if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                      if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                               $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]) . $hardreturn[$graph_item_id] . "\" ";
+                               if (trim($comment_string) != "COMMENT:\"\"") {
+                                       $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item);
+@@ -1150,7 +1150,7 @@
+                               $graph_item_color_code = "";
+                       }else{
+                               $graph_item_color_code = "#" . $graph_item["hex"];
+-                              if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                              if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                                       $graph_item_color_code .= $graph_item["alpha"];
+                               }
+                       }
+@@ -1160,7 +1160,7 @@
+                               $graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */
+                               $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . $data_source_name . $graph_item_color_code . ":" . "\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\" ";
+                       }elseif ($graph_item_types{$graph_item["graph_type_id"]} == "STACK") {
+-                              if (read_config_option("rrdtool_version") == "rrd-1.2.x") {
++                              if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
+                                       $graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */
+                                       $txt_graph_items .= $graph_item_stack_type . ":" . $data_source_name . $graph_item_color_code . ":" . "\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\":STACK";
+                               }else {
+Index: utilities.php
+===================================================================
+--- utilities.php      (wersja 4583)
++++ utilities.php      (wersja 4584)
+@@ -225,7 +225,9 @@
+               exec(read_config_option("path_rrdtool"), $out_array);
+               if (sizeof($out_array) > 0) {
+-                      if (ereg("^RRDtool 1\.2", $out_array[0])) {
++                      if (ereg("^RRDtool 1\.3", $out_array[0])) {
++                              $rrdtool_version = "rrd-1.3.x";
++                      }else if (ereg("^RRDtool 1\.2\.", $out_array[0])) {
+                               $rrdtool_version = "rrd-1.2.x";
+                       }else if (ereg("^RRDtool 1\.0\.", $out_array[0])) {
+                               $rrdtool_version = "rrd-1.0.x";
+@@ -239,7 +241,7 @@
+               $rrdtool_error .= "<br><font color='red'>ERROR: Installed RRDTool version does not match configured version.<br>Please visit the <a href='settings.php?tab=general'>Configuration Settings</a> and select the correct RRDTool Utility Version.</font><br>";
+       }
+       $graph_gif_count = db_fetch_cell("SELECT COUNT(*) FROM graph_templates_graph WHERE image_format_id = 2");
+-      if (($graph_gif_count > 0) && (read_config_option("rrdtool_version") == "rrd-1.2.x")) {
++      if (($graph_gif_count > 0) && (read_config_option("rrdtool_version") != "rrd-1.0.x")) {
+               $rrdtool_error .= "<br><font color='red'>ERROR: RRDTool 1.2.x does not support the GIF images format, but " . $graph_gif_count . " graph(s) and/or templates have GIF set as the image format.</font><br>";
+       }
+Index: install/index.php
+===================================================================
+--- install/index.php  (wersja 4583)
++++ install/index.php  (wersja 4584)
+@@ -262,7 +262,9 @@
+       exec($input["path_rrdtool"]["default"], $out_array);
+       if (sizeof($out_array) > 0) {
+-              if (ereg("^RRDtool 1\.2", $out_array[0])) {
++              if (ereg("^RRDtool 1\.3", $out_array[0])) {
++                      $input["rrdtool_version"]["default"] = "rrd-1.3.x";
++              }else if (ereg("^RRDtool 1\.2\.", $out_array[0])) {
+                       $input["rrdtool_version"]["default"] = "rrd-1.2.x";
+               }else if (ereg("^RRDtool 1\.0\.", $out_array[0])) {
+                       $input["rrdtool_version"]["default"] = "rrd-1.0.x";
This page took 0.09801 seconds and 4 git commands to generate.