]> 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 1e75dd71711eae658ff64971fe92f9f54f5d9d11..5b14313b5ef450d93e8b6068963f0773e82812c4 100644 (file)
@@ -1137,7 +1137,7 @@ sub dbh_selectrow_hashref
 # display Mb/Gb/Kb
 sub human_size
 {
-    my @unit = qw(b Kb Mb Gb Tb);
+    my @unit = qw(B KB MB GB TB);
     my $val = shift || 0;
     my $i=0;
     my $format = '%i %s';
@@ -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
 ";