From 8d9056063d0e100a6e83024eb36a478a89f78a21 Mon Sep 17 00:00:00 2001 From: Jonas Bengtsson Date: Sat, 5 Sep 2026 14:39:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Fix=20dashboard=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- frontend/src/style.css | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c653f1..09cf41a 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,8 @@ Example response: - [x] Add possability to rename ingested device names in message payloads, e g based on the imei. Must be possible to perform between datetimes. If either field(from or to) is unset, no framing is performed in that end. (→ `POST /devices/{imei}/rename`, see the endpoint table) - [x] Separate payload relative settings from auth settings. Sub-sections in menu? (→ sidebar grouped into **Data** / **Access** sections) - [x] Hide features from users not able to use them based on authorization. (→ auth-management links hidden for read-only `user` role; route guard blocks direct URL access; the API enforces 403 server-side regardless) -- [ ] Fix dashboard view, message expanding outside table. Make it look like the table in messages view. +- [x] Fix dashboard view, message expanding outside table. Make it look like the table in messages view. (→ payload cell now uses the same collapsed `
` + pretty-printed JSON + attributes block as the Messages view) - [ ] Make all tables able to sort on header. - [ ] Remove clickable device links in tables for users that is not allowed to see the device view, or does not have enought authorization to be able to change anything. CLicking as a user ends up on a page with only some text. - [ ] Change datetime localization. How is it handled now, from browser or static? I'm in sweden and not following swedish rules on layout. +- [ ] Make it possible to manipulate a messages payload. diff --git a/frontend/src/style.css b/frontend/src/style.css index 1bdbc4e..42983d2 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -353,6 +353,16 @@ pre.json { margin: 0.5rem 0; } +/* Inside table cells (the collapsible payload/attributes blocks): report + zero min-width so a long unbreakable JSON value can never stretch the + column past the card; min-width:100% fills the actual cell instead and + the pre scrolls internally. Applies to Dashboard and Messages alike. */ +details > pre.json { + width: 0; + min-width: 100%; + margin: 0.35rem 0; +} + [data-theme='dark'] pre.json { background: #060b16; border: 1px solid var(--border);