Skip to content
Browse files

Merge remote branch 'gentoo/2.0.3-gentoo' into devel

  • Loading branch information...
2 parents 461729a + cbecced commit ff1377f6bdb1bc0616bca57e60f9e39f71ca2e2a @steveschnepp steveschnepp committed Jul 25, 2012
Showing with 25 additions and 7 deletions.
  1. +1 −6 master/_bin/munin-graph.in
  2. +1 −1 master/lib/Munin/Master/GraphOld.pm
  3. +23 −0 master/lib/Munin/Master/HTMLOld.pm
View
7 master/_bin/munin-graph.in
@@ -77,7 +77,7 @@ my $nb_request_max = 0;
my $graph_fh = new IO::File($config->{dbdir} . "/graphs");
while (my $path = <$graph_fh>) {
my $pinpoint = undef;
- print "Request path is $path";
+ INFO "Request path is $path";
# The full URL looks like this:
# Case 1:
@@ -331,13 +331,8 @@ sub draw_graph_or_complain {
if (! -f $ret) {
my ($dom, $host, $serv, $scale, $filename ) = @_;
WARN "[WARNING] Could not draw graph \"$filename\": $ret";
- print "Status: 500\r\n",
- "Content-Type: text/plain\r\n",
- "\r\n",
- "Could not draw graph \"$filename\"\r\n";
return 0;
} else {
- print "X-Graph-Duration: $graph_duration\r\n";
return $ret;
}
}
View
2 master/lib/Munin/Master/GraphOld.pm
@@ -334,7 +334,7 @@ sub graph_startup {
sub graph_check_cron {
# Are we running from cron and do we have matching graph_strategy
- if (&munin_get($config, "graph_strategy", "cgi") ne "cron" and $cron) {
+ if (&munin_get($config, "graph_strategy") eq "cgi" and $cron) {
# Strategy mismatch: We're run from cron, but munin.conf says
# we use dynamic graph generation
View
23 master/lib/Munin/Master/HTMLOld.pm
@@ -269,6 +269,19 @@ sub emit_comparison_template {
push((@$comparepeers), {"name" => $peer->{"name"}, "link" => $comparelink});
}
+ foreach my $cat(@{$key->{'comparecategories'}}) {
+ foreach my $service(@{$cat->{'services'}}) {
+ foreach my $node(@{$service->{'nodes'}}) {
+ foreach my $imgsrc(qw(imgday imgweek imgmonth imgyear
+ cimgday cimgweek cimgmonth cimgyear
+ zoomday zoomweek zoommonth zoomyear)) {
+ next unless defined($node->{$imgsrc});
+ $node->{$imgsrc} =~ s|^\.\./\.\./|../|;
+ }
+ }
+ }
+ }
+
$comparisontemplates{$t}->param(
INFO_OPTION => 'Groups on this level',
NAME => $key->{'name'},
@@ -373,6 +386,16 @@ sub emit_category_template {
DEBUG "[DEBUG] Creating global category page ".$filename;
+ foreach my $graphs(@{$key->{'graphs'}}) {
+ foreach my $graph(@{$graphs->{'graphs'}}) {
+ foreach my $imgsrc(qw(imgday imgweek imgmonth imgyear
+ cimgday cimgweek cimgmonth cimgyear
+ zoomday zoomweek zoommonth zoomyear)) {
+ $graph->{$imgsrc} =~ s|^\.\./||
+ }
+ }
+ }
+
$graphtemplate->param(
PATH => $key->{'path'},
CSS_NAME => get_css_name(),

0 comments on commit ff1377f

Please sign in to comment.
Something went wrong with that request. Please try again.