fix: details

This commit is contained in:
Fine 2023-06-12 20:34:26 +08:00
parent 62a82590c9
commit e33e59f472
3 changed files with 23 additions and 11 deletions

View File

@ -43,11 +43,26 @@ export const queryEBPFTasks = {
serviceInstanceId serviceInstanceId
serviceInstanceName serviceInstanceName
processLabels processLabels
processName
processId
taskStartTime taskStartTime
triggerType triggerType
fixedTriggerDuration fixedTriggerDuration
targetType targetType
createTime createTime
continuousProfilingCauses {
type
singleValue {
threshold
current
}
uri {
uriRegex
uriPath
threshold
current
}
}
}`, }`,
}; };
export const queryEBPFSchedules = { export const queryEBPFSchedules = {

View File

@ -22,7 +22,6 @@ declare module '@vue/runtime-core' {
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElPopover: typeof import('element-plus/es')['ElPopover'] ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress'] ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadio: typeof import('element-plus/es')['ElRadio']

View File

@ -101,22 +101,20 @@ limitations under the License. -->
template(item: EBPFTaskList | any) { template(item: EBPFTaskList | any) {
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 = "";
for (const item of data.continuousProfilingCauses || []) {
str += `${item.type}: ${getURI(item.uri)}${item.uri.threshold}>=${item.uri.current}; `;
}
let tmp = ` let tmp = `
<div>Task ID: ${data.taskId || ""}</div> <div>Task ID: ${data.taskId || ""}</div>
<div>Service Name: ${data.serviceName || ""}</div>
<div>Service Instance Name: ${data.serviceInstanceName || ""}</div>
<div>Service Process Name: ${data.processName || ""}</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>
<div>Start Time: ${data.taskStartTime ? visDate(data.taskStartTime) : ""}</div> <div>Start Time: ${data.taskStartTime ? visDate(data.taskStartTime) : ""}</div>
<div>End Time: ${end}</div> <div>End Time: ${end}</div>
<div>Causes: ${str}</div>
<div>Process Labels: ${data.processLabels.join("; ") || ""}</div>`; <div>Process Labels: ${data.processLabels.join("; ") || ""}</div>`;
let str = ""; return tmp;
for (const item of data.continuousProfilingCauses || []) {
str += `<div>${item.type}: ${getURI(item.uri)}${item.uri.threshold}>=${item.uri.current}</div>`;
}
return tmp + str;
}, },
}, },
}; };
@ -132,7 +130,7 @@ limitations under the License. -->
} }
function getURI(uri: { uriRegex: string; uriPath: string }) { 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() { function resize() {