browse plugins
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2460 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
1b698dbb2d
commit
9b5498af1c
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.2.4-1
|
||||
Version: 1.2.4-3
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.1.18),lighttpd(>=1.4.35-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.5),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7)
|
||||
|
@ -5,10 +5,13 @@ source /mod/webif/lib/setup
|
||||
require ts.class pretty_size system.class settings.class escape browse.class \
|
||||
plugin epg.class
|
||||
|
||||
set mroot [system mediaroot]
|
||||
set dir [cgi_get dir $mroot]
|
||||
|
||||
jqplugin contextMenu bar enadis
|
||||
jscss script.js style.css
|
||||
|
||||
set plugins { dmenu {} menu {} omenu {} }
|
||||
set plugins { dmenu {} menu {} omenu {} buttons {} }
|
||||
eval_plugins browse
|
||||
|
||||
header
|
||||
@ -266,9 +269,6 @@ proc entry {file} {{i 0}} {
|
||||
puts "</div>"
|
||||
}
|
||||
|
||||
set mroot [system mediaroot]
|
||||
set dir [cgi_get dir $mroot]
|
||||
|
||||
######################################################################
|
||||
# Render web page
|
||||
|
||||
@ -404,8 +404,6 @@ if {$nicesplice} {
|
||||
puts { <button id=join>Join</button> }
|
||||
}
|
||||
|
||||
puts "</div><div class=brow style=\"margin-top: 3px\">"
|
||||
|
||||
# De-duplicate
|
||||
|
||||
puts {
|
||||
@ -417,12 +415,24 @@ puts {
|
||||
if {[file exists /mnt/hd3/Streamer_down_file]} {
|
||||
puts {
|
||||
<button id=save_stream file=/mnt/hd3/Streamer_down_file>
|
||||
Save last streamed content (e.g. iPlayer/YouTube)
|
||||
<div id=streamstatus></div>
|
||||
Save last streamed content
|
||||
<span id=streamstatus></span>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
|
||||
# Plugin buttons
|
||||
|
||||
if {[llength $plugins(buttons)]} {
|
||||
puts "</div><div class=brow style=\"margin-top: 3px\">"
|
||||
foreach plugin $plugins(buttons) {
|
||||
lassign $plugin tag options
|
||||
puts "
|
||||
<button class=plugin act=\"$options(link)\">$options(desc)</button>
|
||||
"
|
||||
}
|
||||
}
|
||||
|
||||
puts "</div>"
|
||||
|
||||
footer
|
||||
|
@ -1010,6 +1010,11 @@ var dmenuclick = function(action, el, pos)
|
||||
});
|
||||
});
|
||||
|
||||
$('button.plugin').button().on('click', function() {
|
||||
window.location.href = $(this).attr('act');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('input.fs').change(function() {
|
||||
var num = $('input.fs:checked').size();
|
||||
if (num > 0)
|
||||
|
@ -126,22 +126,26 @@ foreach line [split [exec /mod/bin/smartctl -A $device] "\n"] {
|
||||
}
|
||||
set left ""
|
||||
if {$id ni $nolife &&
|
||||
[expr $flags & 0x18] == 0x10 && $val == $worst && $val <= 100} {
|
||||
[expr $flags & 0x18] == 0x10 && $val == $worst && $val <= 100 &&
|
||||
$thresh < 100} {
|
||||
# Event counter which is not a rate and has not regressed.
|
||||
set notes ""
|
||||
set left [expr 100 - 100 * (100 - $val) / (100 - $thresh)]
|
||||
if {$left < 10} { set class orangeshade }
|
||||
if {$rval > 0 && [dict exists $derive $id]} {
|
||||
if {$left < 100} {
|
||||
set total [expr \
|
||||
round(($rval / (100 - $left) * 100) \
|
||||
/ 10000) * 10000 \
|
||||
]
|
||||
set remain $($total - $rval)
|
||||
set notes "$remain of approximately $total $derive($id)"
|
||||
set notes "$remain of approximately"
|
||||
append notes " $total $derive($id)"
|
||||
}
|
||||
}
|
||||
set left "<span title=\"$notes\">$left%</span>"
|
||||
}
|
||||
if {[string match "*Temperature_Cel*" $name]} {
|
||||
if {$id == 190} {
|
||||
append val " ([expr 100 - $val]°C)"
|
||||
append worst " ([expr 100 - $worst]°C)"
|
||||
append thresh " ([expr 100 - $thresh]°C)"
|
||||
|
Loading…
Reference in New Issue
Block a user