diff options
-rwxr-xr-x | web/nms.gathering.org/switches-json.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/nms.gathering.org/switches-json.pl b/web/nms.gathering.org/switches-json.pl index 8d3d88a..5ade700 100755 --- a/web/nms.gathering.org/switches-json.pl +++ b/web/nms.gathering.org/switches-json.pl @@ -16,8 +16,10 @@ my %json = (); while (my $ref = $q->fetchrow_hashref()) { $ref->{'placement'} =~ /\((-?\d+),(-?\d+)\),\((-?\d+),(-?\d+)\)/; my ($x1, $y1, $x2, $y2) = ($1, $2, $3, $4); + my $sysname = $ref->{'sysname'}; + $sysname =~ s/\..*$//; $json{$ref->{'switch'}} = { - sysname => $ref->{'sysname'}, + sysname => $sysname, x => $x2, y => $y2, width => $x1 - $x2, |