Skip to content

Commit 668a0d9

Browse files
authored
fix: fixes redirect when container was created before it was stopped (#3446)
2 parents 39be1dd + 672a5f8 commit 668a0d9

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

assets/components/LogViewer/ContainerEventLogItem.vue

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,23 @@ const router = useRouter();
3333
const { showToast } = useToast();
3434
const { t } = useI18n();
3535
36-
const { currentContainer } = useContainerStore();
37-
38-
const container = currentContainer(toRef(() => logEntry.containerID));
39-
4036
const { logEntry } = defineProps<{
4137
logEntry: ContainerEventLogEntry;
4238
showContainerName?: boolean;
4339
}>();
4440
41+
const { currentContainer } = useContainerStore();
42+
const container = currentContainer(toRef(() => logEntry.containerID));
4543
const { containers } = useLoggingContext();
46-
4744
const store = useContainerStore();
48-
4945
const { containers: allContainers } = storeToRefs(store);
5046
5147
const nextContainer = computed(
5248
() =>
5349
[
5450
...allContainers.value.filter(
5551
(c) =>
56-
c.host === containers.value[0].host &&
57-
c.created > logEntry.date &&
58-
c.name === containers.value[0].name &&
59-
c.state === "running",
52+
c.host === container.value.host && c.created > container.value.created && c.name === container.value.name,
6053
),
6154
].sort((a, b) => +a.created - +b.created)[0],
6255
);

0 commit comments

Comments
 (0)