@@ -458,6 +462,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.GROUP,
title: t('分组'),
dataIndex: 'group',
+ width: 120,
render: (text, record, index) => {
if (record.type === 0 || record.type === 2 || record.type === 5) {
if (record.group) {
@@ -490,6 +495,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TYPE,
title: t('类型'),
dataIndex: 'type',
+ width: 100,
render: (text, record, index) => {
return <>{renderType(text)}>;
},
@@ -498,6 +504,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.MODEL,
title: t('模型'),
dataIndex: 'model_name',
+ width: 160,
render: (text, record, index) => {
return record.type === 0 || record.type === 2 || record.type === 5 ? (
<>{renderModelName(record)}>
@@ -510,6 +517,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.USE_TIME,
title: t('用时/首字'),
dataIndex: 'use_time',
+ width: 160,
render: (text, record, index) => {
if (record.is_stream) {
let other = getLogOther(record.other);
@@ -538,6 +546,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.PROMPT,
title: t('提示'),
dataIndex: 'prompt_tokens',
+ width: 100,
render: (text, record, index) => {
return record.type === 0 || record.type === 2 || record.type === 5 ? (
<>{
{text} }>
@@ -550,6 +559,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.COMPLETION,
title: t('补全'),
dataIndex: 'completion_tokens',
+ width: 100,
render: (text, record, index) => {
return parseInt(text) > 0 &&
(record.type === 0 || record.type === 2 || record.type === 5) ? (
@@ -563,6 +573,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.COST,
title: t('花费'),
dataIndex: 'quota',
+ width: 120,
render: (text, record, index) => {
return record.type === 0 || record.type === 2 || record.type === 5 ? (
<>{renderQuota(text, 6)}>
@@ -575,6 +586,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.RETRY,
title: t('重试'),
dataIndex: 'retry',
+ width: 160,
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
let content = t('渠道') + `:${record.channel}`;
@@ -603,6 +615,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.DETAILS,
title: t('详情'),
dataIndex: 'content',
+ width: 200,
render: (text, record, index) => {
let other = getLogOther(record.other);
if (other == null || record.type !== 2) {
diff --git a/web/src/components/MjLogsTable.js b/web/src/components/MjLogsTable.js
index f44f712f..08c47e7d 100644
--- a/web/src/components/MjLogsTable.js
+++ b/web/src/components/MjLogsTable.js
@@ -374,6 +374,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.SUBMIT_TIME,
title: t('提交时间'),
dataIndex: 'submit_time',
+ width: 180,
render: (text, record, index) => {
return
{renderTimestamp(text / 1000)}
;
},
@@ -381,9 +382,9 @@ const LogsTable = () => {
{
key: COLUMN_KEYS.DURATION,
title: t('花费时间'),
- dataIndex: 'finish_time', // 以finish_time作为dataIndex
+ dataIndex: 'finish_time',
+ width: 120,
render: (finish, record) => {
- // 假设record.start_time是存在的,并且finish是完成时间的时间戳
return renderDuration(record.submit_time, finish);
},
},
@@ -391,6 +392,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.CHANNEL,
title: t('渠道'),
dataIndex: 'channel_id',
+ width: 100,
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return isAdminUser ? (
@@ -400,7 +402,7 @@ const LogsTable = () => {
size='large'
shape='circle'
onClick={() => {
- copyText(text); // 假设copyText是用于文本复制的函数
+ copyText(text);
}}
>
{' '}
@@ -416,6 +418,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TYPE,
title: t('类型'),
dataIndex: 'action',
+ width: 120,
render: (text, record, index) => {
return
{renderType(text)}
;
},
@@ -424,6 +427,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TASK_ID,
title: t('任务ID'),
dataIndex: 'mj_id',
+ width: 200,
render: (text, record, index) => {
return
{text}
;
},
@@ -432,6 +436,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.SUBMIT_RESULT,
title: t('提交结果'),
dataIndex: 'code',
+ width: 120,
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return isAdminUser ?
{renderCode(text)}
: <>>;
@@ -441,6 +446,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TASK_STATUS,
title: t('任务状态'),
dataIndex: 'status',
+ width: 120,
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return
{renderStatus(text)}
;
@@ -450,11 +456,11 @@ const LogsTable = () => {
key: COLUMN_KEYS.PROGRESS,
title: t('进度'),
dataIndex: 'progress',
+ width: 160,
render: (text, record, index) => {
return (
{
- // 转换例如100%为数字100,如果text未定义,返回0