diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2025-04-13 07:18:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-13 07:18:45 +0200 |
commit | 4ea3a099b05fa910498bfbf1b2d7387118355472 (patch) | |
tree | c248cf6764412471ee3e0d1218761bee19fb396a /web/api/public/distro-tree | |
parent | 09710c061d5b8ae86b3dfe49f4b8936c13a10535 (diff) |
Diffstat (limited to 'web/api/public/distro-tree')
-rwxr-xr-x | web/api/public/distro-tree | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/web/api/public/distro-tree b/web/api/public/distro-tree deleted file mode 100755 index 49ce607..0000000 --- a/web/api/public/distro-tree +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/perl -# vim:ts=8:sw=8 - -use CGI qw(fatalsToBrowser); -use DBI; -use lib '/opt/gondul/include'; -use nms; -use nms::web; -use strict; -use warnings; -use Data::Dumper; - -$nms::web::cc{'max-age'} = "5"; -$nms::web::cc{'stale-while-revalidate'} = "30"; - -my $q2 = $nms::web::dbh->prepare('select sysname,distro_phy_port,distro_name from switches where placement is not null and distro_name is not null and distro_phy_port is not null and deleted = false'); - -$q2->execute(); -while (my $ref = $q2->fetchrow_hashref()) { - my $sysname = $ref->{'sysname'}; - my $distro = $ref->{'distro_name'}; - my $phy = $ref->{'distro_phy_port'}; - $nms::web::json{'distro-tree-phy'}{$distro}{$phy} = $sysname; - $nms::web::json{'distro-tree-sys'}{$distro}{$sysname} = $phy; -} - -finalize_output(); |