#!/mod/bin/jimsh

package require cgi
source /mod/webif/lib/setup
require altrow ts.class queue.class

jqplugin tablesorter2 enadis blockui confirmAction
jscss script.js style.css

header

puts {
<h3 class=va>
	<img class=va width=100 src=/img/queuep.png>
	Queued Tasks
</h3>
<fieldset class=cleft>
<legend>
	Queued Tasks
	<button class="refresh small">Refresh</button>
	<span class=isloading><img src=/img/spin.gif></span>
</legend>

<div id=loading>
<img src=/img/spin.gif> Loading queue data...
</div>

<div id=nodata class="hidden">
There are no tasks in the queue.
</div>

<table id=queuetab class="borders hidden" cellpadding=5>
<thead>
<tr>
	<th nowrap>ID</th>
	<th>Submitted</th>
	<th>File</th>
	<th>Action</th>
	<th>Status</th>
	<th>Runtime</th>
	<th>Log</th>
	<th>Last Update</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class=buttonbar>
<button id=selcomplete class=needsdata>Select Completed</button>
<button id=selfailed class=needsdata>Select Failed</button>
<button id=selpending class=needsdata>Select Pending</button>
<button id=selall class=needsdata>Select All</button>
<button id=selnone class=needsdata>Select None</button>
</div>
<div class=buttonbar>
<button id=qdelete act=delete class="submit needssel">Delete</button>
<button id=qresubmit act=resubmit class="submit needssel">Re-submit</button>
<button id=qhold act=hold class="submit needssel">Hold</button>
<button id=killrun>Kill Running</button>
<button id=refresh class=refresh>Refresh</button>
<button id=viewlog>View auto.log</button>
<span class=isloading><img src=/img/spin.gif></span>
</div>
<div id=lastscan>Last media scan: <span id=autolast>retrieving...</span> -
scanning every <span id=autofreq>TBC</span> minutes.</div>
</fieldset>
}

footer

