Skip to content

DGS-427 Improve logs section: collapse request/response into modal vi…#168

Merged
rokaszygmantas merged 4 commits into
DPDBaltics:release-3.3.1from
TLabutis:DGS-427-improve-logs-section
May 25, 2026
Merged

DGS-427 Improve logs section: collapse request/response into modal vi…#168
rokaszygmantas merged 4 commits into
DPDBaltics:release-3.3.1from
TLabutis:DGS-427-improve-logs-section

Conversation

@TLabutis

@TLabutis TLabutis commented May 5, 2026

Copy link
Copy Markdown
Contributor

…ewer

Long DPD API request URLs rendered inline in the Logs list table caused the table to overflow horizontally and squeeze other columns off-screen.

Adopted the same modal pattern already used in SaferPay, Square, Klarna and Mollie modules: request/response cells now render a "View" button that opens a modal loaded via AJAX with the formatted payload.

Pretty-prints JSON when applicable; otherwise splits URL query strings into one decoded key = value per line so long DPD shipment URLs become readable.

Tadas Labutis added 3 commits May 5, 2026 13:56
…ewer

Long DPD API request URLs rendered inline in the Logs list table caused
the table to overflow horizontally and squeeze other columns off-screen.

Adopted the same modal pattern already used in SaferPay, Square, Klarna
and Mollie modules: request/response cells now render a "View" button
that opens a modal loaded via AJAX with the formatted payload.

Pretty-prints JSON when applicable; otherwise splits URL query strings
into one decoded key = value per line so long DPD shipment URLs become
readable.
- Reorder log columns to ID | Severity (1-4) | Message | Request | Response | Context | Date with severity badge, message preview and endpoint context callbacks.
- Encode logged request as structured JSON (endpoint + params) and mask username/password in stored payload.
- Encode logged response as JSON envelope with level and message so the modal renders pretty-printed JSON.
- Refine modal layout: wider window, centered title with id prefix, absolute close button and Esc key support.
- Replace PrestaShop default exporter with a clean fputcsv stream so JSON request/response columns are not HTML-mangled.
- Prepend store info, module configuration and PrestaShop settings so support can read environment context without follow-up.
- Derive Severity, Message and Context columns directly from the JSON payloads stored in the log table.
@TLabutis TLabutis changed the base branch from main to release-3.3.1 May 22, 2026 13:17
@rokaszygmantas rokaszygmantas merged commit 6daacb3 into DPDBaltics:release-3.3.1 May 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants