[ISSUE #15] Set up core module and ASF License (#12)
* Set up CI
* Add LICENSE
* Add CheckStyle
* Set up DB
* Add druid StatFilter controller
* sync CI change in https://github.com/apache/eventmesh/pull/4722
* fix(*)1. 完成项目设计 2. 完成项目与模块搭建
* Supplement module dependency relation and fix project info
* Move original Admin into Core & rewrite dependencies
---------
Co-authored-by: laohu <2732554140@qq.com>
diff --git a/.asf.yaml b/.asf.yaml
deleted file mode 100644
index ec35b20..0000000
--- a/.asf.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-github:
- description: EventMesh dashboard
- features:
- # Enable issue management
- issues: true
- # Enable wiki
- wiki: true
- homepage: https://eventmesh.apache.org/
- labels:
- - pubsub
- enabled_merge_buttons:
- squash: true
- merge: true
- rebase: false
- protected_branches:
- main:
- required_status_checks:
- strict: true
- required_pull_request_reviews:
- dismiss_stale_reviews: true
- required_approving_review_count: 1
-notifications:
- commits: commits@eventmesh.apache.org
- # Send all issue emails (new, closed, comments) to issues@
- issues: issues@eventmesh.apache.org
- # Send new/closed PR notifications to dev@
- pullrequests_status: dev@eventmesh.apache.org
- # Send individual PR comments/reviews to issues@
- pullrequests_comment: issues@eventmesh.apache.org
- jira_options: link label worklog
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..b27bb30
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+*.sh text eol=lf
+gradlew text eol=lf
+*.{cmd,[cC][mM][dD]} text eol=crlf
+*.{bat,[bB][aA][tT]} text eol=crlf
\ No newline at end of file
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2c833..e8c512e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -16,11 +16,11 @@
# specific language governing permissions and limitations
# under the License.
#
-name: Build
+name: Docker
on:
push:
- branches:
- - main
+ tags:
+ - 'v*'
jobs:
docker:
@@ -31,12 +31,20 @@
- name: Login to DockerHub
uses: docker/login-action@v2
with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
+ username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: |
+ apache/eventmesh-dashboard
+
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
- tags: apache/eventmesh-dashboard:latest
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile
context: .
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..dba06dc
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,55 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: "Continuous Integration"
+
+on:
+ push:
+ branches: [ '*' ]
+ pull_request:
+ branches: [ '*' ]
+
+jobs:
+ build:
+ name: Build
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ ubuntu-latest ]
+ java: [ 8 ]
+ language: ['java']
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Setup Gradle
+ uses: gradle/gradle-build-action@v2
+
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'corretto'
+ java-version: ${{ matrix.java }}
+
+ - name: Build
+ run: ./gradlew clean build bootJar --parallel --daemon
+ env:
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
diff --git a/.gitignore b/.gitignore
index b1f31d2..1098c79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,100 +1,45 @@
-.settings/
-.project
-.classpath
-.target
-./**/.settings/
-./**/.project
-./**/.classpath
-./**/target/
-
-
-#gitignore文件的内容
-.factorypath
-.DS_Store
-.project
-*.prefs
-.classpath
-.setting/h
-.settings/
-.idea/
-*.iml
-*.ipr
-*.iws
-logs/
-
-#忽略eclipse相关
-org.eclipse.core.resources.prefs
-org.eclipse.jdt.core.prefs
-org.eclipse.m2e.core.prefs
-org.eclipse.wst.common.component
-org.eclipse.wst.common.project.facet.core.xml
-
-#忽略java相关的文件
-*.class
-*.trc
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-#忽略maven相关的文件
-target/
-pom.xml.tag
-pom.xml.releaseBackup
-pom.xml.versionsBackup
-pom.xml.next
-release.properties
-dependency-reduced-pom.xml
-buildNumber.properties
-.mvn/timing.properties
-
-# Built application files
-*.apk
-*.ap_
-
-
-#忽略andriod相关的文件
-# Files for the Dalvik VM
-*.dex
-# Generated files
-bin/
-gen/
-# Gradle files
-.gradle/
+.gradle
build/
-*/build/
+!gradle/wrapper/gradle-wrapper.jar
+!**/src/main/**/build/
+!**/src/test/**/build/
-# Local configuration file (sdk path, etc)
-local.properties
-
-# Proguard folder generated by Eclipse
-proguard/
-# Log Files
-*.log
-# Android Studio Navigation editor temp files
-.navigation/
-# Android Studio captures folder
-captures/
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
+### STS ###
+.apt_generated
+.classpath
+./**/.classpath
+.factorypath
+.project
+./**/.project
+.settings
+./**/.settings/
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
### IntelliJ IDEA ###
-.idea/modules.xml
-.idea/jarRepositories.xml
-.idea/compiler.xml
-.idea/libraries/
+.idea
*.iws
*.iml
*.ipr
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
### Eclipse ###
.apt_generated
@@ -104,19 +49,37 @@
.settings
.springBeans
.sts4-cache
+org.eclipse.core.resources.prefs
+org.eclipse.jdt.core.prefs
+org.eclipse.m2e.core.prefs
+org.eclipse.wst.common.component
+org.eclipse.wst.common.project.facet.core.xml
+*.prefs
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
+### Java ###
+*.class
+*.trc
-### VS Code ###
-.vscode/
+### Package Files ###
+*.jar
+*.war
+*.ear
-### Mac OS ###
-.DS_Store
\ No newline at end of file
+### Maven ###
+.target
+target/
+./**/target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+
+### Log Files ###
+*.log
+logs/
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..910ee06
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache EventMesh
+Copyright 2021-2024 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 1d3574c..5c7eac2 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,45 @@
-
+# EventMesh Dashboard
## 介绍
-
## 业务架构
-
## 技术架构
-
### 模块依赖图
### 模块介绍
-1. eventmesh-dashboard-console 业务模块的代码
+1. eventmesh-dashboard-console 业务模块的代码,调用service接口
2. eventmesh-dashboard-observe 监控模块的代码
-3. eventmesh-dashboard-core 对eventmesh以及相关组件的代码
-4. eventmesh-dashboard-service 公用接口
+3. eventmesh-dashboard-core 对eventmesh以及相关组件的代码,提供service实现
+4. eventmesh-dashboard-service 公用API接口,对core的抽象
5. eventmesh-dashboard-common 公共模块的代码
6. eventmesh-dashboard-view 前端代码
-
### eventmesh-dashboard-core 介绍
+
+## Build
+
+### Build on source code
+
+```
+cd eventmesh-dashboard
+./gradlew clean bootJar
+```
+
+```
+java -jar build/libs/eventmesh-dashboard-0.0.1-SNAPSHOT.jar
+```
+
+### Build and Run with Docker
+
+```
+cd eventmesh-dashboard
+./gradlew clean bootJar
+docker build -t yourname/eventmesh-dashboard -f docker/Dockerfile .
+```
+
+```
+docker run -d --name eventmesh-dashboard -p 8080:8080 yourname/eventmesh-dashboard
+```
\ No newline at end of file
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..326c8b1
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:8-jdk
+VOLUME /tmp
+COPY build/libs/eventmesh-dashboard-*.jar eventmesh-dashboard.jar
+ENV JAVA_OPTS=""
+ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /eventmesh-dashboard.jar"]
diff --git a/eventmesh-dashboard-core/pom.xml b/eventmesh-dashboard-core/pom.xml
index 7192775..1f23357 100644
--- a/eventmesh-dashboard-core/pom.xml
+++ b/eventmesh-dashboard-core/pom.xml
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -8,14 +29,150 @@
<artifactId>eventmesh-dashboard</artifactId>
<version>0.0.1</version>
</parent>
-
<groupId>org.apache.eventmesh.dashboard.core</groupId>
<artifactId>eventmesh-dashboard-core</artifactId>
-
+ <version>0.0.1-SNAPSHOT</version>
+ <name>eventmesh-dashboard-core</name>
<properties>
- <maven.compiler.source>17</maven.compiler.source>
- <maven.compiler.target>17</maven.compiler.target>
+ <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <spring-boot.version>2.7.6</spring-boot.version>
</properties>
+ <dependencies>
+ <!-- versions managed by spring dependency management -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-devtools</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-configuration-processor</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- utility -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.13.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.alibaba.fastjson2</groupId>
+ <artifactId>fastjson2</artifactId>
+ <version>2.0.40</version>
+ </dependency>
+
+ <!-- swagger -->
+ <dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-ui</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-javadoc</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+
+ <!-- unit test -->
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>5.5.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- meta -->
+ <dependency>
+ <groupId>com.alibaba.nacos</groupId>
+ <artifactId>nacos-client</artifactId>
+ <version>2.2.4</version>
+ </dependency>
+
+ <!-- Event Store -->
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-client</artifactId>
+ <version>4.9.7</version>
+ </dependency>
+
+ <!-- Database -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>druid-spring-boot-starter</artifactId>
+ <version>1.2.21</version>
+ </dependency>
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-boot-starter</artifactId>
+ <version>3.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-dependencies</artifactId>
+ <version>${spring-boot.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>${spring-boot.version}</version>
+ <configuration>
+ <mainClass>org.apache.eventmesh.dashboard.core.EventMeshDashboardApplication</mainClass>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>repackage</id>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplication.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplication.java
new file mode 100644
index 0000000..7caeddb
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplication.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.core;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+
+@ServletComponentScan // Druid Monitor
+@SpringBootApplication
+public class EventMeshDashboardApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(EventMeshDashboardApplication.class, args);
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/AdminProperties.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/AdminProperties.java
new file mode 100644
index 0000000..efcb74c
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/AdminProperties.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.config;
+
+import org.apache.eventmesh.dashboard.constant.ConfigConst;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import lombok.Data;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = ConfigConst.ADMIN_PROPS_PREFIX)
+public class AdminProperties {
+
+ private MetaProperties meta = new MetaProperties();
+ private StoreProperties store = new StoreProperties();
+
+ @Data
+ public static class MetaProperties {
+
+ private String type = ConfigConst.META_TYPE_NACOS;
+ private NacosProperties nacos = new NacosProperties();
+ private EtcdProperties etcd = new EtcdProperties();
+ private int timeoutMs = 5000;
+
+ @Data
+ public static class NacosProperties {
+ private String addr = "127.0.0.1:8848";
+ private String namespace = "";
+ private boolean authEnabled = false;
+ private String protocol = "http";
+ private String username;
+ private String password;
+ private String accessKey;
+ private String secretKey;
+ }
+
+ @Data
+ public static class EtcdProperties {
+ private String addr;
+ }
+ }
+
+ @Data
+ public static class StoreProperties {
+
+ private String type = ConfigConst.STORE_TYPE_ROCKETMQ; // TODO should be standalone
+ private RocketMQProperties rocketmq = new RocketMQProperties();
+ private KafkaProperties kafka = new KafkaProperties();
+
+ @Data
+ public static class RocketMQProperties {
+ private String namesrvAddr;
+ private String clusterName = "";
+ private String accessKey = "";
+ private String secretKey = "";
+ }
+
+ @Data
+ public static class KafkaProperties {
+ private String namesrvAddr;
+ private int partitions = 1;
+ private int replicationFactors = 1;
+ }
+ }
+}
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/BeanTypeConfig.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/BeanTypeConfig.java
new file mode 100644
index 0000000..3a169f7
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/config/BeanTypeConfig.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.config;
+
+import org.apache.eventmesh.dashboard.constant.ConfigConst;
+import org.apache.eventmesh.dashboard.service.ConnectionService;
+import org.apache.eventmesh.dashboard.service.SubscriptionService;
+import org.apache.eventmesh.dashboard.service.TopicService;
+import org.apache.eventmesh.dashboard.service.meta.EtcdConnectionService;
+import org.apache.eventmesh.dashboard.service.meta.EtcdSubscriptionService;
+import org.apache.eventmesh.dashboard.service.meta.NacosConnectionService;
+import org.apache.eventmesh.dashboard.service.meta.NacosSubscriptionService;
+import org.apache.eventmesh.dashboard.service.store.RocketmqTopicService;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Use different registry SDK depending on the configured meta type;
+ * Use different storage SDK depending on the configured storage type.
+ */
+@Configuration
+public class BeanTypeConfig {
+
+ private final AdminProperties adminProperties;
+
+ public BeanTypeConfig(AdminProperties adminProperties) {
+ this.adminProperties = adminProperties;
+ }
+
+ @Bean
+ public ConnectionService connectionService() {
+ switch (adminProperties.getMeta().getType()) {
+ case ConfigConst.META_TYPE_NACOS:
+ return new NacosConnectionService(adminProperties);
+ case ConfigConst.META_TYPE_ETCD:
+ return new EtcdConnectionService();
+ default:
+ throw new IllegalArgumentException("Unsupported EventMesh Meta type: " + adminProperties.getMeta().getType());
+ }
+ }
+
+ @Bean
+ public SubscriptionService subscriptionService() {
+ switch (adminProperties.getMeta().getType()) {
+ case ConfigConst.META_TYPE_NACOS:
+ return new NacosSubscriptionService(adminProperties);
+ case ConfigConst.META_TYPE_ETCD:
+ return new EtcdSubscriptionService();
+ default:
+ throw new IllegalArgumentException("Unsupported EventMesh Meta type: " + adminProperties.getMeta().getType());
+ }
+ }
+
+ @Bean
+ public TopicService topicService() {
+ switch (adminProperties.getStore().getType()) {
+ case ConfigConst.STORE_TYPE_STANDALONE:
+ return null; // TODO StandaloneTopicService
+ case ConfigConst.STORE_TYPE_ROCKETMQ:
+ return new RocketmqTopicService(adminProperties);
+ case ConfigConst.STORE_TYPE_KAFKA:
+ return null; // TODO KafkaTopicService
+ default:
+ throw new IllegalArgumentException("Unsupported EventMesh Store type: " + adminProperties.getStore().getType());
+ }
+ }
+}
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/ConfigConst.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/ConfigConst.java
new file mode 100644
index 0000000..4932adf
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/ConfigConst.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.constant;
+
+public class ConfigConst {
+
+ // yml config
+ public static final String ADMIN_PROPS_PREFIX = "eventmesh";
+ public static final String META_TYPE_NACOS = "nacos";
+ public static final String META_TYPE_ETCD = "etcd";
+ public static final String STORE_TYPE_STANDALONE = "standalone";
+ public static final String STORE_TYPE_ROCKETMQ = "rocketmq";
+ public static final String STORE_TYPE_KAFKA = "kafka";
+
+ // Open-API
+ public static final String HTTP_PREFIX = "http://";
+ public static final String HTTPS_PREFIX = "https://";
+
+ // common
+ /**
+ * colon with space
+ */
+ public static final String COLON = ": ";
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/NacosConst.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/NacosConst.java
new file mode 100644
index 0000000..d0b027e
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/constant/NacosConst.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.constant;
+
+public class NacosConst {
+
+ public static final String LOGIN_API = "/nacos/v1/auth/login";
+
+ public static final String LOGIN_REQ_USERNAME = "username";
+ public static final String LOGIN_REQ_PASSWORD = "password";
+
+ public static final String LOGIN_RESP_TOKEN = "accessToken";
+
+ public static final String CONFIGS_API = "/nacos/v1/cs/configs";
+
+ public static final String CONFIGS_REQ_PAGE = "pageNo";
+ public static final String CONFIGS_REQ_PAGE_SIZE = "pageSize";
+ public static final String CONFIGS_REQ_DATAID = "dataId";
+ public static final String CONFIGS_REQ_GROUP = "group";
+ public static final String CONFIGS_REQ_SEARCH = "search";
+ public static final String CONFIGS_REQ_TOKEN = "accessToken";
+
+ public static final String CONFIGS_RESP_CONTENT_LIST = "pageItems"; // json page data list field
+ public static final String CONFIGS_RESP_CONTENT = "content"; // json page data field
+ public static final String CONFIGS_RESP_PAGES = "pagesAvailable"; // json total pages field
+ public static final String CONFIGS_RESP_DATAID = "dataId";
+ public static final String CONFIGS_RESP_GROUP = "group";
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java
new file mode 100644
index 0000000..b723e66
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.controller;
+
+import org.apache.eventmesh.dashboard.service.ConnectionService;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@RestController
+public class ConnectionController {
+
+ @Autowired
+ ConnectionService connectionService;
+
+ /**
+ * Query Connection List
+ * <p>
+ * The subscription information of SourceConnector and SinkConnector reported by EventMesh Runtime to the meta,
+ * containing the configuration of each connection.
+ *
+ * @param page the page number
+ * @param size the page size
+ * @return A paged list of connection configuration and total number of pages
+ */
+ @GetMapping("/connection")
+ public String listConnections(@RequestParam("page") Integer page, @RequestParam("size") String size) {
+ return null;
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java
new file mode 100644
index 0000000..dfe3a46
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.alibaba.druid.stat.DruidStatManagerFacade;
+
+@RestController
+public class MetricsController {
+ @GetMapping("/druid/stat")
+ public Object druidStat() {
+ return DruidStatManagerFacade.getInstance().getDataSourceStatDataList();
+ }
+}
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java
new file mode 100644
index 0000000..0ae0091
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.controller;
+
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.model.SubscriptionInfo;
+import org.apache.eventmesh.dashboard.service.SubscriptionService;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/api/v1")
+public class SubscriptionController {
+
+ @Autowired
+ SubscriptionService subscriptionService;
+
+ // the subscription dataId naming pattern of EventMesh clients: ip-protocol
+ private static final String CLIENT_DATA_ID_PATTERN = "*.*.*.*-*";
+
+ /**
+ * Retrieve the config content of a specified config.
+ *
+ * @param dataId nacos config data id (Exact Matching)
+ * @param group config group (Exact Matching)
+ * @return config content
+ */
+ @GetMapping("/subscription")
+ public Result<String> retrieveSubscription(@RequestParam("dataId") String dataId, @RequestParam("group") String group) {
+ return Result.success(subscriptionService.retrieveConfig(dataId, group));
+ }
+
+ /**
+ * Retrieve a list of configs.
+ *
+ * @param page page number
+ * @param size page size
+ * @param dataId nacos config data id (Fuzzy Matching)
+ * @param group config group (Fuzzy Matching)
+ * @return config properties and base64 encoded config content
+ */
+ @GetMapping("/subscriptions")
+ public Result<List<SubscriptionInfo>> listSubscriptions(
+ @RequestParam(name = "page", defaultValue = "1") Integer page,
+ @RequestParam(name = "size", defaultValue = "10") Integer size,
+ @RequestParam(name = "dataId", defaultValue = CLIENT_DATA_ID_PATTERN) String dataId,
+ @RequestParam(name = "group", defaultValue = "") String group) {
+ return Result.success(subscriptionService.retrieveConfigs(page, size, dataId, group));
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java
new file mode 100644
index 0000000..09d848c
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.controller;
+
+import org.apache.eventmesh.dashboard.dto.CreateTopicRequest;
+import org.apache.eventmesh.dashboard.dto.DeleteTopicRequest;
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.model.TopicProperties;
+import org.apache.eventmesh.dashboard.service.TopicService;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/topic")
+public class TopicController {
+
+ @Autowired
+ TopicService topicService;
+
+ /**
+ * TODO Is OPTIONS method and @CrossOrigin necessary?
+ */
+ @CrossOrigin
+ @RequestMapping(method = RequestMethod.OPTIONS)
+ public ResponseEntity<Object> preflight() {
+ return ResponseEntity.ok()
+ .header("Access-Control-Allow-Origin", "*")
+ .header("Access-Control-Allow-Methods", "*")
+ .header("Access-Control-Allow-Headers", "*")
+ .header("Access-Control-Max-Age", "86400")
+ .build();
+ }
+
+ @CrossOrigin
+ @GetMapping
+ public Result<List<TopicProperties>> getList() {
+ List<TopicProperties> topicList = topicService.getTopic();
+ return Result.success(topicList);
+ }
+
+ @CrossOrigin
+ @PostMapping
+ public Result<Object> create(@RequestBody CreateTopicRequest createTopicRequest) {
+ String topicName = createTopicRequest.getName();
+ topicService.createTopic(topicName);
+ return Result.success();
+ }
+
+ @CrossOrigin
+ @DeleteMapping
+ public Result<Object> delete(@RequestBody DeleteTopicRequest deleteTopicRequest) {
+ String topicName = deleteTopicRequest.getName();
+ topicService.deleteTopic(topicName);
+ return Result.success();
+ }
+}
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/CreateTopicRequest.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/CreateTopicRequest.java
new file mode 100644
index 0000000..2475a21
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/CreateTopicRequest.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.dto;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.Data;
+
+@Data
+public class CreateTopicRequest {
+
+ private String name;
+
+ @JsonCreator
+ public CreateTopicRequest(@JsonProperty("name") String name) {
+ super();
+ this.name = name;
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/DeleteTopicRequest.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/DeleteTopicRequest.java
new file mode 100644
index 0000000..094a008
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/DeleteTopicRequest.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.dto;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.Data;
+
+@Data
+public class DeleteTopicRequest {
+
+ private String name;
+
+ @JsonCreator
+ public DeleteTopicRequest(@JsonProperty("name") String name) {
+ super();
+ this.name = name;
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/Result.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/Result.java
new file mode 100644
index 0000000..50b90c1
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/dto/Result.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.dto;
+
+import static org.apache.eventmesh.dashboard.enums.Status.SUCCESS;
+
+import org.apache.eventmesh.dashboard.enums.Status;
+import org.apache.eventmesh.dashboard.exception.BaseException;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * A RESTful response DTO.
+ */
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class Result<T> {
+
+ private T data;
+
+ private Integer pages;
+
+ private StatusMessage message;
+
+ public Result(StatusMessage statusMessage) {
+ this.message = statusMessage;
+ }
+
+ public Result(T data, Integer pages) {
+ this.data = data;
+ this.pages = pages;
+ }
+
+ /**
+ * The request is valid and the result is wrapped in {@link Result}.
+ */
+ public static <T> Result<T> success() {
+ return new Result<>(new StatusMessage(SUCCESS));
+ }
+
+ public static <T> Result<T> success(Result<T> result) {
+ result.setMessage(new StatusMessage(SUCCESS));
+ return result;
+ }
+
+ public static <T> Result<T> success(T data) {
+ return new Result<>(data, null, new StatusMessage(SUCCESS));
+ }
+
+ /**
+ * The request is valid and the result is returned in {@link ResponseEntity}.
+ * Logic issues should use 422 Unprocessable Entity instead of 200 OK.
+ */
+ public static <T> ResponseEntity<Result<T>> ok() {
+ return ResponseEntity.ok(new Result<>(new StatusMessage(SUCCESS)));
+ }
+
+ public static <T> ResponseEntity<Result<T>> ok(Result<T> result) {
+ result.setMessage(new StatusMessage(SUCCESS));
+ return ResponseEntity.ok(result);
+ }
+
+ /**
+ * The request is invalid.
+ */
+ public static <T> ResponseEntity<Result<T>> badRequest(String message) {
+ return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new Result<>(new StatusMessage(message)));
+ }
+
+ /**
+ * The request is valid but cannot be processed due to business logic issues.
+ */
+ public static <T> ResponseEntity<Result<T>> unprocessable(String message) {
+ return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(new Result<>(new StatusMessage(message)));
+ }
+
+ /**
+ * Uncaught exception happened in EventMeshAdmin application.
+ */
+ public static <T> ResponseEntity<Result<T>> internalError(String message) {
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new Result<>(new StatusMessage(message)));
+ }
+
+ /**
+ * Upstream service unavailable such as Meta.
+ */
+ public static <T> ResponseEntity<Result<T>> badGateway(String message) {
+ return ResponseEntity.status(HttpStatus.BAD_GATEWAY).body(new Result<>(new StatusMessage(message)));
+ }
+
+ @Data
+ public static class StatusMessage {
+
+ private String status;
+
+ private String category;
+
+ private String desc;
+
+ public StatusMessage(BaseException e) {
+ this.status = e.getStatus().name();
+ this.category = e.getStatus().getCategory().name();
+ this.desc = e.getMessage();
+ }
+
+ /**
+ * Only recommended for returning successful results,
+ * the stack trace cannot be displayed when returning unsuccessful results.
+ */
+ public StatusMessage(Status status) {
+ this.status = status.name();
+ this.category = status.getCategory().name();
+ this.desc = status.getDesc(); // no stack trace
+ }
+
+ public StatusMessage(String desc) {
+ this.desc = desc;
+ }
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/enums/Status.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/enums/Status.java
new file mode 100644
index 0000000..958b3bb
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/enums/Status.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.enums;
+
+import static org.apache.eventmesh.dashboard.constant.ConfigConst.COLON;
+
+import org.springframework.http.HttpStatus;
+
+import lombok.Getter;
+
+/**
+ * An error enumeration class that conforms to the RESTful specifications and custom error reporting requirements.
+ * <ul>
+ * <li>The 'code' field is used to return the HTTP status code using {@link HttpStatus}.</li>
+ * <li>The 'category' field represents the major category of the error.</li>
+ * <li>the 'desc' field represents the detailed subcategory and information of the error.</li>
+ * </ul>
+ */
+
+@Getter
+public enum Status {
+
+ SUCCESS(HttpStatus.OK, Category.SUCCESS, "Operation success."),
+
+ NACOS_SDK_CONFIG_ERR(HttpStatus.INTERNAL_SERVER_ERROR, Category.SDK_CONFIG_ERR,
+ "Failed to create Nacos ConfigService. Please check EventMeshAdmin application configuration."),
+
+ NACOS_GET_CONFIGS_ERR(HttpStatus.BAD_GATEWAY, Category.META_COM_ERR, "Failed to retrieve Nacos config(s)."),
+
+ NACOS_EMPTY_RESP_ERR(HttpStatus.BAD_GATEWAY, Category.META_COM_ERR, "No result returned by Nacos. Please check Nacos."),
+
+ NACOS_LOGIN_ERR(HttpStatus.UNAUTHORIZED, Category.META_COM_ERR, "Nacos login failed."),
+
+ NACOS_LOGIN_EMPTY_RESP_ERR(HttpStatus.BAD_GATEWAY, Category.META_COM_ERR, "Nacos didn't return accessToken. Please check Nacos status."),
+ ;
+
+ // error code
+ private final HttpStatus code;
+
+ // error type
+ private final Category category;
+
+ // error message
+ private final String desc;
+
+ Status(HttpStatus code, Category category, String desc) {
+ this.code = code;
+ this.category = category;
+ this.desc = desc;
+ }
+
+ @Override
+ public String toString() {
+ return name() + " of " + category + COLON + desc;
+ }
+
+ @Getter
+ public enum Category {
+
+ SUCCESS("Successfully received and processed"),
+
+ SDK_CONFIG_ERR("The Meta SDK config in EventMeshAdmin application.yml error"),
+
+ META_COM_ERR("Network communication to Meta error"),
+ ;
+
+ /**
+ * Helpful for understanding and not used for now
+ */
+ private final String desc;
+
+ Category(String desc) {
+ this.desc = desc;
+ }
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/BaseException.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/BaseException.java
new file mode 100644
index 0000000..872ac4c
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/BaseException.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.exception;
+
+import static org.apache.eventmesh.dashboard.constant.ConfigConst.COLON;
+
+import org.apache.eventmesh.dashboard.enums.Status;
+import org.apache.eventmesh.dashboard.util.ExceptionUtil;
+
+import lombok.Getter;
+
+/**
+ * Exceptions in EventMeshAdmin application
+ */
+
+@Getter
+public class BaseException extends RuntimeException {
+
+ private static final long serialVersionUID = 3509261993355721168L;
+
+ private Status status;
+
+ public BaseException(String message) {
+ super(message);
+ }
+
+ /**
+ * Customized error reporting using enums and exceptions
+ */
+ public BaseException(Status status, Throwable cause) {
+ super(ExceptionUtil.trimDesc(status.getDesc()) + COLON + cause.getMessage(), cause);
+ this.status = status;
+ }
+
+ public BaseException(Status status) {
+ super(status.getDesc());
+ this.status = status;
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshAdminException.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshAdminException.java
new file mode 100644
index 0000000..d298a7e
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshAdminException.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.exception;
+
+import org.apache.eventmesh.dashboard.enums.Status;
+
+/**
+ * EventMeshAdmin Application side exception
+ */
+
+public class EventMeshAdminException extends BaseException {
+
+ private static final long serialVersionUID = 2002022502005456586L;
+
+ public EventMeshAdminException(String message) {
+ super(message);
+ }
+
+ /**
+ * Customized error reporting using enums and exceptions
+ */
+ public EventMeshAdminException(Status status, Throwable cause) {
+ super(status, cause);
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshException.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshException.java
new file mode 100644
index 0000000..9a835cd
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/EventMeshException.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.exception;
+
+/**
+ * EventMesh Runtime side exception
+ */
+
+public class EventMeshException extends BaseException {
+
+ private static final long serialVersionUID = 5648256502005456586L;
+
+ public EventMeshException(String message) {
+ super(message);
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/GlobalExceptionHandler.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/GlobalExceptionHandler.java
new file mode 100644
index 0000000..51a2def
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/GlobalExceptionHandler.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.exception;
+
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.dto.Result.StatusMessage;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * This class, in conjunction with {@linkplain org.apache.eventmesh.dashboard.enums.Status Status} and {@link BaseException},
+ * collectively implements customized error reporting.
+ */
+
+@Slf4j
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ExceptionHandler(BaseException.class)
+ public ResponseEntity<Result<Object>> baseHandler(BaseException e, HttpServletRequest request) {
+ String uri = request.getRequestURI();
+ log.error("RESTful API {} service error occurred, name: {}, category: {}",
+ uri, e.getStatus().name(), e.getStatus().getCategory().name(), e);
+ return ResponseEntity.status(e.getStatus().getCode()).body(new Result<>(new StatusMessage(e)));
+ }
+
+ @ExceptionHandler(RuntimeException.class)
+ public ResponseEntity<Result<Object>> runtimeHandler(RuntimeException e, HttpServletRequest request) {
+ String uri = request.getRequestURI();
+ log.error("RESTful API {} runtime error occurred.", uri, e);
+ return Result.internalError(e.getMessage());
+ }
+
+ @ExceptionHandler(Exception.class)
+ public ResponseEntity<Result<Object>> exceptionHandler(Exception e, HttpServletRequest request) {
+ String uri = request.getRequestURI();
+ log.error("RESTful API {} unknown error occurred.", uri, e);
+ return Result.internalError(e.getMessage());
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/MetaException.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/MetaException.java
new file mode 100644
index 0000000..54db37d
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/exception/MetaException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.exception;
+
+import org.apache.eventmesh.dashboard.enums.Status;
+
+/**
+ * Meta side exception with EventMeshAdmin Application
+ */
+
+public class MetaException extends BaseException {
+
+ private static final long serialVersionUID = 6246145526338359773L;
+
+ public MetaException(String message) {
+ super(message);
+ }
+
+ /**
+ * Customized error reporting using enums and exceptions
+ */
+ public MetaException(Status status, Throwable cause) {
+ super(status, cause);
+ }
+
+ public MetaException(Status status) {
+ super(status);
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/ConnectionInfo.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/ConnectionInfo.java
new file mode 100644
index 0000000..8b3c61d
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/ConnectionInfo.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.model;
+
+public class ConnectionInfo {
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/SubscriptionInfo.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/SubscriptionInfo.java
new file mode 100644
index 0000000..a7fbfb7
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/SubscriptionInfo.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.model;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class SubscriptionInfo {
+
+ // client name
+ private String clientName;
+
+ // group name
+ private String group;
+
+ // config content
+ private String subscription;
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/TopicProperties.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/TopicProperties.java
new file mode 100644
index 0000000..c001822
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/model/TopicProperties.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * One record displayed in 'Topic' page.
+ */
+
+public class TopicProperties {
+
+ public String name;
+ public long messageCount;
+
+ @JsonCreator
+ public TopicProperties(
+ @JsonProperty("name") String name,
+ @JsonProperty("messageCount") long messageCount) {
+ super();
+ this.name = name;
+ this.messageCount = messageCount;
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/ConnectionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/ConnectionService.java
new file mode 100644
index 0000000..db00467
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/ConnectionService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service;
+
+/**
+ * "Connection" refers to the subscription relationship between connectors.
+ * It focuses on the configuration deployed on the source and sink connectors themselves,
+ * reported by the connector.
+ */
+
+public interface ConnectionService {
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java
new file mode 100644
index 0000000..0927abf
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java
@@ -0,0 +1,7 @@
+package org.apache.eventmesh.dashboard.service;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/SubscriptionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/SubscriptionService.java
new file mode 100644
index 0000000..01ba3dd
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/SubscriptionService.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service;
+
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.model.SubscriptionInfo;
+
+import java.util.List;
+
+/**
+ * "Subscription" refers to the traditional MQ producer-consumer topic subscription relationship,
+ * emphasizing the subscription relationship between EventMesh clients (including SDK and connectors) and topics,
+ * reported by the EventMesh runtime.
+ */
+
+public interface SubscriptionService {
+
+ String retrieveConfig(String dataId, String group);
+
+ Result<List<SubscriptionInfo>> retrieveConfigs(Integer page, Integer size, String dataId, String group);
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/TopicService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/TopicService.java
new file mode 100644
index 0000000..f617a77
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/TopicService.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service;
+
+import org.apache.eventmesh.dashboard.model.TopicProperties;
+
+import java.util.List;
+
+/**
+ * Manage topics of eventmesh-storage-plugin (EventMesh Store).
+ */
+
+public interface TopicService {
+
+ /**
+ * TODO rename to getTopics after being implemented
+ */
+ List<TopicProperties> getTopic();
+
+ void createTopic(String topicName);
+
+ void deleteTopic(String topicName);
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdConnectionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdConnectionService.java
new file mode 100644
index 0000000..f55ad70
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdConnectionService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service.meta;
+
+import org.apache.eventmesh.dashboard.service.ConnectionService;
+
+import org.springframework.stereotype.Service;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Service
+public class EtcdConnectionService implements ConnectionService {
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdSubscriptionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdSubscriptionService.java
new file mode 100644
index 0000000..d5c024f
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/EtcdSubscriptionService.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service.meta;
+
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.model.SubscriptionInfo;
+import org.apache.eventmesh.dashboard.service.SubscriptionService;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Service
+public class EtcdSubscriptionService implements SubscriptionService {
+
+ @Override
+ public String retrieveConfig(String dataId, String group) {
+ return null;
+ }
+
+ @Override
+ public Result<List<SubscriptionInfo>> retrieveConfigs(Integer page, Integer size, String dataId, String group) {
+ return null;
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosConnectionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosConnectionService.java
new file mode 100644
index 0000000..8e10082
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosConnectionService.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service.meta;
+
+import org.apache.eventmesh.dashboard.config.AdminProperties;
+import org.apache.eventmesh.dashboard.service.ConnectionService;
+
+import org.springframework.stereotype.Service;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Service
+public class NacosConnectionService implements ConnectionService {
+
+ public NacosConnectionService(AdminProperties adminProperties) {
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosSubscriptionService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosSubscriptionService.java
new file mode 100644
index 0000000..09b675c
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/meta/NacosSubscriptionService.java
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service.meta;
+
+import static org.apache.eventmesh.dashboard.enums.Status.NACOS_EMPTY_RESP_ERR;
+import static org.apache.eventmesh.dashboard.enums.Status.NACOS_GET_CONFIGS_ERR;
+import static org.apache.eventmesh.dashboard.enums.Status.NACOS_LOGIN_EMPTY_RESP_ERR;
+import static org.apache.eventmesh.dashboard.enums.Status.NACOS_LOGIN_ERR;
+import static org.apache.eventmesh.dashboard.enums.Status.NACOS_SDK_CONFIG_ERR;
+
+import org.apache.eventmesh.dashboard.config.AdminProperties;
+import org.apache.eventmesh.dashboard.constant.ConfigConst;
+import org.apache.eventmesh.dashboard.constant.NacosConst;
+import org.apache.eventmesh.dashboard.dto.Result;
+import org.apache.eventmesh.dashboard.exception.EventMeshAdminException;
+import org.apache.eventmesh.dashboard.exception.MetaException;
+import org.apache.eventmesh.dashboard.model.SubscriptionInfo;
+import org.apache.eventmesh.dashboard.service.SubscriptionService;
+
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.alibaba.nacos.api.NacosFactory;
+import com.alibaba.nacos.api.PropertyKeyConst;
+import com.alibaba.nacos.api.config.ConfigService;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Service
+public class NacosSubscriptionService implements SubscriptionService {
+
+ AdminProperties adminProperties;
+
+ Properties nacosProps = new Properties();
+
+ RestTemplate restTemplate = new RestTemplate();
+
+ private static String HTTP_PREFIX = ConfigConst.HTTP_PREFIX;
+
+ public NacosSubscriptionService(AdminProperties adminProperties) {
+ this.adminProperties = adminProperties;
+
+ nacosProps.setProperty(PropertyKeyConst.SERVER_ADDR, adminProperties.getMeta().getNacos().getAddr());
+ nacosProps.setProperty(PropertyKeyConst.NAMESPACE, adminProperties.getMeta().getNacos().getNamespace());
+ if (adminProperties.getMeta().getNacos().isAuthEnabled()) {
+ if (!adminProperties.getMeta().getNacos().getUsername().isEmpty()) {
+ nacosProps.setProperty(PropertyKeyConst.USERNAME, adminProperties.getMeta().getNacos().getUsername());
+ }
+ if (!adminProperties.getMeta().getNacos().getPassword().isEmpty()) {
+ nacosProps.setProperty(PropertyKeyConst.PASSWORD, adminProperties.getMeta().getNacos().getPassword());
+ }
+ if (!adminProperties.getMeta().getNacos().getAccessKey().isEmpty()) {
+ nacosProps.setProperty(PropertyKeyConst.ACCESS_KEY, adminProperties.getMeta().getNacos().getAccessKey());
+ }
+ if (!adminProperties.getMeta().getNacos().getSecretKey().isEmpty()) {
+ nacosProps.setProperty(PropertyKeyConst.SECRET_KEY, adminProperties.getMeta().getNacos().getSecretKey());
+ }
+ }
+ if (adminProperties.getMeta().getNacos().getProtocol().equalsIgnoreCase("https")) {
+ HTTP_PREFIX = ConfigConst.HTTPS_PREFIX;
+ }
+ }
+
+ /**
+ * Retrieve a specified config with Nacos SDK.
+ */
+ @Override
+ public String retrieveConfig(String dataId, String group) {
+ ConfigService configService;
+ try {
+ configService = NacosFactory.createConfigService(nacosProps);
+ } catch (Exception e) {
+ log.error(NACOS_SDK_CONFIG_ERR.getDesc(), e);
+ throw new EventMeshAdminException(NACOS_SDK_CONFIG_ERR, e);
+ }
+ try {
+ return configService.getConfig(dataId, group, adminProperties.getMeta().getTimeoutMs());
+ } catch (Exception e) {
+ log.error(NACOS_GET_CONFIGS_ERR.getDesc(), e);
+ throw new MetaException(NACOS_GET_CONFIGS_ERR, e);
+ }
+ }
+
+ /**
+ * Retrieve a list of configs with Nacos OpenAPI, because Nacos SDK doesn't support listing and fuzzy matching.
+ *
+ * TODO Granularity should be based on subscriptions rather than Runtime;
+ * retrieve all subscriptions for each Runtime, rather than retrieving subscriptions for each individual Runtime.
+ */
+ @Override
+ public Result<List<SubscriptionInfo>> retrieveConfigs(Integer page, Integer size, String dataId, String group) {
+ UriComponentsBuilder urlBuilder = UriComponentsBuilder
+ .fromHttpUrl(HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + NacosConst.CONFIGS_API)
+ .queryParam(NacosConst.CONFIGS_REQ_PAGE, page)
+ .queryParam(NacosConst.CONFIGS_REQ_PAGE_SIZE, size)
+ .queryParam(NacosConst.CONFIGS_REQ_DATAID, dataId)
+ .queryParam(NacosConst.CONFIGS_REQ_GROUP, group)
+ .queryParam(NacosConst.CONFIGS_REQ_SEARCH, "blur");
+
+ if (adminProperties.getMeta().getNacos().isAuthEnabled()) {
+ urlBuilder.queryParam(NacosConst.CONFIGS_REQ_TOKEN, loginGetAccessToken());
+ }
+
+ ResponseEntity<String> response;
+ try {
+ response = restTemplate.getForEntity(urlBuilder.toUriString(), String.class);
+ } catch (Exception e) {
+ log.error(NACOS_GET_CONFIGS_ERR.getDesc(), e);
+ throw new MetaException(NACOS_GET_CONFIGS_ERR, e);
+ }
+ if (response.getBody() == null || response.getBody().isEmpty()) {
+ log.error(NACOS_EMPTY_RESP_ERR.getDesc());
+ throw new MetaException(NACOS_EMPTY_RESP_ERR);
+ }
+
+ JSONObject obj = JSON.parseObject(response.getBody());
+ return new Result<>(toSubscriptionInfos(obj), obj.getInteger(NacosConst.CONFIGS_RESP_PAGES));
+ }
+
+ private List<SubscriptionInfo> toSubscriptionInfos(JSONObject obj) {
+ List<SubscriptionInfo> subscriptionInfos = new ArrayList<>();
+ for (Object pageItem : obj.getJSONArray(NacosConst.CONFIGS_RESP_CONTENT_LIST)) {
+ JSONObject pageItemObj = (JSONObject) pageItem;
+ subscriptionInfos.add(toSubscriptionInfo(pageItemObj));
+ }
+ return subscriptionInfos;
+ }
+
+ private SubscriptionInfo toSubscriptionInfo(JSONObject obj) {
+ String content = obj.getString(NacosConst.CONFIGS_RESP_CONTENT);
+ return SubscriptionInfo.builder()
+ .clientName(obj.getString(NacosConst.CONFIGS_RESP_DATAID))
+ .group(obj.getString(NacosConst.CONFIGS_RESP_GROUP))
+ // The subscription content of Nacos config should be base64 encoded to protect special characters.
+ .subscription(Base64.getEncoder().encodeToString(content.getBytes()))
+ .build();
+ }
+
+ /**
+ * Login if auth enabled and return accessToken.
+ */
+ private String loginGetAccessToken() {
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+
+ MultiValueMap<String, String> bodyParams = new LinkedMultiValueMap<>();
+ bodyParams.put(NacosConst.LOGIN_REQ_USERNAME, Collections.singletonList(nacosProps.getProperty(PropertyKeyConst.USERNAME)));
+ bodyParams.put(NacosConst.LOGIN_REQ_PASSWORD, Collections.singletonList(nacosProps.getProperty(PropertyKeyConst.PASSWORD)));
+
+ String loginUrl = HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + NacosConst.LOGIN_API;
+ HttpEntity<MultiValueMap<String, String>> loginRequest = new HttpEntity<>(bodyParams, headers);
+ ResponseEntity<String> loginResponse;
+ try {
+ loginResponse = restTemplate.postForEntity(loginUrl, loginRequest, String.class);
+ } catch (Exception e) {
+ log.error(NACOS_LOGIN_ERR.getDesc(), e);
+ throw new MetaException(NACOS_LOGIN_ERR, e);
+ }
+ if (loginResponse.getBody() == null || loginResponse.getBody().isEmpty()) {
+ log.error(NACOS_LOGIN_EMPTY_RESP_ERR + " Status code: {}", loginResponse.getStatusCode());
+ throw new MetaException(NACOS_LOGIN_EMPTY_RESP_ERR + " Status code: " + loginResponse.getStatusCode());
+ }
+ return JSON.parseObject(loginResponse.getBody()).getString(NacosConst.LOGIN_RESP_TOKEN);
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/store/RocketmqTopicService.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/store/RocketmqTopicService.java
new file mode 100644
index 0000000..ca8340c
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/store/RocketmqTopicService.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.service.store;
+
+import org.apache.eventmesh.dashboard.config.AdminProperties;
+import org.apache.eventmesh.dashboard.model.TopicProperties;
+import org.apache.eventmesh.dashboard.service.TopicService;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * TODO implement methods from storage-plugin.admin
+ */
+
+@Slf4j
+@Service
+public class RocketmqTopicService implements TopicService {
+
+ AdminProperties adminProperties;
+
+ public RocketmqTopicService(AdminProperties adminProperties) {
+ this.adminProperties = adminProperties;
+ }
+
+ @Override
+ public List<TopicProperties> getTopic() {
+ return null;
+ }
+
+ @Override
+ public void createTopic(String topicName) {
+
+ }
+
+ @Override
+ public void deleteTopic(String topicName) {
+
+ }
+}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/util/ExceptionUtil.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/util/ExceptionUtil.java
new file mode 100644
index 0000000..1da2956
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/util/ExceptionUtil.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.util;
+
+public class ExceptionUtil {
+
+ /**
+ * Remove the last period of exception description.
+ */
+ public static String trimDesc(String desc) {
+ if (desc == null) {
+ return "";
+ }
+ if (desc.charAt(desc.length() - 1) == '.') {
+ return desc.substring(0, desc.length() - 1);
+ }
+ return desc;
+ }
+
+}
diff --git a/eventmesh-dashboard-core/src/main/resources/application-dev.yml b/eventmesh-dashboard-core/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..9137786
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/resources/application-dev.yml
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+spring:
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ druid:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://localhost:3306/eventmesh-dashboard?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
+ username: root
+ password:
+
+ initial-size: 1
+ max-active: 50
+ min-idle: 5
+ max-wait: 6000
+ validation-query: select 'x'
+ validation-query-timeout: 15
+ test-on-borrow: false
+ test-while-idle: true
+ min-evictable-idle-time-millis: 300000
+
+ stat-view-servlet:
+ enabled: true
+ url-pattern: /druid/*
+ filter:
+ wall:
+ config:
+ multi-statement-allow: true # corresponds to allowMultiQueries
+
+eventmesh:
+ meta:
+ # registry type: nacos, etcd
+ type: nacos
+ nacos:
+ addr: 127.0.0.1:8848
+ namespace: # namespace id, empty by default
+ authEnabled: false
+ protocol: http # http or https
+ username:
+ password:
+ # Alibaba Cloud MSE Nacos auth, not nacos.token.secret.key
+ accessKey:
+ secretKey:
+ etcd:
+ addr: # TODO
+ # timeout for admin client
+ timeoutMs: 5000
+ store:
+ # Event Store type, should be consistent with the EventMesh Runtime configuration.
+ type: rocketmq
+ standalone:
+ # TODO
+ rocketmq:
+ namesrvAddr: 127.0.0.1:9876;127.0.0.1:9876
+ clusterName: DefaultCluster
+ accessKey: '********'
+ secretKey: '********'
+ kafka:
+ namesrvAddr: localhost:9092;localhost:9092
+ partitions: 1
+ replicationFactors: 1
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/resources/application.yml b/eventmesh-dashboard-core/src/main/resources/application.yml
new file mode 100644
index 0000000..434cf55
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/resources/application.yml
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+spring:
+ application:
+ name: eventmesh-dashboard
+ profiles:
+ active: dev
+
+server:
+ port: 8080
+ servlet:
+ encoding:
+ charset: UTF-8
+ enabled: true
+ force: true
+
+logging:
+ config: classpath:logback.xml
+
+mybatis-plus:
+ mapper-locations: classpath*:mappers/**/*.xml # Default value
+ typeAliasesPackage: org.apache.eventmesh.dashboard.entity
+ configuration:
+ call-setters-on-nulls: true # Display fields with null values in query results
+ map-underscore-to-camel-case: true # Convert database underscore naming convention to camel case (default is true)
+# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # Output SQL execution logs to console (for debugging)
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/main/resources/logback.xml b/eventmesh-dashboard-core/src/main/resources/logback.xml
new file mode 100644
index 0000000..447ace7
--- /dev/null
+++ b/eventmesh-dashboard-core/src/main/resources/logback.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder charset="UTF-8">
+ <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %p %t - %m%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="FILE"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/eventmesh-dashboard.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${user.home}/logs/eventmesh-dashboard-%d{yyyy-MM-dd}.%i.log
+ </fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>104857600</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <MaxHistory>10</MaxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <root level="INFO">
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="FILE" />
+ </root>
+
+</configuration>
\ No newline at end of file
diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplicationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplicationTest.java
new file mode 100644
index 0000000..cc04983
--- /dev/null
+++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/EventMeshDashboardApplicationTest.java
@@ -0,0 +1,13 @@
+package org.apache.eventmesh.dashboard.core;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class EventMeshDashboardApplicationTest {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/eventmesh-dashboard-view/.gitignore b/eventmesh-dashboard-view/.gitignore
index 63d2f1a..7415ebb 100644
--- a/eventmesh-dashboard-view/.gitignore
+++ b/eventmesh-dashboard-view/.gitignore
@@ -1,36 +1,131 @@
-.gradle
-build/
-!gradle/wrapper/gradle-wrapper.jar
-!**/src/main/**/build/
-!**/src/test/**/build/
+# https://github.com/github/gitignore/blob/main/Node.gitignore
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+.pnpm-debug.log*
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-bin/
-!**/src/main/**/bin/
-!**/src/test/**/bin/
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-out/
-!**/src/main/**/out/
-!**/src/test/**/out/
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
-### VS Code ###
-.vscode/
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional stylelint cache
+.stylelintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variable files
+.env
+.env.development.local
+.env.test.local
+.env.production.local
+.env.local
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# vuepress v2.x temp and cache directory
+.temp
+.cache
+
+# Docusaurus cache and generated files
+.docusaurus
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.*
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 0fae672..f85cff6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,6 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
@@ -40,21 +39,19 @@
<name>eventmesh-dashboard</name>
<description>eventmesh-dashboard</description>
- <url>https://github.com/apache/pulsar</url>
+ <url>https://github.com/apache/eventmesh-dashboard</url>
<organization>
<name>Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
+ <url>https://www.apache.org/</url>
</organization>
- <inceptionYear>2017</inceptionYear>
-
+ <inceptionYear>2021</inceptionYear>
<developers>
<developer>
- <organization>Apache eventmesh developers</organization>
- <organizationUrl>http://eventmesh.apache.org/</organizationUrl>
+ <organization>Apache EventMesh developers</organization>
+ <organizationUrl>https://eventmesh.apache.org/</organizationUrl>
</developer>
</developers>
-
<licenses>
<license>
<name>Apache License, Version 2.0</name>
@@ -62,7 +59,7 @@
<distribution>repo</distribution>
</license>
</licenses>
- <scm>
+ <scm>
<url>https://github.com/apache/eventmesh-dashboard</url>
<connection>scm:git:https://github.com/apache/eventmesh-dashboard.git</connection>
<developerConnection>scm:git:ssh://git@github.com:apache/eventmesh-dashboard.git</developerConnection>
@@ -70,7 +67,7 @@
<ciManagement>
<system>GitHub Actions</system>
- <url>https://github.com/apache/puleventmesh-dashboardsar/actions</url>
+ <url>https://github.com/apache/eventmesh-dashboard/actions</url>
</ciManagement>
<issueManagement>
@@ -79,11 +76,11 @@
</issueManagement>
<properties>
- <maven.compiler.source>17</maven.compiler.source>
- <maven.compiler.target>17</maven.compiler.target>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
</properties>
+
<modules>
<module>eventmesh-dashboard-console</module>
<module>eventmesh-dashboard-observe</module>
@@ -91,6 +88,4 @@
<module>eventmesh-dashboard-service</module>
<module>eventmesh-dashboard-common</module>
</modules>
-
-
</project>
\ No newline at end of file
diff --git a/style/checkStyle.xml b/style/checkStyle.xml
new file mode 100644
index 0000000..cfa1972
--- /dev/null
+++ b/style/checkStyle.xml
@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+ "http://checkstyle.org/dtds/configuration_1_3.dtd">
+<module name="Checker">
+
+ <property name="charset" value="UTF-8"/>
+ <property name="severity" value="warning"/>
+ <property name="fileExtensions" value="java, properties, xml, gradle, env, sh"/>
+ <module name="SuppressWarningsFilter" />
+ <module name="Header">
+ <property name="headerFile" value="${config_loc}/checkstyle-header1.txt"/>
+ <property name="fileExtensions" value="java, gradle"/>
+ </module>
+ <module name="Header">
+ <property name="headerFile" value="${config_loc}/checkstyle-header2.txt"/>
+ <property name="fileExtensions" value="properties, env"/>
+ </module>
+ <module name="Header">
+ <property name="headerFile" value="${config_loc}/checkstyle-header3.txt"/>
+ <property name="fileExtensions" value="sh"/>
+ </module>
+ <module name="RegexpSingleline">
+ <property name="format" value="System\..+\.println"/>
+ <property name="message" value="Prohibit invoking System.*.println in source code !"/>
+ </module>
+
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s*\*\s*@author"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="ASF project doesn't allow @author copyright."/>
+ </module>
+
+ <module name="RegexpSingleline">
+ <property name="format"
+ value=".*[\u3400-\u4DB5\u4E00-\u9FA5\u9FA6-\u9FBB\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFF00-\uFFEF\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF]+.*"/>
+ <property name="message" value="Chinese characters are not allowed!"/>
+ </module>
+
+ <module name="BeforeExecutionExclusionFileFilter">
+ <property name="fileNamePattern" value="./eventmesh-runtime/conf/sChat2.jks$"/>
+ </module>
+
+ <module name="FileTabCharacter">
+ <property name="eachLine" value="true"/>
+ </module>
+
+ <module name="LineLength">
+ <property name="fileExtensions" value="java"/>
+ <property name="max" value="150"/>
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+ </module>
+
+ <module name="TreeWalker">
+ <module name="UnusedImports">
+ <property name="processJavadoc" value="true"/>
+ </module>
+ <module name="RedundantImport"/>
+ <module name="SuppressWarningsHolder" />
+ <module name="OuterTypeFilename"/>
+ <module name="IllegalTokenText">
+ <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+ <property name="format"
+ value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+ <property name="message"
+ value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
+ </module>
+ <module name="AvoidEscapedUnicodeCharacters">
+ <property name="allowEscapesForControlCharacters" value="true"/>
+ <property name="allowByTailComment" value="true"/>
+ <property name="allowNonPrintableEscapes" value="true"/>
+ </module>
+ <module name="AvoidStarImport"/>
+ <module name="ImportOrder">
+ <property name="staticGroups" value="org.apache.eventmesh,org.apache,java,javax,org,io,net,junit,com,lombok"/>
+ <property name="separatedStaticGroups" value="true"/>
+ <property name="groups" value="org.apache.eventmesh,org.apache,java,javax,org,io,net,junit,com,lombok"/>
+ <property name="ordered" value="true"/>
+ <property name="separated" value="true"/>
+ <property name="option" value="top"/>
+ <property name="sortStaticImportsAlphabetically" value="true"/>
+ </module>
+ <module name="OneTopLevelClass"/>
+ <module name="NoLineWrap">
+ <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT"/>
+ </module>
+ <module name="EmptyBlock">
+ <property name="option" value="TEXT"/>
+ <property name="tokens"
+ value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
+ </module>
+ <module name="NeedBraces">
+ <property name="tokens"
+ value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE"/>
+ </module>
+ <module name="LeftCurly">
+ <property name="tokens"
+ value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF,
+ INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT,
+ LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF,
+ LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF,
+ OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF"/>
+ </module>
+ <module name="RightCurly">
+ <property name="id" value="RightCurlySame"/>
+ <property name="tokens"
+ value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
+ LITERAL_DO"/>
+ </module>
+ <module name="RightCurly">
+ <property name="id" value="RightCurlyAlone"/>
+ <property name="option" value="alone"/>
+ <property name="tokens"
+ value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
+ INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF,
+ COMPACT_CTOR_DEF"/>
+ </module>
+ <module name="SuppressionXpathSingleFilter">
+ <property name="id" value="RightCurlyAlone"/>
+ <property name="query" value="//RCURLY[parent::SLIST[count(./*)=1]
+ or preceding-sibling::*[last()][self::LCURLY]]"/>
+ </module>
+ <module name="WhitespaceAfter">
+ <property name="tokens"
+ value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE,
+ LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE"/>
+ </module>
+ <module name="WhitespaceAround">
+ <property name="allowEmptyConstructors" value="true"/>
+ <property name="allowEmptyLambdas" value="true"/>
+ <property name="allowEmptyMethods" value="true"/>
+ <property name="allowEmptyTypes" value="true"/>
+ <property name="allowEmptyLoops" value="true"/>
+ <property name="ignoreEnhancedForColon" value="false"/>
+ <property name="tokens"
+ value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR,
+ BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND,
+ LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
+ LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED,
+ LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN,
+ NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
+ SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
+ <message key="ws.notFollowed"
+ value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
+ <message key="ws.notPreceded"
+ value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
+ </module>
+ <module name="OneStatementPerLine"/>
+ <module name="MultipleVariableDeclarations"/>
+ <module name="ArrayTypeStyle"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="FallThrough"/>
+ <module name="UpperEll"/>
+ <module name="ModifierOrder"/>
+ <module name="EmptyLineSeparator">
+ <property name="allowNoEmptyLineBetweenFields" value="true"/>
+ </module>
+ <module name="SeparatorWrap">
+ <property name="id" value="SeparatorWrapDot"/>
+ <property name="tokens" value="DOT"/>
+ <property name="option" value="nl"/>
+ </module>
+ <module name="SeparatorWrap">
+ <property name="id" value="SeparatorWrapComma"/>
+ <property name="tokens" value="COMMA"/>
+ <property name="option" value="EOL"/>
+ </module>
+ <module name="SeparatorWrap">
+ <property name="id" value="SeparatorWrapEllipsis"/>
+ <property name="tokens" value="ELLIPSIS"/>
+ <property name="option" value="EOL"/>
+ </module>
+ <module name="SeparatorWrap">
+ <property name="id" value="SeparatorWrapArrayDeclarator"/>
+ <property name="tokens" value="ARRAY_DECLARATOR"/>
+ <property name="option" value="EOL"/>
+ </module>
+ <module name="SeparatorWrap">
+ <property name="id" value="SeparatorWrapMethodRef"/>
+ <property name="tokens" value="METHOD_REF"/>
+ <property name="option" value="nl"/>
+ </module>
+ <module name="PackageName">
+ <property name="format" value="^(org)\.apache.(eventmesh|rocketmq)(\.[a-zA-Z][a-zA-Z0-9]*)+$"/>
+ <message key="name.invalidPattern"
+ value="Package name ''{0}'' must match pattern ''{1}''."/>
+
+ </module>
+ <module name="TypeName">
+ <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
+ ANNOTATION_DEF, RECORD_DEF"/>
+ <message key="name.invalidPattern"
+ value="Type name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="MemberName">
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+ <message key="name.invalidPattern"
+ value="Member name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="ParameterName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Parameter name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="LambdaParameterName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="CatchParameterName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="LocalVariableName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Local variable name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="PatternVariableName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Pattern variable name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="ClassTypeParameterName">
+ <!-- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>-->
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
+ <message key="name.invalidPattern"
+ value="Class type name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="RecordComponentName">
+ <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+ <message key="name.invalidPattern"
+ value="Record component name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="RecordTypeParameterName">
+<!-- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>-->
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
+ <message key="name.invalidPattern"
+ value="Record type name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="MethodTypeParameterName">
+<!-- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>-->
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
+ <message key="name.invalidPattern"
+ value="Method type name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="InterfaceTypeParameterName">
+<!-- <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>-->
+ <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
+ <message key="name.invalidPattern"
+ value="Interface type name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="NoFinalizer"/>
+ <module name="GenericWhitespace">
+ <message key="ws.followed"
+ value="GenericWhitespace ''{0}'' is followed by whitespace."/>
+ <message key="ws.preceded"
+ value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
+ <message key="ws.illegalFollow"
+ value="GenericWhitespace ''{0}'' should followed by whitespace."/>
+ <message key="ws.notPreceded"
+ value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
+ </module>
+ <module name="Indentation">
+ <property name="basicOffset" value="4"/>
+ <property name="braceAdjustment" value="2"/>
+ <property name="throwsIndent" value="4"/>
+ <property name="lineWrappingIndentation" value="4"/>
+ <property name="arrayInitIndent" value="2"/>
+ </module>
+ <module name="AbbreviationAsWordInName">
+ <property name="ignoreFinal" value="false"/>
+ <property name="allowedAbbreviationLength" value="6"/>
+ <property name="tokens"
+ value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF,
+ PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF, PATTERN_VARIABLE_DEF, RECORD_DEF,
+ RECORD_COMPONENT_DEF"/>
+ </module>
+ <module name="OverloadMethodsDeclarationOrder"/>
+ <module name="VariableDeclarationUsageDistance"/>
+ <module name="MethodParamPad">
+ <property name="tokens"
+ value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF,
+ SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF"/>
+ </module>
+ <module name="NoWhitespaceBefore">
+ <property name="tokens"
+ value="COMMA, SEMI, POST_INC, POST_DEC, DOT,
+ LABELED_STAT, METHOD_REF"/>
+ <property name="allowLineBreaks" value="true"/>
+ </module>
+ <module name="ParenPad">
+ <property name="tokens"
+ value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF,
+ EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW,
+ LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL,
+ METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA,
+ RECORD_DEF"/>
+ </module>
+ <module name="OperatorWrap">
+ <property name="option" value="NL"/>
+ <property name="tokens"
+ value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
+ LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF,
+ TYPE_EXTENSION_AND "/>
+ </module>
+ <module name="AnnotationLocation">
+ <property name="id" value="AnnotationLocationMostCases"/>
+ <property name="tokens"
+ value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF,
+ RECORD_DEF, COMPACT_CTOR_DEF"/>
+ </module>
+ <module name="AnnotationLocation">
+ <property name="id" value="AnnotationLocationVariables"/>
+ <property name="tokens" value="VARIABLE_DEF"/>
+ <property name="allowSamelineMultipleAnnotations" value="true"/>
+ </module>
+ <module name="AtclauseOrder">
+ <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
+ <property name="target"
+ value="CLASS_DEF, ENUM_DEF, METHOD_DEF, VARIABLE_DEF"/>
+ </module>
+ <module name="JavadocMethod">
+ <property name="accessModifiers" value="public"/>
+ <property name="allowMissingParamTags" value="true"/>
+ <property name="allowMissingReturnTag" value="true"/>
+ <property name="allowedAnnotations" value="Override, Test"/>
+ <property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF"/>
+ </module>
+ <module name="MissingJavadocType">
+ <property name="scope" value="protected"/>
+ <property name="tokens"
+ value="INTERFACE_DEF"/>
+ <property name="excludeScope" value="nothing"/>
+ </module>
+ <module name="MethodName">
+ <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
+ <message key="name.invalidPattern"
+ value="Method name ''{0}'' must match pattern ''{1}''."/>
+ </module>
+ <module name="SingleLineJavadoc"/>
+ <module name="EmptyCatchBlock">
+ <property name="exceptionVariableName" value="expected"/>
+ </module>
+ <module name="CommentsIndentation">
+ <property name="tokens" value="SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN"/>
+ </module>
+ </module>
+
+</module>
diff --git a/style/checkstyle-header1.txt b/style/checkstyle-header1.txt
new file mode 100644
index 0000000..6a9c064
--- /dev/null
+++ b/style/checkstyle-header1.txt
@@ -0,0 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
diff --git a/style/checkstyle-header2.txt b/style/checkstyle-header2.txt
new file mode 100644
index 0000000..b1312a0
--- /dev/null
+++ b/style/checkstyle-header2.txt
@@ -0,0 +1,16 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
diff --git a/style/checkstyle-header3.txt b/style/checkstyle-header3.txt
new file mode 100644
index 0000000..446e3fb
--- /dev/null
+++ b/style/checkstyle-header3.txt
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Licensed to Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Apache Software Foundation (ASF) licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
diff --git a/style/eventmesh-code-style.xml b/style/eventmesh-code-style.xml
new file mode 100644
index 0000000..c8bddd4
--- /dev/null
+++ b/style/eventmesh-code-style.xml
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<code_scheme name="EventMeshStyle">
+ <option name="OTHER_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
+ <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+ <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+ <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
+ <value />
+ </option>
+ <option name="IMPORT_LAYOUT_TABLE">
+ <value>
+ <package name="" withSubpackages="true" static="true" />
+ <emptyLine />
+ <package name="" withSubpackages="true" static="false" />
+ </value>
+ </option>
+ <option name="RIGHT_MARGIN" value="150" />
+ <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
+ <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
+ <option name="JD_P_AT_EMPTY_LINES" value="false" />
+ <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
+ <option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
+ <option name="JD_KEEP_EMPTY_RETURN" value="false" />
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="0" />
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
+ <AndroidXmlCodeStyleSettings>
+ <option name="USE_CUSTOM_SETTINGS" value="true" />
+ <option name="LAYOUT_SETTINGS">
+ <value>
+ <option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false" />
+ </value>
+ </option>
+ </AndroidXmlCodeStyleSettings>
+ <JSCodeStyleSettings>
+ <option name="INDENT_CHAINED_CALLS" value="false" />
+ </JSCodeStyleSettings>
+ <Python>
+ <option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true" />
+ </Python>
+ <TypeScriptCodeStyleSettings>
+ <option name="INDENT_CHAINED_CALLS" value="false" />
+ </TypeScriptCodeStyleSettings>
+ <XML>
+ <option name="XML_ALIGN_ATTRIBUTES" value="false" />
+ <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
+ </XML>
+ <codeStyleSettings language="CSS">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="ECMA Script Level 4">
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ </codeStyleSettings>
+ <codeStyleSettings language="HTML">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="JAVA">
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
+ <option name="ALIGN_MULTILINE_RESOURCES" value="false" />
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="4" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="JSON">
+ <indentOptions>
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="JavaScript">
+ <option name="RIGHT_MARGIN" value="80" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="PROTO">
+ <option name="RIGHT_MARGIN" value="80" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="protobuf">
+ <option name="RIGHT_MARGIN" value="80" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="Python">
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="RIGHT_MARGIN" value="80" />
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="SASS">
+ <indentOptions>
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="SCSS">
+ <indentOptions>
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="TypeScript">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="XML">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="4" />
+ </indentOptions>
+ </codeStyleSettings>
+ <Objective-C>
+ <option name="INDENT_NAMESPACE_MEMBERS" value="0" />
+ <option name="INDENT_C_STRUCT_MEMBERS" value="2" />
+ <option name="INDENT_CLASS_MEMBERS" value="2" />
+ <option name="INDENT_VISIBILITY_KEYWORDS" value="1" />
+ <option name="INDENT_INSIDE_CODE_BLOCK" value="2" />
+ <option name="KEEP_STRUCTURES_IN_ONE_LINE" value="true" />
+ <option name="FUNCTION_PARAMETERS_WRAP" value="5" />
+ <option name="FUNCTION_CALL_ARGUMENTS_WRAP" value="5" />
+ <option name="TEMPLATE_CALL_ARGUMENTS_WRAP" value="5" />
+ <option name="TEMPLATE_CALL_ARGUMENTS_ALIGN_MULTILINE" value="true" />
+ <option name="ALIGN_INIT_LIST_IN_COLUMNS" value="false" />
+ <option name="SPACE_BEFORE_SUPERCLASS_COLON" value="false" />
+ </Objective-C>
+ <Objective-C-extensions>
+ <option name="GENERATE_INSTANCE_VARIABLES_FOR_PROPERTIES" value="ASK" />
+ <option name="RELEASE_STYLE" value="IVAR" />
+ <option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE" />
+ <file>
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
+ </file>
+ <class>
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
+ <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
+ </class>
+ <extensions>
+ <pair source="cc" header="h" />
+ <pair source="c" header="h" />
+ </extensions>
+ </Objective-C-extensions>
+ <codeStyleSettings language="ObjectiveC">
+ <option name="RIGHT_MARGIN" value="80" />
+ <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
+ <option name="BLANK_LINES_BEFORE_IMPORTS" value="0" />
+ <option name="BLANK_LINES_AFTER_IMPORTS" value="0" />
+ <option name="BLANK_LINES_AROUND_CLASS" value="0" />
+ <option name="BLANK_LINES_AROUND_METHOD" value="0" />
+ <option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="false" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="1" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ </indentOptions>
+ </codeStyleSettings>
+</code_scheme>