diff --git a/src/locales/en-US/gpuservice.ts b/src/locales/en-US/gpuservice.ts index d2dd9e4a..607d8bcf 100644 --- a/src/locales/en-US/gpuservice.ts +++ b/src/locales/en-US/gpuservice.ts @@ -13,7 +13,11 @@ export default { 'gpuservice.template.command.placeholder': 'Separate arguments with spaces; wrap arguments containing spaces in quotes, e.g.: /bin/bash -c "echo hello world"', 'gpuservice.template.mountPath': 'Mount Path', + 'gpuservice.template.mountPath.tips': + 'The default mount path for the storage volume when creating an instance from this template. Useful for persisting data that needs to be retained while the instance is running.', 'gpuservice.template.containerDisk': 'Container Disk (GB)', + 'gpuservice.template.containerDisk.tips': + 'The size of the container system disk.', 'gpuservice.template.memory': 'Memory (GB)', 'gpuservice.instance.containerDisk.remaining': 'Container Disk (Max {count} GB)', diff --git a/src/locales/ja-JP/gpuservice.ts b/src/locales/ja-JP/gpuservice.ts index 1946e18d..f98bdafd 100644 --- a/src/locales/ja-JP/gpuservice.ts +++ b/src/locales/ja-JP/gpuservice.ts @@ -13,7 +13,11 @@ export default { 'gpuservice.template.command.placeholder': '引数はスペースで区切り、スペースを含む引数は引用符で囲んでください。例:/bin/bash -c "echo hello world"', 'gpuservice.template.mountPath': 'マウントパス', + 'gpuservice.template.mountPath.tips': + 'このテンプレートからインスタンスを作成する際に、ストレージボリュームがデフォルトでマウントされるパスです。インスタンスの実行中に保持する必要があるデータの永続化に使用できます。', 'gpuservice.template.containerDisk': 'コンテナディスク (GB)', + 'gpuservice.template.containerDisk.tips': + 'コンテナシステムディスクのサイズです。', 'gpuservice.template.memory': 'メモリ (GB)', 'gpuservice.instance.containerDisk.remaining': 'コンテナディスク (最大 {count} GB)', diff --git a/src/locales/ru-RU/gpuservice.ts b/src/locales/ru-RU/gpuservice.ts index 6e98d10a..dadb1c2b 100644 --- a/src/locales/ru-RU/gpuservice.ts +++ b/src/locales/ru-RU/gpuservice.ts @@ -14,7 +14,11 @@ export default { 'gpuservice.template.command.placeholder': 'Разделяйте аргументы пробелами; аргументы с пробелами заключайте в кавычки, например: /bin/bash -c "echo hello world"', 'gpuservice.template.mountPath': 'Путь монтирования', + 'gpuservice.template.mountPath.tips': + 'Путь, по которому том хранилища монтируется по умолчанию при создании экземпляра из этого шаблона. Может использоваться для сохранения данных, которые нужно сохранить во время работы экземпляра.', 'gpuservice.template.containerDisk': 'Диск контейнера (GB)', + 'gpuservice.template.containerDisk.tips': + 'Размер системного диска контейнера.', 'gpuservice.template.memory': 'Память (GB)', 'gpuservice.instance.containerDisk.remaining': 'Диск контейнера (Макс. {count} GB)', diff --git a/src/locales/tr-TR/gpuservice.ts b/src/locales/tr-TR/gpuservice.ts index 59ffe26f..81c6fc78 100644 --- a/src/locales/tr-TR/gpuservice.ts +++ b/src/locales/tr-TR/gpuservice.ts @@ -13,7 +13,10 @@ export default { 'gpuservice.template.command.placeholder': 'Argümanları boşlukla ayırın; boşluk içeren argümanları tırnak içine alın, örn.: /bin/bash -c "echo hello world"', 'gpuservice.template.mountPath': 'Bağlama Yolu', + 'gpuservice.template.mountPath.tips': + 'Bu şablondan bir örnek oluşturulurken depolama biriminin varsayılan olarak bağlanacağı yol. Örnek çalışırken saklanması gereken verileri kalıcı hale getirmek için kullanılabilir.', 'gpuservice.template.containerDisk': 'Konteyner Diski (GB)', + 'gpuservice.template.containerDisk.tips': 'Konteyner sistem diskinin boyutu.', 'gpuservice.template.memory': 'Bellek (GB)', 'gpuservice.instance.containerDisk.remaining': 'Konteyner Diski (Maks. {count} GB)', diff --git a/src/locales/zh-CN/gpuservice.ts b/src/locales/zh-CN/gpuservice.ts index fa9f9c7f..4305d73b 100644 --- a/src/locales/zh-CN/gpuservice.ts +++ b/src/locales/zh-CN/gpuservice.ts @@ -13,10 +13,13 @@ export default { 'gpuservice.template.command.placeholder': '使用空格分隔参数;含空格的参数请用引号包裹,例如:/bin/bash -c "echo hello world"', 'gpuservice.template.mountPath': '挂载路径', - 'gpuservice.template.containerDisk': '容器磁盘(GB)', - 'gpuservice.template.memory': '内存(GB)', - 'gpuservice.instance.containerDisk.remaining': '容器磁盘(最大{count}GB)', - 'gpuservice.instance.memory.remaining': '内存(最大{count}GB)', + 'gpuservice.template.mountPath.tips': + '在使用该模板创建实例时,存储卷默认挂载的路径,可用于持久化实例运行过程中需要保留的数据。', + 'gpuservice.template.containerDisk': '容器磁盘(GB)', + 'gpuservice.template.containerDisk.tips': '容器系统盘大小。', + 'gpuservice.template.memory': '内存(GB)', + 'gpuservice.instance.containerDisk.remaining': '容器磁盘(最大 {count} GB)', + 'gpuservice.instance.memory.remaining': '内存(最大 {count} GB)', 'gpuservice.template.displayName': '显示名称', 'gpuservice.template.displayName.max': '显示名称不能超过 63 个字符', 'gpuservice.template.ports': '端口', diff --git a/src/pages/gpu-service/templates/forms/basic.tsx b/src/pages/gpu-service/templates/forms/basic.tsx index dc85e436..86cef6ac 100644 --- a/src/pages/gpu-service/templates/forms/basic.tsx +++ b/src/pages/gpu-service/templates/forms/basic.tsx @@ -9,7 +9,7 @@ import { useAppUtils } from '@gpustack/core-ui'; import { useIntl } from '@umijs/max'; -import { Flex, Form } from 'antd'; +import { Form } from 'antd'; import { useMemo } from 'react'; import { GPUsConfigs } from '../../../resources/config/gpu-driver'; import formStyles from '../../instances/styles/instances.module.less'; @@ -179,39 +179,39 @@ const Basic: React.FC = ({ /> - - - {page === 'template' && ( -
- name={['spec', 'volumeMount']}> - - -
- )} -
- - name={['spec', 'resources', 'localStorage']} - normalize={(value) => (value ? `${value}Gi` : undefined)} - getValueProps={(value) => ({ - value: value ? String(value).replace(/Gi$/, '') : '' + + name={['spec', 'resources', 'localStorage']} + normalize={(value) => (value ? `${value}Gi` : undefined)} + getValueProps={(value) => ({ + value: value ? String(value).replace(/Gi$/, '') : '' + })} + > + + + {page === 'template' && ( + name={['spec', 'volumeMount']}> + - - -
-
+ description={intl.formatMessage({ + id: 'gpuservice.template.mountPath.tips' + })} + placeholder={intl.formatMessage({ + id: 'clusters.volume.mountPath.format' + })} + disabled={disabled} + /> + + )}