feat: simplify param override audit UI and operation labels

This commit is contained in:
Seefs
2026-03-17 16:22:26 +08:00
parent 5db25f47f1
commit bc80477b1a
5 changed files with 448 additions and 282 deletions

View File

@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { Modal, Button, Tag } from '@douyinfe/semi-ui';
import { Modal } from '@douyinfe/semi-ui';
import {
API,
getTodayStartTimestamp,
@@ -39,6 +39,7 @@ import {
} from '../../helpers';
import { ITEMS_PER_PAGE } from '../../constants';
import { useTableCompactMode } from '../common/useTableCompactMode';
import ParamOverrideEntry from '../../components/table/usage-logs/components/ParamOverrideEntry';
export const useLogsData = () => {
const { t } = useTranslation();
@@ -604,30 +605,14 @@ export const useLogsData = () => {
expandDataLocal.push({
key: t('参数覆盖'),
value: (
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 10,
flexWrap: 'wrap',
<ParamOverrideEntry
count={other.po.length}
t={t}
onOpen={(event) => {
event.stopPropagation();
openParamOverrideModal(logs[i], other);
}}
>
<Tag color='blue' shape='circle'>
{t('{{count}} 项变更', { count: other.po.length })}
</Tag>
<Button
theme='borderless'
type='primary'
size='small'
style={{ paddingLeft: 0 }}
onClick={(event) => {
event.stopPropagation();
openParamOverrideModal(logs[i], other);
}}
>
{t('查看详情')}
</Button>
</div>
/>
),
});
}