feat(events): timeline d'événements machine (tâche 5 backlog)
- listMachineEvents (machine_events, 30 derniers, desc) + route GET /machines/:id/events - api machineEvents ; section repliable « Timeline » dans le panneau détail (badge sévérité + horodatage), exploite les events déjà enregistrés par recordEvent tsc 0 · 118 tests · build OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { runProbe } from "../services/machineProbe.js";
|
||||
import { collectMetrics, getLatestMetrics } from "../services/machineMetrics.js";
|
||||
import { analyzeMachineRepositories } from "../services/aptRepositories.js";
|
||||
import { listImportantMessages, acknowledgeMessage } from "../services/importantMessages.js";
|
||||
import { listMachineEvents } from "../services/machineState.js";
|
||||
|
||||
export const machinesRoutes = new Hono();
|
||||
|
||||
@@ -78,6 +79,9 @@ machinesRoutes.post("/:id/apt-repositories", async (c) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Timeline d'événements machine.
|
||||
machinesRoutes.get("/:id/events", (c) => c.json(listMachineEvents(c.req.param("id"))));
|
||||
|
||||
// Messages importants (warnings/erreurs/évolutions) extraits des sorties.
|
||||
machinesRoutes.get("/:id/messages", (c) => c.json(listImportantMessages(c.req.param("id"))));
|
||||
machinesRoutes.post("/:id/messages/:msgId/ack", (c) => {
|
||||
|
||||
Reference in New Issue
Block a user