mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
refactor: update
This commit is contained in:
parent
d2eae87957
commit
b994842ecd
@ -42,7 +42,7 @@ limitations under the License. -->
|
|||||||
@closed="showDetail = false"
|
@closed="showDetail = false"
|
||||||
:title="t('logDetail')"
|
:title="t('logDetail')"
|
||||||
>
|
>
|
||||||
<LogDetail :currentLog="currentLog" :columns="columns" />
|
<LogDetail :currentLog="currentLog" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -90,13 +90,14 @@ limitations under the License. -->
|
|||||||
width: 390px;
|
width: 390px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content,
|
.content {
|
||||||
.tags {
|
width: 1000px;
|
||||||
width: 300px;
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.serviceInstanceName,
|
|
||||||
.endpointName,
|
|
||||||
.serviceName {
|
.serviceName {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License. -->
|
limitations under the License. -->
|
||||||
<template>
|
<template>
|
||||||
<div class="log-detail">
|
<div class="log-detail">
|
||||||
<div class="mb-10 clear rk-flex" v-for="(item, index) in columns" :key="index">
|
<div class="mb-10 clear rk-flex" v-for="(item, index) in ServiceLogDetail" :key="index">
|
||||||
<span class="g-sm-4 grey">{{ t(item.value) }}:</span>
|
<span class="g-sm-4 grey">{{ t(item.value) }}:</span>
|
||||||
<span v-if="['timestamp', 'time'].includes(item.label)" class="g-sm-8 mb-10">
|
<span v-if="['timestamp', 'time'].includes(item.label)" class="g-sm-8 mb-10">
|
||||||
{{ dateFormat(currentLog[item.label]) }}
|
{{ dateFormat(currentLog[item.label]) }}
|
||||||
@ -36,14 +36,13 @@ limitations under the License. -->
|
|||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import type { Option } from "@/types/app";
|
|
||||||
import { dateFormat } from "@/utils/dateFormat";
|
import { dateFormat } from "@/utils/dateFormat";
|
||||||
import { formatJson } from "@/utils/formatJson";
|
import { formatJson } from "@/utils/formatJson";
|
||||||
|
import { ServiceLogDetail } from "./data";
|
||||||
|
|
||||||
/*global defineProps */
|
/*global defineProps */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentLog: { type: Object as PropType<any>, default: () => ({}) },
|
currentLog: { type: Object as PropType<any>, default: () => ({}) },
|
||||||
columns: { type: Array as PropType<Option[]>, default: () => [] },
|
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const logTags = computed(() => {
|
const logTags = computed(() => {
|
||||||
|
@ -88,7 +88,7 @@ limitations under the License. -->
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.traceId {
|
.traceId {
|
||||||
width: 390px;
|
width: 260px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@ -102,20 +102,21 @@ limitations under the License. -->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content,
|
|
||||||
.tags {
|
.tags {
|
||||||
width: 300px;
|
width: 320px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.serviceInstanceName,
|
|
||||||
.endpointName,
|
|
||||||
.serviceName {
|
.serviceName {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-item:hover {
|
.log-item:hover {
|
||||||
background: rgba(0, 0, 0, 0.04);
|
background: rgb(0 0 0 / 4%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-item > div {
|
.log-item > div {
|
||||||
|
@ -16,26 +16,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const ServiceLogConstants = [
|
export const ServiceLogConstants = [
|
||||||
|
{
|
||||||
|
label: "content",
|
||||||
|
value: "content",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "serviceName",
|
label: "serviceName",
|
||||||
value: "service",
|
value: "service",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "serviceInstanceName",
|
|
||||||
value: "instance",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "endpointName",
|
|
||||||
value: "endpoint",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "timestamp",
|
|
||||||
value: "time",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "contentType",
|
|
||||||
value: "contentType",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "tags",
|
label: "tags",
|
||||||
value: "tags",
|
value: "tags",
|
||||||
@ -44,10 +32,6 @@ export const ServiceLogConstants = [
|
|||||||
label: "traceId",
|
label: "traceId",
|
||||||
value: "traceID",
|
value: "traceID",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "content",
|
|
||||||
value: "content",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
export const ServiceLogDetail = [
|
export const ServiceLogDetail = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user