|
@@ -103,9 +103,15 @@ const LogsTable = () => {
|
|
|
{t('系统')}
|
|
{t('系统')}
|
|
|
</Tag>
|
|
</Tag>
|
|
|
);
|
|
);
|
|
|
|
|
+ case 5:
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Tag color='red' size='large'>
|
|
|
|
|
+ {t('错误')}
|
|
|
|
|
+ </Tag>
|
|
|
|
|
+ );
|
|
|
default:
|
|
default:
|
|
|
return (
|
|
return (
|
|
|
- <Tag color='black' size='large'>
|
|
|
|
|
|
|
+ <Tag color='grey' size='large'>
|
|
|
{t('未知')}
|
|
{t('未知')}
|
|
|
</Tag>
|
|
</Tag>
|
|
|
);
|
|
);
|
|
@@ -373,7 +379,7 @@ const LogsTable = () => {
|
|
|
className: isAdmin() ? 'tableShow' : 'tableHiddle',
|
|
className: isAdmin() ? 'tableShow' : 'tableHiddle',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
return isAdminUser ? (
|
|
return isAdminUser ? (
|
|
|
- record.type === 0 || record.type === 2 ? (
|
|
|
|
|
|
|
+ record.type === 0 || record.type === 2 || record.type === 5 ? (
|
|
|
<div>
|
|
<div>
|
|
|
{
|
|
{
|
|
|
<Tooltip content={record.channel_name || '[未知]'}>
|
|
<Tooltip content={record.channel_name || '[未知]'}>
|
|
@@ -426,7 +432,7 @@ const LogsTable = () => {
|
|
|
title: t('令牌'),
|
|
title: t('令牌'),
|
|
|
dataIndex: 'token_name',
|
|
dataIndex: 'token_name',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
- return record.type === 0 || record.type === 2 ? (
|
|
|
|
|
|
|
+ return record.type === 0 || record.type === 2 || record.type === 5 ? (
|
|
|
<div>
|
|
<div>
|
|
|
<Tag
|
|
<Tag
|
|
|
color='grey'
|
|
color='grey'
|
|
@@ -450,7 +456,7 @@ const LogsTable = () => {
|
|
|
title: t('分组'),
|
|
title: t('分组'),
|
|
|
dataIndex: 'group',
|
|
dataIndex: 'group',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
- if (record.type === 0 || record.type === 2) {
|
|
|
|
|
|
|
+ if (record.type === 0 || record.type === 2 || record.type === 5) {
|
|
|
if (record.group) {
|
|
if (record.group) {
|
|
|
return <>{renderGroup(record.group)}</>;
|
|
return <>{renderGroup(record.group)}</>;
|
|
|
} else {
|
|
} else {
|
|
@@ -490,7 +496,7 @@ const LogsTable = () => {
|
|
|
title: t('模型'),
|
|
title: t('模型'),
|
|
|
dataIndex: 'model_name',
|
|
dataIndex: 'model_name',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
- return record.type === 0 || record.type === 2 ? (
|
|
|
|
|
|
|
+ return record.type === 0 || record.type === 2 || record.type === 5 ? (
|
|
|
<>{renderModelName(record)}</>
|
|
<>{renderModelName(record)}</>
|
|
|
) : (
|
|
) : (
|
|
|
<></>
|
|
<></>
|
|
@@ -530,7 +536,7 @@ const LogsTable = () => {
|
|
|
title: t('提示'),
|
|
title: t('提示'),
|
|
|
dataIndex: 'prompt_tokens',
|
|
dataIndex: 'prompt_tokens',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
- return record.type === 0 || record.type === 2 ? (
|
|
|
|
|
|
|
+ return record.type === 0 || record.type === 2 || record.type === 5 ? (
|
|
|
<>{<span> {text} </span>}</>
|
|
<>{<span> {text} </span>}</>
|
|
|
) : (
|
|
) : (
|
|
|
<></>
|
|
<></>
|
|
@@ -543,7 +549,7 @@ const LogsTable = () => {
|
|
|
dataIndex: 'completion_tokens',
|
|
dataIndex: 'completion_tokens',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
return parseInt(text) > 0 &&
|
|
return parseInt(text) > 0 &&
|
|
|
- (record.type === 0 || record.type === 2) ? (
|
|
|
|
|
|
|
+ (record.type === 0 || record.type === 2 || record.type === 5) ? (
|
|
|
<>{<span> {text} </span>}</>
|
|
<>{<span> {text} </span>}</>
|
|
|
) : (
|
|
) : (
|
|
|
<></>
|
|
<></>
|
|
@@ -555,7 +561,7 @@ const LogsTable = () => {
|
|
|
title: t('花费'),
|
|
title: t('花费'),
|
|
|
dataIndex: 'quota',
|
|
dataIndex: 'quota',
|
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
|
- return record.type === 0 || record.type === 2 ? (
|
|
|
|
|
|
|
+ return record.type === 0 || record.type === 2 || record.type === 5 ? (
|
|
|
<>{renderQuota(text, 6)}</>
|
|
<>{renderQuota(text, 6)}</>
|
|
|
) : (
|
|
) : (
|
|
|
<></>
|
|
<></>
|
|
@@ -986,9 +992,10 @@ const LogsTable = () => {
|
|
|
other?.group_ratio,
|
|
other?.group_ratio,
|
|
|
other?.cache_tokens || 0,
|
|
other?.cache_tokens || 0,
|
|
|
other?.cache_ratio || 1.0,
|
|
other?.cache_ratio || 1.0,
|
|
|
- other?.image || false,
|
|
|
|
|
- other?.image_ratio || 0,
|
|
|
|
|
- other?.image_output || 0,);
|
|
|
|
|
|
|
+ other?.image || false,
|
|
|
|
|
+ other?.image_ratio || 0,
|
|
|
|
|
+ other?.image_output || 0,
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
expandDataLocal.push({
|
|
expandDataLocal.push({
|
|
|
key: t('计费过程'),
|
|
key: t('计费过程'),
|
|
@@ -1247,6 +1254,7 @@ const LogsTable = () => {
|
|
|
<Select.Option value='2'>{t('消费')}</Select.Option>
|
|
<Select.Option value='2'>{t('消费')}</Select.Option>
|
|
|
<Select.Option value='3'>{t('管理')}</Select.Option>
|
|
<Select.Option value='3'>{t('管理')}</Select.Option>
|
|
|
<Select.Option value='4'>{t('系统')}</Select.Option>
|
|
<Select.Option value='4'>{t('系统')}</Select.Option>
|
|
|
|
|
+ <Select.Option value='5'>{t('错误')}</Select.Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
<Button
|
|
<Button
|
|
|
theme='light'
|
|
theme='light'
|