X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=web%2Fhtdocs%2Fdetails%2Ffound.mc;h=e4312fb69e086c933b9ecb2c95dc118c5e48c827;hb=a83e6f252aa3b3cba0f10a190b9afb6ddf28ec43;hp=156a7f216679d192b8c7b30c598987fe7cdde8cd;hpb=38ef7e0de0bae04ba0246355a4b197590f0afa22;p=irspy-moved-to-github.git diff --git a/web/htdocs/details/found.mc b/web/htdocs/details/found.mc index 156a7f2..e4312fb 100644 --- a/web/htdocs/details/found.mc +++ b/web/htdocs/details/found.mc @@ -1,4 +1,3 @@ -%# $Id: found.mc,v 1.31 2007-07-04 20:54:11 mike Exp $ <%once> sub print_navlink { my($params, $cond, $caption, $skip) = @_; @@ -19,27 +18,11 @@ sub navlink { return $url; } -# Identical to the same-named function in full.mc -# So maybe this should go into IRSpy::Utils.pm? -# Name changed (append 2) to prevent inadvertent clashes in Mason namespace -# -sub calc_reliability2 { - my($xc) = @_; - - my @allpings = $xc->findnodes("i:status/i:probe"); - my $nall = @allpings; - return "[untested]" if $nall == 0; - my @okpings = $xc->findnodes('i:status/i:probe[@ok = "1"]'); - my $nok = @okpings; - return "$nok/$nall = " . int(100*$nok/$nall) . "%"; -} - - # Just make this once; forge the connection on first use our $conn = undef; %once> <%perl> -my %params = map { ( $_, utf8param($r, $_)) } grep { $r->param($_) } $r->param(); +my %params = map { ( $_, utf8param($r, $_)) } grep { &utf8param($r, $_) } &utf8param($r); my $query; if ($params{_query}) { $query = $params{_query}; @@ -70,8 +53,10 @@ if ($sort) { my $tried_to_open = 0; if (!defined $conn) { OPEN: - $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1"); + my $db = ZOOM::IRSpy::connect_to_registry(); + $conn = new ZOOM::Connection($db); $conn->option(elementSetName => "zeerex"); + $conn->option(count => 20); } my $rs; @@ -116,7 +101,7 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count);