changes for rs

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@328 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-08-31 21:47:43 +00:00
parent 0852c70891
commit 1d6917a782
4 changed files with 64 additions and 4 deletions

View File

@ -35,7 +35,7 @@ puts {
<script type=text/javascript> <script type=text/javascript>
$('#restart_humaxtv').button(); $('#restart_humaxtv').button();
$('#restart_humaxtv').click(function() { $('#restart_humaxtv').click(function() {
if (confirm('Are you sure you wish to perform a warm restart now?')) if (confirm('Are you sure you wish to perform a restart now?'))
window.location = '/cgi-bin/restart.jim'; window.location = '/cgi-bin/restart.jim';
}); });
</script> </script>

View File

@ -127,10 +127,10 @@ proc eventrow {event {table TBL_RESERVATION}} {
} }
if {$rsvicon ne ""} { if {$rsvicon ne ""} {
set rsvicon "<img src='images/$rsvicon' height=20> set rsvicon "<img src='/images/$rsvicon' height=20>
} }
if {$RKIcon ne ""} { if {$RKIcon ne ""} {
set RKIcon "<img src='images/$RKIcon' height=20> set RKIcon "<img src='/images/$RKIcon' height=20>
} }
if {$table eq "pending"} { if {$table eq "pending"} {

41
var/mongoose/lib/findhsvc Executable file
View File

@ -0,0 +1,41 @@
if {![exists -proc findhsvc]} {
require rsv.class
proc findhsvc {channel} {
global rsvdb
set hsvc [$rsvdb query "
select hSvc
from channel.TBL_SVC
where szSvcName = '$channel'
or szSvcname = '\025$channel'
limit 1
"]
if {[llength $hsvc] == 1} {
return [lindex [lindex $hsvc 0] 1]
} else {
return 0
}
}
proc findhsvcbylcn {lcn} {
global rsvdb
set hsvc [$rsvdb query "
select hSvc
from channel.TBL_SVC
where usLcn = $lcn
limit 1
"]
if {[llength $hsvc] == 1} {
return [lindex [lindex $hsvc 0] 1]
} else {
return 0
}
}
}

View File

@ -65,7 +65,7 @@ rsv method name {} {
5 { set name "--- Wake-up ---" } 5 { set name "--- Wake-up ---" }
6 { set name "--- Sleep ---" } 6 { set name "--- Sleep ---" }
7 { set name "--- Auto Update ---" } 7 { set name "--- Auto Update ---" }
11 { set name "--- DSO Event? ---" } 11 { set name "--- DSO Event ---" }
default { set name "--- Unknown event type $ersvtype ---" } default { set name "--- Unknown event type $ersvtype ---" }
} }
} }
@ -237,6 +237,25 @@ proc {rsv entry} {{table TBL_RESERVATION} crid svc} {
return 0 return 0
} }
proc {rsv fetch} {{table TBL_RESERVATION} hsvc nsttime usevtid events} {
set res [$::rsvdb query "
select $table.*,
channel.TBL_SVC.szSvcName, channel.TBL_SVC.usLcn
from $table
left join channel.TBL_SVC
on $table.hSvc = channel.TBL_SVC.hSvc
where $table.hsvc = '%s'
and $table.nsttime = '%s'
and $table.usevtid = '%s'
and $table.szEventToRecord = '%s'
" $hsvc $nsttime $usevtid $events]
if {[llength $res] > 0} {
return [rsv new [lindex $res 0]]
}
return 0
}
proc {rsv slot} {{table TBL_RESERVATION} slot} { proc {rsv slot} {{table TBL_RESERVATION} slot} {
set res [$::rsvdb query " set res [$::rsvdb query "
select $table.*, select $table.*,