diff --git a/CONTROL/control b/CONTROL/control index 4b8d36e..edd8b50 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.10.0-3 +Version: 0.10.0-4 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim index bba63ce..d924ff0 100755 --- a/var/mongoose/cgi-bin/settings.jim +++ b/var/mongoose/cgi-bin/settings.jim @@ -2,8 +2,7 @@ package require cgi source /mod/webif/lib/setup -require settings.class -require plugin +require settings.class plugin system.class puts "Content-Type: text/html" puts "" @@ -22,6 +21,17 @@ if {[cgi_get act] eq "https"} { exit } +if {[cgi_get act] eq "xtelnet"} { + if {[cgi_get val off] eq "off"} { + file delete /mod/boot/xtelnet + puts "Telnet server expert mode will be disabled after next reboot." + } else { + exec /mod/bin/busybox/touch /mod/boot/xtelnet + puts "Telnet server expert mode will be enabled after next reboot." + } + exit +} + set settings [settings new] set hostname [$settings hostname] @@ -144,6 +154,21 @@ puts "> " +if {[system modversion 1] >= 214} { + +puts -nonewline " + + Expert mode telnet server? + +
+ + +" + +} + puts -nonewline " Slide-down toolbar? diff --git a/var/mongoose/cgi-bin/settings.js b/var/mongoose/cgi-bin/settings.js index a395f3f..b789668 100644 --- a/var/mongoose/cgi-bin/settings.js +++ b/var/mongoose/cgi-bin/settings.js @@ -76,6 +76,26 @@ $(document).ready(function () { }); }); + $('#xtelnet_toggle').change(function() { + var arg = 'off'; + if ($(this).attr('checked')) + arg = 'on'; + + $(this).disable(); + + $('#xtelnet_output') + .empty() + .html('Please Wait...') + .show('slow') + .load('/cgi-bin/settings.jim?act=xtelnet&val=' + arg, + function() { + $('#xtelnet_toggle').enable(); + $('#xtelnet_output') + .css('font-style', 'italic') + .delay(2000).fadeOut('slow'); + }); + }); + $('#toolbar_toggle').change(function() { var arg = '1'; if ($(this).attr('checked')) diff --git a/var/mongoose/cgi-bin/status.jim b/var/mongoose/cgi-bin/status.jim index a59ce8f..5c9ecae 100755 --- a/var/mongoose/cgi-bin/status.jim +++ b/var/mongoose/cgi-bin/status.jim @@ -2,20 +2,25 @@ package require cgi source /mod/webif/lib/setup -require system.class findhsvc epg.class +require system.class findhsvc epg.class rsv.class set runmode cli if {[string match {*jim} $argv0]} { set runmode cgi } -cgi_input - -set type [cgi_get type "full"] - -if {$runmode eq "cgi"} { +set schedtime 900 +case $runmode { + cgi { + cgi_input + set type [cgi_get type "full"] puts "Content-Type: text/html" puts "Pragma: no-cache" puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT" puts "" + } + cli { + set type "full" + if {"-X" in $argv} { set schedtime 7200 } + } } if {[catch {set pid [exec pgrep humaxtv]}]} { @@ -146,6 +151,29 @@ if {[system instandby]} { } } +set events [rsv list tbl_reservation \ + " where ersvtype = 3 and nsttime - [clock seconds] < $schedtime + and nsttime > [clock seconds] "] +foreach event $events { + if {$runmode eq "cgi"} { + set icon "175_1_11_Reservation_Record.png" + lappend output [concat \ + "\n" \ + " \n" \ + " Will record [$event name]" \ + " on [$event channel_name] at"\ + " [clock format [$event get nsttime] -format {%H:%M}]" \ + " \n" \ + "\n" \ + } else { + lappend output [concat \ + "Will record '[$event name]' " \ + "on [$event channel_name] at " \ + "[clock format [$event get nsttime] -format {%H:%M}]" \ + ] + } +} + if {[llength $output]} { if {$runmode eq "cgi"} { puts [join $output "\n
\n"] diff --git a/var/mongoose/html/css/style.css b/var/mongoose/html/css/style.css index 61eeb54..1fcd684 100644 --- a/var/mongoose/html/css/style.css +++ b/var/mongoose/html/css/style.css @@ -400,3 +400,8 @@ button.red color: #ffffff; } +div#restart_block +{ + z-index: 31; +} + diff --git a/var/mongoose/html/diag/disk.jim b/var/mongoose/html/diag/disk.jim index 1fdad3b..423b452 100755 --- a/var/mongoose/html/diag/disk.jim +++ b/var/mongoose/html/diag/disk.jim @@ -138,8 +138,12 @@ puts { } +if {[catch {set msg [exec /mod/bin/smartctl -l selftest $device]} xmsg]} { + set msg $xmsg +} + set i 0 -foreach line [split [exec /mod/bin/smartctl -l selftest $device] "\n"] { +foreach line [split $msg "\n"] { regsub -all -- {[[:space:]][[:space:]]+} $line "|" line if {[incr i] < 7} continue lassign [split $line "|"] id name status remaining when lba diff --git a/var/mongoose/include/menuicons.jim b/var/mongoose/include/menuicons.jim index 4b75d7e..9dfa412 100755 --- a/var/mongoose/include/menuicons.jim +++ b/var/mongoose/include/menuicons.jim @@ -8,11 +8,11 @@ proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} { if {$title eq ""} return if {$num > 4} { puts {
} - set num 0 + set num 1 } if {$extra ne ""} { append extra " " } puts -nonewline " -
+