fix restart icon

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2365 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2015-02-24 20:18:38 +00:00
parent 9b30a9b0b6
commit 9b9032eee8
7 changed files with 56 additions and 13 deletions

View File

@ -1,10 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 1.2.2
Version: 1.2.2-1
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.15),lighttpd(>=1.4.35-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.3),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,mongoose,recmon(>=2.0.2)
Depends: webif-channelicons(>=1.1.16),lighttpd(>=1.4.35-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.3),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,mongoose,recmon(>=2.0.2)
Suggests:
Description: An evolving web interface for the Humax.
Tags: http://hummy.tv/forum/threads/5866/

View File

@ -11,7 +11,6 @@ set schedtime 1200
switch $runmode {
cgi {
set type [cgi_get type "full"]
set schedtime [cgi_get schedtime 1200]
httpheader
}
cli {
@ -57,6 +56,10 @@ proc get_data {} {
set ext [file extension $line]
if {$ext ni $exts} continue
set file [string range $line 1 end]
# Skip HD-Fox TSR buffer
if {$file eq "/media/drive1/.tsr/0.ts"} {
continue
}
# Handle chase play (same file open twice
# and recently written)
if {[dict exists $ret $file] && \

View File

@ -5,6 +5,9 @@ package require sqlite3
source /mod/webif/lib/setup
require altrow
jqplugin tablesorter2
jscss script.js
set databases [glob /var/lib/humaxtv/*.db]
lappend databases {*}[glob /mod/etc/*.db]
lappend databases "/mnt/hd2/dms_cds.db"
@ -15,7 +18,21 @@ set ftab [cgi_get tab]
set fdb [cgi_get db]
if {$fdb != 0} {
puts "<h1><a href=/cgi-bin/db.jim>Remove filters</a></h1>"
puts "<h1><a href=/db/index.jim>Remove filters</a></h1>"
}
proc escape {data} {
if {[string is print $data]} { return $data }
set ret ""
foreach c [split $data ""] {
if {[string is print $c]} {
append ret $c
} else {
binary scan $c H* hex
append ret "\\x$hex"
}
}
return $ret
}
proc db_info {db_file} {
@ -30,7 +47,7 @@ proc db_info {db_file} {
where type='table' order by name
}]
puts "<h1><a href=/cgi-bin/db.jim?db=[file tail $db_file]>
puts "<h1><a href=/db/index.jim?db=[file tail $db_file]>
$db_file</a></h1>"
foreach table $tables {
@ -39,22 +56,33 @@ proc db_info {db_file} {
set columns [$db query "pragma table_info($table)"]
set datas [$db query "SELECT * FROM $table order by 1"]
puts "<h2><a href=/cgi-bin/db.jim?db=[file tail $db_file]&tab=$table>$table</a></h2>"
puts "<table class=borders>"
puts " <tr>"
puts "
<h2><a href=/db/index.jim?db=[file tail $db_file]&tab=$table>$table</a></h2>
<table>
<thead>
<tr>
"
foreach column $columns {
puts " <th>[lindex $column 3]</th>"
}
puts " </tr>"
puts "
</tr>
</thead>
<tbody>
"
foreach data $datas {
altrow
for {set i 1} {$i < [llength $data]} {incr i 2} {
puts " <td>[lindex $data $i]</td>"
puts " <td nowrap>[
escape [lindex $data $i]]</td>"
}
puts " </tr>"
}
puts "</table>"
puts "
</tbody>
</table>
"
}
$db close

11
webif/html/db/script.js Normal file
View File

@ -0,0 +1,11 @@
$(function() {
$('table')
.tablesorter({
theme: 'webif',
widthFixed: false,
widgets: ['zebra', 'stickyHeaders']
});
});

View File

@ -34,7 +34,7 @@ $('#runedit').click(function(e) {
$('#dbinfo').click(function(e) {
e.preventDefault();
window.location = '/cgi-bin/db.jim';
window.location = '/db/index.jim';
});
$('#channelinfo').click(function(e) {

View File

@ -135,7 +135,7 @@ $('button.selended').button({icons:{primary:"ui-icon-stop"}})
$('button.rawview').button({icons:{primary:"ui-icon-wrench"}})
.on('click', function() {
window.location = '/cgi-bin/db.jim?' + $(this).attr('path');
window.location = '/db/index.jim?' + $(this).attr('path');
});
$('button.backup').button({icons:{primary:"ui-icon-disk"}})

View File

@ -6,6 +6,7 @@ if {[file exists /tmp/.restartpending]} {
require system.class rsv.class
if {[rsv count pending] <= 0} {
system restartpending 0
} else {
set class ""
}
}