fix: rpc server field error
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ const isProduction = env === 'production';
|
|||||||
const t = Date.now();
|
const t = Date.now();
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
proxy: {
|
proxy: {
|
||||||
...proxy()
|
...proxy('http://192.168.50.166:8080')
|
||||||
},
|
},
|
||||||
history: {
|
history: {
|
||||||
type: 'hash'
|
type: 'hash'
|
||||||
|
|||||||
@@ -10,9 +10,10 @@ interface SimpleTableProps {
|
|||||||
columns: any[];
|
columns: any[];
|
||||||
dataSource: any[];
|
dataSource: any[];
|
||||||
bordered?: boolean;
|
bordered?: boolean;
|
||||||
|
rowKey?: string;
|
||||||
}
|
}
|
||||||
const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
|
const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
|
||||||
const { columns, dataSource, bordered = true } = props;
|
const { columns, dataSource, rowKey, bordered = true } = props;
|
||||||
return (
|
return (
|
||||||
<SimpleBar style={{ maxHeight: 200 }}>
|
<SimpleBar style={{ maxHeight: 200 }}>
|
||||||
<table
|
<table
|
||||||
@@ -26,7 +27,11 @@ const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{dataSource.map((item: any, index: number) => {
|
{dataSource.map((item: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<TableRow row={item} columns={columns} key="index"></TableRow>
|
<TableRow
|
||||||
|
row={item}
|
||||||
|
columns={columns}
|
||||||
|
key={rowKey ? item[rowKey] : index}
|
||||||
|
></TableRow>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -102,24 +102,24 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderDistributionInfo = (item: ModelInstanceListItem) => {
|
const renderDistributionInfo = (row: ModelInstanceListItem) => {
|
||||||
const rpcServerList = item.distributed_servers?.rpc_servers || [];
|
const rpcServerList = row.distributed_servers?.rpc_servers || [];
|
||||||
const list = _.map(rpcServerList, (item: any) => {
|
const list = _.map(rpcServerList, (item: any) => {
|
||||||
const data = _.find(workerList, { id: item.worker_id });
|
const data = _.find(workerList, { id: item.worker_id });
|
||||||
return {
|
return {
|
||||||
woker_name: data?.name,
|
worker_name: data?.name,
|
||||||
work_ip: data.ip,
|
worker_ip: data?.ip,
|
||||||
port: item.port,
|
port: data?.port,
|
||||||
gpu_index: item.gpu_index
|
gpu_index: item.gpu_index
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const mainWorker = [
|
const mainWorker = [
|
||||||
{
|
{
|
||||||
worker_name: `${item.worker_name}`,
|
worker_name: `${row.worker_name}`,
|
||||||
worker_ip: `${item.worker_ip}`,
|
worker_ip: `${row.worker_ip}`,
|
||||||
port: item.port,
|
port: row.port,
|
||||||
gpu_index: `${item.gpu_indexes} (main)`
|
gpu_index: `${row.gpu_indexes} (main)`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -135,6 +135,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
||||||
{_.map(list, (item: ModelInstanceListItem, index: number) => {
|
{_.map(list, (item: ModelInstanceListItem, index: number) => {
|
||||||
|
|||||||
@@ -361,16 +361,19 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderChildren = useCallback((list: any) => {
|
const renderChildren = useCallback(
|
||||||
return (
|
(list: any) => {
|
||||||
<InstanceItem
|
return (
|
||||||
list={list}
|
<InstanceItem
|
||||||
gpuDeviceList={gpuDeviceList}
|
list={list}
|
||||||
workerList={workerList}
|
gpuDeviceList={gpuDeviceList}
|
||||||
handleChildSelect={handleChildSelect}
|
workerList={workerList}
|
||||||
></InstanceItem>
|
handleChildSelect={handleChildSelect}
|
||||||
);
|
></InstanceItem>
|
||||||
}, []);
|
);
|
||||||
|
},
|
||||||
|
[workerList]
|
||||||
|
);
|
||||||
|
|
||||||
const handleCloseViewCode = useCallback(() => {
|
const handleCloseViewCode = useCallback(() => {
|
||||||
setEmbeddingParams({
|
setEmbeddingParams({
|
||||||
|
|||||||
Reference in New Issue
Block a user