From 59bd937809ef0da9d8f117eb8b280c543ed5902d Mon Sep 17 00:00:00 2001 From: "peng.heng" Date: Thu, 25 May 2023 15:05:46 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=20springcloud=20plugin=E2=80=98s=20styl?= =?UTF-8?q?e=20display=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/Plugin/Common/Selector.js | 261 ++++++++++++++------------- 1 file changed, 135 insertions(+), 126 deletions(-) diff --git a/src/routes/Plugin/Common/Selector.js b/src/routes/Plugin/Common/Selector.js index 4a1f44f1e..7af9ca853 100644 --- a/src/routes/Plugin/Common/Selector.js +++ b/src/routes/Plugin/Common/Selector.js @@ -349,114 +349,119 @@ class AddModal extends Component { required key={key} {...(index === 0 - ? { labelCol: { span: 3 }, wrapperCol: { span: 21 } } - : { wrapperCol: { span: 21, offset: 3 } })} + ? { labelCol: { span: 4 }, wrapperCol: { span: 20 } } + : { wrapperCol: { span: 20, offset: 4 } })} label={index === 0 ? "divideUpstreams" : ""} >
- - - - {getFieldDecorator(`divideUpstreams[${key}].protocol`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].protocol - : "", - rules: [ - { - required: true, - message: "protocol is required" - } - ] - })()} - - - - - {getFieldDecorator(`divideUpstreams[${key}].upstreamUrl`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].upstreamUrl - : "", - rules: [ - { - required: true, - message: "upstreamUrl is required" - } - ] - })()} - - - - - {getFieldDecorator(`divideUpstreams[${key}].weight`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].weight - : "", - rules: [ - { - required: true, - message: "weight is required" - } - ] - })( - - )} - - - - - - {getFieldDecorator(`divideUpstreams[${key}].status`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].status - : false, - valuePropName: "checked", - rules: [ - { - required: true, - message: "status is required" - } - ] - })()} - - +
+ + + + {getFieldDecorator(`divideUpstreams[${key}].protocol`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].protocol + : "", + rules: [ + { + required: true, + message: "protocol is required" + } + ] + })()} + + + + + {getFieldDecorator(`divideUpstreams[${key}].upstreamUrl`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].upstreamUrl + : "", + rules: [ + { + required: true, + message: "upstreamUrl is required" + } + ] + })()} + + + + + + + {getFieldDecorator(`divideUpstreams[${key}].weight`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].weight + : "", + rules: [ + { + required: true, + message: "weight is required" + } + ] + })( + + )} + + - - - {getFieldDecorator(`divideUpstreams[${key}].timestamp`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].timestamp - : "", - rules: [ - { - required: true, - message: "timestamp is required" - } - ] - })()} - - + + + {getFieldDecorator(`divideUpstreams[${key}].status`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].status + : false, + valuePropName: "checked", + rules: [ + { + required: true, + message: "status is required" + } + ] + })()} + + + + + + + {getFieldDecorator(`divideUpstreams[${key}].timestamp`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].timestamp + : "", + rules: [ + { + required: true, + message: "timestamp is required" + } + ] + })()} + + - - - {getFieldDecorator(`divideUpstreams[${key}].warmup`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].warmup - : "", - rules: [ - { - required: true, - message: "warmup is required" - } - ] - })()} - - - + + + {getFieldDecorator(`divideUpstreams[${key}].warmup`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].warmup + : "", + rules: [ + { + required: true, + message: "warmup is required" + } + ] + })()} + + + +
{ @@ -478,22 +483,23 @@ class AddModal extends Component { )); return ( - - - - {getFieldDecorator("serviceId", { +
+ + + + {getFieldDecorator("serviceId", { initialValue: serviceId, rules: [ { required: true } ] - })()} - - - - - {getFieldDecorator("gray", { + })( )} + + + + + {getFieldDecorator("gray", { valuePropName: "checked", initialValue: gray, rules: [ @@ -502,14 +508,16 @@ class AddModal extends Component { } ] })()} - - - - {Rule} - - - - - + > + Add divide upstream + + + + +
); } From d7740b722c7e97b229b1c9665f1811a52aa26c4e Mon Sep 17 00:00:00 2001 From: "peng.heng" Date: Thu, 25 May 2023 15:50:08 +0800 Subject: [PATCH 2/4] fix style --- src/routes/Plugin/Common/Selector.js | 56 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/routes/Plugin/Common/Selector.js b/src/routes/Plugin/Common/Selector.js index 7af9ca853..4397f6f22 100644 --- a/src/routes/Plugin/Common/Selector.js +++ b/src/routes/Plugin/Common/Selector.js @@ -357,8 +357,8 @@ class AddModal extends Component {
- - + + {getFieldDecorator(`divideUpstreams[${key}].protocol`, { initialValue: divideUpstreams[key] ? divideUpstreams[key].protocol @@ -372,8 +372,8 @@ class AddModal extends Component { })()} - - + + {getFieldDecorator(`divideUpstreams[${key}].upstreamUrl`, { initialValue: divideUpstreams[key] ? divideUpstreams[key].upstreamUrl @@ -389,8 +389,8 @@ class AddModal extends Component { - - + + {getFieldDecorator(`divideUpstreams[${key}].weight`, { initialValue: divideUpstreams[key] ? divideUpstreams[key].weight @@ -410,8 +410,24 @@ class AddModal extends Component { )} - - + + + {getFieldDecorator(`divideUpstreams[${key}].timestamp`, { + initialValue: divideUpstreams[key] + ? divideUpstreams[key].timestamp + : "", + rules: [ + { + required: true, + message: "timestamp is required" + } + ] + })()} + + + + + {getFieldDecorator(`divideUpstreams[${key}].status`, { initialValue: divideUpstreams[key] @@ -427,26 +443,8 @@ class AddModal extends Component { })()} - - - - - {getFieldDecorator(`divideUpstreams[${key}].timestamp`, { - initialValue: divideUpstreams[key] - ? divideUpstreams[key].timestamp - : "", - rules: [ - { - required: true, - message: "timestamp is required" - } - ] - })()} - - - - - + + {getFieldDecorator(`divideUpstreams[${key}].warmup`, { initialValue: divideUpstreams[key] ? divideUpstreams[key].warmup @@ -511,7 +509,7 @@ class AddModal extends Component { - + {Rule} From d8d46871691bfb5236bbf7686f1356d705a9a0ab Mon Sep 17 00:00:00 2001 From: "peng.heng" Date: Thu, 25 May 2023 16:05:40 +0800 Subject: [PATCH 3/4] fix style --- src/routes/Plugin/Common/Selector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/Plugin/Common/Selector.js b/src/routes/Plugin/Common/Selector.js index 4397f6f22..a385a2b56 100644 --- a/src/routes/Plugin/Common/Selector.js +++ b/src/routes/Plugin/Common/Selector.js @@ -355,7 +355,7 @@ class AddModal extends Component { >
- +
@@ -459,7 +459,7 @@ class AddModal extends Component { - +
{ From fd99b318ed0e470404fdd1a29c731de634511382 Mon Sep 17 00:00:00 2001 From: "peng.heng" <1048352717@qq.com> Date: Thu, 25 May 2023 16:25:42 +0800 Subject: [PATCH 4/4] fix style --- src/routes/Plugin/Common/Selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/Plugin/Common/Selector.js b/src/routes/Plugin/Common/Selector.js index a385a2b56..e890b363a 100644 --- a/src/routes/Plugin/Common/Selector.js +++ b/src/routes/Plugin/Common/Selector.js @@ -427,7 +427,7 @@ class AddModal extends Component { - + {getFieldDecorator(`divideUpstreams[${key}].status`, { initialValue: divideUpstreams[key]