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/07/21 00:12:50 UTC
[apisix-dashboard] branch master updated: feat: set a initial
weight value for the upstream node (#1979)
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 c01fd52 feat: set a initial weight value for the upstream node (#1979)
c01fd52 is described below
commit c01fd52e8a3fc47b528a672f3bb5b1092ddb89e6
Author: okaybase <75...@users.noreply.github.com>
AuthorDate: Wed Jul 21 08:12:43 2021 +0800
feat: set a initial weight value for the upstream node (#1979)
Co-authored-by: lixingwang <li...@yiche.com>
---
web/cypress/integration/route/import_export_route.spec.js | 2 +-
web/src/components/Upstream/components/Nodes.tsx | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/cypress/integration/route/import_export_route.spec.js b/web/cypress/integration/route/import_export_route.spec.js
index 7e841d7..17e3afc 100644
--- a/web/cypress/integration/route/import_export_route.spec.js
+++ b/web/cypress/integration/route/import_export_route.spec.js
@@ -84,7 +84,7 @@ context('import and export routes', () => {
// input nodes_0_host, click Next
cy.get(selector.nodes_0_host).type(data[`upstream_node0_host_${i}`]);
cy.get(selector.nodes_0_port).type(data.port);
- cy.get(selector.nodes_0_weight).type(data.weight);
+ cy.get(selector.nodes_0_weight).clear().type(data.weight);
cy.contains(actionBarUS['component.actionbar.button.nextStep']).click();
// do not config plugins, click Next
cy.contains(actionBarUS['component.actionbar.button.nextStep']).click();
diff --git a/web/src/components/Upstream/components/Nodes.tsx b/web/src/components/Upstream/components/Nodes.tsx
index 50fabd3..4b95c5a 100644
--- a/web/src/components/Upstream/components/Nodes.tsx
+++ b/web/src/components/Upstream/components/Nodes.tsx
@@ -95,6 +95,7 @@ const Component: React.FC<Props> = ({ readonly }) => {
message: formatMessage({ id: 'page.upstream.step.input.weight' }),
},
]}
+ initialValue={1}
>
<InputNumber
placeholder={formatMessage({ id: 'page.upstream.step.weight' })}