From 576bf8b41e2e7c56a3f300c6fb099ca4edb0a8e2 Mon Sep 17 00:00:00 2001
From: scwlkq <89067331+scwlkq@users.noreply.github.com>
Date: Fri, 29 Mar 2024 15:54:42 +0800
Subject: [PATCH] [ISSUE #45] Implement methods from
storage-plugin.admin(rocketmq) (#66)
* modify RocketmqTopicCore, using SDKManager
* fix style
* delete some variable in RocketmqProperties and TopicProperties & remote additional endPoint name
* remove junit dependency back to console module
* remove unnecessary brackets & revert em-dashboard-pom.xml & move RocketmqProperties to core.dto
* add todo
* move todo to common sdk dependencies & fix style
* add test and junit dependencies in core pom.xml
* revert the indentation in pom.xml & move test related dependencies to bottom in core-pom.xml
* revert indentation in pom.xml
* revert indentation in pom.xml
* remove unnecessary params
* remove params
* remove empty line
---
eventmesh-dashboard-common/pom.xml | 24 ++++
eventmesh-dashboard-console/pom.xml | 53 +++-----
.../console/controller/TopicController.java | 4 +-
eventmesh-dashboard-core/pom.xml | 13 ++
.../function/SDK/AbstractSDKOperation.java | 2 +-
.../core}/function/SDK/SDKManager.java | 20 ++-
.../core}/function/SDK/SDKOperation.java | 4 +-
.../core}/function/SDK/SDKTypeEnum.java | 2 +-
.../SDK/config/CreateNacosConfig.java | 2 +-
.../SDK/config/CreateRedisConfig.java | 2 +-
.../SDK/config/CreateRocketmqConfig.java | 2 +-
.../function/SDK/config/CreateSDKConfig.java | 2 +-
.../SDK/operation/EtcdSDKOperation.java | 6 +-
.../operation/NacosConfigSDKOperation.java | 8 +-
.../operation/NacosNamingSDKOperation.java | 8 +-
.../SDK/operation/NacosSDKOperation.java | 8 +-
.../SDK/operation/RedisSDKOperation.java | 8 +-
.../RocketMQProduceSDKOperation.java | 8 +-
.../RocketMQPushConsumerSDKOperation.java | 8 +-
.../RocketMQRemotingSDKOperation.java | 6 +-
.../SDK/operation/RuntimeSDKOperation.java | 6 +-
.../function/SDK/wrapper/NacosSDKWrapper.java | 2 +-
.../core/store/RocketmqTopicCore.java | 126 ++++++++++++++++--
.../core}/function/SDK/SDKManagerTest.java | 7 +-
.../RedisSDKCreateOperationTest.java | 6 +-
.../service/dto/RocketmqProperties.java | 34 +++++
.../service/dto}/TopicProperties.java | 19 +--
.../dashboard/service/store/TopicCore.java | 11 +-
pom.xml | 1 +
29 files changed, 270 insertions(+), 132 deletions(-)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/AbstractSDKOperation.java (94%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/SDKManager.java (83%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/SDKOperation.java (88%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/SDKTypeEnum.java (94%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/config/CreateNacosConfig.java (93%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/config/CreateRedisConfig.java (93%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/config/CreateRocketmqConfig.java (95%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/config/CreateSDKConfig.java (93%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/EtcdSDKOperation.java (82%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/NacosConfigSDKOperation.java (86%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/NacosNamingSDKOperation.java (86%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/NacosSDKOperation.java (87%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RedisSDKOperation.java (82%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RocketMQProduceSDKOperation.java (85%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RocketMQPushConsumerSDKOperation.java (86%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RocketMQRemotingSDKOperation.java (87%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RuntimeSDKOperation.java (82%)
rename {eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core}/function/SDK/wrapper/NacosSDKWrapper.java (94%)
rename {eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core}/function/SDK/SDKManagerTest.java (90%)
rename {eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console => eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core}/function/SDK/operation/RedisSDKCreateOperationTest.java (91%)
create mode 100644 eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/dto/RocketmqProperties.java
rename {eventmesh-dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/model => eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/dto}/TopicProperties.java (66%)
diff --git a/eventmesh-dashboard-common/pom.xml b/eventmesh-dashboard-common/pom.xml
index 108b059b..d6c277c5 100644
--- a/eventmesh-dashboard-common/pom.xml
+++ b/eventmesh-dashboard-common/pom.xml
@@ -40,6 +40,30 @@
fastjson2
2.0.40
+
+
+
+
+ io.lettuce
+ lettuce-core
+
+
+
+ com.alibaba.nacos
+ nacos-client
+ ${nacos.version}
+
+
+
+ org.apache.rocketmq
+ rocketmq-client
+ ${rocketmq.version}
+
+
+ org.apache.rocketmq
+ rocketmq-tools
+ ${rocketmq.version}
+
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/pom.xml b/eventmesh-dashboard-console/pom.xml
index 231d865c..c68e5a8e 100644
--- a/eventmesh-dashboard-console/pom.xml
+++ b/eventmesh-dashboard-console/pom.xml
@@ -37,6 +37,19 @@
spring-aspects
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ junit
+ junit
+ 4.13.2
+ test
+
+
org.springdoc
@@ -59,19 +72,13 @@
org.mybatis.spring.boot
mybatis-spring-boot-starter
+
com.mysql
mysql-connector-j
runtime
-
-
- com.alibaba.nacos
- nacos-client
- ${nacos.version}
-
-
@@ -93,38 +100,8 @@
-
-
- io.lettuce
- lettuce-core
-
-
-
- org.apache.rocketmq
- rocketmq-client
- 4.9.4
-
-
- org.apache.rocketmq
- rocketmq-tools
- 5.2.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
- junit
- junit
- 4.13.2
- test
-
+
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java
index 1f6c601b..c8f92ff8 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java
+++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java
@@ -18,9 +18,9 @@
package org.apache.eventmesh.dashboard.console.controller;
import org.apache.eventmesh.dashboard.common.dto.Result;
-import org.apache.eventmesh.dashboard.common.model.TopicProperties;
import org.apache.eventmesh.dashboard.console.dto.CreateTopicRequest;
import org.apache.eventmesh.dashboard.console.dto.DeleteTopicRequest;
+import org.apache.eventmesh.dashboard.service.dto.TopicProperties;
import org.apache.eventmesh.dashboard.service.store.TopicCore;
import java.util.List;
@@ -61,7 +61,7 @@ public ResponseEntity