fixes
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@2089 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
d962ada7e5
commit
fcb036801e
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.18-2
|
||||
Version: 1.0.18-3
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.1.14),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.14),hmt(>=1.1.21),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),mongoose
|
||||
|
@ -62,7 +62,7 @@ proc db_info {db_file} {
|
||||
|
||||
if {$fdb == 0} {
|
||||
puts "Please choose database to view:<ul>"
|
||||
foreach db $databases {
|
||||
foreach db [lsort $databases] {
|
||||
puts "<li><a href=$::env(SCRIPT_NAME)?db=[file tail $db]>
|
||||
$db</a></li>"
|
||||
}
|
||||
|
@ -174,6 +174,8 @@ foreach file [lsort -command logsort $loglist] {
|
||||
[file tail $file]
|
||||
</a>
|
||||
(<span class=lsize>[pretty_size [file size $file]]</span>)
|
||||
<a class=\"va footnote logclear\" href=# file=\"$file\">
|
||||
<img class=va border=0 src=/img/close.png width=20>Clear</a>
|
||||
<br>"
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,21 @@ $('#runrma').click(function(e) {
|
||||
});
|
||||
});
|
||||
|
||||
$('a.logclear').click(function(e) {
|
||||
var t = $(this);
|
||||
e.preventDefault();
|
||||
if (!confirm('Delete ' + $(this).attr('file') + '?'))
|
||||
return;
|
||||
$('#results')
|
||||
.slideDown()
|
||||
.text('\n\nClearing log, please wait...\n\n')
|
||||
.load('/log/act.jim?action=clear&file=' +
|
||||
encodeURIComponent($(this).attr('file')), function() {
|
||||
$('#results').wrapInner('<pre>');
|
||||
$(t).prev('span.lsize').html('0 bytes');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@ -7,8 +7,13 @@ source _lib.jim
|
||||
|
||||
cgi_input
|
||||
|
||||
httpheader
|
||||
|
||||
set file [cgi_get file "-"]
|
||||
if {$file ni $loglist} { exit }
|
||||
if {$file ni $loglist} {
|
||||
puts "$file is not a log file."
|
||||
exit
|
||||
}
|
||||
|
||||
set action [cgi_get action -]
|
||||
|
||||
|
@ -10,6 +10,15 @@ cgi_input
|
||||
|
||||
httpheader
|
||||
|
||||
proc quote {s} {
|
||||
return [string map {
|
||||
{&} {&}
|
||||
{"} {"}
|
||||
{<} {<}
|
||||
{>} {>}
|
||||
} $s]
|
||||
}
|
||||
|
||||
set file [cgi_get file "-"]
|
||||
if {$file eq "-"} { set file "/var/log/humaxtv.log" }
|
||||
if {$file ni $loglist} { exit }
|
||||
@ -25,7 +34,7 @@ set l 1
|
||||
while {![$fp eof]} {
|
||||
$fp gets line
|
||||
if {[$fp eof]} break
|
||||
puts "<tr><td>$l</td><td>[cgi_quote_html $line]</td></tr>"
|
||||
puts "<tr><td>$l</td><td>[quote $line]</td></tr>"
|
||||
incr l
|
||||
}
|
||||
$fp close
|
||||
|
@ -26,7 +26,8 @@ foreach file [lsort -command logsort $loglist] {
|
||||
if {$logf eq $file} {
|
||||
puts -nonewline " selected"
|
||||
}
|
||||
puts ">[file rootname [file tail $file]]$pf</option>"
|
||||
puts ">[file rootname [file tail $file]] ([pretty_size \
|
||||
[file size $file]]) $pf</option>"
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ div.pager
|
||||
td
|
||||
{
|
||||
padding: 3px !important;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
#buttons
|
||||
|
@ -72,6 +72,10 @@ if {![exists -proc require]} {
|
||||
foreach css $::_mws_css { _css $css }
|
||||
}
|
||||
|
||||
proc _jqplugin_sort {a b} {
|
||||
return $([string length $a] - [string length $b])
|
||||
}
|
||||
|
||||
proc jqplugin {args} {{done {}}} {
|
||||
foreach name $args {
|
||||
if {$name in $done} continue
|
||||
@ -80,11 +84,13 @@ if {![exists -proc require]} {
|
||||
if {![file isdirectory $dir]} {
|
||||
error "Unknown JQ Plugin - '$name'"
|
||||
}
|
||||
foreach file [glob -nocomplain "$dir/*.js"] {
|
||||
foreach file [lsort -command _jqplugin_sort [\
|
||||
glob -nocomplain "$dir/*.js"]] {
|
||||
set file [join [lrange [split $file /] 4 end] /]
|
||||
_js "/$file"
|
||||
}
|
||||
foreach file [glob -nocomplain "$dir/*.css"] {
|
||||
foreach file [lsort -command _jqplugin_sort [\
|
||||
glob -nocomplain "$dir/*.css"]] {
|
||||
set file [join [lrange [split $file /] 4 end] /]
|
||||
_css "/$file"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user