fix: backend input focus not work
This commit is contained in:
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
|
|||||||
// import './iconfont/iconfont.js';
|
// import './iconfont/iconfont.js';
|
||||||
|
|
||||||
const IconFont = createFromIconfontCN({
|
const IconFont = createFromIconfontCN({
|
||||||
scriptUrl: '//at.alicdn.com/t/c/font_4613488_v10ij8hozhi.js'
|
scriptUrl: '//at.alicdn.com/t/c/font_4613488_fabphdpng0n.js'
|
||||||
});
|
});
|
||||||
|
|
||||||
export default IconFont;
|
export default IconFont;
|
||||||
|
|||||||
@@ -509,15 +509,13 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
></SealInput.Number>
|
></SealInput.Number>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="backend">
|
<Form.Item name="backend">
|
||||||
<div id="backend-field">
|
|
||||||
<SealSelect
|
<SealSelect
|
||||||
onChange={handleBackendChange}
|
onChange={handleBackendChange}
|
||||||
label={intl.formatMessage({ id: 'models.form.backend' })}
|
label={intl.formatMessage({ id: 'models.form.backend' })}
|
||||||
description={
|
description={
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
1.{' '}
|
1. {intl.formatMessage({ id: 'models.form.backend.llamabox' })}
|
||||||
{intl.formatMessage({ id: 'models.form.backend.llamabox' })}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
2. {intl.formatMessage({ id: 'models.form.backend.vllm' })}
|
2. {intl.formatMessage({ id: 'models.form.backend.vllm' })}
|
||||||
@@ -555,7 +553,6 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
props.source !== modelSourceMap.local_path_value
|
props.source !== modelSourceMap.local_path_value
|
||||||
}
|
}
|
||||||
></SealSelect>
|
></SealSelect>
|
||||||
</div>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item<FormData> name="description">
|
<Form.Item<FormData> name="description">
|
||||||
<SealInput.TextArea
|
<SealInput.TextArea
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import AutoTooltip from '@/components/auto-tooltip';
|
import AutoTooltip from '@/components/auto-tooltip';
|
||||||
import DropdownButtons from '@/components/drop-down-buttons';
|
import DropdownButtons from '@/components/drop-down-buttons';
|
||||||
|
import IconFont from '@/components/icon-font';
|
||||||
import RowChildren from '@/components/seal-table/components/row-children';
|
import RowChildren from '@/components/seal-table/components/row-children';
|
||||||
import SimpleTabel from '@/components/simple-table';
|
import SimpleTabel from '@/components/simple-table';
|
||||||
import StatusTag from '@/components/status-tag';
|
import StatusTag from '@/components/status-tag';
|
||||||
@@ -10,7 +11,9 @@ import {
|
|||||||
import {
|
import {
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
FieldTimeOutlined,
|
FieldTimeOutlined,
|
||||||
InfoCircleOutlined
|
HddFilled,
|
||||||
|
InfoCircleOutlined,
|
||||||
|
ThunderboltFilled
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { useIntl } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
import { Col, Divider, Row, Space, Tag, Tooltip } from 'antd';
|
import { Col, Divider, Row, Space, Tag, Tooltip } from 'antd';
|
||||||
@@ -19,6 +22,7 @@ import _ from 'lodash';
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { InstanceStatusMap, InstanceStatusMapValue, status } from '../config';
|
import { InstanceStatusMap, InstanceStatusMapValue, status } from '../config';
|
||||||
import { ModelInstanceListItem } from '../config/types';
|
import { ModelInstanceListItem } from '../config/types';
|
||||||
|
import '../style/instance-item.less';
|
||||||
|
|
||||||
interface InstanceItemProps {
|
interface InstanceItemProps {
|
||||||
list: ModelInstanceListItem[];
|
list: ModelInstanceListItem[];
|
||||||
@@ -97,12 +101,17 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>{item.worker_name}</div>
|
<div>{item.worker_name}</div>
|
||||||
<div>{workerIp}</div>
|
<div className="flex-center">
|
||||||
<div>
|
<HddFilled className="m-r-5" />
|
||||||
|
{workerIp}
|
||||||
|
</div>
|
||||||
|
<div className="flex-center">
|
||||||
|
<IconFont type="icon-filled-gpu" className="m-r-5" />
|
||||||
{intl.formatMessage({ id: 'models.table.gpuindex' })}: [
|
{intl.formatMessage({ id: 'models.table.gpuindex' })}: [
|
||||||
{_.join(item.gpu_indexes?.sort?.(), ',')}]
|
{_.join(item.gpu_indexes?.sort?.(), ',')}]
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="flex-center">
|
||||||
|
<ThunderboltFilled className="m-r-5" />
|
||||||
{intl.formatMessage({ id: 'models.form.backend' })}:{' '}
|
{intl.formatMessage({ id: 'models.form.backend' })}:{' '}
|
||||||
{modelData?.backend || ''}
|
{modelData?.backend || ''}
|
||||||
{modelData.backend_version ? `(${modelData.backend_version})` : ''}
|
{modelData.backend_version ? `(${modelData.backend_version})` : ''}
|
||||||
@@ -150,7 +159,6 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
{_.map(list, (item: ModelInstanceListItem, index: number) => {
|
{_.map(list, (item: ModelInstanceListItem, index: number) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="_2Q2Yw"
|
|
||||||
key={`${item.id}`}
|
key={`${item.id}`}
|
||||||
style={{ borderRadius: 'var(--ant-table-header-border-radius)' }}
|
style={{ borderRadius: 'var(--ant-table-header-border-radius)' }}
|
||||||
>
|
>
|
||||||
@@ -162,12 +170,14 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="flex-center">
|
<span className="flex-center instance-name">
|
||||||
<AutoTooltip title={item.name} ghost>
|
<AutoTooltip title={item.name} ghost>
|
||||||
<span className="m-r-5">{item.name}</span>
|
<span className="m-r-5">{item.name}</span>
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
<Tooltip title={renderWorkerInfo(item)}>
|
<Tooltip title={renderWorkerInfo(item)}>
|
||||||
|
<span className="server-info">
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined />
|
||||||
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>
|
</span>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
.instance-name {
|
||||||
|
min-height: 54px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.server-info {
|
||||||
|
.text {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
color: var(--ant-blue-5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.server-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user