Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 查看上传文件大量日志时前端 api 参数错误 #3009 #3040

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/frontend/src/views/executive-history/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,6 @@ export default {
'容器 ID': 'Container ID',
'所属 Pod 名称': 'Pod name',
没有可复制的容器名称: 'Container name not found',
文件源: 'File source',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,48 @@
[statusMap[data.status]]: true,
toggle: isContentOpen,
};

let bkTooltips = null;

if (data.srcExecuteObject.container) {
const {
id,
name,
nodeHostId,
podName,
uid,
} = data.srcExecuteObject.container || {};

bkTooltips = {
theme: 'light',
content: `<table>
<tr>
<td style="text-align: right; padding-right: 12px;">id: </td>
<td>${id}</td>
</tr>
<tr>
<td style="text-align: right; padding-right: 12px;">Container name: </td>
<td>${name}</td>
</tr>
<tr>
<td style="text-align: right; padding-right: 12px;">Host id: </td>
<td>${nodeHostId}</td>
</tr>
<tr>
<td style="text-align: right; padding-right: 12px;">Pod name: </td>
<td>${podName}</td>
</tr>
<tr>
<td style="text-align: right; padding-right: 12px;">uid: </td>
<td>${uid}</td>
</tr>
</table>`,
allowHTML: true,
};
}
// 异步获取日志的loading状态
const logContent = renderContentMap[data.taskId] || data.logContent;

if (isContentLoading && !logContent) {
classes['content-loading'] = true;
}
Expand Down Expand Up @@ -83,7 +123,15 @@
<span>{ parent.$t('history.文件名') }:{ data.fileName }</span>
<span>{ parent.$t('history.文件大小') }:{ data.fileSize }</span>
<span>{ parent.$t('history.状态.log') }:<span class="status">{ data.statusDesc }</span></span>
<span>{ parent.$t('history.源服务器 IP') }:{ renderServer() }</span>
<span>{ parent.$t('history.文件源') }:
<span
v-bk-tooltips={bkTooltips}
style={{
borderBottom: bkTooltips ? '1px dashed #c4c6cc' : '',
}}>
{ renderServer() }
</span>
</span>
<span>{ parent.$t('history.速率') }:{ data.speed }</span>
<span>{ parent.$t('history.进度') }:{ data.progress }</span>
</div>
Expand Down
Loading