From 18c4e9c2409e97bbaf9c7f73f20e66dace48a12c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 16 Jul 2009 09:49:36 +0000 Subject: [PATCH] Fix graph_font parameter to work with graph module Avoid warning messages in apache log with graph module git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9021 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/ReleaseNotes | 5 +++++ gui/bweb/cgi/bgraph.pl | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gui/bweb/ReleaseNotes b/gui/bweb/ReleaseNotes index 0d076ec4db..cd1bcb3cfa 100644 --- a/gui/bweb/ReleaseNotes +++ b/gui/bweb/ReleaseNotes @@ -1,3 +1,8 @@ + Release Notes for bweb 3.0.2 + + - Fix graph_font parameter to work with graph module + - Avoid warning messages in apache log with graph module + Release Notes for bweb 3.0 - Support Copy and Migration jobs diff --git a/gui/bweb/cgi/bgraph.pl b/gui/bweb/cgi/bgraph.pl index 760e670a04..441de265f4 100755 --- a/gui/bweb/cgi/bgraph.pl +++ b/gui/bweb/cgi/bgraph.pl @@ -218,16 +218,20 @@ sub get_graph 'x_number_format' => sub { strftime('%D', localtime($_[0])) }, 'x_tick_number' => 5*$arg->{width}/800, 'overwrite' => 1, - dclrs => [ add_colour("#afd8f8"), add_colour("#f6bd0f"), + dclrs => [ add_colour("#008e8e"), + add_colour("#afd8f8"), add_colour("#f6bd0f"), add_colour("#8bba00"), add_colour("#ff8e46"), - add_colour("#008e8e"), add_colour("#d64646"), + add_colour("#d64646"), add_colour("#8e468e"), add_colour("#588526"), add_colour("#b3aa00"), add_colour("#008ed6"), add_colour("#9d080d"), add_colour("#a186be"), ], @options, ); - + if (-f $conf->{graph_font}) { + $graph->set_title_font([$conf->{graph_font}], 12); + $graph->set_legend_font([$conf->{graph_font}], 11); + } return $graph; } @@ -243,7 +247,7 @@ sub make_tab foreach my $row (@$all_row) { my $label = $row->[1] . "/" . $row->[2] ; # client/backup name - if ($arg->{level} eq 'All') { # can separate level + if ($arg->{level} && $arg->{level} eq 'All') { # can separate level $label = $row->[4] . ': ' . $label; # if users ask for } -- 2.39.5