fix: correct the parameter for attachment events (#502)

This commit is contained in:
Fine0830
2025-09-30 11:22:48 +08:00
committed by GitHub
parent 4f95dd9807
commit 51817f32de
2 changed files with 18 additions and 18 deletions

View File

@@ -64,7 +64,7 @@ function generateHash(str: string) {
} }
export function getServiceColor(serviceName: string): string { export function getServiceColor(serviceName: string): string {
if (!serviceName) return "#eee"; if (!serviceName) return "var(--el-color-primary)";
const hash = generateHash(serviceName); const hash = generateHash(serviceName);
return ServicePalette[hash % ServicePalette.length]; return ServicePalette[hash % ServicePalette.length];
} }

View File

@@ -49,6 +49,7 @@ limitations under the License. -->
</span> </span>
</div> </div>
<h5 class="mb-10" v-if="currentSpan.tags && currentSpan.tags.length"> {{ t("tags") }}. </h5> <h5 class="mb-10" v-if="currentSpan.tags && currentSpan.tags.length"> {{ t("tags") }}. </h5>
<div class="scroll_bar_style" style="max-height: 200px; overflow: auto">
<div class="mb-10 clear item" v-for="i in currentSpan.tags" :key="i.key"> <div class="mb-10 clear item" v-for="i in currentSpan.tags" :key="i.key">
<span class="g-sm-4 grey">{{ i.key }}:</span> <span class="g-sm-4 grey">{{ i.key }}:</span>
<span class="g-sm-8 wba"> <span class="g-sm-8 wba">
@@ -58,6 +59,7 @@ limitations under the License. -->
</span> </span>
</span> </span>
</div> </div>
</div>
<h5 class="mb-10" v-if="currentSpan.logs" v-show="currentSpan.logs.length"> {{ t("logs") }}. </h5> <h5 class="mb-10" v-if="currentSpan.logs" v-show="currentSpan.logs.length"> {{ t("logs") }}. </h5>
<div v-for="(i, index) in currentSpan.logs" :key="index"> <div v-for="(i, index) in currentSpan.logs" :key="index">
<div class="mb-10 sm"> <div class="mb-10 sm">
@@ -234,14 +236,11 @@ limitations under the License. -->
}); });
tree.value = new ListGraph({ el: eventGraph.value, handleSelectSpan: selectEvent }); tree.value = new ListGraph({ el: eventGraph.value, handleSelectSpan: selectEvent });
tree.value.init( tree.value.init({
{ data: { children: events, label: "" },
children: events, row: events,
label: "", fixSpansSize: 0,
}, });
events,
0,
);
tree.value.draw(); tree.value.draw();
} }
@@ -282,8 +281,9 @@ limitations under the License. -->
.attach-events { .attach-events {
width: 100%; width: 100%;
margin: 0 5px 5px 0; margin: 0 5px 5px 0;
height: 400px; height: 300px;
overflow: auto; overflow-y: auto;
overflow-x: hidden;
} }
.popup-btn { .popup-btn {