From bd5bb64b13bb414ad35d7baa46a4d20689093b64 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sat, 4 Feb 2017 22:33:55 +0000 Subject: [PATCH] remove chunked header from opkg. Fix chunking in Google Chrome. queue top refresh button git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3708 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/cgi-bin/opkg.jim | 5 ++++- webif/html/diag/dump.jim | 19 +++++++++++++++++++ webif/html/diag/queue/index.jim | 10 +++++++--- webif/html/diag/queue/script.js | 6 +++--- webif/html/diag/queue/style.css | 5 +++++ webif/html/pkg/index.jim | 2 +- webif/lib/chunked | 21 --------------------- webif/lib/setup | 1 + 9 files changed, 41 insertions(+), 30 deletions(-) create mode 100755 webif/html/diag/dump.jim delete mode 100755 webif/lib/chunked diff --git a/CONTROL/control b/CONTROL/control index a2642e4..0ae377f 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.0-5 +Version: 1.4.0-6 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.25),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.10),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1) diff --git a/webif/cgi-bin/opkg.jim b/webif/cgi-bin/opkg.jim index eae2d63..218bbce 100755 --- a/webif/cgi-bin/opkg.jim +++ b/webif/cgi-bin/opkg.jim @@ -25,7 +25,10 @@ proc opkg {cmd} { putsf "" } -httpheader "text/plain" 0 "Transfer-Encoding: chunked\r\n" +# Google Chrome won't render chunks with text/plain! +# https://bugs.chromium.org/p/chromium/issues/detail?id=156023 +#httpheader "text/plain" +httpheader "application/octet-stream" set cmdargs [lassign $cmd cmd] diff --git a/webif/html/diag/dump.jim b/webif/html/diag/dump.jim new file mode 100755 index 0000000..69cd725 --- /dev/null +++ b/webif/html/diag/dump.jim @@ -0,0 +1,19 @@ +#!/mod/bin/jimsh + +source /mod/webif/lib/setup +package require cgi + +puts "

CGI

"
+cgi_input
+cgi_dump
+puts "
" + +flush stdout +#sleep 5 + +puts "

ENV

"
+foreach {var val} [env] {
+	puts "$var = $val"
+}
+puts "
" + diff --git a/webif/html/diag/queue/index.jim b/webif/html/diag/queue/index.jim index 89a0036..e66e6ca 100755 --- a/webif/html/diag/queue/index.jim +++ b/webif/html/diag/queue/index.jim @@ -15,7 +15,11 @@ puts { Queued Tasks
-Queued Tasks + + Queued Tasks + + +
Loading queue data... @@ -48,8 +52,8 @@ There are no tasks in the queue. - - + +
Last media scan: retrieving... - scanning every TBC minutes.
diff --git a/webif/html/diag/queue/script.js b/webif/html/diag/queue/script.js index 3dc189b..c64447d 100644 --- a/webif/html/diag/queue/script.js +++ b/webif/html/diag/queue/script.js @@ -15,7 +15,7 @@ function dirname(path) function load() { - $('#isloading').show(); + $('span.isloading').show(); $.getJSON('fetch.jim', function(data) { $('#queuetab > tbody').empty(); @@ -74,7 +74,7 @@ function load() }); $('input.qid').first().trigger('change'); - $('#loading,#isloading').hide('slow'); + $('#loading,span.isloading').hide('slow'); }); } @@ -145,7 +145,7 @@ $('#selcomplete').button({icons:{primary:"ui-icon-check"}}) .trigger('change'); }); -$('#refresh').button({icons:{primary:"ui-icon-refresh"}}) +$('button.refresh').button({icons:{primary:"ui-icon-refresh"}}) .on('click', function() { load(); }); diff --git a/webif/html/diag/queue/style.css b/webif/html/diag/queue/style.css index 50be30a..a9e1b15 100644 --- a/webif/html/diag/queue/style.css +++ b/webif/html/diag/queue/style.css @@ -45,3 +45,8 @@ div#loading, div#nodata padding-top: 2px; } +button.small +{ + padding: .1em .5em .1em .1em; +} + diff --git a/webif/html/pkg/index.jim b/webif/html/pkg/index.jim index cdb3147..88bc733 100755 --- a/webif/html/pkg/index.jim +++ b/webif/html/pkg/index.jim @@ -22,7 +22,7 @@ puts {