]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bweb/lib/Bweb.pm
ebl Doesn't display running job more in job hist
[bacula/bacula] / gui / bweb / lib / Bweb.pm
index 77a013d48a3d531c77b43c3d788c87526b1a33dd..5b14313b5ef450d93e8b6068963f0773e82812c4 100644 (file)
@@ -1259,7 +1259,7 @@ sub display_clients
     my ($self) = @_;
 
     my $where='';
-    my $arg = $self->get_form("client", "qre_client", "jclient_groups");
+    my $arg = $self->get_form("client", "qre_client", "jclient_groups", "qnotingroup");
 
     if ($arg->{qre_client}) {
        $where = "WHERE Name $self->{sql}->{MATCH} $arg->{qre_client} ";
@@ -1269,6 +1269,14 @@ sub display_clients
        $where = "JOIN client_group_member ON (Client.ClientId = client_group_member.clientid) 
                   JOIN client_group USING (client_group_id)
                   WHERE client_group_name IN ($arg->{jclient_groups})";
+    } elsif ($arg->{qnotingroup}) {
+       $where =   "
+  WHERE NOT EXISTS
+   (SELECT 1 FROM client_group_member
+     WHERE Client.ClientId = client_group_member.ClientId
+   )
+";
+   
     }
 
     my $query = "
@@ -2006,7 +2014,7 @@ SELECT  Job.JobId       AS jobid,
           LEFT JOIN FileSet  ON (Job.FileSetId = FileSet.FileSetId)
           $cgq
  WHERE Client.ClientId=Job.ClientId
-   AND Job.JobStatus != 'R'
+   AND Job.JobStatus NOT IN ('R', 'C')
  $where
  $limit
 ";