From 1b8c17ce92103d5b8ef69966fb6f3d7a4e28e3df Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 11 Feb 2026 15:29:58 +0800 Subject: [PATCH] fix: tts params filter --- src/components/logs-viewer/logs-list.tsx | 53 +++++++++---------- src/pages/benchmark/details.tsx | 2 +- .../benchmark/hooks/use-column-settings.tsx | 30 ++++++++--- src/pages/benchmark/index.tsx | 2 +- .../step-forms/advance-config.tsx | 2 +- .../maas-provider/forms/advance-config.tsx | 2 +- src/pages/maas-provider/forms/api-keys.tsx | 10 ++-- .../playground/components/ground-stt.tsx | 5 +- .../playground/components/ground-tts.tsx | 23 +++++++- 9 files changed, 84 insertions(+), 45 deletions(-) diff --git a/src/components/logs-viewer/logs-list.tsx b/src/components/logs-viewer/logs-list.tsx index c7b1f14a..95fe2515 100644 --- a/src/components/logs-viewer/logs-list.tsx +++ b/src/components/logs-viewer/logs-list.tsx @@ -62,36 +62,33 @@ const LogsList: React.FC = forwardRef((props, ref) => { scroller: scroller.current })); - const handleOnWheel = useCallback( - (e: any) => { - const scrollTop = scrollEventElement?.current.scrollTop; - const scrollHeight = scrollEventElement?.current.scrollHeight; - const clientHeight = scrollEventElement?.current.clientHeight; + const handleOnWheel = (e: any) => { + const scrollTop = scrollEventElement?.current?.scrollTop; + const scrollHeight = scrollEventElement?.current?.scrollHeight; + const clientHeight = scrollEventElement?.current?.clientHeight; - stopScroll.current = scrollTop + clientHeight <= scrollHeight; + stopScroll.current = scrollTop + clientHeight <= scrollHeight; - const isBottom = scrollTop + clientHeight + 150 >= scrollHeight; - // is scroll to top - if (scrollTop <= 10) { - onScroll?.({ - isTop: true, - isBottom: false - }); - } else if (isBottom) { - onScroll?.({ - isTop: false, - isBottom: true - }); - stopScroll.current = false; - } else { - onScroll?.({ - isTop: false, - isBottom: false - }); - } - }, - [debounceResetStopScroll, scrollEventElement] - ); + const isBottom = scrollTop + clientHeight + 150 >= scrollHeight; + // is scroll to top + if (scrollTop <= 10) { + onScroll?.({ + isTop: true, + isBottom: false + }); + } else if (isBottom) { + onScroll?.({ + isTop: false, + isBottom: true + }); + stopScroll.current = false; + } else { + onScroll?.({ + isTop: false, + isBottom: false + }); + } + }; const debounceUpdateScrollerPosition = _.debounce(() => { generateInstance(); diff --git a/src/pages/benchmark/details.tsx b/src/pages/benchmark/details.tsx index f5d95be7..414bdce4 100644 --- a/src/pages/benchmark/details.tsx +++ b/src/pages/benchmark/details.tsx @@ -146,7 +146,7 @@ const Details: React.FC = () => { style={{ opacity: loading ? 0 : 1, position: 'relative', - bottom: -2, + bottom: 1, right: -1 }} > diff --git a/src/pages/benchmark/hooks/use-column-settings.tsx b/src/pages/benchmark/hooks/use-column-settings.tsx index 2cf801e5..0d1879fd 100644 --- a/src/pages/benchmark/hooks/use-column-settings.tsx +++ b/src/pages/benchmark/hooks/use-column-settings.tsx @@ -19,8 +19,8 @@ import { BenchmarkListItem as ListItem } from '../config/types'; const allFields = [ 'cluster_id', 'model_name', - 'dataset_name', 'profile', + 'dataset_name', 'gpu_summary', 'state', 'request_rate', @@ -47,7 +47,7 @@ const fieldSortPos: Record = Object.fromEntries( const defaultColumns: string[] = [ 'model_name', - 'dataset_name', + 'profile', 'state', 'gpu_summary', 'tokens_per_second_mean', @@ -107,10 +107,18 @@ const useColumnSettings = (options: { title={`${title} ${options?.subTitle || ''}`} > {title} - {options?.subTitle && ( -
{options.subTitle}
- )} + {options?.subTitle && ( + + + {options.subTitle} + + + )} ); }; @@ -142,7 +150,11 @@ const useColumnSettings = (options: { path: 'request_latency_mean', unit: 'ms', sorter: tableSorter(1), - render: (value: number) => round(value, 2) + render: (value: number) => ( + + {round(value, 2)} + + ) }, { title: renderTitle('TTFT', { @@ -180,7 +192,11 @@ const useColumnSettings = (options: { dataIndex: 'inter_token_latency_mean', path: 'inter_token_latency_mean', unit: 'ms', - render: (value: number) => round(value, 2) || '-' + render: (value: number) => ( + + {round(value, 2) || '-'} + + ) }, { title: 'RPS', diff --git a/src/pages/benchmark/index.tsx b/src/pages/benchmark/index.tsx index 20aa6930..eb8f3eba 100644 --- a/src/pages/benchmark/index.tsx +++ b/src/pages/benchmark/index.tsx @@ -247,7 +247,7 @@ const Benchmark: React.FC = () => { sortDirections={TABLE_SORT_DIRECTIONS} showSorterTooltip={false} rowKey="id" - scroll={{ x: 1200 }} + scroll={{ x: 1260 }} onChange={handleTableChange} pagination={{ showSizeChanger: true, diff --git a/src/pages/cluster-management/step-forms/advance-config.tsx b/src/pages/cluster-management/step-forms/advance-config.tsx index 239ea8a3..ee47d0bb 100644 --- a/src/pages/cluster-management/step-forms/advance-config.tsx +++ b/src/pages/cluster-management/step-forms/advance-config.tsx @@ -63,7 +63,7 @@ const ClusterAdvanceConfig: React.FC<{ ref={editorRef} title={ - {`${intl.formatMessage({ id: 'clusters.create.workerConfig' })} YAML`} + {`${intl.formatMessage({ id: 'clusters.create.workerConfig' })} (YAML)`}