style: instance cell style

This commit is contained in:
jialin
2026-03-26 18:20:55 +08:00
committed by jialin
parent 43dfc7e1f0
commit 144d5a6d5f
14 changed files with 125 additions and 51 deletions
@@ -163,7 +163,7 @@ const DistributeInfoCell: React.FC<{
marginRight: 0,
display: 'flex',
alignItems: 'center',
maxWidth: '100%',
maxWidth: 'max-content',
minWidth: 50,
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
@@ -14,10 +14,11 @@ import React, { useEffect } from 'react';
import { ModelInstanceListItem } from '../../config/types';
import '../../style/instance-item.less';
interface NameCellProps {
export interface NameCellProps {
record: ModelInstanceListItem;
modelData: any;
defaultOpenId?: string;
showWorkerInfo?: boolean;
}
const calcTotalVram = (vram: Record<string, number>) => {
@@ -108,14 +109,15 @@ const WorkerInfo = (props: {
const NameCell: React.FC<NameCellProps> = ({
record,
modelData,
defaultOpenId
defaultOpenId,
showWorkerInfo = true
}) => {
return (
<span className="flex-center instance-name">
<AutoTooltip title={record.name} ghost>
<span className="m-r-5">{record.name}</span>
</AutoTooltip>
{!!record.worker_id && (
{!!record.worker_id && showWorkerInfo && (
<WorkerInfo
title={
<WorkerInfoContent
@@ -96,7 +96,6 @@ const ViewLogsModal: React.FC<ViewModalProps> = (props) => {
</span>
</span>
}
zIndex={3000}
open={open}
centered={true}
onCancel={handleCancel}