forked from hummypkg/webif
allow restart cancel, improve logfile list
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@629 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
75b31696c5
commit
c2ec779465
@ -8,6 +8,12 @@ puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
|
||||
if {[cgi_get act] eq "cancel"} {
|
||||
file delete /tmp/.restartpending
|
||||
exit
|
||||
}
|
||||
|
||||
if {[cgi_get now] eq "yes"} {
|
||||
# - Busybox reboot does sync the disk but may still not be clean enough.
|
||||
puts "Restarting."
|
||||
|
@ -4,7 +4,7 @@ source /mod/var/mongoose/lib/setup
|
||||
require pretty_size
|
||||
|
||||
foreach file [concat \
|
||||
[glob -nocomplain /tmp/*.log] \
|
||||
[glob -nocomplain /var/log/*.log] \
|
||||
[glob -nocomplain /mod/tmp/*.log] \
|
||||
] {
|
||||
puts "<a href=# class=log file=\"$file\">
|
||||
|
@ -25,17 +25,23 @@ if {[system busy]} {
|
||||
}
|
||||
|
||||
puts {
|
||||
<small><button id=restart_cancel>Hide</button></small>
|
||||
</font>
|
||||
</div>
|
||||
<div style="width: 60%; height: 0.7em; margin-bottom: 2em;
|
||||
background: url(/img/stripes.gif) repeat-x;"></div>
|
||||
</center>
|
||||
<script type=text/javascript>
|
||||
$('#restart_humaxtv').button();
|
||||
$('#restart_humaxtv').click(function() {
|
||||
$('#restart_humaxtv').button()
|
||||
.click(function() {
|
||||
if (confirm('Are you sure you wish to perform a restart now?'))
|
||||
window.location = '/cgi-bin/restart.jim';
|
||||
});
|
||||
$('#restart_cancel').button()
|
||||
.click(function() {
|
||||
$.get('/cgi-bin/restart.jim?act=cancel');
|
||||
$('#restart_block').slideUp('slow');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user