aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/read/switches-management
diff options
context:
space:
mode:
authorroot <root@colazero.tele.tg18.gathering.org>2018-03-31 22:28:26 +0200
committerroot <root@colazero.tele.tg18.gathering.org>2018-03-31 22:28:26 +0200
commit38b48dd77b57b116f633b1cf5d68cc70a44b1ea8 (patch)
tree52b6b4a1af7c4aff3321f4ce60e88d4a483ba315 /web/api/read/switches-management
parentbe54730288b9925003e88788e65f11199cc8292b (diff)
Throw TG18-stuff over the wall
Diffstat (limited to 'web/api/read/switches-management')
-rwxr-xr-xweb/api/read/switches-management2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/api/read/switches-management b/web/api/read/switches-management
index 77badf4..c734eef 100755
--- a/web/api/read/switches-management
+++ b/web/api/read/switches-management
@@ -20,7 +20,7 @@ $nms::web::cc{'max-age'} = "5";
$nms::web::cc{'stale-while-revalidate'} = "30";
if (!defined($switch)) {
- $q2 = $nms::web::dbh->prepare('select switches.sysname, host(switches.mgmt_v4_addr) as mgmt_v4_addr, host(switches.mgmt_v6_addr) as mgmt_v6_addr, switches.mgmt_vlan, switches.traffic_vlan, switches.poll_frequency, switches.last_updated, switches.distro_name, switches.distro_phy_port, switches.community, traffic_net.subnet4, traffic_net.subnet6, mgmt_net.gw4 as mgmt_v4_gw, mgmt_net.gw6 as mgmt_v6_gw from switches left join networks as traffic_net on (switches.traffic_vlan = traffic_net.name) left join networks as mgmt_net on (switches.mgmt_vlan = mgmt_net.name) where switches.placement is not null and switches.deleted = false;');
+ $q2 = $nms::web::dbh->prepare('select switches.sysname, host(switches.mgmt_v4_addr) as mgmt_v4_addr, host(switches.mgmt_v6_addr) as mgmt_v6_addr, switches.mgmt_vlan, switches.traffic_vlan, switches.poll_frequency, switches.last_updated, switches.distro_name, switches.distro_phy_port, switches.community, traffic_net.subnet4, traffic_net.subnet6, host(mgmt_net.gw4) as mgmt_v4_gw, host(mgmt_net.gw6) as mgmt_v6_gw from switches left join networks as traffic_net on (switches.traffic_vlan = traffic_net.name) left join networks as mgmt_net on (switches.mgmt_vlan = mgmt_net.name) where switches.placement is not null and switches.deleted = false;');
} else {
$q2 = $nms::web::dbh->prepare('select sysname,host(mgmt_v4_addr) as mgmt_v4_addr,host(mgmt_v6_addr) as mgmt_v6_addr,mgmt_vlan,traffic_vlan,poll_frequency,last_updated,distro_name,distro_phy_port,community from switches where placement is not null and sysname = ' . $nms::web::dbh->quote($switch) . ' and switches.deleted = false;');
}