diff --git a/config/config.ts b/config/config.ts index 9dbc3ccd..36546891 100644 --- a/config/config.ts +++ b/config/config.ts @@ -14,7 +14,7 @@ const isProduction = env === 'production'; const t = Date.now(); export default defineConfig({ proxy: { - ...proxy('http://192.168.50.166:8080') + ...proxy() }, history: { type: 'hash' diff --git a/src/components/auto-tooltip/index.tsx b/src/components/auto-tooltip/index.tsx index afa82eec..b801ecea 100644 --- a/src/components/auto-tooltip/index.tsx +++ b/src/components/auto-tooltip/index.tsx @@ -1,4 +1,4 @@ -import { Tag, Tooltip } from 'antd'; +import { Tag, Tooltip, type TagProps } from 'antd'; import debounce from 'lodash/debounce'; import React, { useCallback, @@ -8,12 +8,15 @@ import React, { useState } from 'react'; -interface AutoTooltipProps extends React.ComponentProps { +// type TagProps = React.ComponentProps; + +interface AutoTooltipProps extends Omit { children: React.ReactNode; maxWidth?: number | string; color?: string; style?: React.CSSProperties; ghost?: boolean; + title?: React.ReactNode; showTitle?: boolean; } @@ -21,6 +24,7 @@ const AutoTooltip: React.FC = ({ children, maxWidth = '100%', ghost = false, + title, showTitle = false, ...tagProps }) => { @@ -64,7 +68,7 @@ const AutoTooltip: React.FC = ({ ); return ( - + {ghost ? (
{children} diff --git a/src/components/label-selector/label-item.tsx b/src/components/label-selector/label-item.tsx index 3afe4db9..0e187222 100644 --- a/src/components/label-selector/label-item.tsx +++ b/src/components/label-selector/label-item.tsx @@ -77,6 +77,7 @@ const LabelItem: React.FC = ({ title={intl.formatMessage({ id: 'resources.table.key.tips' })} > = ({
{valueAddon ?? ( = (props) => { const [logs, setLogs] = useState(''); const size = useSize(scroller); - const throttleScroll = _.debounce(() => { + const throttleScroll = _.throttle(() => { termRef.current?.scrollToBottom?.(); }, 100); @@ -36,6 +36,7 @@ const LogsViewer: React.FC = (props) => { termRef.current?.clear?.(); cacheDataRef.current = data; termRef.current?.write?.(data); + setLogs(data); }, 100), [] ); @@ -78,11 +79,11 @@ const LogsViewer: React.FC = (props) => { termRef.current.open(termwrapRef.current); // add event - termRef.current.onLineFeed((e: any) => { - if (cacheDataRef.current) { - throttleScroll(); - } - }); + // termRef.current.onLineFeed((e: any) => { + // if (cacheDataRef.current) { + // throttleScroll(); + // } + // }); }; const handleResize = _.throttle(() => { @@ -111,6 +112,10 @@ const LogsViewer: React.FC = (props) => { } }, [size]); + useEffect(() => { + throttleScroll(); + }, [logs]); + return (
diff --git a/src/components/seal-form/seal-input.tsx b/src/components/seal-form/seal-input.tsx index 8df0648a..17ce221b 100644 --- a/src/components/seal-form/seal-input.tsx +++ b/src/components/seal-form/seal-input.tsx @@ -17,6 +17,7 @@ const SealInput: React.FC = (props) => { isInFormItems = true, variant, addAfter, + checkStatus, trim = true, ...rest } = props; @@ -70,7 +71,7 @@ const SealInput: React.FC = (props) => { return ( = forwardRef((props, ref) => { replicas: 1, source: props.source, placement_strategy: 'spread', - cpu_offloading: false, + cpu_offloading: true, scheduleType: 'auto', - distributed_inference_across_workers: false + distributed_inference_across_workers: true }} > diff --git a/src/pages/llmodels/components/hf-model-file.tsx b/src/pages/llmodels/components/hf-model-file.tsx index cb46777e..0fc70bdb 100644 --- a/src/pages/llmodels/components/hf-model-file.tsx +++ b/src/pages/llmodels/components/hf-model-file.tsx @@ -262,7 +262,7 @@ const HFModelFile: React.FC = forwardRef((props, ref) => { return (
- + {intl.formatMessage({ id: 'models.available.files' })} ( {dataSource.fileList.length || 0}) diff --git a/src/pages/llmodels/components/instance-item.tsx b/src/pages/llmodels/components/instance-item.tsx index a34e646d..15fc1e08 100644 --- a/src/pages/llmodels/components/instance-item.tsx +++ b/src/pages/llmodels/components/instance-item.tsx @@ -1,3 +1,4 @@ +import AutoTooltip from '@/components/auto-tooltip'; import DropdownButtons from '@/components/drop-down-buttons'; import RowChildren from '@/components/seal-table/components/row-children'; import SimpleTabel from '@/components/simple-table'; @@ -159,10 +160,16 @@ const InstanceItem: React.FC = ({ paddingInline: 'var(--ant-table-cell-padding-inline)' }} > - - {item.name} + + + {item.name} + - + = ({ span={5} render={(text, record: ListItem) => { return ( - - + + {text}