aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms-public.gathering.org/api/public/dhcp
diff options
context:
space:
mode:
authorOle Mathias Heggem <olemathias.aa.heggem@gmail.com>2023-01-21 19:07:38 +0100
committerOle Mathias Heggem <olemathias.aa.heggem@gmail.com>2023-01-21 19:07:38 +0100
commit709c78569b26677624e60588fa1166dc659ac93c (patch)
tree2bd5555af31b637d03693b8563fb24b41bf1f22b /web/nms-public.gathering.org/api/public/dhcp
parentf5da0d943401e527f5162e9c6344deb65b19b045 (diff)
chore: cleanup repo
Diffstat (limited to 'web/nms-public.gathering.org/api/public/dhcp')
-rwxr-xr-xweb/nms-public.gathering.org/api/public/dhcp20
1 files changed, 0 insertions, 20 deletions
diff --git a/web/nms-public.gathering.org/api/public/dhcp b/web/nms-public.gathering.org/api/public/dhcp
deleted file mode 100755
index 91d52af..0000000
--- a/web/nms-public.gathering.org/api/public/dhcp
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /usr/bin/perl
-# vim:ts=8:sw=8
-
-use lib '../../../../include';
-use nms::web qw (%json finalize_output);
-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() ) {
- my $sysname = $ref->{'sysname'};
- $json{'dhcp'}{$ref->{'sysname'}} = $ref->{'time'};
-}
-
-$nms::web::cc{'max-age'} = "5";
-$nms::web::cc{'stale-while-revalidate'} = "30";
-finalize_output();