feat(log): multi-term comma-separated search with :not() exclusion#3313
feat(log): multi-term comma-separated search with :not() exclusion#3313limad wants to merge 3 commits into
Conversation
Enhance the log filter search to support multiple comma-separated terms. Before: single term, optionally negated with ':not(term)' After: comma-separated terms, each independently negatable Examples: - 'error,warning' → show entries matching error OR warning - 'error,:not(daemon)' → show entries matching error OR not matching daemon - ':not(debug),:not(info)' → hide debug and info entries Implements the approach proposed in jeedom#3270 (Enhance search log filter with term support), which also covered this global improvement.
|
Label suggestion for maintainers: |
|
It is not yet planned because there are still at least 2 unresolved questions that need alignement with the team
On top, we need to adapt the documentation as well, or to to define how to explain the feature in the UI directly. |
Mips2648
left a comment
There was a problem hiding this comment.
On top, this PR is a regression regarding var declaration
|
Thanks @Mips2648 — Understood on the broader points: happy to wait for team alignment on the separator format and the scope across other search boxes before this moves forward. |
| } | ||
| const not = search.startsWith(":not(") | ||
| if (not) { | ||
| search = search.replace(':not(', '') |
There was a problem hiding this comment.
I think we need to handle also ), currently if we do :not(toto), search will search toto) and not toto
Summary
Enhances the log filter search to support multiple comma-separated terms, each optionally negated with
:not().Before
Single-term search:
erroror:not(daemon)After
Multi-term, comma-separated:
error,warning→ show entries matching error OR warningerror,:not(daemon)→ show entries matching error OR not matching daemon:not(debug),:not(info)→ hide debug and info entriesLogic
Each comma-separated term is evaluated independently against the log name. An entry is shown if any term matches (OR semantics). Each term can be negated individually.
Suggested changelog entry
Known risks / side effects
desktop/js/log.jsis modified — no PHP changes, no impact on other pages.:not()syntax continues to work as before (backward compatible).Notes
var→const/letrefactoringTypes of changes
PR checklist
Testing
error,warning→ only logs containing "error" or "warning" shown:not(debug)→ logs NOT containing "debug" shownhttp,:not(daemon)→ logs containing "http" OR not containing "daemon" shown