Skip to content

Commit

Permalink
[ISSUE #73] Add remoting service (#74)
Browse files Browse the repository at this point in the history
* add remoting service and move models into common module

* chore: fix mistakes and several rename

* [ISSUE #45] Implement methods from storage-plugin.admin(rocketmq) (#66)

* modify RocketmqTopicCore, using SDKManager

* fix style

* delete some variable in RocketmqProperties and TopicProperties & remote additional endPoint name

* remove junit dependency back to console module

* remove unnecessary brackets & revert em-dashboard-pom.xml & move RocketmqProperties to core.dto

* add todo

* move todo to common sdk dependencies & fix style

* add test and junit dependencies in core pom.xml

* revert the indentation in pom.xml & move test related dependencies to bottom in core-pom.xml

* revert indentation in pom.xml

* revert indentation in pom.xml

* remove unnecessary params

* remove params

* remove empty line

* chore: fix typos

---------

Co-authored-by: scwlkq <89067331+scwlkq@users.noreply.github.com>
  • Loading branch information
Lambert-Rao and scwlkq authored Mar 29, 2024
1 parent 576bf8b commit 13eae3f
Show file tree
Hide file tree
Showing 102 changed files with 2,400 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant;
package org.apache.eventmesh.dashboard.common.constant;

public class ApiPrefix {
public static final String API_PREFIX = "/eventmesh-dashboard/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant.health;
package org.apache.eventmesh.dashboard.common.constant.health;

public class HealthCheckTypeConstant {

Expand All @@ -35,5 +35,5 @@ public class HealthCheckTypeConstant {
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";
public static final String HEALTH_CHECK_SUBTYPE_NACOS_REGISTRY = "nacos-registry";
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant.health;
package org.apache.eventmesh.dashboard.common.constant.health;

public class HealthConstant {
public static final String NEW_LINE_ENDING = "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums;
package org.apache.eventmesh.dashboard.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums;
package org.apache.eventmesh.dashboard.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StatusEnum {
public enum RecordStatus {
INACTIVE(0, "Inactive"),
ACTIVE(1, "Active");

Expand Down
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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums.health;
package org.apache.eventmesh.dashboard.common.enums.health;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,24 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums.health;
package org.apache.eventmesh.dashboard.common.enums.health;

import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_CLUSTER;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_RUNTIME;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_STORAGE;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_TOPIC;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_UNKNOWN;
import org.apache.eventmesh.dashboard.common.constant.health.HealthCheckTypeConstant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum HealthCheckType {
UNKNOWN(0, HEALTH_CHECK_TYPE_UNKNOWN),
UNKNOWN(0, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_UNKNOWN),

CLUSTER(1, HEALTH_CHECK_TYPE_CLUSTER),
CLUSTER(1, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_CLUSTER),

RUNTIME(2, HEALTH_CHECK_TYPE_RUNTIME),
RUNTIME(2, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_RUNTIME),

TOPIC(3, HEALTH_CHECK_TYPE_TOPIC),
TOPIC(3, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_TOPIC),

STORAGE(4, HEALTH_CHECK_TYPE_STORAGE);
STORAGE(4, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_STORAGE);

@Getter
private final Integer number;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.model.metadata;

import lombok.Data;

@Data
public class AclMetadata extends MetadataConfig {

private Long clusterId;
private String principal;
private Integer operation;
private String permissionType;
private String host;
private String resourceType;
private String resourceName;
private Integer patternType;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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.model.metadata;

import lombok.Data;

@Data
public class ClientMetadata extends MetadataConfig {

private String name;

private String platform;

/**
* programing language of client
*/
private String language;

/**
* process id
*/
private Long pid;

private String host;

private Integer port;

/**
* protocol used to connect to runtime.
*/
private String protocol;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* 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.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.StoreType;

import lombok.Data;

@Data
public class ClusterMetadata extends MetadataConfig {

private String clusterName;

private String registryAddress;

private String bootstrapServers;

private String eventmeshVersion;

private String clientProperties;

private String jmxProperties;

private String regProperties;

private Integer authType;

private Integer runState;

private Integer status;

private StoreType storeType;

private String description;
}
Original file line number Diff line number Diff line change
@@ -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.common.model.metadata;

import lombok.Data;

/**
* Config metadata is a piece of config with key and value
*/
@Data
public class ConfigMetadata extends MetadataConfig {

/**
* property key
*/
private String configKey;

private String configValue;

private Integer instanceType;

private Long instanceId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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.model.metadata;

import lombok.Data;

/**
* when insert data to db from meta service, connection metadata operation should be called after cluster and client in order to fetch information
* from them.
*/
@Data
public class ConnectionMetadata extends MetadataConfig {


/**
* The type of source. Possible values are "connector" or "client".
*/
private String sourceType;

/**
* The id of the source.<p> It can be connectorId or clientId according to the sourceType.
*/
private Long sourceId;

private String sourceHost;

private Integer sourcePort;

private String sourceName;

/**
* The type of sink. Possible values are "connector" or "client".
*/
private String sinkType;

private String sinkHost;

private Integer sinkPort;

private String sinkName;

/**
* The id of the sink.<p> It can be connectorId or clientId according to the sinkType.
*/
private Long sinkId;

private Long runtimeId;

private String topic;

private Long groupId;

private String description;
}
Loading

0 comments on commit 13eae3f

Please sign in to comment.