1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-28 07:56:37 +01:00

Fixes spacing bug

This commit is contained in:
Amir Raminfar
2022-09-20 14:03:20 -07:00
parent dbd1050948
commit 5cb5cae113

View File

@@ -5,11 +5,9 @@
</div>
<div class="column">
<ul class="fields" @click="expanded = !expanded">
<li v-for="(value, name) in logEntry.message">
<template v-if="value">
<span class="has-text-grey">{{ name }}=</span>
<span class="has-text-weight-bold" v-html="markSearch(value)"></span>
</template>
<li v-for="(value, name) in validValues(logEntry.message)">
<span class="has-text-grey">{{ name }}=</span>
<span class="has-text-weight-bold" v-html="markSearch(value)"></span>
</li>
</ul>
<field-list :fields="logEntry.unfilteredMessage" :expanded="expanded" :visible-keys="visibleKeys"></field-list>
@@ -21,12 +19,16 @@ import { type ComplexLogEntry } from "@/models/LogEntry";
const { markSearch } = useSearchFilter();
defineProps<{
const { logEntry } = defineProps<{
logEntry: ComplexLogEntry;
visibleKeys: string[][];
}>();
let expanded = $ref(false);
function validValues(obj: Record<string, any>) {
return Object.fromEntries(Object.entries(obj).filter(([_, value]) => value !== undefined));
}
</script>
<style lang="scss" scoped>
@@ -47,6 +49,9 @@ let expanded = $ref(false);
li {
display: inline-block;
& + li {
margin-left: 1em;
}
}
}
</style>