🚧 Update system to focus on IMEI

This commit is contained in:
Jonas Bengtsson
2026-09-05 18:19:42 +02:00
parent e83dd755e9
commit 6795547c47
5 changed files with 21 additions and 13 deletions
+6 -5
View File
@@ -240,13 +240,14 @@ Example response:
- [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)
- [x] Fix dashboard view, message expanding outside table. Make it look like the table in messages view. (→ payload cell now uses the same collapsed `<details>` + pretty-printed JSON + attributes block as the Messages view)
- [ ] Update tables displaying messages so they also contain a column with the imei, and not only device.
- [ ] Add possbility to sort and filter on table headers.
- [ ] 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.
- [x] Update tables displaying messages so they also contain a column with the imei, and not only device. (→ IMEI column added to Dashboard + Messages; per the IMEI-first sweep, **links moved to the IMEI** — the device name is plain text everywhere, on the Devices list too)
- [ ] Add possability to sort and filter on table headers.
- [x] 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. (→ resolved by the IMEI-first sweep: names are no longer links for anyone; the IMEI link leads to a legitimate read-only view for every role)
- [ ] 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.
- [ ] Make it possible to manipulate a messeges payload.
- [ ] Make it possible, for superusers and admins, to manually inject new messages using json from an "insert message" view. It should allow array of json objects as well as a single message json object.
- [ ] Change SESSION_TTL_DAYS to SESSION_TTL_MINUTES. Make SESSION_TTL_MINUTES being read from environmental variable. Default to 5 minutes.
- [ ] Add user information. Name, mail address
- [ ] Add audit logging. Audit log entries will contain actor(userid+username), timestamp, action type (login, database change etc.), target outcome(successful, failed, or generating a warning), source information (ip address, device ID, and/or location from which the action orginated) and before/after state.
- [ ] Add view for viewing audit log.
- [ ] Add view for viewing audit log.
- [ ] Change messages in tables to display information about the entire messege, not only the payload.
+4 -2
View File
@@ -60,6 +60,7 @@ onMounted(async () => {
<thead>
<tr>
<th>Received</th>
<th>IMEI</th>
<th>Device</th>
<th>Payload + attributes</th>
</tr>
@@ -67,9 +68,10 @@ onMounted(async () => {
<tbody>
<tr v-for="m in latest" :key="m.id">
<td class="mono">{{ formatTime(m.received_at) }}</td>
<td>
<router-link :to="`/devices/${m.imei}`">{{ m.device }}</router-link>
<td class="mono">
<router-link :to="`/devices/${m.imei}`">{{ m.imei }}</router-link>
</td>
<td>{{ m.device }}</td>
<td>
<details>
<summary class="muted">payload</summary>
+4 -1
View File
@@ -208,7 +208,10 @@ onMounted(async () => {
<template>
<h1>
<router-link to="/devices">Devices</router-link> /
{{ device?.device ?? imei }}
<span class="mono">{{ imei }}</span>
<span v-if="device?.device" class="muted" style="font-weight: 400">
· {{ device.device }}
</span>
</h1>
<h2>Settings</h2>
+3 -3
View File
@@ -76,10 +76,10 @@ async function removeDevice(d: Device) {
</thead>
<tbody>
<tr v-for="d in devices" :key="d.imei">
<td class="mono">{{ d.imei }}</td>
<td>
<router-link :to="`/devices/${d.imei}`">{{ d.device }}</router-link>
<td class="mono">
<router-link :to="`/devices/${d.imei}`">{{ d.imei }}</router-link>
</td>
<td>{{ d.device }}</td>
<td style="text-align: right">
<button v-if="canEdit()" class="danger" @click="removeDevice(d)">
<Trash2 :size="15" />
+4 -2
View File
@@ -85,6 +85,7 @@ onMounted(load)
<thead>
<tr>
<th>Received</th>
<th>IMEI</th>
<th>Device</th>
<th>Payload + attributes</th>
</tr>
@@ -92,9 +93,10 @@ onMounted(load)
<tbody>
<tr v-for="m in page.items" :key="m.id">
<td class="mono">{{ formatTime(m.received_at) }}</td>
<td>
<router-link :to="`/devices/${m.imei}`">{{ m.device }}</router-link>
<td class="mono">
<router-link :to="`/devices/${m.imei}`">{{ m.imei }}</router-link>
</td>
<td>{{ m.device }}</td>
<td>
<details>
<summary class="muted">payload</summary>