diff options
author | Kristian Lyngstol <kly@kly@.no> | 2016-03-24 21:12:08 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly@.no> | 2016-03-24 21:12:08 +0100 |
commit | 7c6589dd177deaba473fdde3fd48c283f5e369bc (patch) | |
tree | 1ba2db50af4df1f7f869ac1d44cc715d4f6296dc | |
parent | 5ed1a58290c97371ba4e7de40f3a467c3d0b6ebe (diff) |
NMS: Expose ET-interfaces and more
-rwxr-xr-x | web/nms-public.gathering.org/api/public/switch-state | 2 | ||||
-rwxr-xr-x | web/nms.gathering.org/api/public/switch-state | 2 | ||||
-rw-r--r-- | web/nms.gathering.org/js/nms-info-box.js | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/web/nms-public.gathering.org/api/public/switch-state b/web/nms-public.gathering.org/api/public/switch-state index 2fff681..62e497c 100755 --- a/web/nms-public.gathering.org/api/public/switch-state +++ b/web/nms-public.gathering.org/api/public/switch-state @@ -19,7 +19,7 @@ while ( my $ref = $q->fetchrow_hashref() ) { for my $porti (keys %{$data{'ports'}}) { my %port = %{$data{'ports'}{$porti}}; my $smallport = $porti; - if (not $smallport =~ m/^ae/) { + if (not $smallport =~ m/^ae/ and not $smallport =~ m/^et/) { $smallport =~ s/[0-9-].*$//; } else { $json{'switches'}{$sysname}{ifs}{$smallport}{'ifAlias'} = $port{'ifAlias'}; diff --git a/web/nms.gathering.org/api/public/switch-state b/web/nms.gathering.org/api/public/switch-state index 2fff681..62e497c 100755 --- a/web/nms.gathering.org/api/public/switch-state +++ b/web/nms.gathering.org/api/public/switch-state @@ -19,7 +19,7 @@ while ( my $ref = $q->fetchrow_hashref() ) { for my $porti (keys %{$data{'ports'}}) { my %port = %{$data{'ports'}{$porti}}; my $smallport = $porti; - if (not $smallport =~ m/^ae/) { + if (not $smallport =~ m/^ae/ and not $smallport =~ m/^et/) { $smallport =~ s/[0-9-].*$//; } else { $json{'switches'}{$sysname}{ifs}{$smallport}{'ifAlias'} = $port{'ifAlias'}; diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index 6609664..a718f78 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -574,9 +574,11 @@ nmsInfoBox._makeCommentTable = function(content) { nmsInfoBox._searchSmart = function(id, sw) { try { - if (nmsData.switches.switches[sw].distro_name.toLowerCase() == id) { - return true; - } + try { + if (nmsData.switches.switches[sw].distro_name.toLowerCase() == id) { + return true; + } + } catch (e) {} if (id.match("active")) { var limit = id; limit = limit.replace("active>",""); |