From e67f54f2f8ea63ff71c15e7d5622fe3c3cff4b88 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sun, 22 May 2016 00:26:52 +0200 Subject: 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 --- web/api/write/switch-add | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/api/write/switch-add') 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'}); } } -- cgit v1.2.3