From eb5d6fa05a0c17bbc6248cc04aea74356e6fa2bc Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 22 Sep 2022 16:45:10 +0800 Subject: [PATCH] refactor: structure of the setting spec (#4) --- .../extensions/policy-template-alioss.yaml | 77 ++++++++++--------- src/main/resources/extensions/settings.yaml | 17 ++-- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/src/main/resources/extensions/policy-template-alioss.yaml b/src/main/resources/extensions/policy-template-alioss.yaml index b74aee1..58a1fdb 100644 --- a/src/main/resources/extensions/policy-template-alioss.yaml +++ b/src/main/resources/extensions/policy-template-alioss.yaml @@ -12,41 +12,42 @@ kind: Setting metadata: name: alioss-policy-template-setting spec: - - group: default - formSchema: - - $formkit: text - name: bucket - label: Bucket - validation: required - - $formkit: text - name: endpoint - label: EndPoint - validation: required - - $formkit: password - name: accessKey - label: Access Key - validation: required - - $formkit: password - name: accessSecret - label: Access Secret - validation: required - - $formkit: text - name: location - label: 上传目录 - placeholder: 如不填写,则默认上传到根目录 - - $formkit: select - name: protocol - label: 绑定域名协议 - options: - - label: HTTPS - value: https - - label: HTTP - value: http - - $formkit: text - name: domain - label: 绑定域名 - placeholder: 如不设置,那么将使用 Bucket + EndPoint 作为域名 - - $formkit: textarea - name: allow_extensions - label: 允许上传的文件类型 - placeholder: 使用半角逗号分隔 + forms: + - group: default + formSchema: + - $formkit: text + name: bucket + label: Bucket + validation: required + - $formkit: text + name: endpoint + label: EndPoint + validation: required + - $formkit: password + name: accessKey + label: Access Key + validation: required + - $formkit: password + name: accessSecret + label: Access Secret + validation: required + - $formkit: text + name: location + label: 上传目录 + placeholder: 如不填写,则默认上传到根目录 + - $formkit: select + name: protocol + label: 绑定域名协议 + options: + - label: HTTPS + value: https + - label: HTTP + value: http + - $formkit: text + name: domain + label: 绑定域名 + placeholder: 如不设置,那么将使用 Bucket + EndPoint 作为域名 + - $formkit: textarea + name: allow_extensions + label: 允许上传的文件类型 + placeholder: 使用半角逗号分隔 diff --git a/src/main/resources/extensions/settings.yaml b/src/main/resources/extensions/settings.yaml index 597086f..2120567 100644 --- a/src/main/resources/extensions/settings.yaml +++ b/src/main/resources/extensions/settings.yaml @@ -3,11 +3,12 @@ kind: Setting metadata: name: alioss-settings spec: - - group: basic - label: 基本设置 - formSchema: - - $formkit: text - help: This will be used for your account. - label: Email - name: email - validation: required|email + forms: + - group: basic + label: 基本设置 + formSchema: + - $formkit: text + help: This will be used for your account. + label: Email + name: email + validation: required|email