Copy of r4295 for branches/0.8.7

git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@4306 860744bd-22fc-0310-8c96-e9fe5004b5ca
This commit is contained in:
Reinhard Scheck committed 2007-11-04 13:46:45 +00:00
1 parent 36c0f00361
commit 34f33c76ed
2 files changed
+17 -12

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
Cacti CHANGELOG
0.8.7a
-bug#0001067: Fixed extra spaces in GPRINT. Better Alignment for Autopadding
-bug#0001038: Data sources in RRAs have random order, messing up predefined CDEFs
-bug#0001043: Graph Templates drop down populates with duplicates
-bug#0001046: Upgrade from 0.8.6j to 0.8.7 defaults to Authentication Method NONE
+16 -12
View File
@@ -874,12 +874,12 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
of course it can be used in other situations, however may not work as intended.
If you have any additions to this small peice of code, feel free to send them to me. */
if ($graph["auto_padding"] == "on") {
/* only applies to AREA and STACK */
/* only applies to AREA, STACK and LINEs */
if (ereg("(AREA|STACK|LINE[123])", $graph_item_types{$graph_item["graph_type_id"]})) {
$text_format_lengths{$graph_item["data_template_rrd_id"]} = strlen($graph_variables["text_format"][$graph_item_id]);
$text_format_length = strlen($graph_variables["text_format"][$graph_item_id]);
if ((strlen($graph_variables["text_format"][$graph_item_id]) > $greatest_text_format) && ($graph_item_types{$graph_item["graph_type_id"]} != "COMMENT")) {
$greatest_text_format = strlen($graph_variables["text_format"][$graph_item_id]);
if ($text_format_length > $greatest_text_format) {
$greatest_text_format = $text_format_length;
}
}
}
@@ -1001,17 +1001,21 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
/* if we are not displaying a legend there is no point in us even processing the auto padding,
text format stuff. */
if ((!isset($graph_data_array["graph_nolegend"])) && ($graph["auto_padding"] == "on") && (isset($text_format_lengths{$graph_item["data_template_rrd_id"]}))) {
/* we are basing how much to pad on area and stack text format,
not gprint. but of course the padding has to be displayed in gprint,
how fun! */
if ((!isset($graph_data_array["graph_nolegend"])) && ($graph["auto_padding"] == "on")) {
/* only applies to AREA, STACK and LINEs */
if (ereg("(AREA|STACK|LINE[123])", $graph_item_types{$graph_item["graph_type_id"]})) {
$text_format_length = strlen($graph_variables["text_format"][$graph_item_id]);
$pad_number = ($greatest_text_format - $text_format_lengths{$graph_item["data_template_rrd_id"]});
//cacti_log("MAX: $greatest_text_format, CURR: $text_format_lengths[$item_dsid], DSID: $item_dsid");
$text_padding = str_pad("", $pad_number);
/* we are basing how much to pad on area and stack text format,
not gprint. but of course the padding has to be displayed in gprint,
how fun! */
$pad_number = ($greatest_text_format - $text_format_length);
//cacti_log("MAX: $greatest_text_format, CURR: $text_format_lengths[$item_dsid], DSID: $item_dsid");
$text_padding = str_pad("", $pad_number);
/* two GPRINT's in a row screws up the padding, lets not do that */
if (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && ($last_graph_type == "GPRINT")) {
} else if (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && ($last_graph_type == "GPRINT")) {
$text_padding = "";
}