update trace

This commit is contained in:
Fine 2022-11-25 17:19:49 +08:00
parent 171b51388c
commit 7da5a8ddc9
2 changed files with 7 additions and 3 deletions

View File

@ -298,4 +298,7 @@ export const CalculationOpts = [
{ label: "Seconds to days", value: "secondToDay" }, { label: "Seconds to days", value: "secondToDay" },
{ label: "Nanoseconds to milliseconds", value: "nanosecondToMillisecond" }, { label: "Nanoseconds to milliseconds", value: "nanosecondToMillisecond" },
]; ];
export const RefIdTypes = [{ label: "Trace ID", value: "traceId" }]; export const RefIdTypes = [
{ label: "Trace ID", value: "traceId" },
{ label: "None", value: "none" },
];

View File

@ -91,8 +91,9 @@ const showTrace = ref<boolean>(false);
const traceOptions = ref<{ type: string; filters?: unknown }>({ const traceOptions = ref<{ type: string; filters?: unknown }>({
type: "Trace", type: "Trace",
}); });
const refIdType = ref<string>( const refIdType = computed(
(props.config.relatedTrace && props.config.relatedTrace.refIdType) || () =>
(props.config.relatedTrace && props.config.relatedTrace.refIdType) ||
RefIdTypes[0].value RefIdTypes[0].value
); );
const key = computed(() => Object.keys(props.data)[0] || ""); const key = computed(() => Object.keys(props.data)[0] || "");