diff options
author | Knut Auvor Grythe <knut@auvor.no> | 2015-04-02 22:55:33 +0200 |
---|---|---|
committer | root <root@einstein.tg15.gathering.org> | 2015-04-02 22:55:33 +0200 |
commit | a4fe4862c69d22ec8a2068bfc1f93a9d3d08d92e (patch) | |
tree | ec653f4a7393f2632b137cbe034d6ff307b46b13 | |
parent | c6f066a87d247583b7b48ab034e874d9ba057cb0 (diff) |
Mae the map use the new sql schema
-rwxr-xr-x | web/nms.gathering.org/uplinkkart.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/uplinkkart.pl b/web/nms.gathering.org/uplinkkart.pl index 48eefff..052fe9c 100755 --- a/web/nms.gathering.org/uplinkkart.pl +++ b/web/nms.gathering.org/uplinkkart.pl @@ -40,7 +40,7 @@ for my $ports (0..4) { $img->stringFT($blk, "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf", 10, 0, 40, $y + 10, $ports); } -my $q = $dbh->prepare(' select switch,sysname,(select placement from placements where placements.switch = switches.switch) as placement,count((ifoperstatus = 1) or null) as active_ports from switches natural left join get_operstatus() natural join placements where ifdescr = \'ge-0/0/44\' or ifdescr = \'ge-0/0/45\' or ifdescr = \'ge-0/0/46\' or ifdescr = \'ge-0/0/47\' group by switch,sysname'); +my $q = $dbh->prepare('select switch,sysname,(select placement from placements where placements.switch=switches.switch) as placement,count((ifhcinoctets > 0 and ifhcoutoctets > 0) or null) as active_ports from switches natural left join get_current_datarate() where (ifname = \'ge-0/0/44\' or ifname = \'ge-0/0/45\' or ifname = \'ge-0/0/46\' or ifname = \'ge-0/0/47\') and switchtype like \'%2200%\' group by switch,sysname'); $q->execute(); while (my $ref = $q->fetchrow_hashref()) { my $ports = $ref->{'active_ports'}; |