diff --git a/src/locales/en-US/clusters.ts b/src/locales/en-US/clusters.ts index c8732b57..b63072cc 100644 --- a/src/locales/en-US/clusters.ts +++ b/src/locales/en-US/clusters.ts @@ -98,5 +98,7 @@ Same applies to the /opt/dtk directory.`, 'Specify a name for the worker container.', 'clusters.addworker.dataVolume': 'GPUStack Data Volume', 'clusters.addworker.dataVolume.tips': - 'Specify a data storage path for GPUStack.' + 'Specify a data storage path for GPUStack.', + 'clusters.table.ip.internal': 'Internal', + 'clusters.table.ip.external': 'External' }; diff --git a/src/locales/ja-JP/clusters.ts b/src/locales/ja-JP/clusters.ts index 63f5e100..4c71c65c 100644 --- a/src/locales/ja-JP/clusters.ts +++ b/src/locales/ja-JP/clusters.ts @@ -98,7 +98,9 @@ Same applies to the /opt/dtk directory.`, 'Specify a name for the worker container.', 'clusters.addworker.dataVolume': 'GPUStack Data Volume', 'clusters.addworker.dataVolume.tips': - 'Specify a data storage path for GPUStack.' + 'Specify a data storage path for GPUStack.', + 'clusters.table.ip.internal': 'Internal', + 'clusters.table.ip.external': 'External' }; // ========== To-Do: Translate Keys (Remove After Translation) ========== @@ -181,5 +183,7 @@ Same applies to the /opt/dtk directory.`, // 75. 'clusters.addworker.containerName': 'Worker Container Name', // 76. 'clusters.addworker.containerName.tips':'Specify a name for the worker container.', // 77. 'clusters.addworker.dataVolume': 'GPUStack Data Volume', -// 78. 'clusters.addworker.dataVolume.tips': 'Specify a data storage path for GPUStack.' +// 78. 'clusters.addworker.dataVolume.tips': 'Specify a data storage path for GPUStack.', +// 79. 'clusters.table.ip.internal': 'Internal', +// 80. 'clusters.table.ip.external': 'External' // ========== End of To-Do List ========== diff --git a/src/locales/ru-RU/clusters.ts b/src/locales/ru-RU/clusters.ts index df890ad3..4e639d73 100644 --- a/src/locales/ru-RU/clusters.ts +++ b/src/locales/ru-RU/clusters.ts @@ -98,7 +98,9 @@ export default { 'Specify a name for the worker container.', 'clusters.addworker.dataVolume': 'GPUStack Data Volume', 'clusters.addworker.dataVolume.tips': - 'Specify a data storage path for GPUStack.' + 'Specify a data storage path for GPUStack.', + 'clusters.table.ip.internal': 'Internal', + 'clusters.table.ip.external': 'External' }; // ========== To-Do: Translate Keys (Remove After Translation) ========== @@ -112,5 +114,7 @@ export default { // 6. 'clusters.addworker.containerName': 'Worker Container Name', // 7. 'clusters.addworker.containerName.tips':'Specify a name for the worker container.', // 8. 'clusters.addworker.dataVolume': 'GPUStack Data Volume', -// 9. 'clusters.addworker.dataVolume.tips': 'Specify a data storage path for GPUStack.' +// 9. 'clusters.addworker.dataVolume.tips': 'Specify a data storage path for GPUStack.', +// 10. 'clusters.table.ip.internal': 'Internal', +// 11. 'clusters.table.ip.external': 'External' // ================================================================ diff --git a/src/locales/zh-CN/clusters.ts b/src/locales/zh-CN/clusters.ts index 6192ad2e..3b4c79c3 100644 --- a/src/locales/zh-CN/clusters.ts +++ b/src/locales/zh-CN/clusters.ts @@ -94,5 +94,7 @@ export default { 'clusters.addworker.containerName': '节点容器名称', 'clusters.addworker.containerName.tips': '为节点容器指定一个名称。', 'clusters.addworker.dataVolume': 'GPUStack 数据卷', - 'clusters.addworker.dataVolume.tips': '为 GPUStack 指定数据存储路径。' + 'clusters.addworker.dataVolume.tips': '为 GPUStack 指定数据存储路径。', + 'clusters.table.ip.internal': '内', + 'clusters.table.ip.external': '外' }; diff --git a/src/pages/resources/config/types.ts b/src/pages/resources/config/types.ts index 793dacdb..3fbe9476 100644 --- a/src/pages/resources/config/types.ts +++ b/src/pages/resources/config/types.ts @@ -67,6 +67,7 @@ export interface ListItem { cluster_id: number; state_message: string; ssh_key_id: string; + advertise_address: string; provision_progress: string; maintenance: { enabled: boolean; diff --git a/src/pages/resources/hooks/use-worker-columns.tsx b/src/pages/resources/hooks/use-worker-columns.tsx index fee8f188..9dba8cb0 100644 --- a/src/pages/resources/hooks/use-worker-columns.tsx +++ b/src/pages/resources/hooks/use-worker-columns.tsx @@ -279,9 +279,14 @@ const useWorkerColumns = ({ { title: 'IP', dataIndex: 'ip', - render: (text: string) => ( + render: (text: string, record) => ( - {text} + {record.advertise_address || text} + {record.advertise_address + ? ` (${intl.formatMessage({ id: 'clusters.table.ip.external' })})` + : record.ip + ? ` (${intl.formatMessage({ id: 'clusters.table.ip.internal' })})` + : ''} ) },