This is an automated email from the ASF dual-hosted git repository.

starsz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 62e94af  chore: added fields for SSL (#1751)
62e94af is described below

commit 62e94afe9e953568d687f9a1212a2685d4c24327
Author: 琚致远 <juzhiy...@apache.org>
AuthorDate: Tue Apr 13 11:19:28 2021 +0800

    chore: added fields for SSL (#1751)
---
 web/src/pages/SSL/List.tsx                             | 2 +-
 web/src/pages/SSL/components/CertificateForm/index.tsx | 4 ++--
 web/src/pages/SSL/components/Step1/index.tsx           | 5 -----
 web/src/pages/SSL/locales/en-US.ts                     | 6 ++++--
 web/src/pages/SSL/locales/zh-CN.ts                     | 5 ++++-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/web/src/pages/SSL/List.tsx b/web/src/pages/SSL/List.tsx
index 56e5737..26452f1 100644
--- a/web/src/pages/SSL/List.tsx
+++ b/web/src/pages/SSL/List.tsx
@@ -108,7 +108,7 @@ const Page: React.FC = () => {
   ];
 
   return (
-    <PageHeaderWrapper title={formatMessage({ id: 'page.ssl.list' })}>
+    <PageHeaderWrapper title={formatMessage({ id: 'page.ssl.list' })} 
content={formatMessage({ id: 'component.ssl.description' })}>
       <ProTable<SSLModule.ResponseBody>
         rowKey="id"
         columns={columns}
diff --git a/web/src/pages/SSL/components/CertificateForm/index.tsx 
b/web/src/pages/SSL/components/CertificateForm/index.tsx
index 89a178d..73dcf6f 100644
--- a/web/src/pages/SSL/components/CertificateForm/index.tsx
+++ b/web/src/pages/SSL/components/CertificateForm/index.tsx
@@ -75,7 +75,7 @@ const CertificateForm: React.FC<CertificateFormProps> = ({ 
mode, form }) => {
           },
         ]}
       >
-        <Input.TextArea rows={6} disabled={mode !== 'EDIT'} />
+        <Input.TextArea rows={6} disabled={mode !== 'EDIT'} 
placeholder={formatMessage({ id: 'component.ssl.fields.cert.required' })} />
       </Form.Item>
       <Form.Item
         label={formatMessage({ id: 'page.ssl.form.itemLabel.privateKey' })}
@@ -93,7 +93,7 @@ const CertificateForm: React.FC<CertificateFormProps> = ({ 
mode, form }) => {
           },
         ]}
       >
-        <Input.TextArea rows={6} disabled={mode !== 'EDIT'} />
+        <Input.TextArea rows={6} disabled={mode !== 'EDIT'} 
placeholder={formatMessage({ id: 'component.ssl.fields.key.required' })} />
       </Form.Item>
       {renderExpireTime()}
     </Form>
diff --git a/web/src/pages/SSL/components/Step1/index.tsx 
b/web/src/pages/SSL/components/Step1/index.tsx
index c66f3f1..5d10103 100644
--- a/web/src/pages/SSL/components/Step1/index.tsx
+++ b/web/src/pages/SSL/components/Step1/index.tsx
@@ -70,11 +70,6 @@ const Step: React.FC<Props> = ({ form }) => {
       <Form.Item
         label={formatMessage({ id: 'page.ssl.form.itemLabel.way' })}
         required
-        extra={
-          window.location.pathname.indexOf('edit') === -1
-            ? ''
-            : formatMessage({ id: 'page.ssl.form.itemExtraMessage.way' })
-        }
       >
         <Select
           placeholder={formatMessage({ id: 
'page.ssl.select.placeholder.selectCreateWays' })}
diff --git a/web/src/pages/SSL/locales/en-US.ts 
b/web/src/pages/SSL/locales/en-US.ts
index 7c91059..cc6ddc5 100644
--- a/web/src/pages/SSL/locales/en-US.ts
+++ b/web/src/pages/SSL/locales/en-US.ts
@@ -26,8 +26,6 @@ export default {
   'page.ssl.button.uploadCert': 'Upload Certificate',
 
   'page.ssl.form.itemLabel.way': 'Way',
-  'page.ssl.form.itemExtraMessage.way':
-    'The new certificate should contain the same about SNI as the current 
certificate',
   'page.ssl.select.placeholder.selectCreateWays': 'Please select create ways',
   'page.ssl.selectOption.input': 'Input',
   'page.ssl.upload': 'Upload',
@@ -41,4 +39,8 @@ export default {
   'page.ssl.steps.stepTitle.completeCertInfo': 'Complete Certificate 
Information',
   'component.ssl.removeSSLSuccess': 'Remove target SSL successfully',
   'component.ssl.removeSSLItemModalContent': 'You are going to remove this 
item!',
+
+  'component.ssl.description': 'The certificate is used by the gateway to 
process encrypted requests, which will be associated with the SNI and bound to 
the host name in the Route.',
+  'component.ssl.fields.cert.required': 'Please enter the certificate',
+  'component.ssl.fields.key.required': 'Please enter the key',
 };
diff --git a/web/src/pages/SSL/locales/zh-CN.ts 
b/web/src/pages/SSL/locales/zh-CN.ts
index c59b644..4608a21 100644
--- a/web/src/pages/SSL/locales/zh-CN.ts
+++ b/web/src/pages/SSL/locales/zh-CN.ts
@@ -24,7 +24,6 @@ export default {
   'page.ssl.button.uploadCert': '上传证书',
 
   'page.ssl.form.itemLabel.way': '方式',
-  'page.ssl.form.itemExtraMessage.way': '新证书所含 SNI 应与当前证书一致',
   'page.ssl.select.placeholder.selectCreateWays': '请选择创建方式',
   'page.ssl.selectOption.input': '输入',
   'page.ssl.upload': '上传',
@@ -37,4 +36,8 @@ export default {
   'page.ssl.steps.stepTitle.completeCertInfo': '完善证书信息',
   'component.ssl.removeSSLSuccess': '删除证书成功',
   'component.ssl.removeSSLItemModalContent': '确定要删除该证书吗?',
+
+  'component.ssl.description': '证书被网关用于处理加密请求,它将与 SNI 关联,并与路由中主机名绑定。',
+  'component.ssl.fields.cert.required': '请输入证书内容',
+  'component.ssl.fields.key.required': '请输入私钥内容',
 };

Reply via email to