diff options
author | ivan <ivan> | 2001-09-11 04:44:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-09-11 04:44:58 +0000 |
commit | 657f97bbcfd5c778aee1f1c1d82c48f4e0bc286f (patch) | |
tree | 15a75dc6b9c894cd5b7de8bf935902b28c65cb11 /httemplate/browse | |
parent | 8d6016abb9ca2e9d270d668e9607445921846aaa (diff) |
web queue view
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-x | httemplate/browse/queue.cgi | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/httemplate/browse/queue.cgi b/httemplate/browse/queue.cgi new file mode 100755 index 000000000..86d4a20f1 --- /dev/null +++ b/httemplate/browse/queue.cgi @@ -0,0 +1,56 @@ +<% +#<!-- $Id: queue.cgi,v 1.1 2001-09-11 04:44:58 ivan Exp $ --> + +use strict; +use vars qw( $cgi $p ); # $part_referral ); +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use Date::Format; +use FS::UID qw(cgisuidsetup); +use FS::Record qw(qsearch); +use FS::CGI qw(header menubar popurl table); +use FS::queue; + +$cgi = new CGI; + +&cgisuidsetup($cgi); + +$p = popurl(2); + +print $cgi->header( '-expires' => 'now' ), 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 $args = join(' ', $queue->args); + my $date = time2str( "%a %b %e %T %Y", $queue->_date ); + print <<END; + <TR> + <TD>$hashref->{jobnum}</TD> + <TD>$hashref->{job}</TD> + <TD>$args</TD> + <TD>$date</TD> + <TD>$hashref->{status}</TD> + </TR> +END + +} + +print <<END; + </TABLE> + </BODY> +</HTML> +END + +%> |