forked from apache/eventmesh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/SLSJL/eventmesh-dashboard in…
…to dev * 'dev' of https://github.com/SLSJL/eventmesh-dashboard: [ISSUE apache#73] Add remoting service (apache#74) [ISSUE apache#45] Implement methods from storage-plugin.admin(rocketmq) (apache#66) [ISSUE apache#71] Reduce log file size and Streamline debug output (apache#72) [ISSUE apache#69] Integrate database credentials in auto-deploy (apache#70) [ISSUE apache#67] Fix HealthCheckResultMapper which leads to application error [ISSUE apache#64] Support automated deployment and Fix runtime packaging errors (apache#65) [ISSUE apache#60] add SDK manager (apache#62) [ISSUE apache#57] Modify the field, synchronize the modification, and add the mapper method (apache#58) [ISSUE apache#29] Set up EventMesh Dashboard Front-end (apache#56) [ISSUE apache#49] RocketMQ and Nacos health check (apache#53) [ISSUE apache#51] Config Mgmt basic function and config,runtime,store,cluster SQL (apache#52) # Conflicts: # eventmesh-dashboard-view/public/index.html # eventmesh-dashboard-view/src/App.tsx # eventmesh-dashboard-view/src/index.tsx # eventmesh-dashboard-view/src/routes/RootLayout.tsx # eventmesh-dashboard-view/src/routes/navigation/Navigation.tsx # eventmesh-dashboard-view/src/routes/navigation/NavigationItem.tsx # eventmesh-dashboard-view/src/routes/topic/Topic.tsx # eventmesh-dashboard-view/src/routes/topic/stats/AbnormalTopicCount.tsx # eventmesh-dashboard-view/src/routes/topic/stats/Stats.tsx # eventmesh-dashboard-view/src/routes/topic/stats/StatsChart.tsx # eventmesh-dashboard-view/src/routes/topic/stats/TopicCount.tsx # eventmesh-dashboard-view/src/routes/topic/topic-list/TopicList.tsx
- Loading branch information
Showing
222 changed files
with
7,456 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# 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. | ||
|
||
# Copy this .env.example file to the .env file | ||
# and edit your credentials. | ||
|
||
# Database credentials | ||
DB_ADDRESS=localhost:3306 | ||
DB_USERNAME=root | ||
DB_PASSWORD=password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Auto Deploy EventMesh Dashboard | ||
|
||
### Usage | ||
|
||
``` | ||
cd ~/service | ||
git clone -b dev https://github.com/apache/eventmesh-dashboard.git | ||
cd eventmesh-dashboard | ||
chmod +x deployment/auto-deploy-eventmesh-dashboard.sh | ||
``` | ||
|
||
Edit credentials: | ||
|
||
``` | ||
cp deployment/.env.example deployment/.env | ||
vim deployment/.env | ||
``` | ||
|
||
Add task to crontab: | ||
|
||
``` | ||
crontab -e | ||
``` | ||
|
||
``` | ||
0 * * * * ~/service/eventmesh-dashboard/deployment/auto-deploy-eventmesh-dashboard.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/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. | ||
|
||
# Git repository path | ||
REPO_PATH=~/service/eventmesh-dashboard | ||
|
||
# SpringBoot process ID file path | ||
PID_LOG=~/service/eventmesh-dashboard/deployment/eventmesh-dashboard-pid.log | ||
|
||
# Automatic deployment shell script log file path | ||
AUTO_DEPLOY_LOG=~/service/eventmesh-dashboard/deployment/auto-deploy-eventmesh-dashboard.log | ||
|
||
# Jar file path | ||
JAR_FILE_PATH=~/service/eventmesh-dashboard/eventmesh-dashboard-console/target/eventmesh-dashboard-console-0.0.1-SNAPSHOT.jar | ||
|
||
# Load environment variables from external file | ||
ENV_FILE=~/service/eventmesh-dashboard/deployment/.env | ||
source $ENV_FILE | ||
|
||
# Update the git repository | ||
cd $REPO_PATH | ||
git fetch origin dev | ||
LOCAL=$(git rev-parse @) | ||
REMOTE=$(git rev-parse origin/dev) | ||
|
||
if [ $LOCAL != $REMOTE ]; then | ||
# If the remote dev branch is newer than the local one, update the local dev branch code | ||
git pull origin dev | ||
|
||
# Log the event | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - change detected." >> $AUTO_DEPLOY_LOG | ||
|
||
# Terminate the old process | ||
if [ -s $PID_LOG ]; then | ||
PID=$(cat $PID_LOG) | ||
if [ -n "$PID" ]; then | ||
kill $PID | ||
# Log the event | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - kill running application." >> $AUTO_DEPLOY_LOG | ||
fi | ||
fi | ||
|
||
# Compile and package the Jar file | ||
mvn clean package -DskipTests | ||
|
||
# Start the springboot application and record the process id to pid.log file | ||
nohup java -DDB_ADDRESS=$DB_ADDRESS -DDB_USERNAME=$DB_USERNAME -DDB_PASSWORD=$DB_PASSWORD -jar $JAR_FILE_PATH > /dev/null 2>&1 & | ||
echo $! > $PID_LOG | ||
|
||
# Log the event | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - start new application." >> $AUTO_DEPLOY_LOG | ||
else | ||
# If there are no new changes in the remote dev branch | ||
|
||
# Log the event | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - no change detected." >> $AUTO_DEPLOY_LOG | ||
|
||
if [ -s $PID_LOG ]; then | ||
# If the pid.log file exists, no action is performed | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - application running, no operation performed." >> $AUTO_DEPLOY_LOG | ||
else | ||
# If the pid.log file does not exist, compile and package the Jar file | ||
mvn clean package -DskipTests | ||
|
||
# Start the springboot application and record the process id to pid.log file | ||
nohup java -DDB_ADDRESS=$DB_ADDRESS -DDB_USERNAME=$DB_USERNAME -DDB_PASSWORD=$DB_PASSWORD -jar $JAR_FILE_PATH > /dev/null 2>&1 & | ||
echo $! > $PID_LOG | ||
|
||
# Log the event | ||
echo "$(date +"%Y-%m-%d %H:%M:%S") - no pid.log file, start application." >> $AUTO_DEPLOY_LOG | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...n/java/org/apache/eventmesh/dashboard/common/constant/health/HealthCheckTypeConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.common.constant.health; | ||
|
||
public class HealthCheckTypeConstant { | ||
|
||
public static final String HEALTH_CHECK_TYPE_UNKNOWN = "unknown"; | ||
|
||
public static final String HEALTH_CHECK_TYPE_CLUSTER = "cluster"; | ||
|
||
public static final String HEALTH_CHECK_TYPE_RUNTIME = "runtime"; | ||
public static final String HEALTH_CHECK_TYPE_STORAGE = "storage"; | ||
public static final String HEALTH_CHECK_TYPE_META = "meta"; | ||
public static final String HEALTH_CHECK_TYPE_TOPIC = "topic"; | ||
|
||
public static final String HEALTH_CHECK_SUBTYPE_REDIS = "redis"; | ||
public static final String HEALTH_CHECK_SUBTYPE_MYSQL = "mysql"; | ||
public static final String HEALTH_CHECK_SUBTYPE_ROCKETMQ_BROKER = "rocketmq4-broker"; | ||
public static final String HEALTH_CHECK_SUBTYPE_ROCKETMQ_NAMESERVER = "rocketmq4-nameserver"; | ||
public static final String HEALTH_CHECK_SUBTYPE_ROCKETMQ_TOPIC = "rocketmq4-topic"; | ||
|
||
public static final String HEALTH_CHECK_SUBTYPE_NACOS_CONFIG = "nacos-config"; | ||
public static final String HEALTH_CHECK_SUBTYPE_NACOS_REGISTRY = "nacos-registry"; | ||
} |
61 changes: 61 additions & 0 deletions
61
...n/src/main/java/org/apache/eventmesh/dashboard/common/constant/health/HealthConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* 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.common.constant.health; | ||
|
||
public class HealthConstant { | ||
public static final String NEW_LINE_ENDING = "\n"; | ||
|
||
public static final String RUNTIME_CHECK_TOPIC = "eventmesh-dashboard-healthcheck-topic"; | ||
|
||
public static final String RUNTIME_CHECK_CONTENT_KEY = "eventmesh-dashboard-healthcheck-content"; | ||
|
||
public static final String RUNTIME_CHECK_CONTENT_BODY = "eventmesh-dashboard-healthcheck-content-body"; | ||
|
||
public static final String CLOUDEVENT_CONTENT_TYPE = "application/cloudevents+json"; | ||
|
||
|
||
public static final String ENV = "test"; | ||
public static final String HOST = "localhost"; | ||
public static final String PASSWORD = "PASSWORD"; | ||
public static final String USER_NAME = "PU4283"; | ||
public static final String GROUP = "EventmeshTestGroup"; | ||
public static final String PATH = "/data/app/umg_proxy"; | ||
public static final Integer PORT = 8362; | ||
public static final String VERSION = "2.0.11"; | ||
public static final String IDC = "FT"; | ||
public static final String SUBSYSTEM = "5023"; | ||
|
||
public static final String ROCKETMQ_CHECK_PRODUCER_GROUP = "eventmesh-dashboard-healthcheck-rocketmq-producer-group"; | ||
|
||
public static final String ROCKETMQ_CHECK_CONSUMER_GROUP = "eventmesh-dashboard-healthcheck-rocketmq-consumer-group"; | ||
|
||
public static final String ROCKETMQ_CHECK_TOPIC = "DO-NOT-USE-THIS-TOPIC-" | ||
+ "eventmesh-dashboard-healthcheck-rocketmq-topic-90a78a5d-b803-447e-8c48-1c87ab0c74d9"; | ||
public static final String ROCKETMQ_CHECK_TOPIC_MSG = "eventmesh-dashboard-healthcheck-rocketmq-message"; | ||
|
||
public static final String NACOS_CHECK_DATA_ID = "DO-NOT-USE-THIS-" | ||
+ "eventmesh-dashboard-healthcheck-nacos-data-id-28e2933f-a47b-439d-b14b-7d9970c37042"; | ||
|
||
public static final String NACOS_CHECK_GROUP = "EVENTMESH_DASHBOARD_HEALTH_CHECK_GROUP"; | ||
|
||
public static final String NACOS_CHECK_CONTENT = "eventmesh-dashboard"; | ||
|
||
public static final String NACOS_CHECK_SERVICE_NAME = "eventmesh-dashboard-healthcheck-nacos-service-name"; | ||
|
||
public static final String NACOS_CHECK_SERVICE_CLUSTER_NAME = "eventmesh-dashboard-healthcheck-nacos-service-cluster-name"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/enums/StoreType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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.common.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor | ||
public enum StoreType { | ||
|
||
STANDALONE(0, "Standalone"), | ||
ROCKETMQ(1, "RocketMQ"), | ||
KAFKA(2, "Kafka"), | ||
PULSAR(3, "Pulsar"), | ||
RABBITMQ(4, "RabbitMQ"), | ||
REDIS(5, "Redis"); | ||
|
||
@Getter | ||
private final Integer number; | ||
@Getter | ||
private final String name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.