aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/switches-json.pl
diff options
context:
space:
mode:
Diffstat (limited to 'web/nms.gathering.org/switches-json.pl')
-rwxr-xr-xweb/nms.gathering.org/switches-json.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/nms.gathering.org/switches-json.pl b/web/nms.gathering.org/switches-json.pl
index 5ade700..67017b4 100755
--- a/web/nms.gathering.org/switches-json.pl
+++ b/web/nms.gathering.org/switches-json.pl
@@ -9,7 +9,7 @@ my $cgi = CGI->new;
my $dbh = nms::db_connect();
-my $q = $dbh->prepare('select switch,sysname,placement from switches natural join placements');
+my $q = $dbh->prepare('select switch,sysname,placement,zorder from switches natural join placements');
$q->execute();
my %json = ();
@@ -23,7 +23,8 @@ while (my $ref = $q->fetchrow_hashref()) {
x => $x2,
y => $y2,
width => $x1 - $x2,
- height => $y1 - $y2
+ height => $y1 - $y2,
+ zorder => $ref->{'zorder'}
};
}
print $cgi->header(-type=>'text/json; charset=utf-8');