Skip to content

Commit

Permalink
fixes events
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Jan 3, 2025
1 parent 9480fbb commit 0de37d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/stores/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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);
}
Expand Down

0 comments on commit 0de37d8

Please sign in to comment.