mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
log column state is properly setup and works fine
This commit is contained in:
parent
72ab1534ae
commit
f4d93591c6
@ -15,7 +15,11 @@ limitations under the License. -->
|
||||
|
||||
<template>
|
||||
<div @click="showSelectSpan" class="log-item">
|
||||
<div v-for="(item, index) in visibleColumns" :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>
|
||||
@ -33,17 +37,22 @@ limitations under the License. -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import { ServiceLogConstants } from "./data";
|
||||
import { logStore } from "@/store/modules/log";
|
||||
/*global defineProps, defineEmits */
|
||||
const props = defineProps({
|
||||
data: { type: Object as any, default: () => ({}) },
|
||||
noLink: { type: Boolean, default: true },
|
||||
});
|
||||
const useLogStore = logStore();
|
||||
const columns = ref<any[]>(useLogStore.serviceLogColumn);
|
||||
const emit = defineEmits(["select"]);
|
||||
const columns = ServiceLogConstants;
|
||||
const visibleColumns = computed(() => columns.filter(column => column.isVisible))
|
||||
// const columns = ServiceLogConstants;
|
||||
const visibleColumns = computed(() =>
|
||||
columns.value.filter((column) => column.isVisible)
|
||||
);
|
||||
const tags = computed(() => {
|
||||
if (!props.data.tags) {
|
||||
return "";
|
||||
|
@ -29,7 +29,7 @@ export const ServiceLogConstants = [
|
||||
{
|
||||
label: "endpointName",
|
||||
value: "endpoint",
|
||||
isVisible: false
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
label: "timestamp",
|
||||
@ -44,7 +44,7 @@ export const ServiceLogConstants = [
|
||||
{
|
||||
label: "tags",
|
||||
value: "tags",
|
||||
isVisible: false
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
label: "content",
|
||||
@ -54,7 +54,7 @@ export const ServiceLogConstants = [
|
||||
{
|
||||
label: "traceId",
|
||||
value: "traceID",
|
||||
isVisible: false
|
||||
isVisible: true
|
||||
},
|
||||
];
|
||||
export const ServiceLogDetail = [
|
||||
@ -92,37 +92,45 @@ export const BrowserLogConstants = [
|
||||
{
|
||||
label: "service",
|
||||
value: "service",
|
||||
isVisble: true,
|
||||
},
|
||||
{
|
||||
label: "serviceVersion",
|
||||
value: "serviceVersion",
|
||||
isVisble: true,
|
||||
},
|
||||
{
|
||||
label: "errorUrl",
|
||||
value: "errorPage",
|
||||
isVisble: true,
|
||||
},
|
||||
{
|
||||
label: "time",
|
||||
value: "time",
|
||||
isVisble: true,
|
||||
},
|
||||
{
|
||||
label: "message",
|
||||
value: "message",
|
||||
isVisble: true,
|
||||
// drag: true,
|
||||
method: 350,
|
||||
},
|
||||
{
|
||||
label: "stack",
|
||||
value: "stack",
|
||||
isVisble: true,
|
||||
// drag: true,
|
||||
method: 350,
|
||||
},
|
||||
{
|
||||
label: "category",
|
||||
value: "category",
|
||||
isVisble: true,
|
||||
},
|
||||
{
|
||||
label: "grade",
|
||||
value: "grade",
|
||||
isVisble: true,
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user