diff options
author | Ole Mathias Heggem <ole@sdok.no> | 2017-04-19 23:16:07 +0200 |
---|---|---|
committer | Ole Mathias Heggem <ole@sdok.no> | 2017-04-19 23:16:07 +0200 |
commit | 7b97188b728c85c498acc8acdce1750c472f2c85 (patch) | |
tree | 12c1436ab7eb97e9434e774671e8ffea134d61db /web/api/read/switches-management | |
parent | f70f65f7466a480a45a8260b35887cb7ed36b466 (diff) | |
parent | 7d404abf07d865d253ac2cfc353741e8d4af4867 (diff) |
Merge remote-tracking branch 'refs/remotes/tech-server/master'
Diffstat (limited to 'web/api/read/switches-management')
-rwxr-xr-x | web/api/read/switches-management | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/api/read/switches-management b/web/api/read/switches-management index 425262e..9d8bc53 100755 --- a/web/api/read/switches-management +++ b/web/api/read/switches-management @@ -20,9 +20,9 @@ $nms::web::cc{'max-age'} = "5"; $nms::web::cc{'stale-while-revalidate'} = "30"; if (!defined($switch)) { - $q2 = $nms::web::dbh->prepare('select sysname,mgmt_v4_addr,subnet4,subnet6,mgmt_v6_addr,mgmt_v4_gw,mgmt_v6_gw,mgmt_vlan,traffic_vlan,poll_frequency,last_updated,distro_name,distro_phy_port,community from switches where placement is not null'); + $q2 = $nms::web::dbh->prepare('select sysname,host(mgmt_v4_addr) as mgmt_v4_addr,subnet4,subnet6,host(mgmt_v6_addr) as mgmt_v6_addr,host(mgmt_v4_gw) as mgmt_v4_gw,host(mgmt_v6_gw) as mgmt_v6_gw,mgmt_vlan,traffic_vlan,poll_frequency,last_updated,distro_name,distro_phy_port,community from switches where placement is not null'); } else { - $q2 = $nms::web::dbh->prepare('select sysname,mgmt_v4_addr,subnet4,subnet6,mgmt_v6_addr,mgmt_v4_gw,mgmt_v6_gw,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) . ';'); + $q2 = $nms::web::dbh->prepare('select sysname,host(mgmt_v4_addr) as mgmt_v4_addr,subnet4,subnet6,host(mgmt_v6_addr) as mgmt_v6_addr,host(mgmt_v4_gw) as mgmt_v4_gw,host(mgmt_v6_gw) as mgmt_v6_gw,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) . ';'); } $q2->execute(); |