]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix graph_font parameter to work with graph module
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 16 Jul 2009 09:49:36 +0000 (09:49 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 16 Jul 2009 09:49:36 +0000 (09:49 +0000)
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
gui/bweb/cgi/bgraph.pl

index 0d076ec4dbb4f1695272203a02a98db4d570faa2..cd1bcb3cfad02620ef8963c8042c4959f7627864 100644 (file)
@@ -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
index 760e670a04d77fef6029871caec46b5f66d1b2b1..441de265f485d91c056dfbe8d869993d7b1f1194 100755 (executable)
@@ -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
        }