# 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';
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} ";
$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 = "
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
";