Skip to content

Commit

Permalink
fix: 查看上传文件大量日志时前端 api 参数错误 TencentBlueKing#3009
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 9275
  • Loading branch information
hLinx committed Jun 4, 2024
1 parent 4f404c9 commit dd9cdf1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
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

0 comments on commit dd9cdf1

Please sign in to comment.