Repository navigation
[O2B-1631] Display and allow users to filter logs by linked simulation passes - #2252
Merged
Merged
Conversation
Return the simulation passes ({ id, name }) of each log from the log
overview endpoint and from the standard log query shared by the run,
LHC fill, environment and tag log endpoints, so embedded log tables also
get them.
In the front-end, add a "Simulation passes" column to the logs table and
a field to the log details, both linking to the runs of the simulation
pass. The title column is narrowed (w-30 to w-20) to keep the total table
width unchanged, otherwise the actions column becomes unclickable.
Add the `simulationPasses` filter (comma separated names) to GET /api/logs: a log matches if it is linked to at least one of the given simulation passes, like the data passes filter. Add the matching text filter to the logs overview page. Includes use case, API and UI tests.
Return a `logsCount` for each simulation pass (computed with a subquery so the other joins are not multiplied) and add a "Logs" column to the simulation passes tables. It shows the number of logs as a link to the logs overview filtered on that simulation pass, or "No logs". Includes service, API and UI tests.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2252 +/- ##
==========================================
- Coverage 46.49% 46.48% -0.01%
==========================================
Files 1051 1052 +1
Lines 17341 17351 +10
Branches 3156 3159 +3
==========================================
+ Hits 8062 8066 +4
- Misses 9279 9285 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Two new browser tests need explicit table-data waits to prevent timing-dependent failures.
1 open issue
What changed in this PR
Adds linked simulation passes to log views and filtering, with log counts linking back from simulation-pass tables.
Changes:
- Exposes simulation-pass associations and filters through log APIs.
- Adds simulation-pass links, filters, and log-count navigation to the UI.
- Extends API, service, and browser regression coverage.
| File | Description |
|---|---|
| test/public/simulationPasses/overviewPerLhcPeriod.test.js | Tests log counts and navigation. |
| test/public/simulationPasses/overviewAnchoredSimulationPasses.test.js | Validates the logs column. |
| test/public/logs/overview.test.js | Tests simulation-pass links and filtering. |
| test/public/logs/detail.test.js | Tests simulation-pass detail links. |
| test/lib/usecases/log/GetLogUseCase.test.js | Checks returned simulation passes. |
| test/lib/usecases/log/GetAllLogsUseCase.test.js | Tests associations and combined filters. |
| test/lib/server/services/simulationPasses/SimulationPassesService.test.js | Adds expected log counts. |
| test/lib/server/services/log/LogService.test.js | Checks simulation-pass associations. |
| test/api/tags.test.js | Checks associations in tag logs. |
| test/api/simulationPasses.test.js | Checks API log counts. |
| test/api/runs.test.js | Checks associations in run logs. |
| test/api/logs.test.js | Tests associations and name filtering. |
| test/api/lhcFills.test.js | Checks associations in fill logs. |
| test/api/environments.test.js | Checks associations in environment logs. |
| lib/usecases/log/GetAllLogsUseCase.js | Loads and filters simulation passes. |
| lib/server/services/simulationPasses/SimulationPassService.js | Queries linked log counts. |
| lib/server/services/log/LogService.js | Loads simulation-pass associations. |
| lib/public/views/SimulationPasses/format/formatSimulationPassesList.js | Formats simulation-pass links. |
| lib/public/views/SimulationPasses/ActiveColumns/simulationPassesActiveColumns.js | Adds linked log counts. |
| lib/public/views/Logs/Overview/LogsOverviewModel.js | Registers the simulation-pass filter. |
| lib/public/views/Logs/ActiveColumns/logsActiveColumns.js | Adds the simulation-pass column and filter. |
| lib/public/components/Log/logDisplayComponent.js | Displays simulation-pass detail links. |
| lib/domain/entities/SimulationPass.js | Documents the log-count property. |
| lib/domain/dtos/GetAllLogsDto.js | Validates simulation-pass filters. |
| lib/database/models/typedefs/SequelizeSimulationPass.js | Documents the database log-count property. |
| lib/database/adapters/SimulationPassAdapter.js | Exposes log counts in adapted results. |
Review effort: Balanced
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 a JIRA ticket
Notable changes for users:
Notable changes for developers: