Removing spaces from beginning and end of search strings

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
luczynj
Posts: 88
Joined: Wed Dec 03, 2014 6:47 pm

Removing spaces from beginning and end of search strings

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Removing spaces from beginning and end of search strings

Post by lmiltchev »

Where are you entering the keyword (user1)? Can you show us a screenshot?
Be sure to check out our Knowledgebase for helpful articles and solutions!
luczynj
Posts: 88
Joined: Wed Dec 03, 2014 6:47 pm

Re: Removing spaces from beginning and end of search strings

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Removing spaces from beginning and end of search strings

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
luczynj
Posts: 88
Joined: Wed Dec 03, 2014 6:47 pm

Re: Removing spaces from beginning and end of search strings

Post by luczynj »

Thanks so much. I appreciate the quick response.

You can close this message.
Locked