From 68f4fb87d1b15985aa2f7df036ab27905ec454e5 Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Sun, 4 Apr 2021 17:16:59 +0800 Subject: [PATCH 01/16] chore: use UpperCase for JSON/YAML --- web/src/components/Plugin/PluginDetail.tsx | 25 ++++++++++--------- web/src/components/Plugin/typing.d.ts | 2 +- .../RawDataEditor/RawDataEditor.tsx | 23 +++++++++-------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/web/src/components/Plugin/PluginDetail.tsx b/web/src/components/Plugin/PluginDetail.tsx index 6ad7d9c071..8c3eac7220 100644 --- a/web/src/components/Plugin/PluginDetail.tsx +++ b/web/src/components/Plugin/PluginDetail.tsx @@ -87,24 +87,24 @@ const PluginDetail: React.FC = ({ readonly = false, maskClosable = true, initialData = {}, - onClose = () => {}, - onChange = () => {}, + onClose = () => { }, + onChange = () => { }, }) => { const { formatMessage } = useIntl(); enum codeMirrorModeList { - Json = 'Json', - Yaml = 'Yaml', + JSON = 'JSON', + YAML = 'YAML', } const [form] = Form.useForm(); const ref = useRef(null); const data = initialData[name] || {}; const pluginType = pluginList.find((item) => item.name === name)?.type; const [codeMirrorMode, setCodeMirrorMode] = useState( - codeMirrorModeList.Json, + codeMirrorModeList.JSON, ); const modeOptions = [ - { label: codeMirrorModeList.Json, value: codeMirrorModeList.Json }, - { label: codeMirrorModeList.Yaml, value: codeMirrorModeList.Yaml }, + { label: codeMirrorModeList.JSON, value: codeMirrorModeList.JSON }, + { label: codeMirrorModeList.YAML, value: codeMirrorModeList.YAML }, ]; useEffect(() => { @@ -160,8 +160,8 @@ const PluginDetail: React.FC = ({ }; const handleModeChange = (value: PluginComponent.CodeMirrorMode) => { switch (value) { - case codeMirrorModeList.Json: { - const { data: yamlData , error } = yaml2json(ref.current.editor.getValue(), true); + case codeMirrorModeList.JSON: { + const { data: yamlData, error } = yaml2json(ref.current.editor.getValue(), true); if (error) { notification.error({ @@ -176,7 +176,7 @@ const PluginDetail: React.FC = ({ ); break; } - case codeMirrorModeList.Yaml: { + case codeMirrorModeList.YAML: { const { data: jsonData, error } = json2yaml(ref.current.editor.getValue()); if (error) { @@ -250,7 +250,7 @@ const PluginDetail: React.FC = ({ onClick={() => { try { const editorData = - codeMirrorMode === codeMirrorModeList.Json + codeMirrorMode === codeMirrorModeList.JSON ? JSON.parse(ref.current?.editor.getValue()) : yaml2json(ref.current?.editor.getValue(), false).data; validateData(name, editorData).then((value) => { @@ -320,7 +320,7 @@ const PluginDetail: React.FC = ({ {formatMessage({ id: 'component.global.document' })} , { @@ -192,6 +192,7 @@ const RawDataEditor: React.FC = ({ visible, readonly = true, type, data = ref.current = codemirror; if (codemirror) { // NOTE: for debug & test + // @ts-ignore window.codemirror = codemirror.editor; } }} From a0c212fab146a544282fc813045b0381e5fb0a91 Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Sun, 4 Apr 2021 17:19:21 +0800 Subject: [PATCH 02/16] ui: improve i18n for Upstream Form --- .../components/RawDataEditor/locales/en-US.ts | 2 +- .../components/RawDataEditor/locales/zh-CN.ts | 2 +- web/src/components/Upstream/UpstreamForm.tsx | 12 ++++----- web/src/locales/en-US/component.ts | 6 +++-- web/src/locales/zh-CN/component.ts | 6 +++-- web/src/pages/Route/locales/zh-CN.ts | 2 +- web/src/pages/Upstream/Create.tsx | 15 ++++++++--- web/src/pages/Upstream/List.tsx | 3 +-- web/src/pages/Upstream/components/Step1.tsx | 1 - web/src/pages/Upstream/locales/en-US.ts | 13 +++++----- web/src/pages/Upstream/locales/zh-CN.ts | 25 ++++++++++--------- 11 files changed, 49 insertions(+), 38 deletions(-) diff --git a/web/src/components/RawDataEditor/locales/en-US.ts b/web/src/components/RawDataEditor/locales/en-US.ts index 773b53cdbe..ff321e785a 100644 --- a/web/src/components/RawDataEditor/locales/en-US.ts +++ b/web/src/components/RawDataEditor/locales/en-US.ts @@ -16,5 +16,5 @@ */ export default { 'component.rawDataEditor.tip': "Don't support edit mode currently", - 'component.rawDataEditor.title': 'Raw Data Editor', + 'component.rawDataEditor.title': 'CodeMirror', }; diff --git a/web/src/components/RawDataEditor/locales/zh-CN.ts b/web/src/components/RawDataEditor/locales/zh-CN.ts index 7a4a1ac55d..17c2bbc9ac 100644 --- a/web/src/components/RawDataEditor/locales/zh-CN.ts +++ b/web/src/components/RawDataEditor/locales/zh-CN.ts @@ -16,5 +16,5 @@ */ export default { 'component.rawDataEditor.tip': '目前暂不支持编辑', - 'component.rawDataEditor.title': '元数据编辑器', + 'component.rawDataEditor.title': 'CodeMirror', }; diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 609a15fa6a..801aea178e 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -163,10 +163,6 @@ const UpstreamForm: React.FC = forwardRef( index === 0 && formatMessage({ id: 'page.upstream.form.item-label.node.domain.or.ip' }) } - extra={ - index === 0 && - formatMessage({ id: 'page.upstream.form.item.extra-message.node.domain.or.ip' }) - } labelCol={{ span: index === 0 ? 3 : 0 }} wrapperCol={{ offset: index === 0 ? 0 : 3 }} > @@ -196,10 +192,11 @@ const UpstreamForm: React.FC = forwardRef( /> - + = forwardRef( /> - + = forwardRef( {Object.entries(Type).map(([label, value]) => { return ( - {label} + {formatMessage({ id: `page.upstream.type.${label}` })} ); })} diff --git a/web/src/locales/en-US/component.ts b/web/src/locales/en-US/component.ts index a6a41000d5..6593e8f64d 100644 --- a/web/src/locales/en-US/component.ts +++ b/web/src/locales/en-US/component.ts @@ -25,12 +25,12 @@ export default { 'component.global.document': 'Document', 'component.global.enable': 'Enable', 'component.global.scope': 'Scope', - 'component.global.data.editor': 'Data Editor', + 'component.global.data.editor': 'CodeMirror', 'component.global.delete': 'Delete', 'component.global.cancel': 'Cancel', 'component.global.submit': 'Submit', 'component.global.create': 'Create', - 'component.global.createWithEditor': 'Create with Editor', + 'component.global.createWithEditor': 'CodeMirror', 'component.global.add': 'Add', 'component.global.save': 'Save', 'component.global.edit': 'Configure', @@ -72,4 +72,6 @@ export default { // User component 'component.user.loginByPassword': 'Username & Password', 'component.user.login': 'Login', + + 'component.document': 'Document' }; diff --git a/web/src/locales/zh-CN/component.ts b/web/src/locales/zh-CN/component.ts index 4cb43cf694..f54e0c26e0 100644 --- a/web/src/locales/zh-CN/component.ts +++ b/web/src/locales/zh-CN/component.ts @@ -26,13 +26,13 @@ export default { 'component.global.document': '文档', 'component.global.enable': '启用', 'component.global.scope': '作用域', - 'component.global.data.editor': '元数据编辑器', + 'component.global.data.editor': 'CodeMirror', 'component.global.delete': '删除', 'component.global.cancel': '取消', 'component.global.submit': '提交', 'component.global.create': '创建', - 'component.global.createWithEditor': '使用编辑器创建', + 'component.global.createWithEditor': 'CodeMirror', 'component.global.add': '新建', 'component.global.save': '保存', 'component.global.edit': '配置', @@ -70,4 +70,6 @@ export default { // User component 'component.user.loginByPassword': '账号密码登录', 'component.user.login': '登录', + + 'component.document': '操作手册' }; diff --git a/web/src/pages/Route/locales/zh-CN.ts b/web/src/pages/Route/locales/zh-CN.ts index 71aef9be21..f2a0d28d57 100644 --- a/web/src/pages/Route/locales/zh-CN.ts +++ b/web/src/pages/Route/locales/zh-CN.ts @@ -116,7 +116,7 @@ export default { 'page.route.form.itemLabel.domainNameOrIp': '域名/IP', 'page.route.form.itemExtraMessage.domainNameOrIp': '使用域名时,默认解析本地:/etc/resolv.conf', 'page.route.form.itemRulesPatternMessage.domainNameOrIp': '仅支持字母、数字和 . ', - 'page.route.portNumber': '端口号', + 'page.route.portNumber': '端口', 'page.route.weight': '权重', 'page.route.radio.static': '静态改写', diff --git a/web/src/pages/Upstream/Create.tsx b/web/src/pages/Upstream/Create.tsx index 0e6714e810..92fb0c832a 100644 --- a/web/src/pages/Upstream/Create.tsx +++ b/web/src/pages/Upstream/Create.tsx @@ -16,8 +16,9 @@ */ import React, { useState, useEffect, useRef } from 'react'; import { PageContainer } from '@ant-design/pro-layout'; -import { Card, Steps, notification, Form } from 'antd'; +import { Card, Steps, notification, Form, Button } from 'antd'; import { history, useIntl } from 'umi'; +import { QuestionCircleOutlined } from '@ant-design/icons'; import ActionBar from '@/components/ActionBar'; @@ -78,8 +79,16 @@ const Page: React.FC = (props) => { <> + + {formatMessage({ id: 'component.document' })} + + ]} > diff --git a/web/src/pages/Upstream/List.tsx b/web/src/pages/Upstream/List.tsx index 27474e5c18..c6810715db 100644 --- a/web/src/pages/Upstream/List.tsx +++ b/web/src/pages/Upstream/List.tsx @@ -136,12 +136,11 @@ const Page: React.FC = () => { {formatMessage({ id: 'component.global.create' })} , - , ]} diff --git a/web/src/pages/Upstream/components/Step1.tsx b/web/src/pages/Upstream/components/Step1.tsx index 494f3cb832..797eb3a8cd 100644 --- a/web/src/pages/Upstream/components/Step1.tsx +++ b/web/src/pages/Upstream/components/Step1.tsx @@ -43,7 +43,6 @@ const Step1: React.FC = ({ form, disabled, upstreamRef }) => { label={formatMessage({ id: 'page.upstream.step.name' })} name="name" rules={[{ required: true, message: formatMessage({ id: 'page.upstream.step.name.should.unique' }) }]} - extra={formatMessage({ id: 'page.upstream.step.name.should.unique' })} > Date: Sun, 4 Apr 2021 23:06:10 +0800 Subject: [PATCH 03/16] support retries field & update fields description --- web/src/components/Upstream/UpstreamForm.tsx | 25 ++++++++++++++++---- web/src/components/Upstream/constant.ts | 1 + web/src/pages/Upstream/components/Step1.tsx | 2 +- web/src/pages/Upstream/locales/en-US.ts | 7 ++++-- web/src/pages/Upstream/locales/zh-CN.ts | 13 ++++++---- 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 801aea178e..894bb03372 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -83,14 +83,17 @@ const UpstreamForm: React.FC = forwardRef( { label: formatMessage({ id: 'page.upstream.step.connect.timeout' }), name: ['timeout', 'connect'], + desc: formatMessage({ id: 'page.upstream.step.connect.timeout.desc' }) }, { label: formatMessage({ id: 'page.upstream.step.send.timeout' }), name: ['timeout', 'send'], + desc: formatMessage({ id: 'page.upstream.step.send.timeout.desc' }) }, { label: formatMessage({ id: 'page.upstream.step.read.timeout' }), name: ['timeout', 'read'], + desc: formatMessage({ id: 'page.upstream.step.read.timeout.desc' }) }, ]; @@ -212,7 +215,7 @@ const UpstreamForm: React.FC = forwardRef( /> - + = forwardRef( const ActiveHealthCheck = () => ( <> - + @@ -333,6 +336,7 @@ const UpstreamForm: React.FC = forwardRef( = forwardRef( = forwardRef( = forwardRef( = forwardRef( + + + + + { @@ -744,8 +761,8 @@ const UpstreamForm: React.FC = forwardRef( }} - {timeoutFields.map(({ label, name }) => ( - + {timeoutFields.map(({ label, name, desc = '' }) => ( + Date: Mon, 5 Apr 2021 14:36:51 +0800 Subject: [PATCH 04/16] doc: added some tooltips for fields --- web/src/components/Upstream/UpstreamForm.tsx | 53 +++++++++----------- web/src/components/Upstream/constant.ts | 35 ++++++++++++- web/src/pages/Upstream/Create.tsx | 5 +- web/src/pages/Upstream/components/Step1.tsx | 4 +- web/src/pages/Upstream/locales/en-US.ts | 4 +- web/src/pages/Upstream/locales/zh-CN.ts | 8 +-- 6 files changed, 68 insertions(+), 41 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 894bb03372..9c61fb49f1 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -158,18 +158,9 @@ const UpstreamForm: React.FC = forwardRef( {(fields, { add, remove }) => ( <> - {fields.map((field, index) => ( - - + + {fields.map((field, index) => ( + = forwardRef( @@ -236,13 +227,13 @@ const UpstreamForm: React.FC = forwardRef( - {!readonly && fields.length > 1 && ( + {!readonly && ( remove(field.name)} /> )} - - ))} + ))} + {!readonly && ( - ]} + } > diff --git a/web/src/pages/Upstream/components/Step1.tsx b/web/src/pages/Upstream/components/Step1.tsx index 3983ffc6d3..182ffbc458 100644 --- a/web/src/pages/Upstream/components/Step1.tsx +++ b/web/src/pages/Upstream/components/Step1.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ import React, { useEffect, useState } from 'react'; -import { Form, Input, InputNumber } from 'antd'; +import { Form, Input } from 'antd'; import type { FormInstance } from 'antd/lib/form'; import { useIntl } from 'umi'; @@ -42,7 +42,7 @@ const Step1: React.FC = ({ form, disabled, upstreamRef }) => { Date: Mon, 5 Apr 2021 16:53:38 +0800 Subject: [PATCH 05/16] doc: added more tips on Health Check --- web/src/components/Upstream/UpstreamForm.tsx | 67 ++++++++++---------- web/src/components/Upstream/constant.ts | 8 ++- web/src/pages/Upstream/locales/en-US.ts | 4 +- web/src/pages/Upstream/locales/zh-CN.ts | 4 +- 4 files changed, 44 insertions(+), 39 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 9c61fb49f1..4327ee67a3 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -66,7 +66,7 @@ type Props = { }; const removeBtnStyle = { - marginLeft: -10, + marginLeft: 20, display: 'flex', alignItems: 'center', }; @@ -226,7 +226,7 @@ const UpstreamForm: React.FC = forwardRef( /> - + {!readonly && ( remove(field.name)} /> )} @@ -334,6 +334,7 @@ const UpstreamForm: React.FC = forwardRef( tooltip="对健康的上游服务目标节点进行主动健康检查的间隔时间,默认值为0,表示对健康节点不进行主动健康检查。" > = forwardRef( {(fields, { add, remove }) => ( <> - {fields.map((field, index) => ( - - + + {fields.map((field, index) => ( + - + - {!readonly && fields.length > 1 && ( + {!readonly && ( { remove(field.name); @@ -498,8 +494,8 @@ const UpstreamForm: React.FC = forwardRef( )} - - ))} + ))} + {!readonly && ( , ]} /> diff --git a/web/src/pages/Route/List.tsx b/web/src/pages/Route/List.tsx index a9c1ba5cc6..15984620eb 100644 --- a/web/src/pages/Route/List.tsx +++ b/web/src/pages/Route/List.tsx @@ -478,7 +478,7 @@ const Page: React.FC = () => { setRawData({}); }}> - {formatMessage({ id: 'component.global.createWithEditor' })} + {formatMessage({ id: 'component.global.data.editor' })} , , ]} /> diff --git a/web/src/pages/Upstream/List.tsx b/web/src/pages/Upstream/List.tsx index d035ba0a00..486fbbeb28 100644 --- a/web/src/pages/Upstream/List.tsx +++ b/web/src/pages/Upstream/List.tsx @@ -141,7 +141,7 @@ const Page: React.FC = () => { setEditorMode('create'); setRawData({}); }}> - {formatMessage({ id: 'component.global.createWithEditor' })} + {formatMessage({ id: 'component.global.data.editor' })} , ]} /> From 1305819d012c0c6e5507fe1e870515ac11e99746 Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Wed, 7 Apr 2021 00:13:07 +0800 Subject: [PATCH 12/16] chore: use Raw Data Editor instead --- web/src/components/RawDataEditor/RawDataEditor.tsx | 2 +- web/src/components/RawDataEditor/locales/en-US.ts | 1 - web/src/components/RawDataEditor/locales/zh-CN.ts | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/components/RawDataEditor/RawDataEditor.tsx b/web/src/components/RawDataEditor/RawDataEditor.tsx index 087b8a6bef..3117bd2e95 100644 --- a/web/src/components/RawDataEditor/RawDataEditor.tsx +++ b/web/src/components/RawDataEditor/RawDataEditor.tsx @@ -109,7 +109,7 @@ const RawDataEditor: React.FC = ({ visible, readonly = true, type, data = return ( <> Date: Wed, 7 Apr 2021 00:13:46 +0800 Subject: [PATCH 13/16] chore: use Raw Data Editor instead --- web/src/locales/zh-CN/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/locales/zh-CN/component.ts b/web/src/locales/zh-CN/component.ts index 746124d3fe..f4171ec256 100644 --- a/web/src/locales/zh-CN/component.ts +++ b/web/src/locales/zh-CN/component.ts @@ -25,7 +25,7 @@ export default { 'component.global.document': '文档', 'component.global.enable': '启用', 'component.global.scope': '作用域', - 'component.global.data.editor': '原始数据编辑器', + 'component.global.data.editor': '数据编辑器', 'component.global.delete': '删除', 'component.global.cancel': '取消', 'component.global.submit': '提交', From 842b906cba9216e4fbec68a7e35afeff8cf737fb Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Wed, 7 Apr 2021 00:19:20 +0800 Subject: [PATCH 14/16] fix: update the i18n for host field --- web/src/components/Upstream/UpstreamForm.tsx | 4 ++-- web/src/pages/Upstream/locales/en-US.ts | 3 ++- web/src/pages/Upstream/locales/zh-CN.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 3639c7c724..2d54f75562 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -249,7 +249,7 @@ const UpstreamForm: React.FC = forwardRef( const ActiveHealthCheck = () => ( <> - + @@ -258,7 +258,7 @@ const UpstreamForm: React.FC = forwardRef( Date: Wed, 7 Apr 2021 08:54:13 +0800 Subject: [PATCH 15/16] docs: update i18n in English for upstream --- web/src/pages/Upstream/locales/en-US.ts | 22 +++++++++++----------- web/src/pages/Upstream/locales/zh-CN.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/src/pages/Upstream/locales/en-US.ts b/web/src/pages/Upstream/locales/en-US.ts index c6dfabafe5..1132fa3b81 100644 --- a/web/src/pages/Upstream/locales/en-US.ts +++ b/web/src/pages/Upstream/locales/en-US.ts @@ -56,7 +56,6 @@ export default { 'page.upstream.step.healthyCheck.active.timeout': 'Timeout', 'page.upstream.step.input.healthyCheck.active.timeout': 'Please enter timeout', 'page.upstream.step.healthyCheck.active.http_path': 'HTTP Path', - 'page.upstream.step.input.healthyCheck.active.http_path': 'The HTTP request path to use when performing active health checks (default is /)', 'page.upstream.step.healthyCheck.activePort': 'Port', 'page.upstream.step.input.healthyCheck.activePort': 'Port', 'page.upstream.step.healthyCheck.activeHost': 'Host', @@ -110,15 +109,16 @@ export default { 'page.upstream.retries': 'Retries', 'page.upstream.checks.active.http_path.placeholder': 'Please enter HTTP request path', - 'page.upstream.checks.active.timeout.description': 'Timeout for sockets with active health checks', + 'page.upstream.step.input.healthyCheck.active.http_path': 'Path to use in GET HTTP request to run on active checks', + 'page.upstream.checks.active.timeout.description': 'Socket timeout for active checks (in seconds)', 'page.upstream.checks.active.host.description': 'The hostname of the HTTP request used to perform the active health check', - 'page.upstream.checks.active.healthy.interval.description': 'The interval between active health checks for healthy upstream service target nodes. The default value is 0, which means no active health checks are performed for healthy nodes.', - 'page.upstream.checks.active.healthy.successes.description': 'The number of HTTP successes for the active health check, the default value is 0. If this value is reached, it means that the upstream service target node is healthy.', - 'page.upstream.checks.active.unhealthy.interval.description': 'The interval between active health checks for unhealthy upstream service target nodes. The default value is 0, which means no active health checks are performed for unhealthy nodes.', - 'page.upstream.checks.active.unhealthy.http_failures.description': 'The number of HTTP failures for active health checks, the default value is 0. If this value is reached, it means that the upstream service target node is unhealthy.', - 'page.upstream.checks.passive.healthy.http_statuses.description': 'When the probe return value of a passive health check is one of the values in the HTTP status code list, it means that the health status is generated by the proxy traffic.', - 'page.upstream.checks.passive.healthy.successes.description': 'The number of successes of normal proxy traffic observed through passive health checks. If this value is reached, the upstream service target node is considered healthy.', - 'page.upstream.checks.passive.unhealthy.http_statuses.description': 'When the probe return value of a passive health check is one of the values in the HTTP status code list, it means that the unhealthy state is generated by proxy traffic.', - 'page.upstream.checks.passive.unhealthy.http_failures.description': 'The number of HTTP failures in proxy traffic as observed by passive health checks. If this value is reached, the upstream service target node is considered unhealthy.', - 'page.upstream.checks.passive.unhealthy.tcp_failures.description': 'The number of TCP failures in the proxy traffic observed by the passive health check. If this value is reached, the upstream service target node is considered unhealthy.' + 'page.upstream.checks.active.healthy.interval.description': 'Interval between checks for healthy targets (in seconds)', + 'page.upstream.checks.active.healthy.successes.description': 'Number of successes to consider a target healthy', + 'page.upstream.checks.active.unhealthy.interval.description': 'Interval between checks for unhealthy targets (in seconds)', + 'page.upstream.checks.active.unhealthy.http_failures.description': 'Number of HTTP failures to consider a target unhealthy', + 'page.upstream.checks.passive.healthy.http_statuses.description': 'Which HTTP statuses to consider a failure', + 'page.upstream.checks.passive.healthy.successes.description': 'Number of successes to consider a target healthy', + 'page.upstream.checks.passive.unhealthy.http_statuses.description': 'Which HTTP statuses to consider a success', + 'page.upstream.checks.passive.unhealthy.http_failures.description': 'Number of HTTP failures to consider a target unhealthy', + 'page.upstream.checks.passive.unhealthy.tcp_failures.description': 'Number of TCP failures to consider a target unhealthy' }; diff --git a/web/src/pages/Upstream/locales/zh-CN.ts b/web/src/pages/Upstream/locales/zh-CN.ts index a9210f4b69..3049b97cac 100644 --- a/web/src/pages/Upstream/locales/zh-CN.ts +++ b/web/src/pages/Upstream/locales/zh-CN.ts @@ -56,7 +56,6 @@ export default { 'page.upstream.step.healthyCheck.active.timeout': '超时时间', 'page.upstream.step.input.healthyCheck.active.timeout': '请输入超时时间', 'page.upstream.step.healthyCheck.active.http_path': '路径', - 'page.upstream.step.input.healthyCheck.active.http_path': '进行主动健康检查时使用的 HTTP 请求路径(默认为 /)', 'page.upstream.step.healthyCheck.activePort': '端口', 'page.upstream.step.input.healthyCheck.activePort': '端口', 'page.upstream.step.healthyCheck.activeHost': '域名', @@ -110,6 +109,7 @@ export default { 'page.upstream.retries': '重试次数', 'page.upstream.checks.active.http_path.placeholder': '请输入 HTTP 请求路径', + 'page.upstream.step.input.healthyCheck.active.http_path': '进行主动健康检查时使用的 HTTP 请求路径(默认为 /)', 'page.upstream.checks.active.timeout.description': '主动健康检查的套接字的超时时间', 'page.upstream.checks.active.host.description': '进行主动健康检查时使用的 HTTP 请求主机名', 'page.upstream.checks.active.healthy.interval.description': '对健康的上游服务目标节点进行主动健康检查的间隔时间,默认值为0,表示对健康节点不进行主动健康检查。', From 3fb0ea686d5acaeba88d47bba5f4cb9cb0a02db7 Mon Sep 17 00:00:00 2001 From: juzhiyuan Date: Wed, 7 Apr 2021 09:28:58 +0800 Subject: [PATCH 16/16] docs: use Hostname instead of Host --- web/src/pages/Upstream/locales/en-US.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/pages/Upstream/locales/en-US.ts b/web/src/pages/Upstream/locales/en-US.ts index 1132fa3b81..a78a16260a 100644 --- a/web/src/pages/Upstream/locales/en-US.ts +++ b/web/src/pages/Upstream/locales/en-US.ts @@ -33,7 +33,7 @@ export default { 'page.upstream.step.input.description': 'Please enter upstream\'s description', 'page.upstream.step.type': 'Algorithm', 'page.upstream.step.create.node': 'Add Target', - 'page.upstream.step.pass-host': 'Host Transform', + 'page.upstream.step.pass-host': 'Hostname', 'page.upstream.step.pass-host.pass': 'Keep the same Host from client request', 'page.upstream.step.pass-host.node': 'Use the domain or IP from Node List', 'page.upstream.step.pass-host.rewrite': 'Custom Host (Will be deprecated in the future)',