feat(logs): read the logs modal with the shared log parser #431

Merged
allan merged 1 commits from feat/sas-logs-modal into release/7.22 2026-11-01 22:18:15 +00:00
1 Commits
Author SHA1 Message Date
dc aabc578d5e feat(logs): read the logs modal with the shared log parser
Build / Build-and-ng-test (pull_request) Successful in 6m34s
Lighthouse Checks / lighthouse (pull_request) Successful in 20m44s
Build / Build-and-test-development (pull_request) Successful in 32m1s
The modal decided what was wrong with two regular expressions of its own, and the answer disagreed with the log it was showing:

- an ODS HTML line was cut from the first capital `E` in it and lost its last character, so an error read `ERROR: File WORK.X.DATA does not exist.</font>`;
- a message SAS wrapped over several lines was reported once, truncated at the break, and the rest of it was not reported at all;
- the colon-less form SAS writes (`ERROR Libref X is not assigned.`) was missed on any line carrying markup;
- the notable notes - uninitialised variable, invalid data, a format too small - were not shown anywhere;
- clicking an issue searched the rendered text for its message, so a log that repeats a message (two `ERROR 22-322:` lines is ordinary) always jumped to the first of them.

`parseLog` from `@sasjs/utils` replaces all of it, the same function the VS Code extension and the SASjs server Studio use, so one log now reads identically in every host. Each request keeps the issues the parser reported, grouped by severity, and the tree gains a Notes list beside Errors and Warnings. The click scrolls to `issue.line` and flashes from that line to `issue.endLine`, and the lists no longer render at zero.

The modal is SAS Logs now, as are the menu entry, the deploy button and the abort modal's button; the request history is unchanged underneath.

`formatTimestamp` decided on `moment().format()`, which is 'Invalid date' - truthy - for anything it cannot parse, so its fallback could never fire. It asks `isValid()` now.

The warning flash was yellow where the warning text is ochre; both are ochre now, and the notes flash blue.

`@sasjs/utils` goes to 4.3.1, which is where the parser lives.
2026-11-01 21:45:08 +00:00