git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1983 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-06-23 20:14:23 +00:00
parent 84899871e1
commit 616c0afff1
7 changed files with 41 additions and 17 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.15-3
Version: 1.0.15-4
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.11),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),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),mongoose

View File

@ -10,14 +10,14 @@ cgi_input
set cmd [cgi_get cmd update]
proc opkg {cmd} {
puts ">>> opkg $cmd\r\n"
puts ">>> opkg $cmd"
set bcmd "|/mod/webif/lib/bin/opkg $cmd"
set fd [open $bcmd r]
while {[gets $fd line] >= 0} {
puts "$line\r\n"
puts "$line"
}
close $fd
puts "\r\n"
puts ""
}
httpheader "text/plain"
@ -26,11 +26,12 @@ if {$cmd eq "upgrade"} { opkg update }
opkg $cmd
if {$cmd eq "update" || $cmd eq "upgrade"} {
puts "Updating package meta information\r\n"
puts "Updating package meta information"
pkg fetchmeta
puts "Done.\r\n"
puts "Updating diagnostic meta information\r\n"
puts "Done."
puts ""
puts "Updating diagnostic meta information"
pkg fetchdiagmeta
puts "Done.\r\n"
puts "Done."
}

View File

@ -17,8 +17,7 @@ proc dedupprocess {file} {{seen {}}} {
set base [file tail [file rootname $file]]
set syn [dedupnormalise [$ts get synopsis] [$ts get title]]
# Escape special characters to create the filename.
regsub -all -- {[\/ &]} $syn "_" fn
regsub -all -- {[?]} $fn "" fn
set fn [system filename $syn]
set stat ok
if {[$ts inuse]} {

View File

@ -25,8 +25,10 @@ puts {
<option value=0>-- Select diag or type name in box below --
}
foreach diag [array names ::diagmeta] {
puts "<option value=\"$diag\">$diag\n"
catch {
foreach diag [array names ::diagmeta] {
puts "<option value=\"$diag\">$diag\n"
}
}
puts {

View File

@ -8,7 +8,12 @@ jqplugin enadis tabsupport filetree
jscss script.js style.css
header
set file [cgi_get file "/tmp/hosts"]
set file [cgi_get file -]
set backdesc [cgi_get backdesc "Back to diagnostics"]
set backlink [cgi_get backlink "/diag/diag.jim"]
if {$file ne "-"} {
puts "<script type=text/javascript>forcefile = '$file';</script>"
}
puts {
@ -33,10 +38,12 @@ class="ui-widget ui-corner-all"></textarea>
</fieldset>
<div class=cleft>
<button id=back>Back to diagnostics</button>
}
puts "<button id=back dst=\"$backlink\">$backdesc</button>"
puts {
</div>
<div class=cleft style="margin-top: 1em">
<div id=qedit class=cleft style="margin-top: 1em">
<fieldset>
<legend> Commonly edited files </legend>
<ul>

View File

@ -1,4 +1,6 @@
var forcefile = false;
$(function() {
var file = null;
@ -100,8 +102,8 @@ $('#revert').click(function() {
});
$('#back').click(function() {
window.location = '/diag/diag.jim';
});
window.location = $(this).attr('dst');
});
function createf_submit()
{
@ -148,4 +150,10 @@ $('a.qfile').on('click', function() {
loadfile($(this).text());
});
if (forcefile)
{
loadfile(forcefile);
$('#open,#create,#qedit').remove();
}
});

View File

@ -6,6 +6,11 @@ $(document).ready(function() {
var tswitch = false;
var stick = true;
// Retrieve the stored selected tab from the hash portion of the URL.
var curtab = ~~(window.location.hash.slice(1));
if (curtab < 0 || curtab > 2)
curtab = 0;
$('#opkgupdate')
.button()
.click(function() { tswitch = 2; execopkg('update'); })
@ -17,6 +22,7 @@ $(document).ready(function() {
.fadeIn('slow');
$('#pkgtabs').tabs({
active: curtab,
create: function(event, ui) {
$(ui.panel).html("<img src=/img/loading.gif>" +
"Loading data... Please wait...");
@ -24,6 +30,7 @@ $(document).ready(function() {
$('#pkgtabs').tabs('disable');
},
activate: function(event, ui) {
window.location.hash = ui.newTab.index();
if (busy)
{
alert('Please wait until the current ' +