From 89c78bc9eab3b69fe31babe5e64f0343386f67be Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Tue, 22 Mar 2016 15:06:50 +0100 Subject: NMS: DHCP map --- web/nms.gathering.org/api/public/dhcp | 1 + 1 file changed, 1 insertion(+) (limited to 'web/nms.gathering.org/api/public/dhcp') diff --git a/web/nms.gathering.org/api/public/dhcp b/web/nms.gathering.org/api/public/dhcp index d432af0..91d52af 100755 --- a/web/nms.gathering.org/api/public/dhcp +++ b/web/nms.gathering.org/api/public/dhcp @@ -7,6 +7,7 @@ use strict; use warnings; use Data::Dumper; +nms::web::setwhen('60m'); my $q = $nms::web::dbh->prepare('select distinct on (sysname) extract(epoch from date_trunc(\'second\',time)) as time,sysname from dhcp join switches on dhcp.switch = switches.switch where ' . $nms::web::when . ' order by sysname,time desc;'); $q->execute(); while ( my $ref = $q->fetchrow_hashref() ) { -- cgit v1.2.3