fix tracing profiling (#477)

This commit is contained in:
Fine0830 2025-07-16 16:44:49 +08:00 committed by GitHub
parent 72d7d65daa
commit 518f607db3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -69,6 +69,7 @@ limitations under the License. -->
type: { type: String, default: TraceGraphType.LIST },
headerType: { type: String, default: "" },
});
const emits = defineEmits(["select"]);
const appStore = useAppStoreWithOut();
const loading = ref<boolean>(false);
const showDetail = ref<boolean>(false);
@ -130,6 +131,7 @@ limitations under the License. -->
refParentSpans.value = [];
if (props.type === TraceGraphType.TABLE) {
currentSpan.value = i;
emits("select", i);
} else {
currentSpan.value = i.data;
}

View File

@ -12,7 +12,13 @@ See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="trace-table-charts">
<Graph :data="data" :traceId="traceId" :type="TraceGraphType.TABLE" :headerType="headerType" />
<Graph
:data="data"
:traceId="traceId"
:type="TraceGraphType.TABLE"
:headerType="headerType"
@select="getSelectedSpan"
/>
</div>
</template>
<script lang="ts" setup>
@ -26,6 +32,11 @@ limitations under the License. -->
traceId: { type: String, default: "" },
headerType: { type: String, default: "" },
});
const emits = defineEmits(["select"]);
function getSelectedSpan(span: Span) {
emits("select", span);
}
</script>
<style lang="scss" scoped>
.trace-table-charts {