You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2021/08/07 12:11:37 UTC
[apisix-dashboard] branch master updated: perf(Upstream): improve
grid layout for Upstream components(#2030)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 4d804b4 perf(Upstream): improve grid layout for Upstream components(#2030)
4d804b4 is described below
commit 4d804b4c0b73579f44992ed4d8ea10d43e9f7b13
Author: foolwc <29...@qq.com>
AuthorDate: Sat Aug 7 20:11:32 2021 +0800
perf(Upstream): improve grid layout for Upstream components(#2030)
---
web/src/components/Upstream/components/Nodes.tsx | 6 +++---
.../Upstream/components/active-check/Healthy/HttpStatuses.tsx | 2 +-
.../Upstream/components/active-check/Unhealthy/HttpStatuses.tsx | 2 +-
web/src/components/Upstream/constant.ts | 1 -
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/web/src/components/Upstream/components/Nodes.tsx b/web/src/components/Upstream/components/Nodes.tsx
index c4a8ff7..5fc8b8e 100644
--- a/web/src/components/Upstream/components/Nodes.tsx
+++ b/web/src/components/Upstream/components/Nodes.tsx
@@ -67,7 +67,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
/>
</Form.Item>
</Col>
- <Col span={4}>
+ <Col md={5} lg={5} xl={5} xxl={4}>
<Form.Item
style={{ marginBottom: 0 }}
name={[field.name, 'port']}
@@ -87,7 +87,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
/>
</Form.Item>
</Col>
- <Col span={5}>
+ <Col md={5} lg={5} xl={5} xxl={4}>
<Form.Item
style={{ marginBottom: 0 }}
name={[field.name, 'weight']}
@@ -108,7 +108,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
/>
</Form.Item>
</Col>
- <Col style={{ ...removeBtnStyle, marginLeft: -50 }}>
+ <Col style={{ ...removeBtnStyle }}>
{!readonly && (
<MinusCircleOutlined
data-cy={`upstream-node-minus-${index}`}
diff --git a/web/src/components/Upstream/components/active-check/Healthy/HttpStatuses.tsx b/web/src/components/Upstream/components/active-check/Healthy/HttpStatuses.tsx
index 0b4d644..cf91467 100644
--- a/web/src/components/Upstream/components/active-check/Healthy/HttpStatuses.tsx
+++ b/web/src/components/Upstream/components/active-check/Healthy/HttpStatuses.tsx
@@ -44,7 +44,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
>
{fields.map((field, index) => (
<Row style={{ marginBottom: 10 }} key={index}>
- <Col span={2}>
+ <Col md={4} lg={4} xl={4} xxl={2}>
<Form.Item style={{ marginBottom: 0 }} name={[field.name]}>
<InputNumber disabled={readonly} min={200} max={599} />
</Form.Item>
diff --git a/web/src/components/Upstream/components/active-check/Unhealthy/HttpStatuses.tsx b/web/src/components/Upstream/components/active-check/Unhealthy/HttpStatuses.tsx
index 1d38531..93eb4d7 100644
--- a/web/src/components/Upstream/components/active-check/Unhealthy/HttpStatuses.tsx
+++ b/web/src/components/Upstream/components/active-check/Unhealthy/HttpStatuses.tsx
@@ -42,7 +42,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
>
{fields.map((field, index) => (
<Row style={{ marginBottom: 10 }} key={index}>
- <Col span={2}>
+ <Col md={4} lg={4} xl={4} xxl={2}>
<Form.Item style={{ marginBottom: 0 }} name={[field.name]}>
<InputNumber disabled={readonly} min={200} max={599} />
</Form.Item>
diff --git a/web/src/components/Upstream/constant.ts b/web/src/components/Upstream/constant.ts
index 394b532..97ec8d2 100644
--- a/web/src/components/Upstream/constant.ts
+++ b/web/src/components/Upstream/constant.ts
@@ -16,7 +16,6 @@
*/
export const removeBtnStyle = {
- marginLeft: 20,
display: 'flex',
alignItems: 'center',
};