diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties index 9eca906..bb9eeae 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3.properties @@ -4,4 +4,5 @@ Plugin-S3_Region=Region 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 "/" \ No newline at end of file +Dec-Error_Start_With_Slash_Or_End_Without_Slash=The path cannot start with "/", but must end with "/" +Plugin-S3_Other_Config= \ No newline at end of file diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties index 9e212ba..35e3481 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_en_US.properties @@ -4,4 +4,5 @@ Plugin-S3_Access_Key_Secret=AccessKeySecret Plugin-S3_Bucket=Bucket Plugin-S3_End_Point=Endpoint Plugin-S3_Input=Please input -Plugin-S3_Region=Region \ No newline at end of file +Plugin-S3_Region=Region +Plugin-S3_Other_Config= diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties index 0276339..be3f170 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ja_JP.properties @@ -4,4 +4,5 @@ Plugin-S3_Access_Key_Secret=AccessKeySecret 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 \ No newline at end of file +Plugin-S3_Region=Region +Plugin-S3_Other_Config= \ No newline at end of file diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties index 6380db9..f45b72a 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_ko_KR.properties @@ -4,4 +4,5 @@ Plugin-S3_Access_Key_Secret= Plugin-S3_Bucket= Plugin-S3_End_Point= Plugin-S3_Input= -Plugin-S3_Region= \ No newline at end of file +Plugin-S3_Region= +Plugin-S3_Other_Config= \ No newline at end of file diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties index 91b6745..14a7ba8 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_CN.properties @@ -4,4 +4,5 @@ Plugin-S3_Access_Key_Secret=AccessKeySecret Plugin-S3_Bucket=Bucket Plugin-S3_End_Point=Endpoint Plugin-S3_Input=\u8BF7\u8F93\u5165 -Plugin-S3_Region=Region \ No newline at end of file +Plugin-S3_Region=Region +Plugin-S3_Other_Config=\u66f4\u591a\u8bbe\u7f6e \ No newline at end of file diff --git a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties index 019e745..b0e1426 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties +++ b/src/main/resources/com/fanruan/fs/s3/repository/locale/s3_zh_TW.properties @@ -4,4 +4,5 @@ Plugin-S3_Access_Key_Secret=AccessKeySecret Plugin-S3_Bucket=Bucket Plugin-S3_End_Point=Endpoint Plugin-S3_Input=\u8ACB\u8F38\u5165 -Plugin-S3_Region=Region \ No newline at end of file +Plugin-S3_Region=Region +Plugin-S3_Other_Config= \ No newline at end of file diff --git a/src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js b/src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js index d47df6d..8375b2a 100644 --- a/src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js +++ b/src/main/resources/com/fanruan/fs/s3/repository/web/js/bundle.js @@ -137,7 +137,66 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) { ref: function (_ref) { self.filePathRow = _ref; }, - }], + }, { + type: "bi.vertical_adapt", + items: [{ + type: "bi.icon_change_button", + iconCls: this.model.isOpen ? "expander-down-font" : "expander-right-font", + ref: (_ref) => { + this.OtherConfigButton = _ref; + }, + handler: () => { + this.store.setIsOpen(!this.model.isOpen); + this.OtherConfigButton.setIcon(this.model.isOpen ? "expander-down-font" : "expander-right-font"); + } + }, { + type: "bi.text_button", + cls: "bi-high-light", + text: BI.i18nText('Plugin-S3_Other_Config'), + handler: () => { + this.store.setIsOpen(!this.model.isOpen); + this.OtherConfigButton.setIcon(this.model.isOpen ? "expander-down-font" : "expander-right-font"); + } + }] + }, { + type: 'bi.vertical', + invisible: () => !this.model.isOpen, + items: [{ + type: "dec.label.editor.item", + textWidth: LABEL_WIDTH, + editorWidth: EDITOR_WIDTH, + watermark: BI.i18nText("Plugin-S3_Input"), + text: "PathStyleAccess", + value: this.model.enablePathStyleAccess, + el: { + disabled: !o.editable, + }, + listeners: [{ + eventName: BI.Editor.EVENT_CHANGE, + action: function () { + self.store.setEnablePathStyleAccess(this.getValue()); + } + }] + }, { + type: "dec.label.editor.item", + textWidth: LABEL_WIDTH, + editorWidth: EDITOR_WIDTH, + watermark: BI.i18nText("Plugin-S3_Input"), + text: "SignerOverride", + value: this.model.signerOverride, + el: { + disabled: !o.editable, + }, + tgap: 15, + listeners: [{ + eventName: BI.Editor.EVENT_CHANGE, + action: function () { + self.store.setSignerOverride(this.getValue()); + } + }] + }], + } + ] }; }, @@ -149,6 +208,8 @@ 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, + signerOverride: this.model.signerOverride, }; }, @@ -189,6 +250,9 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) { password: val.password, bucket: val.bucket, workRoot: val.workRoot, + isOpen: false, + enablePathStyleAccess: false, + signerOverride: "", }; }, @@ -218,6 +282,18 @@ BI.config("dec.constant.intelligence.cluster.file.server", function (items) { setBucket: function (v) { this.model.bucket = v; }, + + setEnablePathStyleAccess: function (v) { + this.model.enablePathStyleAccess = v; + }, + + setSignerOverride: function (v) { + this.model.signerOverride = v; + }, + + setIsOpen: function (v) { + this.model.isOpen = v; + }, }, }); BI.model("dec.model.intelligence.cluster.file.s3", Model);