This is an automated email from the ASF dual-hosted git repository.

dengliming 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 7b556455 fixed #455 (#456)
7b556455 is described below

commit 7b556455c84737cdfb79c3299565ae18371da565
Author: Kerwin Bryant <[email protected]>
AuthorDate: Tue May 28 12:42:33 2024 +0800

    fixed #455 (#456)
---
 src/routes/Plugin/Common/Selector.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/routes/Plugin/Common/Selector.js 
b/src/routes/Plugin/Common/Selector.js
index 309e73c1..9431d2ec 100644
--- a/src/routes/Plugin/Common/Selector.js
+++ b/src/routes/Plugin/Common/Selector.js
@@ -192,6 +192,14 @@ class AddModal extends Component {
           selectValue !== "0" && this.checkConditions(selectorConditions);
         if (mySubmit || selectValue === "0") {
           if (isDiscovery) {
+            if (
+              new Set(upstreams.map((item) => item.url)).size !==
+              upstreams.length
+            ) {
+              message.destroy();
+              message.error(`Contains duplicate urls`);
+              return;
+            }
             // The discoveryProps refer to the attributes corresponding to 
each registration center mode
             const discoveryPropsJson = {};
             Object.entries(configPropsJson).forEach(([key]) => {

Reply via email to