Skip to content

Commit

Permalink
fix: fixes redirect when container was created before it was stopped (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Dec 12, 2024
2 parents 39be1dd + 672a5f8 commit 668a0d9
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions assets/components/LogViewer/ContainerEventLogItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,23 @@ const router = useRouter();
const { showToast } = useToast();
const { t } = useI18n();
const { currentContainer } = useContainerStore();
const container = currentContainer(toRef(() => logEntry.containerID));
const { logEntry } = defineProps<{
logEntry: ContainerEventLogEntry;
showContainerName?: boolean;
}>();
const { currentContainer } = useContainerStore();
const container = currentContainer(toRef(() => logEntry.containerID));
const { containers } = useLoggingContext();
const store = useContainerStore();
const { containers: allContainers } = storeToRefs(store);
const nextContainer = computed(
() =>
[
...allContainers.value.filter(
(c) =>
c.host === containers.value[0].host &&
c.created > logEntry.date &&
c.name === containers.value[0].name &&
c.state === "running",
c.host === container.value.host && c.created > container.value.created && c.name === container.value.name,
),
].sort((a, b) => +a.created - +b.created)[0],
);
Expand Down

0 comments on commit 668a0d9

Please sign in to comment.