From c093e8144ec04c54482da53d9877a9629e62f934 Mon Sep 17 00:00:00 2001
From: eurecalulu <1534972955@qq.com>
Date: Tue, 25 Jul 2023 12:37:20 +0800
Subject: [PATCH 1/3] fix: warning message display error
---
src/models/plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/models/plugin.js b/src/models/plugin.js
index 4841c4a76..08b9eb2ae 100644
--- a/src/models/plugin.js
+++ b/src/models/plugin.js
@@ -152,7 +152,7 @@ export default {
message.success(getIntlContent("SHENYU.COMMON.RESPONSE.ADD.SUCCESS"));
callback(json)
} else {
- message.warn(json.message.split(":")[1]);
+ message.warn(json.message);
}
}
From 26ee95950ea2e0cd5673197c418f3bef6ae589ae Mon Sep 17 00:00:00 2001
From: eurecalulu <1534972955@qq.com>
Date: Tue, 25 Jul 2023 13:05:51 +0800
Subject: [PATCH 2/3] refactor: add popconfirm when deleting the selector
---
src/locales/en-US.json | 1 +
src/locales/zh-CN.json | 1 +
src/routes/Plugin/Discovery/TcpCard.js | 18 ++++++++++++++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index e63116466..4aef94ec3 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -388,5 +388,6 @@
"SHENYU.DISCOVERY.SELECTOR.UPSTREAM.DateUpdated": "DateUpdated",
"SHENYU.DISCOVERY.SELECTOR.CONFIG.BASIC": "Basic Config",
"SHENYU.DISCOVERY.SELECTOR.CONFIG.DISCOVERY": "Discovery Config",
+ "SHENYU.DISCOVERY.SELECTOR.DELETE.CONFIRM": "Are you sure to delete this selector?",
"SHENYU.COMMON.REFRESH": "Refresh"
}
diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json
index e8bd8240c..34d926f38 100644
--- a/src/locales/zh-CN.json
+++ b/src/locales/zh-CN.json
@@ -375,5 +375,6 @@
"SHENYU.DISCOVERY.SELECTOR.UPSTREAM.DateUpdated": "更新时间",
"SHENYU.DISCOVERY.SELECTOR.CONFIG.BASIC": "基本配置",
"SHENYU.DISCOVERY.SELECTOR.CONFIG.DISCOVERY": "服务发现",
+ "SHENYU.DISCOVERY.SELECTOR.DELETE.CONFIRM": "确定删除该选择器吗?",
"SHENYU.COMMON.REFRESH": "刷新"
}
diff --git a/src/routes/Plugin/Discovery/TcpCard.js b/src/routes/Plugin/Discovery/TcpCard.js
index 15cc0b2ae..2a8408fce 100644
--- a/src/routes/Plugin/Discovery/TcpCard.js
+++ b/src/routes/Plugin/Discovery/TcpCard.js
@@ -16,7 +16,7 @@
*/
import React, {Component} from "react";
-import {Card, Popover, Typography, Skeleton, Icon} from "antd";
+import {Card, Popover, Typography, Skeleton, Icon, Popconfirm} from "antd";
import {getIntlContent} from "../../../utils/IntlUtils";
import tcpStyles from "./tcp.less";
@@ -75,9 +75,19 @@ export class TcpCard extends Component {