feat: add message

This commit is contained in:
Fine 2023-06-13 14:39:05 +08:00
parent 2e951b4740
commit 44ba899e1e
3 changed files with 6 additions and 8 deletions

View File

@ -62,6 +62,7 @@ export const queryEBPFTasks = {
threshold threshold
current current
} }
message
} }
}`, }`,
}; };

View File

@ -53,10 +53,6 @@ limitations under the License. -->
@change="changeMonitorType($event, index)" @change="changeMonitorType($event, index)"
/> />
</div> </div>
<div>
<div class="label">{{ t("count") }}</div>
<el-input-number size="small" class="profile-input" :min="0" v-model="item.count" @change="changeParam" />
</div>
<div> <div>
<div class="label"> <div class="label">
<span class="mr-5">{{ t("threshold") }}</span> <span class="mr-5">{{ t("threshold") }}</span>
@ -70,6 +66,10 @@ limitations under the License. -->
@change="changeThreshold(index)" @change="changeThreshold(index)"
/> />
</div> </div>
<div>
<div class="label">{{ t("count") }}</div>
<el-input-number size="small" class="profile-input" :min="0" v-model="item.count" @change="changeParam" />
</div>
<div> <div>
<div class="label">{{ t("period") }}</div> <div class="label">{{ t("period") }}</div>
<el-input-number size="small" class="profile-input" :min="0" v-model="item.period" @change="changeParam" /> <el-input-number size="small" class="profile-input" :min="0" v-model="item.period" @change="changeParam" />

View File

@ -99,16 +99,13 @@ limitations under the License. -->
tooltip: { tooltip: {
overflowMethod: "cap", overflowMethod: "cap",
template(item: EBPFTaskList | any) { template(item: EBPFTaskList | any) {
const types = ["PROCESS_CPU", "HTTP_ERROR_RATE"];
const data = item.data || {}; const data = item.data || {};
const end = data.taskStartTime ? visDate(data.taskStartTime + data.fixedTriggerDuration * 1000) : ""; const end = data.taskStartTime ? visDate(data.taskStartTime + data.fixedTriggerDuration * 1000) : "";
let str = ""; let str = "";
for (const item of data.continuousProfilingCauses || []) { for (const item of data.continuousProfilingCauses || []) {
str += `${item.type}: ${getURI(item.uri)}${item.uri.threshold}${types.includes(item.type) ? "%" : ""}>= str += `${item.message};`;
${item.uri.current}${types.includes(item.type) ? "%" : ""}; `;
} }
let tmp = ` let tmp = `
<div>Task ID: ${data.taskId || ""}</div> <div>Task ID: ${data.taskId || ""}</div>
<div>Target Type: ${data.targetType || ""}</div> <div>Target Type: ${data.targetType || ""}</div>
<div>Trigger Type: ${data.triggerType || ""}</div> <div>Trigger Type: ${data.triggerType || ""}</div>