Skip to content

Commit

Permalink
Merge branch 'dev' into pil0txia/bug_64
Browse files Browse the repository at this point in the history
# Conflicts:
#	eventmesh-dashboard-console/pom.xml
  • Loading branch information
Pil0tXia committed Mar 14, 2024
2 parents 09004db + a165e04 commit 7e210a0
Show file tree
Hide file tree
Showing 144 changed files with 22,231 additions and 406 deletions.
67 changes: 48 additions & 19 deletions eventmesh-dashboard-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,50 @@
<scope>runtime</scope>
</dependency>

<!-- health check client -->
<!-- EventMesh SDK -->
<!-- Meta - nacos client -->
<dependency>
<groupId>org.apache.eventmesh</groupId>
<artifactId>eventmesh-sdk-java</artifactId>
<version>1.10.0-release</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
</dependency>

<!-- health check client -->
<!-- EventMesh SDK -->
<!-- <dependency>-->
<!-- <groupId>org.apache.eventmesh</groupId>-->
<!-- <artifactId>eventmesh-sdk-java</artifactId>-->
<!-- <version>1.10.0-release</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>junit</groupId>-->
<!-- <artifactId>junit</artifactId>-->
<!-- </exclusion>-->
<!-- <exclusion>-->
<!-- <groupId>junit</groupId>-->
<!-- <artifactId>junit-dep</artifactId>-->
<!-- </exclusion>-->
<!-- <exclusion>-->
<!-- <groupId>org.apache.logging.log4j</groupId>-->
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- storage redis client -->
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</dependency>
<!-- rocketmq client -->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
<version>4.9.4</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-tools</artifactId>
<version>5.2.0</version>
</dependency>
<!-- health check client end -->

<!-- Unit Test -->
Expand Down Expand Up @@ -137,6 +155,17 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<excludes>
<exclude>**/org/apache/eventmesh/dashboard/console/integration/**/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.eventmesh.dashboard.console.config;

import org.apache.eventmesh.dashboard.console.health.check.config.HealthCheckObjectConfig;
import org.apache.eventmesh.dashboard.console.function.health.check.config.HealthCheckObjectConfig;

import java.util.List;

Expand Down
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.console.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_REGISTER = "nacos-register";
}
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.console.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";
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@

import lombok.Data;

/**
* Base Entity provide some basic fields that every Eventmesh Dashboard Entity would have
*/
@Data
@Schema(name = "BaseEntity", description = "Base entity")
public class BaseEntity implements Serializable {

private static final long serialVersionUID = -2697805837923579585L;
/**
* Primary key
*/
@Schema(name = "id", description = "primary key")
protected Long id;

private Long clusterId;
protected Long clusterId;

protected Timestamp createTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.eventmesh.dashboard.console.entity.cluster;

import org.apache.eventmesh.dashboard.console.entity.base.BaseEntity;

import java.sql.Timestamp;

import lombok.AllArgsConstructor;
Expand All @@ -26,7 +28,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ClusterEntity {
public class ClusterEntity extends BaseEntity {

private Long id;

Expand All @@ -50,7 +52,11 @@ public class ClusterEntity {

private Integer runState;

private Integer status;

private Timestamp createTime;

private Timestamp updateTime;

private Integer storeType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.eventmesh.dashboard.console.entity.config;

import org.apache.eventmesh.dashboard.console.entity.base.BaseEntity;

import java.sql.Timestamp;

import lombok.AllArgsConstructor;
Expand All @@ -26,7 +28,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Data
public class ConfigEntity {
public class ConfigEntity extends BaseEntity {

private Long id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ public class ConnectionEntity extends BaseEntity {

private static final long serialVersionUID = 6565578252656944905L;

/**
* Primary key
*/
@Schema(name = "id", description = "primary key")
private Long id;

/**
* Runtime cluster id
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class ConnectorEntity extends BaseEntity {

private static final long serialVersionUID = -8226303660232951326L;

@Schema(name = "id", description = "primary key")
private Long id;

private Long clusterId;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.eventmesh.dashboard.console.entity.group;

import org.apache.eventmesh.dashboard.console.entity.base.BaseEntity;

import java.sql.Timestamp;

import lombok.AllArgsConstructor;
Expand All @@ -26,7 +28,8 @@
@NoArgsConstructor
@AllArgsConstructor
@Data
public class GroupEntity {
public class GroupEntity extends BaseEntity {

private Long id;

private Long clusterId;
Expand All @@ -45,6 +48,6 @@ public class GroupEntity {

private Timestamp updateTime;


private Integer status;

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.eventmesh.dashboard.console.entity.groupmember;

import org.apache.eventmesh.dashboard.console.entity.base.BaseEntity;

import java.sql.Timestamp;

import lombok.AllArgsConstructor;
Expand All @@ -26,7 +28,8 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GroupMemberEntity {
public class GroupMemberEntity extends BaseEntity {

private Long id;

private Long clusterId;
Expand All @@ -43,5 +46,5 @@ public class GroupMemberEntity {

private Timestamp updateTime;


private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
public class HealthCheckResultEntity extends BaseEntity {

private static final long serialVersionUID = -7350585209577598040L;
@Schema(name = "id", description = "primary key")
private Long id;

private Long clusterId;

Expand All @@ -46,7 +44,7 @@ public class HealthCheckResultEntity extends BaseEntity {

private String resultDesc;

@Schema(description = "status of a health check, 0: failed, 1: passed, 2: doing check, 3: out of time")
private Integer status;
@Schema(description = "state of a health check, 0: failed, 1: passed, 2: doing check, 3: out of time")
private Integer state;

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.eventmesh.dashboard.console.entity.log;

import org.apache.eventmesh.dashboard.console.entity.base.BaseEntity;

import java.sql.Timestamp;

import lombok.AllArgsConstructor;
Expand All @@ -26,7 +28,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LogEntity {
public class LogEntity extends BaseEntity {

private Long id;

Expand All @@ -36,7 +38,7 @@ public class LogEntity {

private String targetType;

private Integer status;
private Integer state;

private String content;

Expand Down
Loading

0 comments on commit 7e210a0

Please sign in to comment.