diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2018-03-17 18:03:23 +0100 |
---|---|---|
committer | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2018-03-17 18:03:23 +0100 |
commit | dc97b997e8d6e5edc63c598c05090a8b98e79757 (patch) | |
tree | 42762b3582ec8416cc70527c178dda6498b90f19 /web/api/read/switches-management | |
parent | 8607a0880724eca35c220f7c26a138d9f0f50f72 (diff) |
Added support for delete switches
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 9d8bc53..9182b60 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,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'); + $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 deleted = false'); } else { - $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 = $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 deleted = false and sysname = ' . $nms::web::dbh->quote($switch) . ';'); } $q2->execute(); |