This commit is contained in:
Fine 2022-11-23 17:46:05 +08:00
parent e9543ff31d
commit ba916a942b
4 changed files with 19 additions and 17 deletions

View File

@ -176,21 +176,6 @@ export const traceStore = defineStore({
return res.data;
}
const data = res.data.data.trace.spans;
data[4].attachedEvents = [
{
startTime: {
seconds: 1669102205296,
nanos: 1669102205296,
},
event: "event",
endTime: {
seconds: 1669102212791,
nanos: 1669102212791,
},
tags: [{ key: "test", value: "test" }],
summary: [{ key: "test", value: 123 }],
},
];
this.setTraceSpans(data || []);
return res.data;
},

View File

@ -81,14 +81,14 @@ limitations under the License. -->
</div>
<h5
class="mb-10"
v-if="currentSpan.attachedEvent && currentSpan.attachedEvent.length"
v-if="currentSpan.attachedEvents && currentSpan.attachedEvents.length"
>
{{ t("events") }}.
</h5>
<div
class="attach-events"
ref="timeline"
v-if="currentSpan.attachedEvent && currentSpan.attachedEvent.length"
v-if="currentSpan.attachedEvents && currentSpan.attachedEvents.length"
></div>
<el-button class="popup-btn" type="primary" @click="getTaceLogs">
{{ t("relatedTraceLogs") }}
@ -190,6 +190,7 @@ const total = computed(() =>
? pageSize * pageNum.value + 1
: pageSize * pageNum.value
);
console.log(props.currentSpan);
const visDate = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
dayjs(date).format(pattern);

View File

@ -112,6 +112,9 @@ limitations under the License. -->
>
<span>{{ t("view") }}</span>
</div>
<div class="application" v-show="headerType !== 'profile'">
<span>{{ data.attachedEvents && data.attachedEvents.length }}</span>
</div>
</div>
<div
v-show="data.children && data.children.length > 0 && displayChildren"
@ -247,6 +250,15 @@ export default defineComponent({
<style lang="scss" scoped>
@import "./table.scss";
.event-tag {
width: 12px;
height: 12px;
border-radius: 12px;
border: 1px solid #e66;
color: #e66;
display: inline-block;
}
.trace-item.level0 {
color: #448dfe;

View File

@ -79,6 +79,10 @@ export const TraceConstant = [
label: "application",
value: "Service",
},
{
label: "application",
value: "Attached Events",
},
];
export const StatisticsConstant = [