From 0de37d8df254093bb888a56e4b52a4b6e32adf45 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Fri, 3 Jan 2025 10:52:03 -0800 Subject: [PATCH] fixes events --- assets/stores/container.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/stores/container.ts b/assets/stores/container.ts index 2f5f4321147e..10ddee357a99 100644 --- a/assets/stores/container.ts +++ b/assets/stores/container.ts @@ -67,6 +67,7 @@ export const useContainerStore = defineStore("container", () => { switch (event.name) { case "die": container.state = "exited"; + container.finishedAt = new Date(event.time); break; case "destroy": container.state = "deleted"; @@ -79,9 +80,9 @@ export const useContainerStore = defineStore("container", () => { const container = JSON.parse((e as MessageEvent).data) as ContainerJson; const existing = allContainersById.value[container.id]; if (existing) { + existing.name = container.name; existing.state = container.state; existing.health = container.health; - existing.name = container.name; existing.startedAt = new Date(container.startedAt); existing.finishedAt = new Date(container.finishedAt); }