]> git.sur5r.net Git - bacula/bacula/commitdiff
bweb: don't display general job errors when using client filter
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 26 Sep 2010 21:38:45 +0000 (23:38 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 30 Sep 2010 12:35:26 +0000 (14:35 +0200)
gui/bweb/lib/Bweb.pm

index 97a29f2da3da8f5a9b6d7a459d414325577f86ed..15e2d062295f5901ab66a8d86d05c07b0388bd28 100644 (file)
@@ -2235,7 +2235,8 @@ sub display_general
     my ($self, %arg) = @_ ;
 
     my ($limit, $label) = $self->get_limit(%arg);
-
+    my $filter = $self->get_client_filter();
+    $filter = $filter? " JOIN Client USING (ClientId) $filter " : '';
     my $query = "
 SELECT
     (SELECT count(Pool.PoolId)   FROM Pool)   AS nb_pool,
@@ -2244,7 +2245,7 @@ SELECT
     (SELECT sum(VolBytes)        FROM Media)  AS nb_bytes,
     ($self->{sql}->{DB_SIZE})                 AS db_size,
     (SELECT count(Job.JobId)
-      FROM Job
+      FROM Job $filter
       WHERE Job.JobStatus IN ('E','e','f','A')
       $limit
     )                                         AS nb_err,