Skip to content

Commit

Permalink
chore: added fields for SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
juzhiyuan committed Apr 11, 2021
1 parent 8b6080d commit 351bfe7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/SSL/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/SSL/components/CertificateForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' })}
Expand All @@ -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>
Expand Down
5 changes: 0 additions & 5 deletions web/src/pages/SSL/components/Step1/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' })}
Expand Down
6 changes: 4 additions & 2 deletions web/src/pages/SSL/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
};
5 changes: 4 additions & 1 deletion web/src/pages/SSL/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': '上传',
Expand All @@ -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': '请输入私钥内容',
};

0 comments on commit 351bfe7

Please sign in to comment.