fix: benchmark tooltip issues
This commit is contained in:
@@ -157,7 +157,7 @@ export const FilterBar: React.FC<FilterBarProps> = (props) => {
|
|||||||
actionType === 'dropdown' ? (
|
actionType === 'dropdown' ? (
|
||||||
<DropDownActions
|
<DropDownActions
|
||||||
styles={{
|
styles={{
|
||||||
root: { minWidth: '125px' }
|
root: { minWidth: '140px' }
|
||||||
}}
|
}}
|
||||||
menu={{
|
menu={{
|
||||||
items: actionItems,
|
items: actionItems,
|
||||||
|
|||||||
@@ -43,6 +43,6 @@ export default {
|
|||||||
'backend.recommendModels': 'Recommended Models',
|
'backend.recommendModels': 'Recommended Models',
|
||||||
'backend.filter.source': 'Filter by source',
|
'backend.filter.source': 'Filter by source',
|
||||||
'backend.add.custom': 'Custom',
|
'backend.add.custom': 'Custom',
|
||||||
'backend.add.community': 'Community Backends',
|
'backend.add.community': 'Community',
|
||||||
'backend.community.title': 'Community Backend Marketplace'
|
'backend.community.title': 'Community Backend Marketplace'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,5 +83,7 @@ export default {
|
|||||||
'benchmark.env.cpuCounts': 'CPU Cores',
|
'benchmark.env.cpuCounts': 'CPU Cores',
|
||||||
'benchmark.table.export.results': 'Export Results',
|
'benchmark.table.export.results': 'Export Results',
|
||||||
'benchmark.form.nonLlmModel.tips':
|
'benchmark.form.nonLlmModel.tips':
|
||||||
'Benchmarking currently only supports LLM models'
|
'Benchmarking currently only supports LLM models',
|
||||||
|
'benchmark.detail.result.duration': 'Duration',
|
||||||
|
'benchmark.detail.result.basic': 'Basic'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,6 @@ export default {
|
|||||||
'backend.recommendModels': 'Recommended Models',
|
'backend.recommendModels': 'Recommended Models',
|
||||||
'backend.filter.source': 'Filter by source',
|
'backend.filter.source': 'Filter by source',
|
||||||
'backend.add.custom': 'Custom',
|
'backend.add.custom': 'Custom',
|
||||||
'backend.add.community': 'Community Backends',
|
'backend.add.community': 'Community',
|
||||||
'backend.community.title': 'Community Backend Marketplace'
|
'backend.community.title': 'Community Backend Marketplace'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,5 +83,7 @@ export default {
|
|||||||
'benchmark.env.cpuCounts': 'CPU Cores',
|
'benchmark.env.cpuCounts': 'CPU Cores',
|
||||||
'benchmark.table.export.results': 'Export Results',
|
'benchmark.table.export.results': 'Export Results',
|
||||||
'benchmark.form.nonLlmModel.tips':
|
'benchmark.form.nonLlmModel.tips':
|
||||||
'Benchmarking currently only supports LLM models'
|
'Benchmarking currently only supports LLM models',
|
||||||
|
'benchmark.detail.result.duration': 'Duration',
|
||||||
|
'benchmark.detail.result.basic': 'Basic'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
'backend.recommendModels': 'Recommended Models',
|
'backend.recommendModels': 'Recommended Models',
|
||||||
'backend.filter.source': 'Filter by source',
|
'backend.filter.source': 'Filter by source',
|
||||||
'backend.add.custom': 'Custom',
|
'backend.add.custom': 'Custom',
|
||||||
'backend.add.community': 'Community Backends',
|
'backend.add.community': 'Community',
|
||||||
'backend.community.title': 'Community Backend Marketplace'
|
'backend.community.title': 'Community Backend Marketplace'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -52,6 +52,6 @@ export default {
|
|||||||
// 2. 'backend.recommendModels': 'Recommended Models',
|
// 2. 'backend.recommendModels': 'Recommended Models',
|
||||||
// 3. 'backend.filter.source': 'Filter by source',
|
// 3. 'backend.filter.source': 'Filter by source',
|
||||||
// 4. 'backend.add.custom': 'Custom',
|
// 4. 'backend.add.custom': 'Custom',
|
||||||
// 5. 'backend.add.community': 'Community Backends',
|
// 5. 'backend.add.community': 'Community',
|
||||||
// 6. 'backend.community.title': 'Community Backend Marketplace'
|
// 6. 'backend.community.title': 'Community Backend Marketplace'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -83,5 +83,7 @@ export default {
|
|||||||
'benchmark.env.cpuCounts': 'CPU Cores',
|
'benchmark.env.cpuCounts': 'CPU Cores',
|
||||||
'benchmark.table.export.results': 'Export Results',
|
'benchmark.table.export.results': 'Export Results',
|
||||||
'benchmark.form.nonLlmModel.tips':
|
'benchmark.form.nonLlmModel.tips':
|
||||||
'Benchmarking currently only supports LLM models'
|
'Benchmarking currently only supports LLM models',
|
||||||
|
'benchmark.detail.result.duration': 'Duration',
|
||||||
|
'benchmark.detail.result.basic': 'Basic'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,6 +40,6 @@ export default {
|
|||||||
'backend.recommendModels': '推荐模型',
|
'backend.recommendModels': '推荐模型',
|
||||||
'backend.filter.source': '按来源过滤',
|
'backend.filter.source': '按来源过滤',
|
||||||
'backend.add.custom': '自定义',
|
'backend.add.custom': '自定义',
|
||||||
'backend.add.community': '社区后端',
|
'backend.add.community': '社区',
|
||||||
'backend.community.title': '社区后端市场'
|
'backend.community.title': '社区后端市场'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -82,5 +82,7 @@ export default {
|
|||||||
'benchmark.env.driverVersion': '驱动版本',
|
'benchmark.env.driverVersion': '驱动版本',
|
||||||
'benchmark.env.cpuCounts': 'CPU 核心数',
|
'benchmark.env.cpuCounts': 'CPU 核心数',
|
||||||
'benchmark.table.export.results': '导出结果',
|
'benchmark.table.export.results': '导出结果',
|
||||||
'benchmark.form.nonLlmModel.tips': '基准测试目前仅支持 LLM 模型'
|
'benchmark.form.nonLlmModel.tips': '基准测试目前仅支持 LLM 模型',
|
||||||
|
'benchmark.detail.result.duration': '耗时',
|
||||||
|
'benchmark.detail.result.basic': '基础信息'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ const ColumnSettings: React.FC<{
|
|||||||
{intl.formatMessage({ id: 'common.checkbox.all' })}
|
{intl.formatMessage({ id: 'common.checkbox.all' })}
|
||||||
</Button>
|
</Button>
|
||||||
<Button size="middle" type="primary" onClick={handleConfirm}>
|
<Button size="middle" type="primary" onClick={handleConfirm}>
|
||||||
{intl.formatMessage({ id: 'common.button.confirm' })}
|
{intl.formatMessage({ id: 'common.button.save' })}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -108,46 +108,21 @@ const requestColumns = [
|
|||||||
0,
|
0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
unit: ''
|
unit: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'benchmark.detail.result.duration',
|
||||||
|
key: 'duration',
|
||||||
|
dataIndex: 'duration',
|
||||||
|
path: ['raw_metrics', 'benchmarks', '0', 'duration'],
|
||||||
|
precision: 0,
|
||||||
|
render: (value: number) => (value ? `${round(value, 2)} (s)` : 0),
|
||||||
|
unit: ''
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const PERCENTILES = [
|
|
||||||
{ key: 'metrics', label: 'Metrics', title: 'N/A' }
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
const PercentileResult: React.FC = () => {
|
const PercentileResult: React.FC = () => {
|
||||||
const { detailData } = useDetailContext();
|
const { detailData } = useDetailContext();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const metrics = detailData?.raw_metrics?.benchmarks?.[0]?.metrics || {};
|
|
||||||
|
|
||||||
const buildPercentileTable = (metrics: any) => {
|
|
||||||
return PERCENTILES.map(({ key, title }) => {
|
|
||||||
const row: any = { metrics: title };
|
|
||||||
|
|
||||||
[...throughputColumns, ...latencyColumns].forEach(
|
|
||||||
({ dataIndex, path }) => {
|
|
||||||
row[dataIndex] = _.get(detailData, path) ?? 0;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return row;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const items = [...throughputColumns, ...latencyColumns].map(
|
|
||||||
({ title, dataIndex, path, render, unit }) => ({
|
|
||||||
key: dataIndex,
|
|
||||||
label: title,
|
|
||||||
children: unit ? (
|
|
||||||
<span className="flex-center">
|
|
||||||
{render(_.get(detailData, path) ?? 0)}{' '}
|
|
||||||
<span className="m-l-4">({unit})</span>
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
render(_.get(detailData, path) ?? 0)
|
|
||||||
)
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const throughputItems = throughputColumns.map(
|
const throughputItems = throughputColumns.map(
|
||||||
({ title, dataIndex, path, render, unit }) => ({
|
({ title, dataIndex, path, render, unit }) => ({
|
||||||
@@ -215,8 +190,8 @@ const PercentileResult: React.FC = () => {
|
|||||||
<Box>
|
<Box>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
styles={descriptionStyles}
|
styles={descriptionStyles}
|
||||||
title={intl.formatMessage({ id: 'benchmark.detail.summary.latency' })}
|
title={intl.formatMessage({ id: 'benchmark.detail.result.basic' })}
|
||||||
items={latencyItems}
|
items={requestItems}
|
||||||
colon={false}
|
colon={false}
|
||||||
column={1}
|
column={1}
|
||||||
></Descriptions>
|
></Descriptions>
|
||||||
@@ -231,8 +206,8 @@ const PercentileResult: React.FC = () => {
|
|||||||
></Descriptions>
|
></Descriptions>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
styles={descriptionStyles}
|
styles={descriptionStyles}
|
||||||
title={intl.formatMessage({ id: 'benchmark.detail.summary.request' })}
|
title={intl.formatMessage({ id: 'benchmark.detail.summary.latency' })}
|
||||||
items={requestItems}
|
items={latencyItems}
|
||||||
colon={false}
|
colon={false}
|
||||||
column={1}
|
column={1}
|
||||||
></Descriptions>
|
></Descriptions>
|
||||||
|
|||||||
@@ -38,14 +38,11 @@ const useBenchmarkColumns = (params: {
|
|||||||
...columns,
|
...columns,
|
||||||
{
|
{
|
||||||
title: (
|
title: (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<Typography.Text ellipsis={{ tooltip: true }}>
|
||||||
{intl.formatMessage({ id: 'common.table.operation' })}
|
{intl.formatMessage({ id: 'common.table.operation' })}
|
||||||
</AutoTooltip>
|
</Typography.Text>
|
||||||
),
|
),
|
||||||
dataIndex: 'operations',
|
dataIndex: 'operations',
|
||||||
ellipsis: {
|
|
||||||
showTitle: false
|
|
||||||
},
|
|
||||||
render: (value: string, record: ListItem) => (
|
render: (value: string, record: ListItem) => (
|
||||||
<RowActions record={record} handleSelect={handleSelect}></RowActions>
|
<RowActions record={record} handleSelect={handleSelect}></RowActions>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import AutoTooltip from '@/components/auto-tooltip';
|
import AutoTooltip from '@/components/auto-tooltip';
|
||||||
|
import InfoColumn from '@/components/simple-table/info-column';
|
||||||
import StatusTag from '@/components/status-tag';
|
import StatusTag from '@/components/status-tag';
|
||||||
import { tableSorter } from '@/config/settings';
|
import { tableSorter } from '@/config/settings';
|
||||||
import ColumnSettings from '@/pages/_components/column-settings';
|
import ColumnSettings from '@/pages/_components/column-settings';
|
||||||
import { useIntl } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
|
import { Typography } from 'antd';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import _, { round } from 'lodash';
|
import _, { round } from 'lodash';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -120,6 +122,21 @@ const useColumnSettings = (options: {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fieldList = [
|
||||||
|
{
|
||||||
|
label: 'benchmark.detail.throughput.inputToken',
|
||||||
|
key: 'input_tokens_per_second_mean',
|
||||||
|
locale: true,
|
||||||
|
render: (val: any) => round(val, 2)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'benchmark.detail.throughput.outputToken',
|
||||||
|
key: 'output_tokens_per_second_mean',
|
||||||
|
locale: true,
|
||||||
|
render: (val: any) => round(val, 2)
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
const resultColumns = [
|
const resultColumns = [
|
||||||
{
|
{
|
||||||
title: renderTitle(
|
title: renderTitle(
|
||||||
@@ -144,7 +161,7 @@ const useColumnSettings = (options: {
|
|||||||
unit: 'ms',
|
unit: 'ms',
|
||||||
render: (text: number) => (
|
render: (text: number) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{_.round(text, 2)}
|
{_.round(text, 2) || '-'}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -158,7 +175,7 @@ const useColumnSettings = (options: {
|
|||||||
unit: 'ms',
|
unit: 'ms',
|
||||||
render: (text: number) => (
|
render: (text: number) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{_.round(text, 2)}
|
{_.round(text, 2) || '-'}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -170,7 +187,7 @@ const useColumnSettings = (options: {
|
|||||||
dataIndex: 'inter_token_latency_mean',
|
dataIndex: 'inter_token_latency_mean',
|
||||||
path: 'inter_token_latency_mean',
|
path: 'inter_token_latency_mean',
|
||||||
unit: 'ms',
|
unit: 'ms',
|
||||||
render: (value: number) => round(value, 2)
|
render: (value: number) => round(value, 2) || '-'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'RPS',
|
title: 'RPS',
|
||||||
@@ -178,7 +195,7 @@ const useColumnSettings = (options: {
|
|||||||
sorter: tableSorter(1),
|
sorter: tableSorter(1),
|
||||||
render: (text: string) => (
|
render: (text: string) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{_.round(text, 2)}
|
{_.round(text, 2) || '-'}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -193,9 +210,14 @@ const useColumnSettings = (options: {
|
|||||||
path: 'tokens_per_second_mean',
|
path: 'tokens_per_second_mean',
|
||||||
unit: 'Tokens/s',
|
unit: 'Tokens/s',
|
||||||
sorter: tableSorter(1),
|
sorter: tableSorter(1),
|
||||||
render: (text: number) => (
|
render: (text: number, record: any) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip
|
||||||
{_.round(text, 2)}
|
ghost
|
||||||
|
minWidth={20}
|
||||||
|
showTitle
|
||||||
|
title={<InfoColumn fieldList={fieldList} data={record}></InfoColumn>}
|
||||||
|
>
|
||||||
|
{_.round(text, 2) || '-'}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -213,7 +235,7 @@ const useColumnSettings = (options: {
|
|||||||
unit: 'Tokens/s',
|
unit: 'Tokens/s',
|
||||||
render: (value: number) => (
|
render: (value: number) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{round(value, 2)}
|
{round(value, 2) || 0}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -231,7 +253,7 @@ const useColumnSettings = (options: {
|
|||||||
unit: 'Tokens/s',
|
unit: 'Tokens/s',
|
||||||
render: (value: number) => (
|
render: (value: number) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{round(value, 2)}
|
{round(value, 2) || 0}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -249,14 +271,53 @@ const useColumnSettings = (options: {
|
|||||||
),
|
),
|
||||||
unit: ''
|
unit: ''
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// title: renderTitle(
|
||||||
|
// intl.formatMessage({ id: 'benchmark.detail.requests.success' })
|
||||||
|
// ),
|
||||||
|
// dataIndex: 'successful_requests',
|
||||||
|
// path: ['raw_metrics', 'benchmarks', '0'],
|
||||||
|
// render: (value: number) =>
|
||||||
|
// round(_.get(value, ['metrics', 'request_totals', 'successful']), 0) ||
|
||||||
|
// 0,
|
||||||
|
// precision: 0,
|
||||||
|
// color: 'var(--ant-color-success)',
|
||||||
|
// unit: ''
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: renderTitle(
|
||||||
|
// intl.formatMessage({ id: 'benchmark.detail.requests.failed' })
|
||||||
|
// ),
|
||||||
|
// dataIndex: 'failed_requests',
|
||||||
|
// path: ['raw_metrics', 'benchmarks', '0'],
|
||||||
|
// render: (value: number) =>
|
||||||
|
// round(_.get(value, ['metrics', 'request_totals', 'errored']), 0) || 0,
|
||||||
|
// precision: 0,
|
||||||
|
// color: 'var(--ant-color-error)',
|
||||||
|
// unit: ''
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: renderTitle(
|
||||||
|
// intl.formatMessage({
|
||||||
|
// id: 'benchmark.detail.requests.concurrency'
|
||||||
|
// })
|
||||||
|
// ),
|
||||||
|
// dataIndex: 'request_concurrency',
|
||||||
|
// path: ['raw_metrics', 'benchmarks', '0'],
|
||||||
|
// render: (value: number) =>
|
||||||
|
// round(_.get(value, 'metrics.request_concurrency.successful.mean'), 0) ||
|
||||||
|
// 0,
|
||||||
|
// precision: 0,
|
||||||
|
// unit: ''
|
||||||
|
// }
|
||||||
];
|
];
|
||||||
|
|
||||||
const metadataColumns = [
|
const metadataColumns = [
|
||||||
{
|
{
|
||||||
title: (
|
title: (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<Typography.Text ellipsis={{ tooltip: true }}>
|
||||||
{intl.formatMessage({ id: 'clusters.title' })}
|
{intl.formatMessage({ id: 'clusters.title' })}
|
||||||
</AutoTooltip>
|
</Typography.Text>
|
||||||
),
|
),
|
||||||
dataIndex: 'cluster_id',
|
dataIndex: 'cluster_id',
|
||||||
render: (text: number) => (
|
render: (text: number) => (
|
||||||
@@ -266,8 +327,10 @@ const useColumnSettings = (options: {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTitle(
|
title: (
|
||||||
intl.formatMessage({ id: 'benchmark.detail.modelName' })
|
<Typography.Text ellipsis={{ tooltip: true }}>
|
||||||
|
{intl.formatMessage({ id: 'benchmark.detail.modelName' })}
|
||||||
|
</Typography.Text>
|
||||||
),
|
),
|
||||||
dataIndex: 'model_name',
|
dataIndex: 'model_name',
|
||||||
sorter: tableSorter(1),
|
sorter: tableSorter(1),
|
||||||
@@ -287,7 +350,11 @@ const useColumnSettings = (options: {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTitle(intl.formatMessage({ id: 'benchmark.form.profile' })),
|
title: (
|
||||||
|
<Typography.Text ellipsis={{ tooltip: true }}>
|
||||||
|
{intl.formatMessage({ id: 'benchmark.form.profile' })}
|
||||||
|
</Typography.Text>
|
||||||
|
),
|
||||||
dataIndex: 'profile',
|
dataIndex: 'profile',
|
||||||
render: (text: string) => (
|
render: (text: string) => (
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import React, { forwardRef, useImperativeHandle } from 'react';
|
|||||||
import APIKeys from './api-keys';
|
import APIKeys from './api-keys';
|
||||||
import ProxyConfig from './proxy-config';
|
import ProxyConfig from './proxy-config';
|
||||||
|
|
||||||
const referLink = `https://higress.cn/docs/latest/plugins/ai/api-provider/ai-proxy/?spm=36971b57.3562eb7c.0.0.31764f5f7uLs2F#%E6%8F%90%E4%BE%9B%E5%95%86%E7%89%B9%E6%9C%89%E9%85%8D%E7%BD%AE`;
|
const referLinkZh = `https://higress.cn/docs/latest/plugins/ai/api-provider/ai-proxy/?spm=36971b57.3562eb7c.0.0.31764f5f7uLs2F#%E6%8F%90%E4%BE%9B%E5%95%86%E7%89%B9%E6%9C%89%E9%85%8D%E7%BD%AE`;
|
||||||
|
const referLinkEn = `https://higress.cn/en/docs/latest/plugins/ai/api-provider/ai-proxy/?spm=36971b57.4a688c53.0.0.64ac436ewz1xGA`;
|
||||||
|
|
||||||
const AdvanceConfig: React.FC<{
|
const AdvanceConfig: React.FC<{
|
||||||
action: PageActionType;
|
action: PageActionType;
|
||||||
@@ -19,6 +20,8 @@ const AdvanceConfig: React.FC<{
|
|||||||
const editorRef = React.useRef<any>(null);
|
const editorRef = React.useRef<any>(null);
|
||||||
const [fileContent, setFileContent] = React.useState<string>('');
|
const [fileContent, setFileContent] = React.useState<string>('');
|
||||||
|
|
||||||
|
const referLink = intl.locale === 'zh-CN' ? referLinkZh : referLinkEn;
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
getYamlValue: () => {
|
getYamlValue: () => {
|
||||||
return editorRef.current?.getValue();
|
return editorRef.current?.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user