Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added fields for SSL #1751

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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': '请输入私钥内容',
};