From 44ba899e1e08b8df8afb0dbfe4836e31835b895b Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 13 Jun 2023 14:39:05 +0800 Subject: [PATCH] feat: add message --- src/graphql/fragments/ebpf.ts | 1 + .../related/continuous-profiling/components/Policy.vue | 8 ++++---- .../related/task-timeline/components/Timeline.vue | 5 +---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/graphql/fragments/ebpf.ts b/src/graphql/fragments/ebpf.ts index ca0d46ab..7f635650 100644 --- a/src/graphql/fragments/ebpf.ts +++ b/src/graphql/fragments/ebpf.ts @@ -62,6 +62,7 @@ export const queryEBPFTasks = { threshold current } + message } }`, }; diff --git a/src/views/dashboard/related/continuous-profiling/components/Policy.vue b/src/views/dashboard/related/continuous-profiling/components/Policy.vue index 8e315dbe..231cedc6 100644 --- a/src/views/dashboard/related/continuous-profiling/components/Policy.vue +++ b/src/views/dashboard/related/continuous-profiling/components/Policy.vue @@ -53,10 +53,6 @@ limitations under the License. --> @change="changeMonitorType($event, index)" /> -
-
{{ t("count") }}
- -
{{ t("threshold") }} @@ -70,6 +66,10 @@ limitations under the License. --> @change="changeThreshold(index)" />
+
+
{{ t("count") }}
+ +
{{ t("period") }}
diff --git a/src/views/dashboard/related/task-timeline/components/Timeline.vue b/src/views/dashboard/related/task-timeline/components/Timeline.vue index c910e897..208586fa 100644 --- a/src/views/dashboard/related/task-timeline/components/Timeline.vue +++ b/src/views/dashboard/related/task-timeline/components/Timeline.vue @@ -99,16 +99,13 @@ limitations under the License. --> tooltip: { overflowMethod: "cap", template(item: EBPFTaskList | any) { - const types = ["PROCESS_CPU", "HTTP_ERROR_RATE"]; 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}${types.includes(item.type) ? "%" : ""}>= - ${item.uri.current}${types.includes(item.type) ? "%" : ""}; `; + str += `${item.message};`; } let tmp = ` -
Task ID: ${data.taskId || ""}
Target Type: ${data.targetType || ""}
Trigger Type: ${data.triggerType || ""}