style: adjust some styles
This commit is contained in:
@@ -688,7 +688,6 @@ body {
|
||||
|
||||
.ant-tooltip-content {
|
||||
.ant-tooltip-inner {
|
||||
width: fit-content;
|
||||
max-width: var(--width-tooltip-max);
|
||||
|
||||
.text-tertiary {
|
||||
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
'models.form.backend_parameters.sglang.placeholder':
|
||||
'e.g., --context-length=8192 (use = to separate name and value)',
|
||||
'models.form.backend_parameters.vllm.tips':
|
||||
'More {backend} parameter details',
|
||||
'For more details about {backend} parameters, see <a href={link} target="_blank">here</a>.',
|
||||
'models.logs.pagination.prev': 'Previous {lines} Lines',
|
||||
'models.logs.pagination.next': 'Next {lines} Lines',
|
||||
'models.logs.pagination.last': 'Last Page',
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
'models.form.gpuPerReplica.tips': 'Enter a custom number',
|
||||
'models.form.generic_proxy': 'Enable Generic Proxy',
|
||||
'models.form.generic_proxy.tips':
|
||||
'After enabling the generic proxy, you can access URI paths that do not follow the OpenAI API standard.',
|
||||
'After enabling the generic proxy, you can access URI paths that do not follow the OpenAI compatible APIs.',
|
||||
'models.form.generic_proxy.button': 'Generic Proxy',
|
||||
'models.accessControlModal.includeusers': 'Include Users',
|
||||
'models.table.genericProxy':
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
'resources.worker.maintenance.remark.rules':
|
||||
'Please enter maintenance remarks',
|
||||
'resources.worker.maintenance.tips':
|
||||
'When maintenance mode is enabled, the node will stop scheduling new model deployment tasks. Running instances will not be affected.',
|
||||
'When enter the maintenance mode, the node will stop scheduling new model deployment tasks. Running instances will not be affected.',
|
||||
'resources.worker.noCluster.tips':
|
||||
'No available clusters. Please create a cluster before adding a node.'
|
||||
};
|
||||
|
||||
@@ -36,5 +36,6 @@ export default {
|
||||
'users.version.update': 'GPUStack {version} is available',
|
||||
'users.settings.title': 'User Settings',
|
||||
'users.status.activate': 'Activate Account',
|
||||
'users.status.deactivate': 'Deactivate Account'
|
||||
'users.status.deactivate': 'Deactivate Account',
|
||||
'users.status.inactiveAccount': 'Inactive Account'
|
||||
};
|
||||
|
||||
@@ -76,7 +76,8 @@ export default {
|
||||
'例: --max-model-len=8192(=で名前と値を分ける)',
|
||||
'models.form.backend_parameters.sglang.placeholder':
|
||||
'例: --context-length=8192(=で名前と値を分ける)',
|
||||
'models.form.backend_parameters.vllm.tips': '詳細な{backend}パラメータ情報',
|
||||
'models.form.backend_parameters.vllm.tips':
|
||||
'For more details about {backend} parameters, see <a href={link} target="_blank">here</a>.',
|
||||
'models.logs.pagination.prev': '前の{lines}行',
|
||||
'models.logs.pagination.next': '次の{lines}行',
|
||||
'models.logs.pagination.last': '最終ページ',
|
||||
@@ -336,4 +337,5 @@ export default {
|
||||
// 59. 'models.form.backend.voxbox': 'Only supports NVIDIA GPUs and CPUs.',
|
||||
// 60. models.form.backend.mindie': 'Only supports Ascend NPUs.',
|
||||
// 61. 'models.form.backend.sglang': 'Built-in support for NVIDIA/AMD GPUs and Ascend NPUs.',
|
||||
// 62. 'models.form.backend_parameters.vllm.tips': 'For more details about {backend} parameters, see <a href={link} target="_blank">here</a>.',
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -37,11 +37,13 @@ export default {
|
||||
'users.version.update': 'GPUStack {version} が利用可能です',
|
||||
'users.settings.title': 'User Settings',
|
||||
'users.status.activate': 'Activate Account',
|
||||
'users.status.deactivate': 'Deactivate Account'
|
||||
'users.status.deactivate': 'Deactivate Account',
|
||||
'users.status.inactiveAccount': 'Inactive Account'
|
||||
};
|
||||
|
||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||
// 1. 'users.settings.title': 'User Settings',
|
||||
// 2. 'users.status.activate': 'Activate Account',
|
||||
// 3. 'users.status.deactivate': 'Deactivate Account',
|
||||
// 4. 'users.status.inactiveAccount': 'Inactive Account'
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
'models.form.backend_parameters.sglang.placeholder':
|
||||
'например: --context-length=8192(параметр и значение разделены знаком =)',
|
||||
'models.form.backend_parameters.vllm.tips':
|
||||
'Подробнее о параметрах {backend}',
|
||||
'For more details about {backend} parameters, see <a href={link} target="_blank">here</a>.',
|
||||
'models.logs.pagination.prev': 'Предыдущие {lines} строк',
|
||||
'models.logs.pagination.next': 'Следующие {lines} строк',
|
||||
'models.logs.pagination.last': 'Последняя страница',
|
||||
@@ -265,4 +265,5 @@ export default {
|
||||
// 5. 'models.form.backend.mindie': 'Only supports Ascend NPUs.',
|
||||
// 6. 'models.form.backend.sglang': 'Built-in support for NVIDIA/AMD GPUs and Ascend NPUs.',
|
||||
// 7. 'models.form.gpusAllocationType.auto.tips': 'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
// 8. 'models.form.backend_parameters.vllm.tips': 'For more details about {backend} parameters, see <a href={link} target="_blank">here</a>.',
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -37,10 +37,12 @@ export default {
|
||||
'users.version.update': 'Доступно обновление GPUStack {version}',
|
||||
'users.settings.title': 'Настройки пользователя',
|
||||
'users.status.activate': 'Activate Account',
|
||||
'users.status.deactivate': 'Deactivate Account'
|
||||
'users.status.deactivate': 'Deactivate Account',
|
||||
'users.status.inactiveAccount': 'Inactive Account'
|
||||
};
|
||||
|
||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||
// 1. 'users.status.activate': 'Activate Account',
|
||||
// 2. 'users.status.deactivate': 'Deactivate Account',
|
||||
// 3. 'users.status.inactiveAccount': 'Inactive Account'
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
'clusters.create.noImages': '无可用的镜像',
|
||||
'clusters.create.noInstanceTypes': '无可用的实例类型',
|
||||
'clusters.create.noRegions': '无可用的区域',
|
||||
'clusters.workerpool.batchSize.desc': '节点池中同时创建的节点数量',
|
||||
'clusters.workerpool.batchSize.desc': '节点池中同时创建的节点数量。',
|
||||
'clusters.create.addworker.tips':
|
||||
'在执行以下命令之前,请确保已满足 {label} 的<a href={link} target="_blank">先决条件</a>。',
|
||||
'clusters.create.addCommand.tips':
|
||||
|
||||
+13
-11
@@ -16,7 +16,7 @@ export default {
|
||||
'models.form.partialoffload.tips':
|
||||
'启用 CPU 卸载时,如果 GPU 资源不足,则模型的一部分层将被卸载到 CPU 上,在没有 GPU 可用时,会使用纯 CPU 推理。',
|
||||
'models.form.distribution.tips':
|
||||
'允许在单个节点资源不足时,将部分计算卸载到一个或多个远程节点',
|
||||
'允许在单个节点资源不足时,将部分计算卸载到一个或多个远程节点。',
|
||||
'models.openinplayground': '在 Playground 中打开',
|
||||
'models.instances': '实例',
|
||||
'models.table.replicas.edit': '调整副本数',
|
||||
@@ -73,7 +73,8 @@ export default {
|
||||
'例如,--max-model-len=8192(参数名和值用 = 号分隔)',
|
||||
'models.form.backend_parameters.sglang.placeholder':
|
||||
'例如,--context-length=8192(参数名和值用 = 号分隔)',
|
||||
'models.form.backend_parameters.vllm.tips': '更多 {backend} 参数说明查看',
|
||||
'models.form.backend_parameters.vllm.tips':
|
||||
'更多 {backend} 参数说明查看<a href={link} target="_blank">这里</a>。',
|
||||
'models.logs.pagination.prev': '上一 {lines} 行',
|
||||
'models.logs.pagination.next': '下一 {lines} 行',
|
||||
'models.logs.pagination.last': '最后一页',
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
'models.form.backend.llamabox':
|
||||
'用于 GGUF 格式模型,支持 Linux, macOS 和 Windows。',
|
||||
'models.form.backend.vllm':
|
||||
'内置支持 NVIDIA、AMD、昇腾、海光、亦来云(Iluvatar)和沐曦(MetaX)设备。',
|
||||
'内置支持 NVIDIA、AMD、昇腾、海光、天数智芯和沐曦设备。',
|
||||
'models.form.backend.voxbox': '仅支持 NVIDIA GPU 和 CPU。',
|
||||
'models.form.backend.mindie': '仅支持昇腾 NPU。',
|
||||
'models.form.backend.sglang': '内置支持 NVIDIA/AMD GPU 和昇腾 NPU。',
|
||||
@@ -100,12 +101,12 @@ export default {
|
||||
'models.localpath.gguf.tips.title': 'GGUF 格式模型',
|
||||
'models.localpat.safe.tips.title': 'safetensors 格式模型',
|
||||
'models.localpath.shared.tips.title': '分片的 GGUF 格式模型',
|
||||
'models.localpath.gguf.tips': '指向模型文件,例如 /data/models/model.gguf',
|
||||
'models.localpath.gguf.tips': '指向模型文件,例如 /data/models/model.gguf。',
|
||||
'models.localpath.safe.tips':
|
||||
'指向包含 .safetensors, config.json 文件的模型目录,例如 /data/models/model',
|
||||
'指向包含 .safetensors, config.json 文件的模型目录,例如 /data/models/model。',
|
||||
'models.localpath.chunks.tips':
|
||||
'指向模型第一个分片文件,例如 /data/models/model-00001-of-00004.gguf',
|
||||
'models.form.replicas.tips': '多副本数实现 { api } 接口推理请求的负载均衡',
|
||||
'指向模型第一个分片文件,例如 /data/models/model-00001-of-00004.gguf。',
|
||||
'models.form.replicas.tips': '多副本数实现 { api } 接口推理请求的负载均衡。',
|
||||
'models.table.list.empty': '暂无已部署模型',
|
||||
'models.table.list.getStart':
|
||||
'<span style="margin-right: 5px;font-size: 13px;">一键部署</span><span style="font-size: 14px;font-weight: 700">DeepSeek-R1-Distill-Qwen-1.5B</span><span style="margin-left: 5px;font-size: 13px;">立即使用!</span>',
|
||||
@@ -126,7 +127,7 @@ export default {
|
||||
'models.form.evaluating': '评估模型兼容性中...',
|
||||
'models.form.incompatible': '检测到不兼容',
|
||||
'models.form.restart.onerror': '错误时重启',
|
||||
'models.form.restart.onerror.tips': '当发生错误时,将自动尝试恢复',
|
||||
'models.form.restart.onerror.tips': '当发生错误时,将自动尝试恢复。',
|
||||
'models.form.check.params': '正在校验配置...',
|
||||
'models.form.check.passed': '兼容性检查通过',
|
||||
'models.form.check.claims': '该模型大约需要消耗 {vram} 显存和 {ram} 内存。',
|
||||
@@ -180,7 +181,7 @@ export default {
|
||||
'models.form.maxCPUSize': 'CPU 缓存最大占用 (GiB)',
|
||||
'models.form.remoteURL': '远程存储地址',
|
||||
'models.form.remoteURL.tips':
|
||||
'参考 <a href="https://docs.lmcache.ai/api_reference/configurations.html" target="_blank">配置文档</a> 配置',
|
||||
'参考 <a href="https://docs.lmcache.ai/api_reference/configurations.html" target="_blank">配置文档</a> 配置。',
|
||||
'models.form.runCommandPlaceholder':
|
||||
'例如,vllm serve Qwen/Qwen2.5-1.5B-Instruct',
|
||||
'models.accessSettings.public': '公开',
|
||||
@@ -196,7 +197,8 @@ export default {
|
||||
'models.form.gpusAllocationType.custom': '自定义',
|
||||
'models.form.gpusAllocationType.auto.tips':
|
||||
'系统自动计算每个副本的 GPU 数量,默认是 2 的幂,不超过选择的 GPU 数量。',
|
||||
'models.form.gpusAllocationType.custom.tips': '您可以指定每个副本的 GPU 数量',
|
||||
'models.form.gpusAllocationType.custom.tips':
|
||||
'您可以指定每个副本的 GPU 数量。',
|
||||
'models.mymodels.status.inactive': '已停止',
|
||||
'models.mymodels.status.degrade': '异常',
|
||||
'models.mymodels.status.active': '可用',
|
||||
@@ -236,7 +238,7 @@ export default {
|
||||
'models.form.gpuPerReplica.tips': '输入自定义数值',
|
||||
'models.form.generic_proxy': '启用通用代理',
|
||||
'models.form.generic_proxy.tips':
|
||||
'启用通用代理后可支持访问非 openai-API 标准的 URI 路径。',
|
||||
'启用通用代理后可支持访问非 OpenAI-API 标准的 URI 路径。',
|
||||
'models.form.generic_proxy.button': '通用代理',
|
||||
'models.accessControlModal.includeusers': '显示用户',
|
||||
'models.table.genericProxy':
|
||||
|
||||
@@ -82,12 +82,12 @@ export default {
|
||||
'playground.audio.speechtotext': '语音转文本',
|
||||
'playground.audio.texttospeech.tips': '生成的语音将出现在这里',
|
||||
'playground.audio.speechtotext.tips': '上传音频文件或开始录音',
|
||||
'playground.audio.enablemic': '请允许浏览器访问麦克风,以便开始录音',
|
||||
'playground.audio.enablemic': '请允许浏览器访问麦克风,以便开始录音。',
|
||||
'playground.audio.enablemic.doc': '参考文档',
|
||||
'playground.audio.startrecord': '开始录音',
|
||||
'playground.audio.stoprecord': '停止录音',
|
||||
'playground.audio.generating.tips': '生成的文本将出现在这里',
|
||||
'playground.audio.uploadfile.tips': '上传音频文件,支持格式:{formats}',
|
||||
'playground.audio.uploadfile.tips': '上传音频文件,支持格式:{formats}。',
|
||||
'playground.audio.button.generate': '生成文本',
|
||||
'playground.input.multiplePaste': '批量输入',
|
||||
'playground.input.multiplePaste.tips':
|
||||
@@ -137,16 +137,16 @@ export default {
|
||||
'playground.chat.aithought': '思考过程',
|
||||
'playground.chat.thinking': '思考中...',
|
||||
'playground.image.mask.uploaded': '遮罩已上传',
|
||||
'playground.image.mask.upload': '上传遮罩:上传后将不可再绘制',
|
||||
'playground.image.mask.upload': '上传遮罩:上传后将不可再绘制。',
|
||||
'playground.params.frequency_penalty.tips': `数值介于 -2.0 和 2.0 之间。正值会根据新词在文本中已出现的频率对其进行惩罚,从而降低模型逐字重复相同内容的可能性。`,
|
||||
'playground.params.presence_penalty.tips': `数值介于 -2.0 和 2.0 之间。正值会根据新词是否已在文本中出现过对其进行惩罚,从而增加模型谈论新话题的可能性。`,
|
||||
'playground.image.origin': '原图',
|
||||
'playground.image.mask': '遮罩',
|
||||
'playground.image.negativeMask.tips':
|
||||
'1. 选择后,将不可再绘制遮罩;因此,你应该先绘制遮罩然后再勾选.\n 2. 当上传了遮罩图片,将不可再生成遮罩',
|
||||
'1. 选择后,将不可再绘制遮罩;因此,你应该先绘制遮罩然后再勾选。\n 2. 当上传了遮罩图片,将不可再生成遮罩。',
|
||||
'playground.model.noavailable.tips2':
|
||||
'若预期的模型未显示,请检查模型是否已正常运行并被正确分类。如分类不正确,请编辑模型并手动调整其类别。',
|
||||
'playground.rerank.query.validate': '查询内容不能为空',
|
||||
'playground.image.generate.error': '出了一点问题,图片未能生成。',
|
||||
'playground.uploadfile.sizeError': '上传的文件大小超过限制,最大允许 {size}'
|
||||
'playground.uploadfile.sizeError': '上传的文件大小超过限制,最大允许 {size}。'
|
||||
};
|
||||
|
||||
@@ -96,11 +96,11 @@ export default {
|
||||
'resources.modelfiles.form.exsting': '已下载',
|
||||
'resources.modelfiles.form.added': '已添加',
|
||||
'resources.worker.maintenance.title': '系统维护',
|
||||
'resources.worker.maintenance.enable': '开启维护',
|
||||
'resources.worker.maintenance.disable': '停止维护',
|
||||
'resources.worker.maintenance.enable': '进入维护模式',
|
||||
'resources.worker.maintenance.disable': '退出维护模式',
|
||||
'resources.worker.maintenance.remark': '备注',
|
||||
'resources.worker.maintenance.remark.rules': '请输入维护备注',
|
||||
'resources.worker.maintenance.tips':
|
||||
'启用维护后,节点将停止调度新的模型实例部署任务,正在运行的实例不会受到影响。',
|
||||
'进入维护模式后,节点将停止调度新的模型实例部署任务,正在运行的实例不会受到影响。',
|
||||
'resources.worker.noCluster.tips': '当前无可用集群,请先创建集群再添加节点。'
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ export default {
|
||||
'users.table.status': '状态',
|
||||
'users.status.active': '启用',
|
||||
'users.status.inactive': '停用',
|
||||
'users.form.active': '激活账户',
|
||||
'users.form.active': '启用账户',
|
||||
'users.form.active.description': '启用或禁用此用户账户',
|
||||
'users.form.fullname': '全名',
|
||||
'users.form.source': '来源',
|
||||
@@ -35,5 +35,6 @@ export default {
|
||||
'users.version.update': 'GPUStack {version} 版本可供更新',
|
||||
'users.settings.title': '用户设置',
|
||||
'users.status.activate': '启用账户',
|
||||
'users.status.deactivate': '停用账户'
|
||||
'users.status.deactivate': '停用账户',
|
||||
'users.status.inactiveAccount': '停用账户'
|
||||
};
|
||||
|
||||
@@ -2,7 +2,6 @@ import ListInput from '@/components/list-input';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealTextArea from '@/components/seal-form/seal-textarea';
|
||||
import { PageAction } from '@/config';
|
||||
import { GPUSTACK_API_BASE_URL } from '@/config/settings';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -46,7 +45,7 @@ const BasicForm: React.FC<AddModalProps> = ({ action, currentData }) => {
|
||||
>
|
||||
<SealInput.Input
|
||||
trim
|
||||
placeholder={`/${GPUSTACK_API_BASE_URL}/models`}
|
||||
placeholder={`/v1/models`}
|
||||
label={intl.formatMessage({ id: 'backend.form.healthCheckPath' })}
|
||||
></SealInput.Input>
|
||||
</Form.Item>
|
||||
|
||||
@@ -163,6 +163,22 @@ const VersionList: React.FC<{ versionConfigs: VersionListItem[] }> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const optionRender = (option: any) => {
|
||||
const { data } = option;
|
||||
return (
|
||||
<span>
|
||||
{option.label}
|
||||
{data.tips ? (
|
||||
data.locale ? (
|
||||
<span className="text-tertiary m-l-4">{` [${intl.formatMessage({ id: data.tips })}]`}</span>
|
||||
) : (
|
||||
<span className="text-tertiary m-l-4">{` [${data.tips}]`}</span>
|
||||
)
|
||||
) : null}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<FilterBox>
|
||||
@@ -171,6 +187,7 @@ const VersionList: React.FC<{ versionConfigs: VersionListItem[] }> = ({
|
||||
placeholder={intl.formatMessage({ id: 'backend.filter.framework' })}
|
||||
options={frameworks}
|
||||
style={{ width: '100%' }}
|
||||
optionRender={optionRender}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</FilterBox>
|
||||
|
||||
@@ -243,7 +243,9 @@ const ClusterCreate = () => {
|
||||
const info = await queryClusterToken({ id: res.id });
|
||||
setRegistrationInfo({
|
||||
...info,
|
||||
image: info.container_registry,
|
||||
image: info.container_registry
|
||||
? `${info.container_registry}/${info.image}`
|
||||
: info.image,
|
||||
cluster_id: res.id
|
||||
});
|
||||
return true;
|
||||
|
||||
@@ -68,7 +68,9 @@ const AddWorker: React.FC<AddWorkerProps> = (props) => {
|
||||
firstLoad.current = false;
|
||||
setRegistrationInfo({
|
||||
...data,
|
||||
image: data.container_registry,
|
||||
image: data.container_registry
|
||||
? `${data.container_registry}/${data.image}`
|
||||
: data.image,
|
||||
cluster_id: value
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -33,6 +33,18 @@ const Title = styled.span`
|
||||
margin-block: 20px 16px;
|
||||
`;
|
||||
|
||||
const Header = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
.description {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
color: var(--ant-color-text-tertiary);
|
||||
}
|
||||
`;
|
||||
|
||||
interface ProviderCatalogProps {
|
||||
onSelect?: (provider: string, item: any) => void;
|
||||
cols?: number;
|
||||
@@ -71,6 +83,21 @@ const ProviderCatalog: React.FC<ProviderCatalogProps> = ({
|
||||
);
|
||||
}, [dataList]);
|
||||
|
||||
const renderTitle = (item: any) => {
|
||||
return (
|
||||
<Header>
|
||||
<span>
|
||||
{item.locale ? intl.formatMessage({ id: item.label }) : item.label}
|
||||
</span>
|
||||
{item.description && (
|
||||
<span className="description">
|
||||
{intl.formatMessage({ id: item.description })}
|
||||
</span>
|
||||
)}
|
||||
</Header>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Container>
|
||||
{Object.entries(groupList).map(([groupName, items]) => (
|
||||
@@ -87,16 +114,9 @@ const ProviderCatalog: React.FC<ProviderCatalogProps> = ({
|
||||
active={current === action.key}
|
||||
disabled={action.disabled}
|
||||
clickable={clickable}
|
||||
header={
|
||||
action.locale
|
||||
? intl.formatMessage({ id: action.label })
|
||||
: action.label
|
||||
}
|
||||
header={renderTitle(action)}
|
||||
icon={action.icon}
|
||||
>
|
||||
{action.description &&
|
||||
intl.formatMessage({ id: action.description })}
|
||||
</Card>
|
||||
></Card>
|
||||
))}
|
||||
</Wrapper>
|
||||
</div>
|
||||
|
||||
@@ -198,7 +198,7 @@ const AccessControlForm = forwardRef((props: AccessControlFormProps, ref) => {
|
||||
checked={filterInUsers.has('inactive')}
|
||||
onChange={(e: any) => handleCheck(e, 'inactive')}
|
||||
>
|
||||
{intl.formatMessage({ id: 'users.status.deactivate' })}
|
||||
{intl.formatMessage({ id: 'users.status.inactiveAccount' })}
|
||||
</Checkbox>
|
||||
),
|
||||
key: '1'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import ModalFooter from '@/components/modal-footer';
|
||||
import ScrollerModal from '@/components/scroller-modal';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { message } from 'antd';
|
||||
import { useRef } from 'react';
|
||||
@@ -53,7 +54,7 @@ const AccessControlModal: React.FC<
|
||||
<AccessControlForm
|
||||
ref={form}
|
||||
currentData={currentData}
|
||||
action={action}
|
||||
action={action as PageActionType}
|
||||
onFinish={handleOnFinish}
|
||||
/>
|
||||
</ScrollerModal>
|
||||
|
||||
@@ -168,7 +168,7 @@ const ApiAccessInfo = ({ open, data, onClose }: ApiAccessInfoProps) => {
|
||||
{intl.formatMessage({ id: 'models.table.apiAccessInfo.endpoint' })}
|
||||
</span>
|
||||
<span className="value">
|
||||
<AutoTooltip ghost maxWidth={data.generic_proxy ? 400 : 180}>
|
||||
<AutoTooltip ghost maxWidth={data.generic_proxy ? 400 : 240}>
|
||||
{endPoint}
|
||||
</AutoTooltip>
|
||||
{!data.generic_proxy && (
|
||||
|
||||
@@ -49,6 +49,11 @@ export const ActionList: ActionItem[] = [
|
||||
key: 'chat',
|
||||
icon: icons.ExperimentOutlined
|
||||
},
|
||||
{
|
||||
label: 'common.button.start',
|
||||
key: 'start',
|
||||
icon: icons.Play
|
||||
},
|
||||
{
|
||||
label: 'models.table.button.apiAccessInfo',
|
||||
key: 'api',
|
||||
@@ -64,11 +69,6 @@ export const ActionList: ActionItem[] = [
|
||||
key: 'stop',
|
||||
icon: icons.Stop
|
||||
},
|
||||
{
|
||||
label: 'common.button.start',
|
||||
key: 'start',
|
||||
icon: icons.Play
|
||||
},
|
||||
{
|
||||
label: 'common.button.delete',
|
||||
key: 'delete',
|
||||
|
||||
@@ -291,9 +291,9 @@ export const modelCategoriesMap = {
|
||||
|
||||
export const categoryOptions = [
|
||||
{ label: 'LLM', value: modelCategoriesMap.llm },
|
||||
{ label: 'Image', value: modelCategoriesMap.image },
|
||||
{ label: 'Embedding', value: modelCategoriesMap.embedding },
|
||||
{ label: 'Reranker', value: modelCategoriesMap.reranker },
|
||||
{ label: 'Image', value: modelCategoriesMap.image },
|
||||
{ label: 'Text-to-Speech', value: modelCategoriesMap.text_to_speech },
|
||||
{ label: 'Speech-to-Text', value: modelCategoriesMap.speech_to_text }
|
||||
];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
import ListInput from '@/components/list-input';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form, Typography } from 'antd';
|
||||
import { Form } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { backendParamsHolderTips, getBackendParamsTips } from '../config';
|
||||
@@ -64,24 +63,20 @@ const BackendParametersList: React.FC = () => {
|
||||
{intl.formatMessage({ id: 'models.backend.mindie.310p' })}
|
||||
</span>
|
||||
)}
|
||||
<span style={{ marginLeft: 5 }}>
|
||||
{intl.formatMessage(
|
||||
{ id: 'models.form.backend_parameters.vllm.tips' },
|
||||
{ backend: backendParamsTips.backend || '' }
|
||||
)}{' '}
|
||||
<Typography.Link
|
||||
style={{ display: 'inline' }}
|
||||
className="flex-center"
|
||||
href={backendParamsTips.link}
|
||||
target="_blank"
|
||||
>
|
||||
<span>{intl.formatMessage({ id: 'common.text.here' })}</span>
|
||||
<IconFont
|
||||
type="icon-external-link"
|
||||
className="font-size-14 m-l-4"
|
||||
></IconFont>
|
||||
</Typography.Link>
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
marginLeft: backend === backendOptionsMap.ascendMindie ? 4 : 0
|
||||
}}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: intl.formatMessage(
|
||||
{ id: 'models.form.backend_parameters.vllm.tips' },
|
||||
{
|
||||
backend: backendParamsTips.backend || '',
|
||||
link: backendParamsTips.link
|
||||
}
|
||||
)
|
||||
}}
|
||||
></span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import TooltipList from '@/components/tooltip-list';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form, Typography } from 'antd';
|
||||
import { Form } from 'antd';
|
||||
import React, { useMemo } from 'react';
|
||||
import {
|
||||
backendLabelMap,
|
||||
backendTipsList,
|
||||
getBackendParamsTips
|
||||
} from '../config';
|
||||
import { backendTipsList } from '../config';
|
||||
import { backendOptionsMap } from '../config/backend-parameters';
|
||||
import { useFormContext } from '../config/form-context';
|
||||
|
||||
@@ -21,14 +16,9 @@ const BackendFields: React.FC = () => {
|
||||
const backend = Form.useWatch('backend', form);
|
||||
|
||||
const handleBackendVersionOnChange = (value: any) => {
|
||||
console.log('value changed:', value);
|
||||
onValuesChange?.({}, form.getFieldsValue());
|
||||
};
|
||||
|
||||
const backendParamsTips = useMemo(() => {
|
||||
return getBackendParamsTips(backend);
|
||||
}, [backend]);
|
||||
|
||||
const backendGroupedOptions = useMemo(() => {
|
||||
const builtInBackends = backendOptions?.filter(
|
||||
(item) => item.isBuiltIn || item.value === backendOptionsMap.custom
|
||||
@@ -138,39 +128,6 @@ const BackendFields: React.FC = () => {
|
||||
})}
|
||||
onChange={handleBackendVersionOnChange}
|
||||
label={intl.formatMessage({ id: 'models.form.backendVersion' })}
|
||||
description={intl.formatMessage(
|
||||
{
|
||||
id: 'models.form.backendVersion.tips'
|
||||
},
|
||||
{
|
||||
backend: backendLabelMap[backend],
|
||||
version: backendParamsTips?.version
|
||||
? `(${intl.formatMessage({ id: 'common.help.eg' }, { content: '' })} ${backendParamsTips?.version})`
|
||||
: '',
|
||||
link: backendParamsTips?.releases && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: 5
|
||||
}}
|
||||
>
|
||||
<Typography.Link
|
||||
className="flex-center"
|
||||
style={{ display: 'inline' }}
|
||||
href={backendParamsTips?.releases}
|
||||
target="_blank"
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'models.form.releases' })}
|
||||
</span>
|
||||
<IconFont
|
||||
type="icon-external-link"
|
||||
className="font-size-14 m-l-4"
|
||||
></IconFont>
|
||||
</Typography.Link>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
)}
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
@@ -154,7 +154,7 @@ const UserModels: React.FC = () => {
|
||||
return MyModelsStatusValueMap.Degrade;
|
||||
}
|
||||
|
||||
if (model.replicas === model.ready_replicas && model.replicas > 0) {
|
||||
if (model.ready_replicas > 0 && model.replicas > 0) {
|
||||
return MyModelsStatusValueMap.Active;
|
||||
}
|
||||
return MyModelsStatusValueMap.Degrade;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Spin } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import 'overlayscrollbars/overlayscrollbars.css';
|
||||
@@ -34,7 +33,6 @@ interface MessageProps {
|
||||
|
||||
const GroundLeft: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
const { modelList } = props;
|
||||
const intl = useIntl();
|
||||
const [systemMessage, setSystemMessage] = useState('');
|
||||
const [show, setShow] = useState(false);
|
||||
const [collapse, setCollapse] = useState(false);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { HEADER_HEIGHT } from '@/config/settings';
|
||||
import useOverlayScroller from '@/hooks/use-overlay-scroller';
|
||||
import _ from 'lodash';
|
||||
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import CompareContext from '../../config/compare-context';
|
||||
import {
|
||||
MessageItem,
|
||||
@@ -309,4 +309,4 @@ const MultiCompare: React.FC<MultiCompareProps> = ({ modelList, loaded }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(MultiCompare);
|
||||
export default MultiCompare;
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-inline: var(--layout-content-inlinepadding);
|
||||
}
|
||||
|
||||
.chat-list-inner {
|
||||
min-height: calc(100vh - 199px);
|
||||
max-height: max-content;
|
||||
height: 100%;
|
||||
padding-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ const useFilesColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.modelfiles.form.path' }),
|
||||
dataIndex: 'resolved_paths',
|
||||
width: '30%',
|
||||
width: '20%',
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user