[OGUI-914] Disable debug logs for "Ops" filter#3480
Open
isaachilly wants to merge 7 commits into
Open
Conversation
When OPS is selected, the DEBUG severity button is disabled and stripped from filters automatically from both the URI and the button methods via `LogFilter.setCriteria` central enforcement. Log level is set to OPS at startup and in the profile defaults.
The reset button and context menu severity reset were calling filter methods directly which skipped the notification and more importantly in live mode would skip applying the filter to the websocket.
Adds tests that cover the DEBUG button being disabled/enabled based on the log level and the severity being stripped from the URL if not allowed.
graduta
requested changes
May 27, 2026
| this.model = model; | ||
|
|
||
| this.filter = new LogFilter(model); | ||
| this.filter.setCriteria('level', 'max', 1); |
Member
There was a problem hiding this comment.
I think the constructor should take care of the setCriteria. In this case it will call resetCriteria.
As the user requested that the new default is OPS, I believe the resetCriteria should reset to default. What do you think?
Collaborator
Author
There was a problem hiding this comment.
I agree with your simpler and more logical approach of building in the default into resetCriteria.
| */ | ||
| resetFilters() { | ||
| this.filter.resetCriteria(); | ||
| this.notifyFilterChanged(); |
Member
There was a problem hiding this comment.
LogFilter class extends Observable. Thus, I would be in favour for you to observe the changes in LogFilter and this would in turn automatically call notifyFilterChanged for both on L405 and L414
| /** | ||
| * Notify the active mode (live or query) that filters have changed. | ||
| */ | ||
| notifyFilterChanged() { |
Member
There was a problem hiding this comment.
A better name would be perhaps: onFilterChange, what do you think?
…ved to within resetCriteria, contextMenu resets to OPS level Attach Log to LogFilter as an observer and make filter updates drive behaviour instead of manual notifications. Adjust tests to take into account new default filter state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have JIRA issue created
Warning
FLP integration tests need changing to match new default page.
LogFilter.setCriteriacentral enforcement.Stealth Fix: The reset button and context menu severity reset were calling filter methods directly which skipped the notification and more importantly in live mode would skip resetting the filter/s entirely.