read database name from config
[irspy-moved-to-github.git] / web / htdocs / details / stats.mc
index c01c302..f44c349 100644 (file)
@@ -27,7 +27,8 @@ my $from_cache = 1;
 my $stats = $m->cache->get($key);
 if (!defined $stats || $reload) {
     $from_cache = 0;
-    $stats = new ZOOM::IRSpy::Stats("localhost:8018/IR-Explain---1", $query);
+    my $db = ZOOM::IRSpy::connect_to_registry();
+    $stats = new ZOOM::IRSpy::Stats($db, $query);
     $m->cache->set($key, $stats, "1 day");
 }
 </%perl>