projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add wrapper to read the IRSpy database name from environment variable / apache config
[irspy-moved-to-github.git]
/
web
/
htdocs
/
details
/
found.mc
diff --git
a/web/htdocs/details/found.mc
b/web/htdocs/details/found.mc
index
7c404f0
..
0f44196
100644
(file)
--- a/
web/htdocs/details/found.mc
+++ b/
web/htdocs/details/found.mc
@@
-1,4
+1,4
@@
-%# $Id: found.mc,v 1.21 2006-11-29 18:21:15 mike Exp $
+%# $Id: found.mc,v 1.33 2009-04-15 18:16:46 wosch Exp $
<%once>
sub print_navlink {
my($params, $cond, $caption, $skip) = @_;
<%once>
sub print_navlink {
my($params, $cond, $caption, $skip) = @_;
@@
-23,7
+23,7
@@
sub navlink {
our $conn = undef;
</%once>
<%perl>
our $conn = undef;
</%once>
<%perl>
-my %params = map { ( $_, $r->param($_)) } grep { $r->param($_) } $r->param();
+my %params = map { ( $_, utf8param($r, $_)) } grep { &utf8param($r, $_) } &utf8param($r);
my $query;
if ($params{_query}) {
$query = $params{_query};
my $query;
if ($params{_query}) {
$query = $params{_query};
@@
-37,7
+37,7
@@
if ($params{_query}) {
$query .= "$key = ($val)";
}
}
$query .= "$key = ($val)";
}
}
-$query = 'cql.allRecords=x' if $query eq "";
+$query = 'cql.allRecords=1' if $query eq "";
my $sort = $params{"_sort"};
if ($sort) {
my $sort = $params{"_sort"};
if ($sort) {
@@
-54,8
+54,9
@@
if ($sort) {
my $tried_to_open = 0;
if (!defined $conn) {
OPEN:
my $tried_to_open = 0;
if (!defined $conn) {
OPEN:
- $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1");
+ $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
$conn->option(elementSetName => "zeerex");
$conn->option(elementSetName => "zeerex");
+ $conn->option(count => 20);
}
my $rs;
}
my $rs;
@@
-100,7
+101,8
@@
print_navlink(\%params, $last < $n, "Next", $skip+$count);
<tr class="thleft">
<th>#</th>
<th>Title</th>
<tr class="thleft">
<th>#</th>
<th>Title</th>
- <th>Author</th>
+ <th>Host Connection Reliability <& /help/link.mc, help => "info/reliability" &>
+ </th>
<th>Host</th>
<th>Port</th>
<th>DB</th>
<th>Host</th>
<th>Port</th>
<th>DB</th>
@@
-108,31
+110,30
@@
print_navlink(\%params, $last < $n, "Next", $skip+$count);
<th></th>
</tr>
% my @ids;
<th></th>
</tr>
% my @ids;
+% $rs->records($first-1, $last-$first+1); ## Force pre-cache
% foreach my $i ($first .. $last) {
<%perl>
my $xc = irspy_xpath_context($rs->record($i-1));
% foreach my $i ($first .. $last) {
<%perl>
my $xc = irspy_xpath_context($rs->record($i-1));
-my $title = $xc->find("e:databaseInfo/e:title");
-my $author = $xc->find("e:databaseInfo/e:author");
+my $title = $xc->find("e:databaseInfo/e:title") || "[UNTITLED]";
+my $reliability = calc_reliability_string($xc);
my $host = $xc->find("e:serverInfo/e:host");
my $port = $xc->find("e:serverInfo/e:port");
my $db = $xc->find("e:serverInfo/e:database");
my $host = $xc->find("e:serverInfo/e:host");
my $port = $xc->find("e:serverInfo/e:port");
my $db = $xc->find("e:serverInfo/e:database");
-my $id = $xc->find("concat(e:serverInfo/e:host, ':',
- e:serverInfo/e:port, '/',
- e:serverInfo/e:database)");
+my $id = irspy_record2identifier($xc);
push @ids, $id;
</%perl>
<tr style="background: <% ($i % 2) ? '#ffffc0' : 'white' %>">
<td><% $i %></td>
<td><a href="<% xml_encode("/full.html?id=" . uri_escape($id))
push @ids, $id;
</%perl>
<tr style="background: <% ($i % 2) ? '#ffffc0' : 'white' %>">
<td><% $i %></td>
<td><a href="<% xml_encode("/full.html?id=" . uri_escape($id))
- %>"><% xml_encode($title, "[untitled]") %></a></td>
- <td><% xml_encode($author, "") %></td>
+ %>"><% xml_encode($title) %></a></td>
+ <td><% xml_encode($reliability, "", { nbsp => 1 }) %></td>
<td><% xml_encode($host, "") %></td>
<td><% xml_encode($port, "") %></td>
<td><% xml_encode($db, "") %></td>
<td>
<td><% xml_encode($host, "") %></td>
<td><% xml_encode($port, "") %></td>
<td><% xml_encode($db, "") %></td>
<td>
- <a href="<% xml_encode("/check.html?id=" . uri_escape($id))
+ <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id))
%>" title="Test this target">Test</a
%>" title="Test this target">Test</a
- > <a href="<% xml_encode("/edit.html?op=edit&id=" .
+ > <a href="<% xml_encode("/admin/edit.html?op=edit&id=" .
uri_escape($id))
%>" title="Edit this target's record">Edit</a
> <a href="<% xml_encode("/raw.html?id=" . uri_escape($id))
uri_escape($id))
%>" title="Edit this target's record">Edit</a
> <a href="<% xml_encode("/raw.html?id=" . uri_escape($id))
@@
-146,8
+147,12
@@
print_navlink(\%params, $skip > 0, "Prev", $count < $skip ? $skip-$count : 0);
print_navlink(\%params, $last < $n, "Next", $skip+$count);
</%perl>
<p>
print_navlink(\%params, $last < $n, "Next", $skip+$count);
</%perl>
<p>
- <a href="<% "/check.html?" .
+ <a href="<% "/admin/check.html?" .
xml_encode(join("&", map { "id=" . uri_escape($_) } @ids))
%>">[Test all targets on this list]</a>
</p>
xml_encode(join("&", map { "id=" . uri_escape($_) } @ids))
%>">[Test all targets on this list]</a>
</p>
+ <p>
+ <a href="<% "/stats.html?query=" . xml_encode(uri_escape($query))
+ %>">[Statistics for targets on this list]</a>
+ </p>
% }
% }