aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/read
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2018-04-04 16:36:33 +0200
committerKristian Lyngstol <kly@kly.no>2018-04-04 16:36:33 +0200
commit0ad449caf997ec356bfb80e731460d0f7496fd5c (patch)
tree8ecd0d419ee7805758991986b6f4de7b14677cef /web/api/read
parent72a89af57f3ac235b9048bd7cd645b580b93d95b (diff)
Tweak DHCP/uplink/client-port logic
Diffstat (limited to 'web/api/read')
-rwxr-xr-xweb/api/read/switches-management8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/api/read/switches-management b/web/api/read/switches-management
index c734eef..b42c84b 100755
--- a/web/api/read/switches-management
+++ b/web/api/read/switches-management
@@ -13,7 +13,13 @@ use Data::Dumper;
my $target = $ENV{REQUEST_URI};
$target =~ s/$ENV{SCRIPT_NAME}//;
$target =~ s/^\///;
-my ($switch, $port) = split(/\//,$target,2);
+my $switch;
+my $port;
+
+if ($target !~ m/now=/) {
+ ($switch, $port) = split(/\//,$target,2);
+}
+
my $q2;
$nms::web::cc{'max-age'} = "5";