webif/var/mongoose/html/diag/diag.jim
hummypkg 57b78c4c0d new disk diagnostics. Progress on mobile
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1173 2a923420-c742-0410-a762-8d5b09965624
2012-10-25 23:31:09 +00:00

141 lines
2.7 KiB
Plaintext
Executable File

#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require pretty_size
puts "Content-Type: text/html"
puts ""
header
puts {
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=script.js></script>
<fieldset class=cleft>
<legend>Utilities</legend>
<table>
<tr>
<td>Run Diagnostic:</td>
<td><input name=seq id=seq autocorrect=off autocapitalize=off
value=general size=30 maxlength=50
class="text ui-widget-content ui-corner-all">
<button id=rundiag>Run Diagnostic</button>
</td>
</tr>
<tr>
<td>Package:</td>
<td><input name=fopkg id=fopkg autocorrect=off autocapitalize=off
value='' size=30 maxlength=50
class="text ui-widget-content ui-corner-all">
<button id=runfopkg>Force re-install</button>
</td>
</tr>
<tr><td colspan=2 style="height: 10px"></td></tr>
<tr>
<td colspan=2 align=center>
<button id=runedit style="width: 48%">File Editor</button>
<button id=dbinfo style="width: 48%">Database Browser</button>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<button id=diskdiag style="width: 48%">Hard Disc</button>
<button id=channelinfo style="width: 48%">Channel Information</button>
</td>
</tr>
}
if {[system model] eq "HDR"} {
puts {
<tr>
<td colspan=2 align=center>
<button id=dlna style="width: 48%">DLNA Server</button>
</td>
</tr>
}
}
puts {
<tr><td colspan=2 style="height: 10px"></td></tr>
<tr>
<td colspan=2>
<button id=reboot style="width: 100%">Reboot System</button>
</td>
</tr>
<tr>
<td colspan=2>
<button id=runreset style="width: 100%"
}
if {[system modversion 1] < 200} {
puts -nonewline " disabled class=ui-state-disabled"
}
puts {
>
Remove all custom firmware packages and settings
</button>
}
if {[system modversion 1] < 200} {
puts {
<div class=footnote style="text-align: center">
(Install custom firmware v2.00 to enable this option)
</div>
}
}
puts {
<div id=resetdone class="hidden blood">
Restart your Humax with the remote control.<br>
Allow it to turn off completely before restarting.<br>
</div>
</td>
</tr>
</table>
<span class=also style="padding-left: 5px">
View:
<a href=/jim/ref.html target=_blank>Jim Reference Manual</a> |
<a href=/jim/oo.html target=_blank>OO</a> |
<a href=/jim/sqlite.html target=_blank>Sqlite</a>
</span>
</fieldset>
<fieldset class=left>
<legend>View Log Files</legend>
}
foreach file [lsort [concat \
[glob -nocomplain /var/log/*.log] \
[glob -nocomplain /mod/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> ([pretty_size [file size $file]]) <br>"
}
puts {
</fieldset>
<div style="margin-top: 2em; display: none; float: left; clear: left"
id=results></div>
}
footer