Trial with Tree builder
diff --git a/lib/Korap.pm b/lib/Korap.pm
index 584d31d..4e1d151 100644
--- a/lib/Korap.pm
+++ b/lib/Korap.pm
@@ -46,7 +46,7 @@
'/sass/tutorial.scss',
'/sass/hint.scss',
'/sass/query.scss',
- '/sass/table.scss',
+ '/sass/matchinfo.scss',
'/sass/pagination.scss',
'/sass/kwic-4.0.scss',
'/css/media.css',
@@ -59,9 +59,12 @@
$self->asset(
'korap.js' => (
+# '/js/d3.v3.min.js',
+# '/js/dagre-d3.min.js',
'/js/jquery-2.0.0.min.js',
'/js/tutorialCookie.js',
'/js/translateTable.js',
+# '/js/translateTree.js',
'/js/hint.js',
'/js/highlight.pack.js',
$self->notifications->scripts
@@ -112,9 +115,9 @@
# Match data
my $match = $doc->route('/:match_id');
$match->route->to('info#about_match')->name('match');
- my $match_layer = $match->route('/:layer');
- $match_layer->route->to('info#about_match');
- $match_layer->route('/:foundry')->to('info#about_match');
+# my $match_foundry = $match->route('/:foundry');
+# $match_foundry->route->to('info#about_match');
+# $match_foundry->route('/:layer')->to('info#about_match');
# Utilities
# $r->get('/util/query')->to('search#query');
diff --git a/lib/Korap/Info.pm b/lib/Korap/Info.pm
index 2780ebb..bc8fc05 100644
--- a/lib/Korap/Info.pm
+++ b/lib/Korap/Info.pm
@@ -10,10 +10,13 @@
my $foundry = '*';
my %query = (foundry => '*');
- if ($c->stash('foundry')) {
- $query{foundry} = $c->stash('foundry');
- if ($c->stash('layer')) {
- $query{layer} = $c->stash('layer');
+ if ($c->param('foundry')) {
+ $query{foundry} = $c->param('foundry');
+ if ($c->param('layer')) {
+ $query{layer} = $c->param('layer');
+ };
+ if ($c->param('spans')) {
+ $query{spans} = 'true';
};
};
@@ -24,7 +27,7 @@
)
},
html => sub {
- my $match = $c->match_info($corpus_id, $doc_id, $match_id);
+ my $match = $c->match_info($corpus_id, $doc_id, $match_id, %query);
if ($match->{error}) {
$c->notify(error => $match->{error});
return $c->render_exception('error');
diff --git a/lib/Korap/Plugin/KorapSearch.pm b/lib/Korap/Plugin/KorapSearch.pm
index 115bcb2..a0fc4a4 100644
--- a/lib/Korap/Plugin/KorapSearch.pm
+++ b/lib/Korap/Plugin/KorapSearch.pm
@@ -137,6 +137,10 @@
my $ua = Mojo::UserAgent->new;
+ # Set timeout to 2 minutes
+ # This may a bit too far for demo users
+ $ua->inactivity_timeout(120);
+
# Blocking request
# TODO: Make non-blocking
my $tx = $ua->get($url);