aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/api/public/dhcp-summary
diff options
context:
space:
mode:
authorNicolai Tellefsen <niccofyren@gmail.com>2016-03-26 07:30:07 +0100
committerNicolai Tellefsen <niccofyren@gmail.com>2016-03-26 07:30:07 +0100
commit5755c9a0ef2d72549aa6eb281c6769c8c171421d (patch)
treef13317e4903ec7de43e6fb46b6181a5730c27016 /web/nms.gathering.org/api/public/dhcp-summary
parent04b13311cedf90f57db5d53feea7349a008f628b (diff)
parentec0d348139403d7caba4ee4cbb99d893d8c741b8 (diff)
Merge branch 'master' of ssh://github.com/tech-server/tgmanage
Diffstat (limited to 'web/nms.gathering.org/api/public/dhcp-summary')
-rwxr-xr-xweb/nms.gathering.org/api/public/dhcp-summary7
1 files changed, 1 insertions, 6 deletions
diff --git a/web/nms.gathering.org/api/public/dhcp-summary b/web/nms.gathering.org/api/public/dhcp-summary
index dd643b2..a0e5609 100755
--- a/web/nms.gathering.org/api/public/dhcp-summary
+++ b/web/nms.gathering.org/api/public/dhcp-summary
@@ -5,16 +5,11 @@ use warnings;
use nms::web;
nms::web::setwhen('2h');
-my $q = $nms::web::dbh->prepare("select count(distinct mac) as clients,count(distinct ip) as addresses,count(mac) as acks from dhcp;");
-$q->execute();
-while (my $ref = $q->fetchrow_hashref()) {
- $nms::web::json{'dhcp'}{'total'} = $ref;
-}
my $q2 = $nms::web::dbh->prepare("select count(distinct mac) as clients,count(distinct ip) as addresses,count(mac) as acks from dhcp where $nms::web::when;");
$q2->execute();
while (my $ref = $q2->fetchrow_hashref()) {
- $nms::web::json{'dhcp'}{'recent'} = $ref;
+ $nms::web::json{'dhcp'} = $ref;
}
$nms::web::cc{'max-age'} = "10";
$nms::web::cc{'stale-while-revalidate'} = "15";