Page 1 of 1

Removing spaces from beginning and end of search strings

Posted: Wed Sep 12, 2018 3:52 pm
by luczynj
Hello,

Could you trim the spaces off the beginning and end of any search strings, please?

If I do a search for user "user1 ", it won't return an existing user named "user1".

Same with other search areas.

Thanks!

JL

Re: Removing spaces from beginning and end of search strings

Posted: Wed Sep 12, 2018 4:49 pm
by lmiltchev
Where are you entering the keyword (user1)? Can you show us a screenshot?

Re: Removing spaces from beginning and end of search strings

Posted: Thu Sep 13, 2018 10:49 am
by luczynj
Here you go.

I'm only reporting this "bug" because I copy and paste from one document/webpage into Nagios XI search boxes to save time. And a lot of times it has a space at the end of the copied text.

See 4 attached photos. 2 from user management and 2 from CCM.

Search in CCM | Services with space at end of "SNMP Traps "
Nagios Copy Paste without Space in CCM.jpg
Search in CCM | Services with no space at end of "SNMP Traps"
Nagios Copy Paste without Space in CCM.jpg
Search in Admin | Manage Users with and without space at end of "luczynj"
Nagios Copy Paste with and without Space.jpg
I am using version 5.4.3 on this example, but have confirmed it happens on 5.5.2 as well.

Thanks in advance!

JL

Re: Removing spaces from beginning and end of search strings

Posted: Thu Sep 13, 2018 11:06 am
by lmiltchev
In Nagios XI 5.6.0 we will be trimming the white spaces in searches from the beginning and the end. Having said that, I see a use case, where not trimming the white space could be useful. A very simple example would be having two users - 'test' and 'test test'. When you searched for "test" (no spaces) you would see both users. If you searched for "test " (space at the end), you would see only the 'test test' user. Depending on a use case, this could be helpful.

FYI, in the future, please post such questions on the Nagios XI forum (General or Customer) instead of posting them on the "Nagios Ideas". Thank you!

Re: Removing spaces from beginning and end of search strings

Posted: Thu Sep 13, 2018 11:48 am
by luczynj
Thanks so much. I appreciate the quick response.

You can close this message.