]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bweb/cgi/bfileview.pl
ebl fix mediatype in display_pool
[bacula/bacula] / gui / bweb / cgi / bfileview.pl
index 5177bbbba7cb335880a6177c082413f3ad3f9866..6c07e83aac5cf2094bffcace2b889b1a0d3800ed 100755 (executable)
@@ -79,8 +79,9 @@ unless ($where and $jobid) {
     exit 0;
 }
 
-unless (-w $base_fich) {
-    $bweb->error("$base_fich is not writable");
+unless ($base_fich and -w $base_fich) {
+    $bweb->error("fv_write_path ($base_fich) is not writable." . 
+                " See Bweb configuration.");
     exit 0;
 }
 
@@ -160,10 +161,11 @@ sub fv_display_rep
        my $size = fv_compute_size($jobid, $dir->[0]);
        $sum += $size;
 
-       my $chld = $ccircle->add_part($size * 100 / $max, 
+       my $per = $size * 100 / $max;
+       my $chld = $ccircle->add_part($per, 
                                      basename($dir->[1]) . '/',
                                      basename($dir->[1]) 
-                                      . "\n" 
+                                      . sprintf(' %.0f%% ', $per)
                                       . Bweb::human_size($size)
                                      ) ;
        
@@ -183,7 +185,7 @@ sub fv_display_rep
 
     if ($sum < $max) {
        $ccircle->add_part(($max - $sum) * 100 / $max, 
-                          "other files < 3",
+                          "other files < 3%",
                           "other\n" . Bweb::human_size($max - $sum));
     }
 
@@ -216,11 +218,7 @@ sub fv_list_dirs
 
     my $ret = $bweb->dbh_selectall_arrayref("
       SELECT P.PathId,
-             (
-              SELECT Path FROM Path WHERE PathId = P.PathId
-              UNION 
-              SELECT Path FROM brestore_missing_path WHERE PathId = P.PathId
-             ) AS Path
+             ( SELECT Path FROM Path WHERE PathId = P.PathId) AS Path
         FROM (
           SELECT PathId
             FROM brestore_pathvisibility 
@@ -328,11 +326,7 @@ sub fv_get_root_pathid
 {
     my ($path) = @_;
     $path = $bweb->dbh_quote($path);
-    my $ret = $bweb->dbh_selectrow_hashref("
-SELECT PathId FROM Path WHERE Path = $path
-   UNION 
-SELECT PathId FROM brestore_missing_path WHERE PATH = $path
-");
+    my $ret = $bweb->dbh_selectrow_hashref("SELECT PathId FROM Path WHERE Path = $path");
     return $ret->{pathid};
 }