add logfiles/cat and improved images

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@512 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-11-16 21:40:53 +00:00
parent ac93144789
commit 8cc2ef3d3f
7 changed files with 58 additions and 10 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.8.1
Version: 0.8.1-1
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.7),hmt(>=1.1.1),ssmtp

25
var/mongoose/cgi-bin/cat.jim Executable file
View File

@ -0,0 +1,25 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require system.class chunked pretty_size
cgi_input
#cgi_dump
set file [cgi_get file "-"]
if {$file eq "-"} { exit }
start_chunked
if {![file exists $file]} {
chunk ">>> File $file does not exist.\r\n"
} else {
chunk ">>> Contents of $file [pretty_size [file size $file]]\r\n"
set fp [open $file r]
chunk [read $fp]
close $fp
}
end_chunked

View File

@ -1,6 +1,6 @@
<!--#include virtual="/lib/header.shtml" -->
<fieldset style="display: inline">
<fieldset style="display: inline; float: left; clear: left">
<legend>Diagnostics</legend>
Diagnostic:
<input name=seq id=seq value=general size=30 maxlength=50
@ -8,17 +8,29 @@ Diagnostic:
<button id=rundiag>Run Diagnostic</button>
</fieldset>
<div style="margin-top: 2em; display: none" class=pre id=results>
<br><br>
<i>Running diagnostic, please wait...</i>
<br><br>
</div>
<fieldset style="display: inline; float: left; clear: left">
<legend>Log Files</legend>
<!--#exec cmd="/mod/var/mongoose/include/logfiles.jim" -->
</fieldset>
<div style="margin-top: 2em; display: none; float: left; clear: left"
class=pre id=results></div>
<script type=text/javascript>
$('#rundiag').button().click(function() {
$('#results').slideDown().load('/cgi-bin/diag.jim?diag=' +
$('#results')
.slideDown()
.text('\n\nRunning diagnostic, please wait...\n\n')
.load('/cgi-bin/diag.jim?diag=' +
encodeURIComponent($('#seq').val()));
});
$('a.log').click(function() {
$('#results')
.slideDown()
.text('\n\nLoading log, please wait...\n\n')
.load('/cgi-bin/cat.jim?file=' +
encodeURIComponent($(this).attr('file')));
});
</script>
<!--#include virtual="/lib/footer.shtml" -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -65,7 +65,7 @@ $(document).ready(function() {
<div style="float: left">
<center>
<a href=/services.shtml>
<img src=/img/spanner.jpg border=0 width=217 height=228>
<img src=/img/spanner.png border=0 width=217 height=228>
</a>
<br>
<a href=/services.shtml>
@ -78,7 +78,7 @@ $(document).ready(function() {
<div style="float: left">
<center>
<a href=/pkg.shtml>
<img src=/img/packages.jpg border=0 width=217 height=228>
<img src=/img/packages.png border=0 width=217 height=228>
</a>
<br>
<a href=/pkg.shtml>

View File

@ -0,0 +1,11 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
foreach file [glob -nocomplain /tmp/*.log] {
puts "<a href=# class=log file=\"$file\">
<img border=0 height=14 src=/images/421_1_00_CH_Title_2R_Arrow.png>
[file tail $file]
</a><br>"
}