From 1a448d0d7c53d25c87d31bd3b175f5b75644f618 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sun, 21 Feb 2016 18:59:40 +0000 Subject: nms: Refactoring work Moving SNMP into a separate module reduces startup time for all the stuff that doesn't need it. Currently comments are broken because the js hasn't been updated. --- web/nms.gathering.org/comment.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web/nms.gathering.org/comment.pl') diff --git a/web/nms.gathering.org/comment.pl b/web/nms.gathering.org/comment.pl index d22dcdc..7a45d76 100755 --- a/web/nms.gathering.org/comment.pl +++ b/web/nms.gathering.org/comment.pl @@ -5,9 +5,8 @@ use lib '../../include'; use nms::web; use strict; use warnings; -use Data::Dumper; -my $query = $nms::web::dbh->prepare('select sysname,extract(epoch from date_trunc(\'second\',time)) as time,state,username,id,comment from switch_comments natural join switches where state != \'delete\' order by time desc limit 1'); +my $query = $nms::web::dbh->prepare('select sysname,extract(epoch from date_trunc(\'second\',time)) as time,state,username,id,comment from switch_comments natural join switches where state != \'delete\' order by time desc'); $query->execute(); while (my $ref = $query->fetchrow_hashref()) { push @{$nms::web::json{'comments'}{$ref->{'sysname'}}{'comments'}},$ref; -- cgit v1.2.3