X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=web%2Fhtdocs%2Fdetails%2Fstats.mc;h=f44c349503e047452b2846ba5a7629bc1ab31fa7;hp=a1871cf9ea1b70b6bdf792ec9c33a16f15c5e267;hb=0ab30e7e20933507512444aed53bcb4ba84003b1;hpb=995c5be6913ecb0e8bf957573f6ce17b1444e1b0 diff --git a/web/htdocs/details/stats.mc b/web/htdocs/details/stats.mc index a1871cf..f44c349 100644 --- a/web/htdocs/details/stats.mc +++ b/web/htdocs/details/stats.mc @@ -1,4 +1,4 @@ -%# $Id: stats.mc,v 1.5 2006-12-18 15:38:09 mike Exp $ +%# $Id: stats.mc,v 1.9 2007-11-02 12:49:28 mike Exp $ <%doc> Here are the headings in the Z-Spy version: The ten most commonly supported Bib-1 Use attributes @@ -27,8 +27,9 @@ my $from_cache = 1; my $stats = $m->cache->get($key); if (!defined $stats || $reload) { $from_cache = 0; - $stats = new ZOOM::IRSpy::Stats("localhost:3313/IR-Explain---1", $query); - $m->cache->set($key, $stats, "10 minutes"); + my $db = ZOOM::IRSpy::connect_to_registry(); + $stats = new ZOOM::IRSpy::Stats($db, $query); + $m->cache->set($key, $stats, "1 day"); }

Statistics for <% xml_encode($stats->{host}) %>

@@ -55,6 +56,9 @@ if (!defined $stats || $reload) { <& table, stats => $stats, data => "domains", title => "Top Domains", headings => [ "Top Domain"] &> +<& table, stats => $stats, data => "implementation", + title => "Implementation", + headings => [ "Name" ], maxrows => 20 &> %# %# <%def table> @@ -62,6 +66,7 @@ if (!defined $stats || $reload) { $stats $data $title +$maxrows => 10 @headings $col3 => undef @@ -79,13 +84,13 @@ $col3 => undef my $hr; $hr = $stats->{$data}; my @sorted = sort { $hr->{$b} <=> $hr->{$a} || $a <=> $b } keys %$hr; -my $n = @sorted; $n = 10 if @sorted > 10; +my $n = @sorted; $n = $maxrows if @sorted > 10; foreach my $i (1..$n) { my $key = $sorted[$i-1]; <% $i %> - <% xml_encode($key, "HUH?") %> + <% xml_encode(substr($key, 0, 54), "HUH?") %> % if (defined $col3) { <% xml_encode(&$col3($key), "HUH2?") %> % }