diff options
author | Kristian Lyngstol <kly@kly@.no> | 2016-03-26 03:48:12 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly@.no> | 2016-03-26 03:48:12 +0100 |
commit | 004f4efcfd0779f4307b90fed139dc87d01ad0b9 (patch) | |
tree | f63bef356ae23f63e81e79d54c2cc911c4937004 /web/nms.gathering.org/api/public/switch-state | |
parent | 25409cdc01450279ce56b78ce962956a9990a175 (diff) |
NMS: Various performance tweaks
Diffstat (limited to 'web/nms.gathering.org/api/public/switch-state')
-rwxr-xr-x | web/nms.gathering.org/api/public/switch-state | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/nms.gathering.org/api/public/switch-state b/web/nms.gathering.org/api/public/switch-state index 0e28cfd..a6caea9 100755 --- a/web/nms.gathering.org/api/public/switch-state +++ b/web/nms.gathering.org/api/public/switch-state @@ -19,6 +19,9 @@ while ( my $ref = $q->fetchrow_hashref() ) { for my $porti (keys %{$data{'ports'}}) { my %port = %{$data{'ports'}{$porti}}; my $smallport = $porti; + if ($porti =~ m/\.0$/) { + next; + } if (not $smallport =~ m/^ae/ and not $smallport =~ m/^et/) { $smallport =~ s/[0-9-].*$//; } else { @@ -59,6 +62,9 @@ while ( my $ref = $q2->fetchrow_hashref() ) { for my $porti (keys %{$data{'ports'}}) { my %port = %{$data{'ports'}{$porti}}; my $smallport = $porti; + if ($porti =~ m/\.0$/) { + next; + } if (not $smallport =~ m/^ae/ and not $smallport =~ m/^et/) { $smallport =~ s/[0-9-].*$//; } else { |