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

chore: fixes settings page broken detailed page

This commit is contained in:
Amir Raminfar
2025-05-30 12:06:08 -07:00
parent 31174a5214
commit 553cfd558d
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
<template>
<LogItem :logEntry @click="showDrawer(LogDetails, { entry: logEntry })" class="clickable">
<LogItem :logEntry @click="containers.length > 0 && showDrawer(LogDetails, { entry: logEntry })" class="clickable">
<ul class="space-x-4" @click="preventDefaultOnLinks">
<li v-for="(value, name) in validValues" :key="name" class="inline-flex">
<span class="text-light">{{ name }}=</span><span class="font-bold" v-if="value === null">&lt;null&gt;</span>
@@ -22,6 +22,8 @@ const { logEntry } = defineProps<{
showContainerName?: boolean;
}>();
const { containers } = useLoggingContext();
const validValues = computed(() => {
return Object.fromEntries(Object.entries(logEntry.message).filter(([_, value]) => value !== undefined));
});

View File

@@ -8,6 +8,7 @@
class="absolute -right-1 opacity-0 transition-opacity delay-150 duration-250 group-hover/entry:opacity-100"
:message="() => stripAnsi(logEntry.rawMessage)"
:log-entry="logEntry"
v-if="containers.length > 0"
/>
</LogItem>
</template>
@@ -15,6 +16,7 @@
import { SimpleLogEntry } from "@/models/LogEntry";
import AnsiConvertor from "ansi-to-html";
import stripAnsi from "strip-ansi";
const { containers } = useLoggingContext();
const ansiConvertor = new AnsiConvertor({
escapeXML: false,