diff --git a/src/locales/en.json b/src/locales/en.json index 3bab9189..47f8050c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1040,6 +1040,7 @@ "Force Delete Container": "Force Delete Container", "Force Delete Share Instance": "Force Delete Share Instance", "Force release": "Force release", + "Force shutdown must be checked!": "Force shutdown must be checked!", "Forced Down": "Forced Down", "Forced Shutdown": "Forced Shutdown", "Forced shutdown may result in data loss or file system damage. You can also take the initiative to shut down and perform operations.": "Forced shutdown may result in data loss or file system damage. You can also take the initiative to shut down and perform operations.", diff --git a/src/locales/ko-kr.json b/src/locales/ko-kr.json index c27732b1..fb6e96a3 100644 --- a/src/locales/ko-kr.json +++ b/src/locales/ko-kr.json @@ -1040,6 +1040,7 @@ "Force Delete Container": "강제 컨테이너 삭제", "Force Delete Share Instance": "강제 공유 인스턴스 삭제", "Force release": "강제 해제", + "Force shutdown must be checked!": "", "Forced Down": "강제 Down", "Forced Shutdown": "강제 Shutdown", "Forced shutdown may result in data loss or file system damage. You can also take the initiative to shut down and perform operations.": "강제 종료 시 데이터가 손실되거나 파일 시스템이 손상될 수 있습니다. 주도적으로 종료하고 작업을 수행할 수도 있습니다.", diff --git a/src/locales/zh-hans.json b/src/locales/zh-hans.json index 403a8a25..a2a7a72e 100644 --- a/src/locales/zh-hans.json +++ b/src/locales/zh-hans.json @@ -1040,6 +1040,7 @@ "Force Delete Container": "强制删除容器", "Force Delete Share Instance": "强制删除共享实例", "Force release": "强制释放", + "Force shutdown must be checked!": "必须勾选强制关机!", "Forced Down": "强制关闭", "Forced Shutdown": "强制关机", "Forced shutdown may result in data loss or file system damage. You can also take the initiative to shut down and perform operations.": "强制关机可能会导致数据丢失或文件系统损坏,您也可以主动关机后再进行操作。", diff --git a/src/pages/compute/containers/Instance/actions/Resize.jsx b/src/pages/compute/containers/Instance/actions/Resize.jsx index a50631de..10dea3ac 100644 --- a/src/pages/compute/containers/Instance/actions/Resize.jsx +++ b/src/pages/compute/containers/Instance/actions/Resize.jsx @@ -246,6 +246,14 @@ export class Resize extends ModalAction { type: 'check', content: t('Agree to force shutdown'), required: true, + validator: (rule, value) => { + if (value !== true) { + return Promise.reject( + new Error(t('Force shutdown must be checked!')) + ); + } + return Promise.resolve(); + }, }, ]; }