blob: af8989b828d938a942ff8d28d196928760f49143 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<!-- $Id: queue.cgi,v 1.7 2002-01-30 14:18:08 ivan Exp $ -->
<%
print header("Job Queue", menubar(
'Main Menu' => $p,
# 'Add new referral' => "../edit/part_referral.cgi",
)), &table(), <<END;
<TR>
<TH COLSPAN=2>Job</TH>
<TH>Args</TH>
<TH>Date</TH>
<TH>Status</TH>
</TR>
END
foreach my $queue ( sort {
$a->getfield('jobnum') <=> $b->getfield('jobnum')
} qsearch('queue',{}) ) {
my($hashref)=$queue->hashref;
my $jobnum = $hashref->{jobnum};
my $args = join(' ', $queue->args);
my $date = time2str( "%a %b %e %T %Y", $queue->_date );
my $status = $hashref->{status};
if ( $status eq 'failed' || $status eq 'locked' ) {
$status .=
qq! ( <A HREF="$p/edit/queue.cgi?jobnum=$jobnum&action=new">retry</A> |!.
qq! <A HREF="$p/edit/queue.cgi?jobnum$jobnum&action=del">remove </A> )!;
}
print <<END;
<TR>
<TD>$jobnum</TD>
<TD>$hashref->{job}</TD>
<TD>$args</TD>
<TD>$date</TD>
<TD>$status</TD>
</TR>
END
}
print <<END;
</TABLE>
</BODY>
</HTML>
END
%>
|