modified display of rows to show data based on colum isVisble prop

This commit is contained in:
Peter Olu 2022-05-19 09:08:19 +01:00
parent 650038f069
commit 0ae9c8f969

View File

@ -15,7 +15,7 @@ limitations under the License. -->
<template>
<div @click="showSelectSpan" class="log-item">
<div v-for="(item, index) in columns" :key="index" :class="item.label">
<div v-for="(item, index) in visibleColumns" :key="index" :class="item.label">
<span v-if="item.label === 'timestamp'">
{{ dateFormat(data.timestamp) }}
</span>
@ -43,6 +43,7 @@ const props = defineProps({
});
const emit = defineEmits(["select"]);
const columns = ServiceLogConstants;
const visibleColumns = computed(() => columns.filter(column => column.isVisible))
const tags = computed(() => {
if (!props.data.tags) {
return "";