fix(comms): refactor the wsLogaccess GetLogs filter creation#4546
Open
jeclrsg wants to merge 1 commit intohpcc-systems:mainfrom
Open
fix(comms): refactor the wsLogaccess GetLogs filter creation#4546jeclrsg wants to merge 1 commit intohpcc-systems:mainfrom
jeclrsg wants to merge 1 commit intohpcc-systems:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors LogaccessService.GetLogsEx filter construction for more predictable AND/OR grouping, and adds Vitest coverage with an ELK fixture to validate parsing + field mapping.
Changes:
- Introduces helper functions to build filter trees deterministically (OR within same field, AND across fields).
- Adds ELK stack response fixtures and Vitest cases for mapping, totals, and filter generation.
- Refactors log line conversion and log-manager-type handling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/comms/src/services/wsLogaccess.ts | Replaces inline filter-building with reusable helpers and updates date range + log parsing. |
| packages/comms/tests/wsLogaccess.spec.ts | Adds unit tests for ELK parsing/mapping and filter-tree construction. |
| packages/comms/tests/fixtures/logaccess.ts | Adds mocked GetLogAccessInfo/GetLogs payloads used by the new tests. |
* refactored the WsLogaccessService filter creation * added basic tests and a mocked response fixture for the ELK stack Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
a358aba to
a57a684
Compare
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.
Checklist:
Testing: