diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-02-21 18:59:40 +0000 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-02-21 18:59:40 +0000 |
commit | 1a448d0d7c53d25c87d31bd3b175f5b75644f618 (patch) | |
tree | ac91a62ff0928ede012c0c114eeacdc2f43dbbc8 /web/nms.gathering.org/comment.pl | |
parent | 47e4039f8fae192f268a13b08e64424d835edb83 (diff) |
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.
Diffstat (limited to 'web/nms.gathering.org/comment.pl')
-rwxr-xr-x | web/nms.gathering.org/comment.pl | 3 |
1 files changed, 1 insertions, 2 deletions
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; |