aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/write/switch-add
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-05-22 00:26:52 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-05-22 00:26:52 +0200
commite67f54f2f8ea63ff71c15e7d5622fe3c3cff4b88 (patch)
tree68d608f054e39855a71ae5d025a9690addfd1106 /web/api/write/switch-add
parentb1dc0791834333e2560ff211c88b092665386333 (diff)
Search box/oplog: Add string-literal search
You can now use "foo" to find a switch called foo, but not also the ones called foobar foobar1, etc
Diffstat (limited to 'web/api/write/switch-add')
-rwxr-xr-xweb/api/write/switch-add2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/api/write/switch-add b/web/api/write/switch-add
index d210567..f77df0a 100755
--- a/web/api/write/switch-add
+++ b/web/api/write/switch-add
@@ -84,7 +84,7 @@ foreach my $tmp2 (@tmp) {
$nms::web::dbh->do("INSERT INTO SWITCHES (mgmt_v4_addr, sysname, poll_frequency, community, lldp_chassis_id, mgmt_v6_addr, placement,subnet4,subnet6,distro_name) VALUES ($template{'mgmt_v4_addr'}, $template{'sysname'}, $template{'poll_frequency'}, $template{'community'}, $template{'lldp_chassis_id'}, $template{'mgmt_v6_addr'}, $template{'placement'},$template{'subnet4'},$template{'subnet6'},$template{'distro_name'});");
push @added, $switch{'sysname'};
- oplog($switch{'sysname'}, "Switch added: " . $switch{'sysname'});
+ oplog("\"" . $switch{'sysname'} . "\"", "Switch added: " . $switch{'sysname'});
}
}