diff --git a/src/graphql/fragments/ebpf.ts b/src/graphql/fragments/ebpf.ts index 252214b0..ca0d46ab 100644 --- a/src/graphql/fragments/ebpf.ts +++ b/src/graphql/fragments/ebpf.ts @@ -43,11 +43,26 @@ export const queryEBPFTasks = { serviceInstanceId serviceInstanceName processLabels + processName + processId taskStartTime triggerType fixedTriggerDuration targetType createTime + continuousProfilingCauses { + type + singleValue { + threshold + current + } + uri { + uriRegex + uriPath + threshold + current + } + } }`, }; export const queryEBPFSchedules = { diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 05ec63bd..fa07aadd 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -22,7 +22,6 @@ declare module '@vue/runtime-core' { ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] diff --git a/src/views/dashboard/related/task-timeline/components/Timeline.vue b/src/views/dashboard/related/task-timeline/components/Timeline.vue index bc8afcad..c9d376fb 100644 --- a/src/views/dashboard/related/task-timeline/components/Timeline.vue +++ b/src/views/dashboard/related/task-timeline/components/Timeline.vue @@ -101,22 +101,20 @@ limitations under the License. --> template(item: EBPFTaskList | any) { const data = item.data || {}; const end = data.taskStartTime ? visDate(data.taskStartTime + data.fixedTriggerDuration * 1000) : ""; - + let str = ""; + for (const item of data.continuousProfilingCauses || []) { + str += `${item.type}: ${getURI(item.uri)}${item.uri.threshold}>=${item.uri.current}; `; + } let tmp = ` +
Task ID: ${data.taskId || ""}
-
Service Name: ${data.serviceName || ""}
-
Service Instance Name: ${data.serviceInstanceName || ""}
-
Service Process Name: ${data.processName || ""}
Target Type: ${data.targetType || ""}
Trigger Type: ${data.triggerType || ""}
Start Time: ${data.taskStartTime ? visDate(data.taskStartTime) : ""}
End Time: ${end}
+
Causes: ${str}
Process Labels: ${data.processLabels.join("; ") || ""}
`; - let str = ""; - for (const item of data.continuousProfilingCauses || []) { - str += `
${item.type}: ${getURI(item.uri)}${item.uri.threshold}>=${item.uri.current}
`; - } - return tmp + str; + return tmp; }, }, }; @@ -132,7 +130,7 @@ limitations under the License. --> } function getURI(uri: { uriRegex: string; uriPath: string }) { - return uri ? `(${uri.uriRegex || ""} | ${uri.uriPath || ""})` : ""; + return uri && uri.uriRegex && uri.uriPath ? `(${uri.uriRegex || ""} | ${uri.uriPath || ""})` : ""; } function resize() {