From 78199c5fe7a298375eb79a2f471fbd43292e71a3 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 20 Mar 2021 21:08:33 +0800 Subject: [PATCH 01/16] feat: add the service page upstream select option --- web/src/components/Upstream/UpstreamForm.tsx | 3 +++ web/src/pages/Upstream/locales/en-US.ts | 1 + web/src/pages/Upstream/locales/zh-CN.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index cc3c41e620..8649105d52 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -663,6 +663,9 @@ const UpstreamForm: React.FC = forwardRef( name: formatMessage({ id: 'page.upstream.step.select.upstream.select.option' }), id: '', }, + { + name: formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }), + }, ...list, ].map((item) => ( diff --git a/web/src/pages/Upstream/locales/en-US.ts b/web/src/pages/Upstream/locales/en-US.ts index 4e821de139..bd0ed3e418 100644 --- a/web/src/pages/Upstream/locales/en-US.ts +++ b/web/src/pages/Upstream/locales/en-US.ts @@ -17,6 +17,7 @@ export default { 'page.upstream.step.select.upstream': 'Select Upstream', 'page.upstream.step.select.upstream.select.option': 'Custom', + 'page.upstream.step.select.upstream.select.none': 'None', 'page.upstream.form.item-label.node.domain.or.ip': 'Node Domain/IP', 'page.upstream.step.backend.server.domain.or.ip': 'Backend Server Domain Name/IP', 'page.upstream.form.item.extra-message.node.domain.or.ip': diff --git a/web/src/pages/Upstream/locales/zh-CN.ts b/web/src/pages/Upstream/locales/zh-CN.ts index ce9c57971d..fdf2ec1d76 100644 --- a/web/src/pages/Upstream/locales/zh-CN.ts +++ b/web/src/pages/Upstream/locales/zh-CN.ts @@ -17,6 +17,7 @@ export default { 'page.upstream.step.select.upstream': '选择上游', 'page.upstream.step.select.upstream.select.option': '手动填写', + 'page.upstream.step.select.upstream.select.none': '无', 'page.upstream.form.item-label.node.domain.or.ip': '节点域名/IP', 'page.upstream.step.backend.server.domain.or.ip': '后端服务域名/IP', 'page.upstream.form.item.extra-message.node.domain.or.ip': From 6749ff02184e1cf8a7c42f2de22e8c62b98d9edd Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 20 Mar 2021 22:02:01 +0800 Subject: [PATCH 02/16] test: fix the upstream option ci --- .../route/can-skip-upstream-when-select-service-id.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 8b7e2f6da7..2085aa5028 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -58,7 +58,7 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.name).type(this.data.routeName); cy.contains('Next').click(); cy.get(this.domSelector.upstreamSelector).click(); - cy.contains('None').should('not.exist'); + cy.contains('None').should('exist'); cy.contains('Previous').click(); cy.contains('None').click(); @@ -89,7 +89,7 @@ context('Can select service_id skip upstream in route', () => { cy.contains('None').click(); cy.contains('Next').click(); cy.get(this.domSelector.upstream_id).click(); - cy.contains('None').should('not.exist'); + cy.contains('None').should('exist'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); cy.contains('Next').click(); From 7abb013b62d74e301f40d9817d76fa27c029e840 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Fri, 26 Mar 2021 09:59:26 +0800 Subject: [PATCH 03/16] feat: add the service page upstream select option --- web/src/components/Upstream/UpstreamForm.tsx | 7 +++---- web/src/pages/Service/components/Step1.tsx | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 6871b6ca10..f4666ec127 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -661,15 +661,14 @@ const UpstreamForm: React.FC = forwardRef( item?.children.toLowerCase().includes(input.toLowerCase()) } > - {Boolean(!required) && None} + {Boolean(!required) && { + formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) + }} {[ { name: formatMessage({ id: 'page.upstream.step.select.upstream.select.option' }), id: '', }, - { - name: formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }), - }, ...list, ].map((item) => ( diff --git a/web/src/pages/Service/components/Step1.tsx b/web/src/pages/Service/components/Step1.tsx index e904a577dd..b7f3eb2a36 100644 --- a/web/src/pages/Service/components/Step1.tsx +++ b/web/src/pages/Service/components/Step1.tsx @@ -54,7 +54,7 @@ const Step1: React.FC = ({ Date: Fri, 26 Mar 2021 10:37:17 +0800 Subject: [PATCH 04/16] feat: adjust the option value field --- web/src/components/Upstream/UpstreamForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index f4666ec127..7a2a4c3f6c 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -661,7 +661,7 @@ const UpstreamForm: React.FC = forwardRef( item?.children.toLowerCase().includes(input.toLowerCase()) } > - {Boolean(!required) && { + {Boolean(!required) && { formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) }} {[ From 125518a7a50fbb9c416bd9e5ee28b04de0911149 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 27 Mar 2021 11:06:15 +0800 Subject: [PATCH 05/16] test: fix the select option test case --- .../route/can-skip-upstream-when-select-service-id.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 2085aa5028..8b7e2f6da7 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -58,7 +58,7 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.name).type(this.data.routeName); cy.contains('Next').click(); cy.get(this.domSelector.upstreamSelector).click(); - cy.contains('None').should('exist'); + cy.contains('None').should('not.exist'); cy.contains('Previous').click(); cy.contains('None').click(); @@ -89,7 +89,7 @@ context('Can select service_id skip upstream in route', () => { cy.contains('None').click(); cy.contains('Next').click(); cy.get(this.domSelector.upstream_id).click(); - cy.contains('None').should('exist'); + cy.contains('None').should('not.exist'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); cy.contains('Next').click(); From 75fb1b503e68baab01043d86855fd66e53dab23f Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sun, 28 Mar 2021 12:02:44 +0800 Subject: [PATCH 06/16] test: fix the select option test case --- .../route/can-skip-upstream-when-select-service-id.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 8b7e2f6da7..4a90d54507 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -89,7 +89,7 @@ context('Can select service_id skip upstream in route', () => { cy.contains('None').click(); cy.contains('Next').click(); cy.get(this.domSelector.upstream_id).click(); - cy.contains('None').should('not.exist'); + cy.contains('None').should('be.visible'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); cy.contains('Next').click(); From 68ad8ac31461b18073884e48b81981ee5ddffc06 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Fri, 2 Apr 2021 18:49:31 +0800 Subject: [PATCH 07/16] test: fix ci error --- .../route/can-skip-upstream-when-select-service-id.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 222b4412d4..f2a313a925 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -88,8 +88,6 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.serviceSelector).click(); cy.contains('None').click(); cy.contains('Next').click(); - cy.get(this.domSelector.upstream_id).click(); - cy.contains('None').should('be.visible'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); cy.contains('Next').click(); From 5e9fc281b1fec95f2179f761d6df77a443126272 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Tue, 6 Apr 2021 18:12:40 +0800 Subject: [PATCH 08/16] fix: fix create service with None upstream error --- .../route/can-skip-upstream-when-select-service-id.spec.js | 2 ++ web/src/pages/Service/Create.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index f2a313a925..9ec4c79b74 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -88,6 +88,8 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.serviceSelector).click(); cy.contains('None').click(); cy.contains('Next').click(); + cy.get(this.domSelector.upstream_id).click(); + cy.contains('None').should('not.exist'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); cy.contains('Next').click(); diff --git a/web/src/pages/Service/Create.tsx b/web/src/pages/Service/Create.tsx index 201c3ddbe2..914edc9395 100644 --- a/web/src/pages/Service/Create.tsx +++ b/web/src/pages/Service/Create.tsx @@ -73,7 +73,7 @@ const Page: React.FC = (props) => { const upstreamFormData = upstreamRef.current?.getData(); if (!upstreamFormData.upstream_id) { data.upstream = upstreamFormData; - } else { + } else if (upstreamFormData.upstream_id !== 'None') { data.upstream_id = upstreamFormData.upstream_id; } From 169fcf3894a4c5ec9cdf1eb7f51399dcf49f0466 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Thu, 8 Apr 2021 08:11:06 +0800 Subject: [PATCH 09/16] test: fix the select option test case --- web/src/components/Upstream/UpstreamForm.tsx | 6 +++--- web/src/pages/Service/components/Step1.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/Upstream/UpstreamForm.tsx b/web/src/components/Upstream/UpstreamForm.tsx index 7a2a4c3f6c..dcb82e4deb 100644 --- a/web/src/components/Upstream/UpstreamForm.tsx +++ b/web/src/components/Upstream/UpstreamForm.tsx @@ -661,9 +661,6 @@ const UpstreamForm: React.FC = forwardRef( item?.children.toLowerCase().includes(input.toLowerCase()) } > - {Boolean(!required) && { - formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) - }} {[ { name: formatMessage({ id: 'page.upstream.step.select.upstream.select.option' }), @@ -675,6 +672,9 @@ const UpstreamForm: React.FC = forwardRef( {item.name} ))} + {Boolean(!required) && { + formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) + }} )} diff --git a/web/src/pages/Service/components/Step1.tsx b/web/src/pages/Service/components/Step1.tsx index b7f3eb2a36..e904a577dd 100644 --- a/web/src/pages/Service/components/Step1.tsx +++ b/web/src/pages/Service/components/Step1.tsx @@ -54,7 +54,7 @@ const Step1: React.FC = ({ Date: Fri, 9 Apr 2021 21:37:22 +0800 Subject: [PATCH 10/16] test: fix ci error --- .../route/can-skip-upstream-when-select-service-id.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 9ec4c79b74..a3ee22d568 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -71,7 +71,7 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.input).should('be.disabled'); cy.contains(this.data.upstreamName).click(); - cy.contains('None').click(); + cy.contains('None').click({ force: true }); cy.contains('Next').click(); cy.contains('Next').click(); cy.contains('Submit').click(); @@ -88,7 +88,7 @@ context('Can select service_id skip upstream in route', () => { cy.get(this.domSelector.serviceSelector).click(); cy.contains('None').click(); cy.contains('Next').click(); - cy.get(this.domSelector.upstream_id).click(); + cy.get(this.domSelector.upstream_id).click({ force: true }); cy.contains('None').should('not.exist'); cy.contains(this.data.upstreamName).click(); cy.contains('Next').click(); From f5f1a8d06f6321e0f10b38175861537169aa80f4 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Tue, 13 Apr 2021 18:58:23 +0800 Subject: [PATCH 11/16] feat: add the service page upstream select option --- web/src/components/Upstream/components/UpstreamSelector.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/Upstream/components/UpstreamSelector.tsx b/web/src/components/Upstream/components/UpstreamSelector.tsx index 1f8b2254e9..896cca80fe 100644 --- a/web/src/components/Upstream/components/UpstreamSelector.tsx +++ b/web/src/components/Upstream/components/UpstreamSelector.tsx @@ -49,7 +49,6 @@ const Component: React.FC = ({ shouldUpdate, onChange, list = [], disable item?.children.toLowerCase().includes(input.toLowerCase()) } > - {Boolean(!required) && None} {[ { name: formatMessage({ id: 'page.upstream.step.select.upstream.select.option' }), @@ -61,6 +60,9 @@ const Component: React.FC = ({ shouldUpdate, onChange, list = [], disable {item.name} ))} + { + formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) + } ) From aeb72f94aa2cf234ee3321da0753fa9599fb4650 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Tue, 13 Apr 2021 20:17:38 +0800 Subject: [PATCH 12/16] feat: add the service page upstream select option --- web/src/components/Upstream/components/UpstreamSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/Upstream/components/UpstreamSelector.tsx b/web/src/components/Upstream/components/UpstreamSelector.tsx index 896cca80fe..bf4d3c544c 100644 --- a/web/src/components/Upstream/components/UpstreamSelector.tsx +++ b/web/src/components/Upstream/components/UpstreamSelector.tsx @@ -60,7 +60,7 @@ const Component: React.FC = ({ shouldUpdate, onChange, list = [], disable {item.name} ))} - { + { formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) } From bfd1f7f7c09aafe77f0d24693513519eb287a57e Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 24 Apr 2021 17:26:58 +0800 Subject: [PATCH 13/16] test: fix ci error --- .../route/can-skip-upstream-when-select-service-id.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index de985d31b8..85db9b770d 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -90,7 +90,7 @@ context('Can select service_id skip upstream in route', () => { cy.contains('Search').click(); cy.contains(this.data.routeName).siblings().contains('Configure').click(); cy.get(this.domSelector.serviceSelector).click(); - cy.contains('None').click(); + cy.contains('None').click({ force: true }); cy.get(this.domSelector.notification).should('contain', 'Please check the configuration of binding service'); cy.get(this.domSelector.notificationCloseIcon).click(); From a9a401ee50e626a16e009650af88a9a4603c0658 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 24 Apr 2021 18:38:26 +0800 Subject: [PATCH 14/16] test: fix ci error --- .../route/can-skip-upstream-when-select-service-id.spec.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 85db9b770d..72f995470e 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -90,10 +90,7 @@ context('Can select service_id skip upstream in route', () => { cy.contains('Search').click(); cy.contains(this.data.routeName).siblings().contains('Configure').click(); cy.get(this.domSelector.serviceSelector).click(); - cy.contains('None').click({ force: true }); - cy.get(this.domSelector.notification).should('contain', 'Please check the configuration of binding service'); - cy.get(this.domSelector.notificationCloseIcon).click(); - + cy.contains('None').click(); cy.contains('Next').click(); cy.wait(500); cy.get('[data-cy=upstream_selector]').click(); From 0fe93b20bd1f13191b0e7e73d64929b27db4f48a Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sat, 24 Apr 2021 20:17:59 +0800 Subject: [PATCH 15/16] feat: change the en-US locales --- web/src/pages/Upstream/locales/en-US.ts | 3 +-- web/src/pages/Upstream/locales/zh-CN.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/pages/Upstream/locales/en-US.ts b/web/src/pages/Upstream/locales/en-US.ts index 02b4e725b9..52bf3a6a83 100644 --- a/web/src/pages/Upstream/locales/en-US.ts +++ b/web/src/pages/Upstream/locales/en-US.ts @@ -18,8 +18,7 @@ export default { 'page.upstream.step.select.upstream': 'Select Upstream', 'page.upstream.step.select.upstream.select.option': 'Custom', 'page.upstream.step.select.upstream.select.none': 'None', - 'page.upstream.form.item-label.node.domain.or.ip': 'Node List', - 'page.upstream.step.backend.server.domain.or.ip': 'Backend Server Domain/IP', + 'page.upstream.step.backend.server.domain.or.ip': 'Backend Server Host/IP', 'page.upstream.form.item-label.node.domain.or.ip': 'Targets', 'page.upstream.step.input.domain.name.or.ip': 'Please enter domain or IP', 'page.upstream.step.valid.domain.name.or.ip': 'Please enter valid a domain or IP', diff --git a/web/src/pages/Upstream/locales/zh-CN.ts b/web/src/pages/Upstream/locales/zh-CN.ts index 64ca129b5c..defb9d9b27 100644 --- a/web/src/pages/Upstream/locales/zh-CN.ts +++ b/web/src/pages/Upstream/locales/zh-CN.ts @@ -18,7 +18,6 @@ export default { 'page.upstream.step.select.upstream': '选择上游服务', 'page.upstream.step.select.upstream.select.option': '手动填写', 'page.upstream.step.select.upstream.select.none': '无', - 'page.upstream.form.item-label.node.domain.or.ip': '上游节点', 'page.upstream.step.backend.server.domain.or.ip': '后端服务域名或 IP', 'page.upstream.form.item-label.node.domain.or.ip': '目标节点', 'page.upstream.step.input.domain.name.or.ip': '请输入域名或 IP', From cfe100c58547e45e4009870974dc65ae5cf646d0 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Wed, 28 Apr 2021 22:19:00 +0800 Subject: [PATCH 16/16] fix: create service when select upstream None error --- .../Upstream/components/UpstreamSelector.tsx | 3 --- web/src/pages/Service/Create.tsx | 13 ++++++------- web/src/pages/Service/components/Step1.tsx | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/web/src/components/Upstream/components/UpstreamSelector.tsx b/web/src/components/Upstream/components/UpstreamSelector.tsx index 218193367c..34f7fec16b 100644 --- a/web/src/components/Upstream/components/UpstreamSelector.tsx +++ b/web/src/components/Upstream/components/UpstreamSelector.tsx @@ -59,9 +59,6 @@ const UpstreamSelector: React.FC = ({ onChange, list = [], disabled, requ {item.name} ))} - { - formatMessage({ id: 'page.upstream.step.select.upstream.select.none' }) - } ) diff --git a/web/src/pages/Service/Create.tsx b/web/src/pages/Service/Create.tsx index 4c56f7a566..04ad579163 100644 --- a/web/src/pages/Service/Create.tsx +++ b/web/src/pages/Service/Create.tsx @@ -51,10 +51,12 @@ const Page: React.FC = (props) => { fetchItem(serviceId).then(({ data }) => { if (data.upstream_id) { upstreamForm.setFieldsValue({ upstream_id: data.upstream_id }) - } - if (data.upstream) { + } else if (data.upstream) { upstreamForm.setFieldsValue(convertToFormData(data.upstream)) + } else { + upstreamForm.setFieldsValue({ upstream_id: 'None' }) } + form.setFieldsValue(omit(data, ['upstream_id', 'upstream', 'plugins'])); setPlugins(data.plugins || {}); }); @@ -68,12 +70,9 @@ const Page: React.FC = (props) => { }; const upstreamFormData = upstreamRef.current?.getData(); - if (!upstreamFormData) { - return - } - if (!upstreamFormData.upstream_id) { + if (!upstreamFormData?.upstream_id) { data.upstream = upstreamFormData; - } else if (upstreamFormData.upstream_id !== 'None') { + } else { data.upstream_id = upstreamFormData.upstream_id; } diff --git a/web/src/pages/Service/components/Step1.tsx b/web/src/pages/Service/components/Step1.tsx index 3817456fc9..0577e69d59 100644 --- a/web/src/pages/Service/components/Step1.tsx +++ b/web/src/pages/Service/components/Step1.tsx @@ -59,7 +59,7 @@ const Step1: React.FC = ({