This is an automated email from the ASF dual-hosted git repository.
xcsnx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 01f8c721 [fix] Fix handler required problem (#525)
01f8c721 is described below
commit 01f8c7210888a014779fc3fa88cd05cc995ef43c
Author: VampireAchao <[email protected]>
AuthorDate: Mon Mar 24 11:03:38 2025 +0800
[fix] Fix handler required problem (#525)
* [type:fix] fix handler required flag
* [type:fix] fix handler required flag
* [type:fix] fix handler required flag
---
src/locales/en-US.json | 2 ++
src/locales/zh-CN.json | 2 ++
src/routes/Plugin/Common/CommonRuleHandle.js | 7 ++++---
src/routes/Plugin/Common/Rule.js | 4 ++--
src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js | 7 ++++---
src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js | 7 ++++---
src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js | 7 ++++---
src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js | 7 ++++---
src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js | 7 ++++---
9 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index bf3d1194..00950ca9 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -38,6 +38,8 @@
"SHENYU.COMMON.INPUTMATCHTYPE": "MatchMode",
"SHENYU.COMMON.CONDITION": "Conditions",
"SHENYU.COMMON.DEAL": "Handler",
+ "SHENYU.COMMON.DEAL.COMPONENT": "Component Handler",
+ "SHENYU.COMMON.DEAL.CUSTOM": "Custom Handler",
"SHENYU.COMMON.SETTING": "Configuration",
"SHENYU.COMMON.YES": "YES",
"SHENYU.COMMON.NO": "NO",
diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json
index 37974493..f885a8c4 100644
--- a/src/locales/zh-CN.json
+++ b/src/locales/zh-CN.json
@@ -37,6 +37,8 @@
"SHENYU.COMMON.INPUTMATCHTYPE": "请选择匹配方式",
"SHENYU.COMMON.CONDITION": "条件",
"SHENYU.COMMON.DEAL": "处理",
+ "SHENYU.COMMON.DEAL.COMPONENT": "组件处理",
+ "SHENYU.COMMON.DEAL.CUSTOM": "自定义处理",
"SHENYU.COMMON.SETTING": "配置",
"SHENYU.COMMON.YES": "是",
"SHENYU.COMMON.NO": "否",
diff --git a/src/routes/Plugin/Common/CommonRuleHandle.js
b/src/routes/Plugin/Common/CommonRuleHandle.js
index 91dbd8fd..33da4d12 100644
--- a/src/routes/Plugin/Common/CommonRuleHandle.js
+++ b/src/routes/Plugin/Common/CommonRuleHandle.js
@@ -26,10 +26,10 @@ const { Option } = Select;
const formItemLayout = {
labelCol: {
- sm: { span: 3 },
+ sm: { span: 4 },
},
wrapperCol: {
- sm: { span: 21 },
+ sm: { span: 20 },
},
};
@@ -46,7 +46,8 @@ export default class CommonRuleHandle extends Component {
const { getFieldDecorator, getFieldValue } = form;
return (
<FormItem
- label={getIntlContent("SHENYU.COMMON.DEAL")}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.CUSTOM")}
{...formItemLayout}
className={styles.rootFormItem}
>
diff --git a/src/routes/Plugin/Common/Rule.js b/src/routes/Plugin/Common/Rule.js
index 23d7c8fa..2a20bed4 100644
--- a/src/routes/Plugin/Common/Rule.js
+++ b/src/routes/Plugin/Common/Rule.js
@@ -509,10 +509,10 @@ class AddModal extends Component {
const { getFieldDecorator } = form;
const formItemLayout = {
labelCol: {
- sm: { span: 3 },
+ sm: { span: 4 },
},
wrapperCol: {
- sm: { span: 21 },
+ sm: { span: 20 },
},
};
const formCheckLayout = {
diff --git a/src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js
b/src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js
index f423956d..862fe3d4 100644
--- a/src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js
+++ b/src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js
@@ -111,9 +111,10 @@ export default class GeneralContextRuleHandle extends
Component {
return (
<FormItem
- label={getIntlContent("SHENYU.COMMON.DEAL")}
- labelCol={{ span: 3 }}
- wrapperCol={{ span: 21 }}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
+ labelCol={{ span: 4 }}
+ wrapperCol={{ span: 20 }}
className={styles.rootFormItem}
>
<Tabs defaultActiveKey={currentType} onChange={this.handleTabChange}>
diff --git a/src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js
b/src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js
index d62ab410..556540ae 100644
--- a/src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js
+++ b/src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js
@@ -165,10 +165,10 @@ export default class HystrixRuleHandle extends Component {
} = this.state;
const formItemLayout = {
labelCol: {
- sm: { span: 3 },
+ sm: { span: 4 },
},
wrapperCol: {
- sm: { span: 21 },
+ sm: { span: 20 },
},
};
// eslint-disable-next-line
@@ -203,7 +203,8 @@ export default class HystrixRuleHandle extends Component {
)}
</FormItem>
<FormItem
- label={getIntlContent("SHENYU.COMMON.DEAL")}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
{...formItemLayout}
>
<div className={styles.handleWrap} style={{ marginTop: 0 }}>
diff --git a/src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js
b/src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js
index 25219c43..704f591b 100644
--- a/src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js
+++ b/src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js
@@ -326,9 +326,10 @@ export default class ParamPluginRuleHandle extends
Component {
return (
<Form.Item
- label={getIntlContent("SHENYU.COMMON.DEAL")}
- labelCol={{ span: 3 }}
- wrapperCol={{ span: 21 }}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
+ labelCol={{ span: 4 }}
+ wrapperCol={{ span: 20 }}
>
{getFieldDecorator("handle", {
initialValue: handle,
diff --git a/src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js
b/src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js
index b0257e9c..6ab84365 100644
--- a/src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js
+++ b/src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js
@@ -415,9 +415,10 @@ export default class RequestRuleHandle extends Component {
const rowStyle = { display: "flex", alignItems: "center" };
return (
<FormItem
- label={getIntlContent("SHENYU.COMMON.DEAL")}
- labelCol={{ span: 3 }}
- wrapperCol={{ span: 21 }}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
+ labelCol={{ span: 4 }}
+ wrapperCol={{ span: 20 }}
className={styles.rootFormItem}
>
<Tabs defaultActiveKey={currentType} onChange={this.handleTabChange}>
diff --git a/src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js
b/src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js
index 1a4d258e..3715c145 100644
--- a/src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js
+++ b/src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js
@@ -423,9 +423,10 @@ export default class ResponseRuleHandle extends Component {
return (
<Form.Item
- label={getIntlContent("SHENYU.COMMON.DEAL")}
- labelCol={{ span: 3 }}
- wrapperCol={{ span: 21 }}
+ required={true}
+ label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
+ labelCol={{ span: 4 }}
+ wrapperCol={{ span: 20 }}
>
{getFieldDecorator("handle", {
initialValue: handle,