feat: 镜像拉取日志 Unicode 转义 (#4239)

This commit is contained in:
ssongliu 2024-03-19 22:40:06 +08:00 committed by GitHub
parent ebc3195df4
commit 8cf8375911
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -162,6 +162,9 @@ const getContent = () => {
if (!end.value && res.data.end) {
lastContent.value = content.value;
}
res.data.content = res.data.content.replace(/\\u(\w{4})/g, function (match, grp) {
return String.fromCharCode(parseInt(grp, 16));
});
data.value = res.data;
if (res.data.content != '') {
if (stopSignals.some((signal) => res.data.content.endsWith(signal))) {

View File

@ -110,7 +110,12 @@
<Status :key="row.state" :status="row.state"></Status>
</template>
</el-table-column>
<el-table-column :label="$t('container.source')" show-overflow-tooltip min-width="100">
<el-table-column
:label="$t('container.source')"
show-overflow-tooltip
prop="resource"
min-width="100"
>
<template #default="{ row }">
<div v-if="row.hasLoad">
<div class="source-font">CPU: {{ row.cpuPercent.toFixed(2) }}%</div>