gui: Add search bar for logging (fixes #9252) #9255
+43
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Adds search functionality to the GUI logs. There is a conversation regarding this addition here: #9252.
Testing
I tested by building from source with the changes and ensuring that current logging functionality was persisted, as well as checking that the search bar works correctly and is reasonably performant.
Screenshots
Documentation
#9252 was the original issue that was raised.
As for documenting the code:
An input of type text is added to the logging html file, ng-keyup callback calls logging.filter.
The function
logging.filter
does the following:logging.entries
array is searched for entries that match the query using the javascriptincludes
function.logging.filtered
array. When the logging text area is redrawn, we select the array to draw from based on whether we are filtering or not (that's why I've also addedlogging.isFiltering
).logging.filtered
array is cleared and re-parsed upon a new input.Authorship
DAlba-sudo, [email protected]
Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.