+
+
+
Loading queue data...
+
+
+
+There are no tasks in the queue.
+
+
+
ID |
@@ -31,13 +40,16 @@ puts {
-
-
-
-
-
+
}
diff --git a/webif/html/diag/queue/resubmit.jim b/webif/html/diag/queue/resubmit.jim
deleted file mode 100755
index bd74eea..0000000
--- a/webif/html/diag/queue/resubmit.jim
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/mod/bin/jimsh
-
-package require cgi
-source /mod/webif/lib/setup
-require queue.class
-
-httpheader
-
-set slots [cgi_get slot 0]
-
-foreach slot [split $slots ","] {
- queue resubmit $slot
-}
-
diff --git a/webif/html/diag/queue/script.js b/webif/html/diag/queue/script.js
index 1c5d0dd..e6b2543 100644
--- a/webif/html/diag/queue/script.js
+++ b/webif/html/diag/queue/script.js
@@ -10,7 +10,7 @@ function page_refresh(msg)
function load()
{
- $('#isloading').show('fast');
+ $('#isloading').show();
$.getJSON('fetch.jim', function(data) {
$('#queuetab > tbody').empty();
@@ -22,7 +22,7 @@ function load()
v.qid + '' +
'' + v.submitted + ' | ' +
'' + v.file + ' | ' +
- '' + v.action + ' | ' +
+ '' + v.action + ' ' + v.args + ' | ' +
'' + v.status;
if (v.status == 'RUNNING')
s += ' ';
@@ -35,6 +35,20 @@ function load()
$('#queuetab > tbody').append(s);
});
+
+ if (data.length > 0)
+ {
+ $('#nodata').hide();
+ $('#queuetab').show();
+ $('.needsdata').enable();
+ }
+ else
+ {
+ $('#nodata').show();
+ $('#queuetab').hide();
+ $('.needssel,.needsdata').disable();
+ }
+
var resort = true;
$('#queuetab').trigger('update', [resort]);
$('input.qid:checkbox').prop('checked', false).enable();
@@ -47,7 +61,7 @@ function load()
});
$('input.qid').first().trigger('change');
- $('#isloading').hide('slow');
+ $('#loading,#isloading').hide('slow');
});
}
@@ -71,63 +85,48 @@ $('#queuetab').on('change', 'input.qid', function() {
$('.needssel').disable();
}).first().trigger('change');
-$('#qdelete').button({icons:{primary:"ui-icon-trash"}})
- .on('click', function() {
+$('#qdelete').button({icons:{primary:"ui-icon-trash"}});
+$('#qresubmit').button({icons:{primary:"ui-icon-refresh"}});
+$('#qhold').button({icons:{primary:"ui-icon-pause"}});
+
+$('button.submit').on('click', function() {
+ var name = $(this).text();
+ var act = $(this).attr('act');
+
$(this).dojConfirmAction({
- question: 'Delete selected?',
+ question: name + ' selected?',
yesAnswer: 'Yes',
cancelAnswer: 'No'
}, function(el) {
$.blockUI({
- message: ' Deleting... '
+ message: ' Processing... '
});
var slots = $('input.qid:checked').map(function() {
return this.value;
}).get();
- $.get('delete.jim', {
+ $.get('update.jim', {
+ act: act,
slot: slots.join(',')
}, function() {
- page_refresh();
+ $.unblockUI();
+ load();
});
});
-
});
-$('#qresubmit').button({icons:{primary:"ui-icon-refresh"}})
- .on('click', function() {
- $(this).dojConfirmAction({
- question: 'Re-submit selected?',
- yesAnswer: 'Yes',
- cancelAnswer: 'No'
- }, function(el) {
- $.blockUI({
- message: ' Re-submitting... '
- });
-
- var slots = $('input.qid:checked').map(function() {
- return this.value;
- }).get();
- $.get('resubmit.jim', {
- slot: slots.join(',')
- }, function() {
- page_refresh();
- });
- });
-
-});
$('#selnone').button({icons:{primary:"ui-icon-close"}})
.on('click', function() {
$('#queuetab input:checkbox').prop('checked', false).trigger('change');
});
-$('#selall').button({icons:{primary:"ui-icon-check"}})
+$('#selall').button({icons:{primary:"ui-icon-star"}})
.on('click', function() {
$('#queuetab input:checkbox').prop('checked', true).trigger('change');
});
-$('#selcomplete').button({icons:{primary:"ui-icon-stop"}})
+$('#selcomplete').button({icons:{primary:"ui-icon-check"}})
.on('click', function() {
$('#queuetab input:checkbox[status="COMPLETE"]').prop('checked', true)
.trigger('change');
diff --git a/webif/html/diag/queue/style.css b/webif/html/diag/queue/style.css
index 48e37b1..da9cdce 100644
--- a/webif/html/diag/queue/style.css
+++ b/webif/html/diag/queue/style.css
@@ -26,3 +26,14 @@ td.status.INTERRUPTED
font-weight: bold;
}
+div.buttonbar
+{
+ padding-top: 5px;
+}
+
+div#loading, div#nodata
+{
+ font-style: italic;
+ color: #ff4000;
+}
+
diff --git a/webif/html/diag/queue/update.jim b/webif/html/diag/queue/update.jim
new file mode 100755
index 0000000..b2e0dbe
--- /dev/null
+++ b/webif/html/diag/queue/update.jim
@@ -0,0 +1,25 @@
+#!/mod/bin/jimsh
+
+package require cgi
+source /mod/webif/lib/setup
+require queue.class
+
+httpheader
+
+set slots [cgi_get slot 0]
+set act [cgi_get act -]
+
+foreach slot [split $slots ","] {
+ switch -- $act {
+ delete {
+ queue delete_by_id $slot
+ }
+ resubmit {
+ queue resubmit $slot
+ }
+ hold {
+ queue hold $slot
+ }
+ }
+}
+
diff --git a/webif/html/go b/webif/html/go
index f9a8603..c8712a8 100755
--- a/webif/html/go
+++ b/webif/html/go
@@ -25,6 +25,7 @@ set pages {
"pkg" "/pkg/"
"diag" "/diag/diag.jim"
"settings" "/settings/settings.jim"
+ "queue" "/diag/queue/"
}
set pages(epg) $epglink
diff --git a/webif/html/settings/modules/auto/init.hook b/webif/html/settings/modules/auto/init.hook
index 00620ab..5c6709b 100644
--- a/webif/html/settings/modules/auto/init.hook
+++ b/webif/html/settings/modules/auto/init.hook
@@ -8,7 +8,8 @@ set autokeep [$settings autokeep]
if {$autokeep == 0} { set autokeep 7 }
set noautohours [$settings noautohours]
set autofreq [$settings autofreq]
-if {$autofreq == 0} { set autofreq 20 }
+if {$autofreq == 0} { set autofreq 10 }
+set toolbarqueue [$settings toolbarqueue]
handle_int_update autolog $autolog "Auto-processing log level"
handle_int_update noautorec $noautorec "Auto-processing during recording"
@@ -18,4 +19,5 @@ handle_int_update autorecperiod $autorecperiod \
handle_int_update autokeep $autokeep "Auto-processing queue period" 1 1 365
handle_int_update autofreq $autofreq "Auto-processing frequency" 1 5 60
handle_str_update noautohours $noautohours "Auto processing hours" ascii
+handle_int_update toolbarqueue $toolbarqueue "Toolbar queue icon"
diff --git a/webif/html/settings/modules/auto/settings.hook b/webif/html/settings/modules/auto/settings.hook
index 30573a2..75d8f60 100755
--- a/webif/html/settings/modules/auto/settings.hook
+++ b/webif/html/settings/modules/auto/settings.hook
@@ -81,6 +81,8 @@ setting_number autokeep \
"How many days should completed entries stay in the queue?" $autokeep \
1 365
+setting_toggle "Show queue icon in toolbar?" "toolbarqueue" $toolbarqueue
+
puts {
|