update stats web page to use db data

This commit is contained in:
Oliver Gorwits
2017-06-28 14:41:16 +01:00
parent adeeaaf9bd
commit 36cea3ad57
2 changed files with 48 additions and 53 deletions

View File

@@ -9,7 +9,7 @@ get '/ajax/content/statistics' => require_login sub {
my $stats = schema('netdisco')->resultset('Statistics')
->search(undef, { order_by => { -desc => 'day' }, rows => 1 });
$stats = ($stats->count ? $stats->first->hri : undef);
$stats = ($stats->count ? $stats->first : undef);
var( nav => 'statistics' );
template 'ajax/statistics.tt',