X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb%2FController%2FStexaminer.pm;h=a0f4fcba5976e7948c606a737df01e3217f7c796;hb=70ccaf75795f26f7951a91db4a3c26229d68d5db;hp=1449ad209eed3528c4e3fafe98ea182144db3188;hpb=0737e7ddd147f7cc1c9b5ef087ca04dcce238b54;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb/Controller/Stexaminer.pm b/lib/stemmaweb/Controller/Stexaminer.pm index 1449ad2..a0f4fcb 100644 --- a/lib/stemmaweb/Controller/Stexaminer.pm +++ b/lib/stemmaweb/Controller/Stexaminer.pm @@ -37,7 +37,7 @@ sub index :Path :Args(1) { $c->stash->{text_title} = $tradition->name; $c->stash->{template} = 'stexaminer.tt'; # TODO Run the analysis as AJAX from the loaded page. - my $t = run_analysis( $tradition ); + my $t = run_analysis( $tradition, 'exclude_type1' => 1 ); # Stringify the reading groups foreach my $loc ( @{$t->{'variants'}} ) { my $mst = wit_stringify( $loc->{'missing'} ); @@ -47,10 +47,13 @@ sub index :Path :Args(1) { $rhash->{'group'} = $gst; } } + # Values for TT rendering $c->stash->{variants} = $t->{'variants'}; $c->stash->{total} = $t->{'variant_count'}; $c->stash->{genealogical} = $t->{'genealogical_count'}; - $c->stash->{conflict} = $t->{'conflict_count'}; + $c->stash->{conflict} = $t->{'conflict_count'}; + # Also make a JSON stash of the data for the statistics tables + $c->stash->{reading_statistics} = to_json( $t->{'variants'} ); } else { $c->stash->{error} = 'Tradition ' . $tradition->name . 'has no stemma for analysis.';