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:
parent
ac93144789
commit
8cc2ef3d3f
@ -1,7 +1,7 @@
|
|||||||
Package: webif
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 0.8.1
|
Version: 0.8.1-1
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
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
|
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
25
var/mongoose/cgi-bin/cat.jim
Executable 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
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<!--#include virtual="/lib/header.shtml" -->
|
<!--#include virtual="/lib/header.shtml" -->
|
||||||
|
|
||||||
<fieldset style="display: inline">
|
<fieldset style="display: inline; float: left; clear: left">
|
||||||
<legend>Diagnostics</legend>
|
<legend>Diagnostics</legend>
|
||||||
Diagnostic:
|
Diagnostic:
|
||||||
<input name=seq id=seq value=general size=30 maxlength=50
|
<input name=seq id=seq value=general size=30 maxlength=50
|
||||||
@ -8,17 +8,29 @@ Diagnostic:
|
|||||||
<button id=rundiag>Run Diagnostic</button>
|
<button id=rundiag>Run Diagnostic</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div style="margin-top: 2em; display: none" class=pre id=results>
|
<fieldset style="display: inline; float: left; clear: left">
|
||||||
<br><br>
|
<legend>Log Files</legend>
|
||||||
<i>Running diagnostic, please wait...</i>
|
<!--#exec cmd="/mod/var/mongoose/include/logfiles.jim" -->
|
||||||
<br><br>
|
</fieldset>
|
||||||
</div>
|
|
||||||
|
<div style="margin-top: 2em; display: none; float: left; clear: left"
|
||||||
|
class=pre id=results></div>
|
||||||
|
|
||||||
<script type=text/javascript>
|
<script type=text/javascript>
|
||||||
$('#rundiag').button().click(function() {
|
$('#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()));
|
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>
|
</script>
|
||||||
|
|
||||||
<!--#include virtual="/lib/footer.shtml" -->
|
<!--#include virtual="/lib/footer.shtml" -->
|
||||||
|
BIN
var/mongoose/html/img/packages.png
Normal file
BIN
var/mongoose/html/img/packages.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
var/mongoose/html/img/spanner.png
Normal file
BIN
var/mongoose/html/img/spanner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
@ -65,7 +65,7 @@ $(document).ready(function() {
|
|||||||
<div style="float: left">
|
<div style="float: left">
|
||||||
<center>
|
<center>
|
||||||
<a href=/services.shtml>
|
<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>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<a href=/services.shtml>
|
<a href=/services.shtml>
|
||||||
@ -78,7 +78,7 @@ $(document).ready(function() {
|
|||||||
<div style="float: left">
|
<div style="float: left">
|
||||||
<center>
|
<center>
|
||||||
<a href=/pkg.shtml>
|
<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>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<a href=/pkg.shtml>
|
<a href=/pkg.shtml>
|
||||||
|
11
var/mongoose/include/logfiles.jim
Executable file
11
var/mongoose/include/logfiles.jim
Executable 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>"
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user