diff --git a/public/locales/de-DE/dashboard.json b/public/locales/de-DE/dashboard.json index 30413b7..efdf253 100644 --- a/public/locales/de-DE/dashboard.json +++ b/public/locales/de-DE/dashboard.json @@ -1032,7 +1032,8 @@ "saveToSharePoint": "Dateien in SharePoint speichern", "sharePointUrlDes": "Geben Sie die SharePoint-Site-URL ein. Nach dem Verlust des Fokus konvertiert das System sie automatisch in die korrekte Treiber-Kennung.", "ks3selectRegionDes": "Geben Sie den Regionscode des Speicher-Buckets ein, z.B. <0>BEIJING.", - "ks3EndpointPathStyle": "Wählen Sie das Format der KS3-Endpoint-Adresse." + "ks3EndpointPathStyle": "Wählen Sie das Format der KS3-Endpoint-Adresse.", + "ossRegionDes": "Geben Sie den Regionscode ein, in dem sich der Bucket befindet, z.B. <0>cn-hangzhou. Sie können die entsprechende Region in der Tabelle <1>OSS-Regionen und Endpunkte finden und die entsprechende <2>Regions-ID ausfüllen." }, "node": { "slave": "Slave", diff --git a/public/locales/en-US/dashboard.json b/public/locales/en-US/dashboard.json index 02dbcf3..29fb1cf 100644 --- a/public/locales/en-US/dashboard.json +++ b/public/locales/en-US/dashboard.json @@ -1033,7 +1033,8 @@ "saveToSharePoint": "Save files to SharePoint", "sharePointUrlDes": "Enter the SharePoint site URL. After losing focus, the system will automatically convert it to the correct driver identifier.", "ks3selectRegionDes": "Enter the region code of the storage bucket, e.g. <0>BEIJING .", - "ks3EndpointPathStyle": "Select the format of the KS3 Endpoint address." + "ks3EndpointPathStyle": "Select the format of the KS3 Endpoint address.", + "ossRegionDes": "Enter the region code of the storage bucket, e.g. <0>cn-hangzhou. You can find the corresponding region in the <1>OSS regions and endpoints table and fill in the corresponding <2>Region ID." }, "node": { "slave": "slave", diff --git a/public/locales/es-ES/dashboard.json b/public/locales/es-ES/dashboard.json index d8f37c6..05eb143 100644 --- a/public/locales/es-ES/dashboard.json +++ b/public/locales/es-ES/dashboard.json @@ -1032,7 +1032,8 @@ "saveToSharePoint": "Guardar archivos en SharePoint", "sharePointUrlDes": "Ingresa la URL del sitio SharePoint. Después de perder el foco, el sistema convertirá automáticamente a la identificación correcta del controlador.", "ks3selectRegionDes": "Ingresa el código de región del bucket de almacenamiento, ej. <0>BEIJING .", - "ks3EndpointPathStyle": "Selecciona el formato de la dirección del Endpoint KS3." + "ks3EndpointPathStyle": "Selecciona el formato de la dirección del Endpoint KS3.", + "ossRegionDes": "Ingresa el código de región donde se encuentra el bucket, ej. <0>cn-hangzhou. Puedes encontrar la región correspondiente en la tabla <1>Regiones y endpoints de OSS y completar el <2>ID de región correspondiente." }, "node": { "slave": "esclavo", diff --git a/public/locales/fr-FR/dashboard.json b/public/locales/fr-FR/dashboard.json index f10a700..9aa9f8b 100644 --- a/public/locales/fr-FR/dashboard.json +++ b/public/locales/fr-FR/dashboard.json @@ -1032,7 +1032,8 @@ "saveToSharePoint": "Sauvegarder les fichiers dans SharePoint", "sharePointUrlDes": "Entrez l'URL du site SharePoint. Après avoir perdu le focus, le système convertira automatiquement vers l'identifiant de pilote correct.", "ks3selectRegionDes": "Entrez le code de région du bucket de stockage, par ex. <0>BEIJING .", - "ks3EndpointPathStyle": "Sélectionnez le format de l'adresse Endpoint KS3." + "ks3EndpointPathStyle": "Sélectionnez le format de l'adresse Endpoint KS3.", + "ossRegionDes": "Entrez le code de région où se trouve le bucket, par ex. <0>cn-hangzhou. Vous pouvez trouver la région correspondante dans le tableau <1>Régions et points de terminaison OSS et remplir l'<2>ID de région correspondant." }, "node": { "slave": "esclave", diff --git a/public/locales/it-IT/dashboard.json b/public/locales/it-IT/dashboard.json index 3b519f5..aeffe25 100644 --- a/public/locales/it-IT/dashboard.json +++ b/public/locales/it-IT/dashboard.json @@ -1031,7 +1031,8 @@ "saveToSharePoint": "Salva i file su SharePoint", "sharePointUrlDes": "Inserisci l'URL del sito SharePoint. Dopo aver perso il focus, il sistema lo convertirà automaticamente nell'identificatore driver corretto.", "ks3selectRegionDes": "Inserisci il codice regione del bucket di archiviazione, ad es. <0>BEIJING.", - "ks3EndpointPathStyle": "Seleziona il formato dell'indirizzo KS3 Endpoint." + "ks3EndpointPathStyle": "Seleziona il formato dell'indirizzo KS3 Endpoint.", + "ossRegionDes": "Inserisci il codice regione dove si trova il bucket, ad es. <0>cn-hangzhou. Puoi trovare la regione corrispondente nella tabella <1>Regioni ed endpoint OSS e inserire il <2>ID regione corrispondente." }, "node": { "slave": "slave", diff --git a/public/locales/ja-JP/dashboard.json b/public/locales/ja-JP/dashboard.json index 9abe4dd..7ed65c1 100644 --- a/public/locales/ja-JP/dashboard.json +++ b/public/locales/ja-JP/dashboard.json @@ -1033,7 +1033,8 @@ "saveToSharePoint": "SharePointにファイルを保存", "sharePointUrlDes": "SharePointサイトのURLを入力してください。フォーカスが外れると、システムが自動的に正しいドライブ識別子に変換します。", "ks3selectRegionDes": "バケットが存在するリージョンコードを入力してください(例:<0>BEIJING)。", - "ks3EndpointPathStyle": "パス形式エンドポイントの強制使用を選択してください。" + "ks3EndpointPathStyle": "パス形式エンドポイントの強制使用を選択してください。", + "ossRegionDes": "バケットが存在するリージョンコードを入力してください(例:<0>cn-hangzhou)。<1>OSSリージョンとエンドポイントの表で対応するリージョンを見つけ、対応する<2>リージョンIDを入力できます。" }, "node": { "slave": "スレーブ", diff --git a/public/locales/ko-KR/dashboard.json b/public/locales/ko-KR/dashboard.json index 21979af..19b4f2c 100644 --- a/public/locales/ko-KR/dashboard.json +++ b/public/locales/ko-KR/dashboard.json @@ -1033,7 +1033,8 @@ "saveToSharePoint": "파일을 SharePoint에 저장", "sharePointUrlDes": "SharePoint 사이트 URL을 입력하세요. 포커스를 잃으면 시스템이 자동으로 올바른 드라이브 식별자로 변환합니다.", "ks3selectRegionDes": "스토리지 버킷이 위치한 지역 코드를 입력하세요. 예: <0>BEIJING.", - "ks3EndpointPathStyle": "경로 형식 Endpoint를 강제로 사용할지 선택하세요." + "ks3EndpointPathStyle": "경로 형식 Endpoint를 강제로 사용할지 선택하세요.", + "ossRegionDes": "버킷이 위치한 지역 코드를 입력하세요. 예: <0>cn-hangzhou. <1>OSS 지역 및 엔드포인트 표에서 해당 지역을 찾아 해당하는 <2>지역 ID를 입력할 수 있습니다." }, "node": { "slave": "슬레이브", diff --git a/public/locales/pt-BR/dashboard.json b/public/locales/pt-BR/dashboard.json index 8154072..5067b53 100644 --- a/public/locales/pt-BR/dashboard.json +++ b/public/locales/pt-BR/dashboard.json @@ -1032,7 +1032,8 @@ "saveToSharePoint": "Salvar arquivos no SharePoint", "sharePointUrlDes": "Digite a URL do site SharePoint. Após perder o foco, o sistema converterá automaticamente para o identificador de driver correto.", "ks3selectRegionDes": "Digite o código da região do bucket de armazenamento, ex. <0>BEIJING .", - "ks3EndpointPathStyle": "Selecione o formato do endereço do Endpoint KS3." + "ks3EndpointPathStyle": "Selecione o formato do endereço do Endpoint KS3.", + "ossRegionDes": "Digite o código da região onde está localizado o bucket, ex. <0>cn-hangzhou. Você pode encontrar a região correspondente na tabela <1>Regiões e endpoints do OSS e preencher o <2>ID da região correspondente." }, "node": { "slave": "escravo", diff --git a/public/locales/ru-RU/dashboard.json b/public/locales/ru-RU/dashboard.json index c3603ca..d024c86 100644 --- a/public/locales/ru-RU/dashboard.json +++ b/public/locales/ru-RU/dashboard.json @@ -1034,7 +1034,8 @@ "saveToSharePoint": "Сохранить файлы в SharePoint", "sharePointUrlDes": "Введите URL сайта SharePoint. После потери фокуса система автоматически преобразует его в правильный идентификатор диска.", "ks3selectRegionDes": "Введите код региона, где находится корзина, например <0>BEIJING.", - "ks3EndpointPathStyle": "Выберите, принудительно ли использовать Endpoint в формате пути." + "ks3EndpointPathStyle": "Выберите, принудительно ли использовать Endpoint в формате пути.", + "ossRegionDes": "Введите код региона, где находится корзина, например <0>cn-hangzhou. Вы можете найти соответствующий регион в таблице <1>Регионы и конечные точки OSS и заполнить соответствующий <2>ID региона." }, "node": { "slave": "Подчиненный узел", diff --git a/public/locales/zh-CN/dashboard.json b/public/locales/zh-CN/dashboard.json index c674571..f8cfe32 100644 --- a/public/locales/zh-CN/dashboard.json +++ b/public/locales/zh-CN/dashboard.json @@ -1033,7 +1033,8 @@ "saveToSharePoint": "保存文件到 SharePoint", "sharePointUrlDes": "输入 SharePoint 站点 URL。失去焦点后,系统将自动转换为正确的驱动器标识。", "ks3selectRegionDes": "输入存储桶所在的区域代码,如 <0>BEIJING。", - "ks3EndpointPathStyle": "选择是否强制使用路径格式 Endpoint。" + "ks3EndpointPathStyle": "选择是否强制使用路径格式 Endpoint。", + "ossRegionDes": "输入存储桶所在的区域代码,如 <0>cn-hangzhou。你可以在 <1>OSS地域和访问域名 的表格中找到对应地域,并填写对应的 <2>地域ID。" }, "node": { "slave": "从机", diff --git a/public/locales/zh-TW/dashboard.json b/public/locales/zh-TW/dashboard.json index cb18f28..c2069dd 100644 --- a/public/locales/zh-TW/dashboard.json +++ b/public/locales/zh-TW/dashboard.json @@ -1033,7 +1033,8 @@ "saveToSharePoint": "儲存檔案到 SharePoint", "sharePointUrlDes": "輸入 SharePoint 站點 URL。失去焦點後,系統將自動轉換為正確的驅動器標識。", "ks3selectRegionDes": "輸入儲存桶所在的區域程式碼,如 <0>BEIJING。", - "ks3EndpointPathStyle": "選擇是否強制使用路徑格式 Endpoint。" + "ks3EndpointPathStyle": "選擇是否強制使用路徑格式 Endpoint。", + "ossRegionDes": "輸入儲存桶所在的區域代碼,如 <0>cn-hangzhou。你可以在 <1>OSS地域和訪問域名 的表格中找到對應地域,並填寫對應的 <2>地域ID。" }, "node": { "slave": "從機", diff --git a/src/component/Admin/StoragePolicy/EditStoragePolicy/FormSections/BasicInfoSection.tsx b/src/component/Admin/StoragePolicy/EditStoragePolicy/FormSections/BasicInfoSection.tsx index a63ea09..33675fe 100644 --- a/src/component/Admin/StoragePolicy/EditStoragePolicy/FormSections/BasicInfoSection.tsx +++ b/src/component/Admin/StoragePolicy/EditStoragePolicy/FormSections/BasicInfoSection.tsx @@ -413,16 +413,10 @@ const BasicInfoSection = () => { )} - {(values.type === PolicyType.s3 || values.type === PolicyType.ks3) && ( - + {policyProps.regionCode && ( + - - ]} - /> - + {policyProps.regionCodeDes} )} diff --git a/src/component/Admin/StoragePolicy/StoragePolicySetting.tsx b/src/component/Admin/StoragePolicy/StoragePolicySetting.tsx index 262d2d9..40d73e6 100644 --- a/src/component/Admin/StoragePolicy/StoragePolicySetting.tsx +++ b/src/component/Admin/StoragePolicy/StoragePolicySetting.tsx @@ -62,6 +62,8 @@ export interface PolicyProps { corsExposedHeaders?: string[]; endpointNotEnforcePrefix?: boolean; pro?: boolean; + regionCode?: string; + regionCodeDes?: React.ReactNode; } export const PolicyPropsMap: Record = { @@ -102,6 +104,8 @@ export const PolicyPropsMap: Record = { chunkSizeMin: 5 * 1024 * 1024, //5MB chunkSizeMax: 5 * 1024 * 1024 * 1024, //5GB chunkSizeDes: "policy.chunkSizeDesS3", + regionCode: "policy.s3Region", + regionCodeDes: ]} />, }, [PolicyType.ks3]: { name: "policy.ks3", @@ -118,6 +122,8 @@ export const PolicyPropsMap: Record = { chunkSizeMin: 5 * 1024 * 1024, //5MB chunkSizeMax: 5 * 1024 * 1024 * 1024, //5GB chunkSizeDes: "policy.chunkSizeDesS3", + regionCode: "policy.s3Region", + regionCodeDes: ]} />, }, [PolicyType.cos]: { name: "policy.cos", @@ -195,6 +201,18 @@ export const PolicyPropsMap: Record = { ]} /> ), + regionCode: "policy.s3Region", + regionCodeDes: ( + , + , + , + ]} + /> + ), }, [PolicyType.obs]: { name: "policy.obs", diff --git a/src/component/Admin/StoragePolicy/Wizards/KS3/KS3Wizard.tsx b/src/component/Admin/StoragePolicy/Wizards/KS3/KS3Wizard.tsx index 23f8022..dc5bdef 100644 --- a/src/component/Admin/StoragePolicy/Wizards/KS3/KS3Wizard.tsx +++ b/src/component/Admin/StoragePolicy/Wizards/KS3/KS3Wizard.tsx @@ -1,6 +1,6 @@ import { Button, Checkbox, Collapse, FormControl, FormControlLabel, Stack } from "@mui/material"; import { useSnackbar } from "notistack"; -import { useRef, useState } from "react"; +import { useMemo, useRef, useState } from "react"; import { Trans, useTranslation } from "react-i18next"; import { createStoragePolicyCors } from "../../../../../api/api"; import { StoragePolicy } from "../../../../../api/dashboard"; @@ -15,6 +15,7 @@ import { NoMarginHelperText } from "../../../Settings/Settings"; import { AddWizardProps } from "../../AddWizardDialog"; import BucketACLInput from "../../EditStoragePolicy/BucketACLInput"; import BucketCorsTable from "../../EditStoragePolicy/BucketCorsTable"; +import { PolicyPropsMap } from "../../StoragePolicySetting"; const KS3Wizard = ({ onSubmit }: AddWizardProps) => { const { t } = useTranslation("dashboard"); @@ -39,6 +40,10 @@ const KS3Wizard = ({ onSubmit }: AddWizardProps) => { edges: {}, }); + const policyProps = useMemo(() => { + return PolicyPropsMap[PolicyType.ks3]; + }, []); + const hamdleCreateCors = () => { if (!formRef.current?.checkValidity()) { formRef.current?.reportValidity(); @@ -130,16 +135,14 @@ const KS3Wizard = ({ onSubmit }: AddWizardProps) => { ]} /> - + setPolicy({ ...policy, settings: { ...policy.settings, region: e.target.value } })} /> - - ]} /> - + {policyProps.regionCodeDes} diff --git a/src/component/Admin/StoragePolicy/Wizards/OSS/OssWizard.tsx b/src/component/Admin/StoragePolicy/Wizards/OSS/OssWizard.tsx index 6d3797d..61f7925 100644 --- a/src/component/Admin/StoragePolicy/Wizards/OSS/OssWizard.tsx +++ b/src/component/Admin/StoragePolicy/Wizards/OSS/OssWizard.tsx @@ -1,6 +1,6 @@ import { Button, Collapse, FormControl, Link, Stack } from "@mui/material"; import { useSnackbar } from "notistack"; -import { useRef, useState } from "react"; +import { useMemo, useRef, useState } from "react"; import { Trans, useTranslation } from "react-i18next"; import { createStoragePolicyCors } from "../../../../../api/api"; import { StoragePolicy } from "../../../../../api/dashboard"; @@ -14,6 +14,7 @@ import { NoMarginHelperText } from "../../../Settings/Settings"; import { AddWizardProps } from "../../AddWizardDialog"; import BucketACLInput from "../../EditStoragePolicy/BucketACLInput"; import BucketCorsTable from "../../EditStoragePolicy/BucketCorsTable"; +import { PolicyPropsMap } from "../../StoragePolicySetting"; const OssWizard = ({ onSubmit }: AddWizardProps) => { const { t } = useTranslation("dashboard"); const dispatch = useAppDispatch(); @@ -39,6 +40,10 @@ const OssWizard = ({ onSubmit }: AddWizardProps) => { edges: {}, }); + const policyProps = useMemo(() => { + return PolicyPropsMap[PolicyType.oss]; + }, []); + const hamdleCreateCors = () => { if (!formRef.current?.checkValidity()) { formRef.current?.reportValidity(); @@ -111,6 +116,15 @@ const OssWizard = ({ onSubmit }: AddWizardProps) => { {t("policy.ossEndpointDesInternalHint")} + + setPolicy({ ...policy, settings: { ...policy.settings, region: e.target.value } })} + /> + {policyProps.regionCodeDes} + { const { t } = useTranslation("dashboard"); @@ -39,6 +40,10 @@ const S3Wizard = ({ onSubmit }: AddWizardProps) => { edges: {}, }); + const policyProps = useMemo(() => { + return PolicyPropsMap[PolicyType.s3]; + }, []); + const hamdleCreateCors = () => { if (!formRef.current?.checkValidity()) { formRef.current?.reportValidity(); @@ -130,16 +135,14 @@ const S3Wizard = ({ onSubmit }: AddWizardProps) => { ]} /> - + setPolicy({ ...policy, settings: { ...policy.settings, region: e.target.value } })} /> - - ]} /> - + {policyProps.regionCodeDes}