Skip to content

[OGUI-914] Disable debug logs for "Ops" filter#3480

Open
isaachilly wants to merge 7 commits into
devfrom
feature/ILG/OGUI-914/Disable-debug-logs-for-ops-filter
Open

[OGUI-914] Disable debug logs for "Ops" filter#3480
isaachilly wants to merge 7 commits into
devfrom
feature/ILG/OGUI-914/Disable-debug-logs-for-ops-filter

Conversation

@isaachilly
Copy link
Copy Markdown
Collaborator

@isaachilly isaachilly commented May 27, 2026

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

Warning

FLP integration tests need changing to match new default page.

  • 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.

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.

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.
@isaachilly isaachilly self-assigned this May 27, 2026
@isaachilly isaachilly added Frontend Backend InfoLogger javascript Pull requests that update javascript code labels May 27, 2026
@isaachilly isaachilly marked this pull request as ready for review May 27, 2026 14:39
@isaachilly isaachilly requested a review from graduta as a code owner May 27, 2026 14:39
Comment thread InfoLogger/public/log/Log.js Outdated
this.model = model;

this.filter = new LogFilter(model);
this.filter.setCriteria('level', 'max', 1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

@isaachilly isaachilly May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your simpler and more logical approach of building in the default into resetCriteria.

Comment thread InfoLogger/public/log/Log.js Outdated
*/
resetFilters() {
this.filter.resetCriteria();
this.notifyFilterChanged();
Copy link
Copy Markdown
Member

@graduta graduta May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread InfoLogger/public/log/Log.js Outdated
/**
* Notify the active mode (live or query) that filters have changed.
*/
notifyFilterChanged() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@isaachilly isaachilly requested a review from graduta May 27, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Frontend InfoLogger javascript Pull requests that update javascript code

Development

Successfully merging this pull request may close these issues.

2 participants