1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

fix: shows container and host name correctly for events. (#3494)

This commit is contained in:
Amir Raminfar
2024-12-31 09:07:52 -08:00
committed by GitHub
parent f4f61a6a75
commit 65ef1d3c68
2 changed files with 21 additions and 25 deletions

View File

@@ -1,12 +1,9 @@
<template>
<div class="flex w-full flex-col">
<div class="relative flex items-start gap-x-2">
<RandomColorTag class="flex-none" :value="container.name" v-if="showContainerName" />
<LogDate :date="logEntry.date" v-if="showTimestamp" />
<LogLevel class="flex" />
<LogItem :logEntry>
<div class="whitespace-pre-wrap" :data-event="logEntry.event" v-html="logEntry.message"></div>
</div>
<div class="alert alert-info mt-8 w-auto flex-none font-sans text-[1rem] md:mx-auto md:w-1/2" v-if="followEligible">
</LogItem>
<div class="alert alert-info my-4 w-auto flex-none font-sans text-[1rem] md:mx-auto md:w-1/2" v-if="followEligible">
<carbon:information class="size-6 shrink-0 stroke-current" />
<div>
<h3 class="text-lg font-bold">{{ $t("alert.similar-container-found.title") }}</h3>
@@ -25,7 +22,6 @@
</router-link>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ContainerEventLogEntry } from "@/models/LogEntry";

View File

@@ -135,7 +135,7 @@ export class ContainerEventLogEntry extends LogEntry<string> {
date: Date,
public readonly event: "container-stopped" | "container-started",
) {
super(message, containerID, date.getTime(), date, "stderr", "info");
super(message, containerID, date.getTime(), date, "stderr", "unknown");
}
getComponent(): Component {
return ContainerEventLogItem;