diff options
author | root <root@einstein.tg15.gathering.org> | 2015-03-31 14:00:09 +0200 |
---|---|---|
committer | root <root@einstein.tg15.gathering.org> | 2015-03-31 14:00:09 +0200 |
commit | 8a76ac019ac8f9c1409c4a34a74a4a38ae025d8c (patch) | |
tree | babd876bf36f6c6de0157acec7228c233964f2ef /web | |
parent | 49a9639ccd52d4a07a0a0263c948c3cfdf0bd696 (diff) |
Fix uplink map (requires SQL changes)
Diffstat (limited to 'web')
-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 135cd61..06160f9 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((bytes_in > 0 and bytes_out > 0) or null) as active_ports from switches natural left join get_current_datarate() natural join placements where port between 45 and 48 and switchtype like \'dlink3100%\' group by switch,sysname'); +my $q = $dbh->prepare(' select switch,sysname,(select placement from placements where placements.switch = switches.switch) as placement,count((operstatus = 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'); $q->execute(); while (my $ref = $q->fetchrow_hashref()) { my $ports = $ref->{'active_ports'}; |