aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-info-box.js
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/js/nms-info-box.js
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/js/nms-info-box.js')
-rw-r--r--web/js/nms-info-box.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/js/nms-info-box.js b/web/js/nms-info-box.js
index 46762c2..9133d7f 100644
--- a/web/js/nms-info-box.js
+++ b/web/js/nms-info-box.js
@@ -965,9 +965,16 @@ nmsInfoBox.searchSmart = function(id, sw) {
nmsInfoBox._searchSmart = function(id, sw) {
try {
- if(sw.toLowerCase().indexOf(id) > -1) {
+ if(sw.toLowerCase().indexOf(id.toLowerCase()) > -1) {
return true;
}
+ if (id[0] == "\"") {
+ if (("\"" + sw.toLowerCase() + "\"") == id.toLowerCase()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
try {
if (nmsData.switches.switches[sw].distro_name.toLowerCase() == id) {
return true;