Browse Source

REPORT-87924 fix:增加输入限制

release/11.0
Freddy 2 years ago
parent
commit
39f1bea676
  1. 3
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties
  2. 1
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties
  3. 3
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties
  4. 3
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties
  5. 3
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties
  6. 3
      src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties
  7. 17
      src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js

3
src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties

@ -5,4 +5,5 @@ Plugin-S3_Access_Key_Id=AccessKeyId
Plugin-S3_Access_Key_Secret=AccessKeySecret
Plugin-S3_Bucket=Bucket
Dec-Error_Start_With_Slash_Or_End_Without_Slash=The path cannot start with "/", but must end with "/"
Plugin-S3_Other_Config=
Plugin-S3_Other_Config=
Plugin-S3_EnablePathStyleAccess_Error_Tip=

1
src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties

@ -6,3 +6,4 @@ Plugin-S3_End_Point=Endpoint
Plugin-S3_Input=Please input
Plugin-S3_Region=Region
Plugin-S3_Other_Config=
Plugin-S3_EnablePathStyleAccess_Error_Tip=

3
src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties

@ -5,4 +5,5 @@ Plugin-S3_Bucket=Bucket
Plugin-S3_End_Point=Endpoint
Plugin-S3_Input=\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
Plugin-S3_Region=Region
Plugin-S3_Other_Config=
Plugin-S3_Other_Config=
Plugin-S3_EnablePathStyleAccess_Error_Tip=

3
src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties

@ -5,4 +5,5 @@ Plugin-S3_Bucket=
Plugin-S3_End_Point=
Plugin-S3_Input=
Plugin-S3_Region=
Plugin-S3_Other_Config=
Plugin-S3_Other_Config=
Plugin-S3_EnablePathStyleAccess_Error_Tip=

3
src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties

@ -5,4 +5,5 @@ Plugin-S3_Bucket=Bucket
Plugin-S3_End_Point=Endpoint
Plugin-S3_Input=\u8BF7\u8F93\u5165
Plugin-S3_Region=Region
Plugin-S3_Other_Config=\u66f4\u591a\u8bbe\u7f6e
Plugin-S3_Other_Config=\u66f4\u591a\u8bbe\u7f6e
Plugin-S3_EnablePathStyleAccess_Error_Tip=\u8bf7\u8f93\u5165true\u6216false

3
src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties

@ -5,4 +5,5 @@ Plugin-S3_Bucket=Bucket
Plugin-S3_End_Point=Endpoint
Plugin-S3_Input=\u8ACB\u8F38\u5165
Plugin-S3_Region=Region
Plugin-S3_Other_Config=
Plugin-S3_Other_Config=
Plugin-S3_EnablePathStyleAccess_Error_Tip=

17
src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js

@ -151,7 +151,6 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
}
}, {
type: "bi.text_button",
cls: "bi-high-light",
text: BI.i18nText('Plugin-S3_Other_Config'),
handler: () => {
this.store.setIsOpen(!this.model.isOpen);
@ -168,6 +167,9 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
watermark: BI.i18nText("Plugin-S3_Input"),
text: "PathStyleAccess",
value: this.model.enablePathStyleAccess,
ref: function (_ref) {
self.enablePathStyleAccessRow = _ref;
},
el: {
disabled: !o.editable,
},
@ -201,6 +203,11 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
},
getValue: function () {
var enablePathStyleAccess = false;
if (this.model.enablePathStyleAccess === 'true') {
enablePathStyleAccess = true;
}
return {
endPoint: this.model.endPoint,
region: this.model.region,
@ -208,7 +215,7 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
password: this.passwordRow.getCipher(),
bucket: this.model.bucket,
workRoot: this.filePathRow.getValue(),
enablePathStyleAccess: this.model.enablePathStyleAccess,
enablePathStyleAccess,
signerOverride: this.model.signerOverride,
};
},
@ -228,6 +235,10 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
this.filePathRow.showError(BI.i18nText("Dec-Error_Null"));
valid = false;
}
if (!(this.model.enablePathStyleAccess === 'false' || this.model.enablePathStyleAccess === 'true')) {
this.enablePathStyleAccessRow.showError(BI.i18nText("Plugin-S3_EnablePathStyleAccess_Error_Tip"));
valid = false;
}
return valid;
},
@ -251,7 +262,7 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) {
bucket: val.bucket,
workRoot: val.workRoot,
isOpen: false,
enablePathStyleAccess: false,
enablePathStyleAccess: 'false',
signerOverride: "",
};
},

Loading…
Cancel
Save