fix: add warning tips when deleting ssh key
This commit is contained in:
@@ -81,6 +81,8 @@ export default {
|
|||||||
'gpuservice.publicKey': 'SSH Public Key',
|
'gpuservice.publicKey': 'SSH Public Key',
|
||||||
'gpuservice.publicKey.add': 'Add SSH Public Key',
|
'gpuservice.publicKey.add': 'Add SSH Public Key',
|
||||||
'gpuservice.publicKey.edit': 'Edit SSH Public Key',
|
'gpuservice.publicKey.edit': 'Edit SSH Public Key',
|
||||||
|
'gpuservice.publicKey.delete.tips':
|
||||||
|
'Deleting an SSH Public Key will not revoke access for existing attached Instances. To remove access, edit those Instances separately.',
|
||||||
'gpuservice.publicKey.filter.name': 'Search by name',
|
'gpuservice.publicKey.filter.name': 'Search by name',
|
||||||
'gpuservice.publicKey.label': 'SSH Public Key',
|
'gpuservice.publicKey.label': 'SSH Public Key',
|
||||||
'gpuservice.instance.ssh.enable': 'Enable SSH Access',
|
'gpuservice.instance.ssh.enable': 'Enable SSH Access',
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ export default {
|
|||||||
'gpuservice.publicKey': 'SSH 公開鍵',
|
'gpuservice.publicKey': 'SSH 公開鍵',
|
||||||
'gpuservice.publicKey.add': 'SSH 公開鍵を追加',
|
'gpuservice.publicKey.add': 'SSH 公開鍵を追加',
|
||||||
'gpuservice.publicKey.edit': 'SSH 公開鍵を編集',
|
'gpuservice.publicKey.edit': 'SSH 公開鍵を編集',
|
||||||
|
'gpuservice.publicKey.delete.tips':
|
||||||
|
'SSH 公開鍵を削除しても、既にアタッチされているインスタンスのアクセス権は取り消されません。アクセス権を削除するには、対象のインスタンスを個別に編集してください。',
|
||||||
'gpuservice.publicKey.filter.name': '名前で検索',
|
'gpuservice.publicKey.filter.name': '名前で検索',
|
||||||
'gpuservice.publicKey.label': 'SSH 公開鍵',
|
'gpuservice.publicKey.label': 'SSH 公開鍵',
|
||||||
'gpuservice.instance.ssh.enable': 'SSH アクセスを有効化',
|
'gpuservice.instance.ssh.enable': 'SSH アクセスを有効化',
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ export default {
|
|||||||
'gpuservice.publicKey': 'Открытый ключ SSH',
|
'gpuservice.publicKey': 'Открытый ключ SSH',
|
||||||
'gpuservice.publicKey.add': 'Добавить открытый ключ SSH',
|
'gpuservice.publicKey.add': 'Добавить открытый ключ SSH',
|
||||||
'gpuservice.publicKey.edit': 'Изменить открытый ключ SSH',
|
'gpuservice.publicKey.edit': 'Изменить открытый ключ SSH',
|
||||||
|
'gpuservice.publicKey.delete.tips':
|
||||||
|
'Удаление открытого ключа SSH не отзывает доступ для уже подключённых экземпляров. Чтобы удалить доступ, отредактируйте эти экземпляры отдельно.',
|
||||||
'gpuservice.publicKey.filter.name': 'Поиск по имени',
|
'gpuservice.publicKey.filter.name': 'Поиск по имени',
|
||||||
'gpuservice.publicKey.label': 'Открытый ключ SSH',
|
'gpuservice.publicKey.label': 'Открытый ключ SSH',
|
||||||
'gpuservice.instance.ssh.enable': 'Включить SSH-доступ',
|
'gpuservice.instance.ssh.enable': 'Включить SSH-доступ',
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ export default {
|
|||||||
'gpuservice.publicKey': 'SSH Açık Anahtarı',
|
'gpuservice.publicKey': 'SSH Açık Anahtarı',
|
||||||
'gpuservice.publicKey.add': 'SSH Açık Anahtarı Ekle',
|
'gpuservice.publicKey.add': 'SSH Açık Anahtarı Ekle',
|
||||||
'gpuservice.publicKey.edit': 'SSH Açık Anahtarını Düzenle',
|
'gpuservice.publicKey.edit': 'SSH Açık Anahtarını Düzenle',
|
||||||
|
'gpuservice.publicKey.delete.tips':
|
||||||
|
'Bir SSH Açık Anahtarını silmek, mevcut bağlı Örneklerin erişimini iptal etmez. Erişimi kaldırmak için ilgili Örnekleri ayrı ayrı düzenleyin.',
|
||||||
'gpuservice.publicKey.filter.name': 'Ada göre ara',
|
'gpuservice.publicKey.filter.name': 'Ada göre ara',
|
||||||
'gpuservice.publicKey.label': 'SSH Açık Anahtarı',
|
'gpuservice.publicKey.label': 'SSH Açık Anahtarı',
|
||||||
'gpuservice.instance.ssh.enable': 'SSH Erişimini Etkinleştir',
|
'gpuservice.instance.ssh.enable': 'SSH Erişimini Etkinleştir',
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ export default {
|
|||||||
'gpuservice.publicKey': 'SSH 公钥',
|
'gpuservice.publicKey': 'SSH 公钥',
|
||||||
'gpuservice.publicKey.add': '添加 SSH 公钥',
|
'gpuservice.publicKey.add': '添加 SSH 公钥',
|
||||||
'gpuservice.publicKey.edit': '编辑 SSH 公钥',
|
'gpuservice.publicKey.edit': '编辑 SSH 公钥',
|
||||||
|
'gpuservice.publicKey.delete.tips':
|
||||||
|
'删除 SSH Public Key 不会撤销已挂载 GPU 实例的访问权限。如需移除访问权限,请分别编辑对应的 GPU 实例。',
|
||||||
'gpuservice.publicKey.filter.name': '按名称搜索',
|
'gpuservice.publicKey.filter.name': '按名称搜索',
|
||||||
'gpuservice.publicKey.label': 'SSH 公钥',
|
'gpuservice.publicKey.label': 'SSH 公钥',
|
||||||
'gpuservice.instance.ssh.enable': '启用 SSH 访问',
|
'gpuservice.instance.ssh.enable': '启用 SSH 访问',
|
||||||
|
|||||||
@@ -87,10 +87,25 @@ const GPUServicePublicKeys: React.FC = () => {
|
|||||||
if (val === 'edit') {
|
if (val === 'edit') {
|
||||||
handleEdit(row);
|
handleEdit(row);
|
||||||
} else if (val === 'delete') {
|
} else if (val === 'delete') {
|
||||||
handleDelete({ ...row, name: row.name as string });
|
handleDelete(
|
||||||
|
{ ...row, name: row.name as string },
|
||||||
|
{
|
||||||
|
tips: intl.formatMessage({
|
||||||
|
id: 'gpuservice.publicKey.delete.tips'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const handleDeleteByBatch = () => {
|
||||||
|
handleDeleteBatch({
|
||||||
|
tips: intl.formatMessage({
|
||||||
|
id: 'gpuservice.publicKey.delete.tips'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const renderEmpty = (type?: string) => {
|
const renderEmpty = (type?: string) => {
|
||||||
if (type !== 'Table') return;
|
if (type !== 'Table') return;
|
||||||
return (
|
return (
|
||||||
@@ -130,7 +145,7 @@ const GPUServicePublicKeys: React.FC = () => {
|
|||||||
})}
|
})}
|
||||||
buttonText={intl.formatMessage({ id: 'gpuservice.publicKey.add' })}
|
buttonText={intl.formatMessage({ id: 'gpuservice.publicKey.add' })}
|
||||||
handleSearch={handleSearch}
|
handleSearch={handleSearch}
|
||||||
handleDeleteByBatch={handleDeleteBatch}
|
handleDeleteByBatch={handleDeleteByBatch}
|
||||||
handleClickPrimary={handleAdd}
|
handleClickPrimary={handleAdd}
|
||||||
handleInputChange={handleNameChange}
|
handleInputChange={handleNameChange}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
Reference in New Issue
Block a user