diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6bfaadea..00000000 --- a/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM fabric8/java-alpine-openjdk8-jdk -MAINTAINER xuzhengxi -ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ADD ./web/target/kafka-manager-web-1.1.0-SNAPSHOT.jar kafka-manager-web.jar -ADD ./docker/kafka-manager/application-standalone.yml application.yml -ENTRYPOINT ["java","-jar","/kafka-manager-web.jar","--spring.config.location=./application.yml"] -EXPOSE 8080 \ No newline at end of file diff --git a/README.md b/README.md index e65dc2c0..bcbad513 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ --- -![kafka-manager-logo](doc/assets/images/common/logo_name.png) +![kafka-manager-logo](./docs/assets/images/common/logo_name.png) **一站式`Apache Kafka`集群指标监控与运维管控平台** @@ -12,110 +12,39 @@ ### 集群监控维度 -- 多版本集群管控,支持从`0.10.2`到`2.4`版本; +- 多版本集群管控,支持从`0.10.2`到`2.x`版本; - 集群Topic、Broker等多维度历史与实时关键指标查看; ### 集群管控维度 -- 集群运维,包括逻辑Region方式管理集群; -- Broker运维,包括优先副本选举; +- 集群运维,包括逻辑Region方式管理集群 +- Broker运维,包括优先副本选举 - Topic运维,包括创建、查询、扩容、修改属性、数据采样及迁移等; -- 消费组运维,包括指定时间或指定偏移两种方式进行重置消费偏移; +- 消费组运维,包括指定时间或指定偏移两种方式进行重置消费偏移 ### 用户使用维度 -- 管理员用户与普通用户视角区分; -- 管理员用户与普通用户权限区分; +- Kafka用户、Kafka研发、Kafka运维 视角区分 +- Kafka用户、Kafka研发、Kafka运维 权限区分 ---- ## kafka-manager架构图 -![kafka-manager-arch](doc/assets/images/common/arch.png) +![kafka-manager-arch](./docs/assets/images/common/arch.png) ---- - -## 安装手册 - -### 环境依赖 - -- `Maven 3.5.0+`(后端打包依赖) -- `node v8.12.0+`(前端打包依赖) -- `Java 8+`(运行环境需要) -- `MySQL` 或 `PostgreSQL`(数据存储) - ---- - -### 环境初始化 - -**MySQL** - -执行[create_mysql_table.sql](doc/create_mysql_table.sql)中的SQL命令,从而创建所需的MySQL库及表,默认创建的库名是`kafka_manager`。 - -``` -############# 示例: -mysql -uXXXX -pXXX -h XXX.XXX.XXX.XXX -PXXXX < ./create_mysql_table.sql -``` - -**PostgreSQL** - -执行[create_postgresql_table.sql](doc/create_postgresql_table.sql)中的SQL命令,从而创建所需的PostgreSQL表。 - -``` -############# 示例: -psql -h XXX.XXX.XXX.XXX -U XXXX -d kafka_manager -f ./create_postgresql_table.sql -``` - -*PostgreSQL 用户、数据库创建方式* - -```sql -create user admin encrypted password 'admin'; -create database kafka_manager owner=admin template=template0 encoding='UTF-8' lc_collate='zh_CN.UTF-8' lc_ctype='zh_CN.UTF-8'; -``` - -***默认配置使用 MySQL 数据库,若要使用 PostgreSQL 数据库,使用 `-Dspring.profiles.active=pg` 指定 `application-pg.yml` 配置文件。*** - ---- - - -### 打包 - -执行`mvn install`命令即可。 - -备注:每一次执行`mvn install`命令,都将在`web/src/main/resources/templates`下面生成最新的前端资源文件,如果`console`模块下的代码没有变更,可以修改`./pom.xml`文件,忽略对`console`模块的打包。 - ---- - -### 启动 - -``` -############# application.yml 是配置文件 -cp web/src/main/resources/application.yml web/target/ -cd web/target/ -nohup java -jar kafka-manager-web-1.1.0-SNAPSHOT.jar --spring.config.location=./application.yml > /dev/null 2>&1 & -``` - -### 使用 - -本地启动的话,访问`http://localhost:8080`,输入帐号及密码进行登录。更多参考:[kafka-manager使用手册](doc/user_cn_guide.md) - - ---- - ## 相关文档 -- [kafka-manager使用手册](doc/user_cn_guide.md) +- [kafka-manager安装手册](./docs/install_cn_guide.md) +- [kafka-manager接入集群](./docs/manual_kafka_op/add_cluster.md) +- [kafka-manager使用手册-待更新](./docs/user_cn_guide.md) ## 钉钉交流群 -搜索群号:`32821440` 或者扫码可入群交流. 备注:在钉钉搜索框搜索`32821440`,然后搜索结果中点击 "网络查找手机/邮箱/钉钉号" 即可看到我们的钉钉群:滴滴KafkaManager开源用户群。 - - -![dingding_group](doc/assets/images/common/dingding_group.jpg) +![dingding_group](./docs/assets/images/common/dingding_group.jpg) ## 项目成员 diff --git a/common/pom.xml b/common/pom.xml deleted file mode 100644 index a39bcd31..00000000 --- a/common/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - com.xiaojukeji.kafka - kafka-manager-common - 1.1.0-SNAPSHOT - jar - - - kafka-manager - com.xiaojukeji.kafka - 1.1.0-SNAPSHOT - - - - 1.0.0-SNAPSHOT - true - true - 1.8 - 1.8 - UTF-8 - UTF-8 - - - - commons-beanutils - commons-beanutils - 1.9.3 - - - org.apache.curator - curator-recipes - 2.10.0 - - - org.apache.zookeeper - zookeeper - - - com.alibaba - fastjson - - - org.apache.kafka - kafka_2.10 - - - \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java deleted file mode 100644 index fc6a657e..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author zengqiao - * @date 20/2/28 - */ -public class Constant { - public static final String KAFKA_MANAGER_INNER_ERROR = "kafka-manager inner error"; - - public final static Map> BROKER_METRICS_TYPE_MBEAN_NAME_MAP = new ConcurrentHashMap<>(); - - public final static Map> TOPIC_METRICS_TYPE_MBEAN_NAME_MAP = new ConcurrentHashMap<>(); - - public static final String COLLECTOR_METRICS_LOGGER = "COLLECTOR_METRICS_LOGGER"; - - public static final String API_METRICS_LOGGER = "API_METRICS_LOGGER"; -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/MetricsType.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/MetricsType.java deleted file mode 100644 index 290330bf..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/MetricsType.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant; - -public class MetricsType { - /** - * Broker流量详情 - */ - public static final int BROKER_FLOW_DETAIL = 0; - public static final int BROKER_TO_DB_METRICS = 1; // Broker入DB的Metrics指标 - public static final int BROKER_REAL_TIME_METRICS = 2; // Broker入DB的Metrics指标 - public static final int BROKER_OVER_VIEW_METRICS = 3; // Broker状态概览的指标 - public static final int BROKER_OVER_ALL_METRICS = 4; // Broker状态总揽的指标 - public static final int BROKER_ANALYSIS_METRICS = 5; // Broker分析的指标 - public static final int BROKER_TOPIC_ANALYSIS_METRICS = 6; // Broker分析的指标 - - /** - * Topic流量详情 - */ - public static final int TOPIC_FLOW_DETAIL = 100; - public static final int TOPIC_FLOW_OVERVIEW = 101; - public static final int TOPIC_METRICS_TO_DB = 102; - - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/OffsetStoreLocation.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/OffsetStoreLocation.java deleted file mode 100644 index b1cd29f7..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/OffsetStoreLocation.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant; - -/** - * @author limeng - * @date 2017/11/21 - */ -public enum OffsetStoreLocation { - - ZOOKEEPER("zookeeper"), - - BROKER("broker"); - - private final String location; - - OffsetStoreLocation(String location) { - this.location = location; - } - - public String getLocation() { - return location; - } - - public static OffsetStoreLocation getOffsetStoreLocation(String location) { - if (location == null) { - return null; - } - - for (OffsetStoreLocation offsetStoreLocation: OffsetStoreLocation.values()) { - if (offsetStoreLocation.location.equals(location)) { - return offsetStoreLocation; - } - } - return null; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/StatusCode.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/StatusCode.java deleted file mode 100644 index f56ad7dc..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/StatusCode.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant; - -public class StatusCode { - /* - * kafka-manager status code: 17000 ~ 17999 - * - * 正常 - 0 - * 参数错误 - 10000 - * 资源未就绪 - 10001 - */ - - /* - * 已约定的状态码 - */ - public static final Integer SUCCESS = 0; - public static final Integer PARAM_ERROR = 10000; //参数错误 - public static final Integer RES_UNREADY = 10001; //资源未就绪 - - public static final Integer MY_SQL_SELECT_ERROR = 17210; // MySQL 查询数据异常 - public static final Integer MY_SQL_INSERT_ERROR = 17211; // MySQL 插入数据异常 - public static final Integer MY_SQL_DELETE_ERROR = 17212; // MySQL 删除数据异常 - public static final Integer MY_SQL_UPDATE_ERROR = 17213; // MySQL 更新数据异常 - public static final Integer MY_SQL_REPLACE_ERROR = 17214; // MySQL 替换数据异常 - - public static final Integer OPERATION_ERROR = 17300; // 请求操作异常 - - - /** - * Topic相关的异常 - */ - public static final Integer TOPIC_EXISTED = 17400; //Topic已经存在了 - - public static final Integer PARTIAL_SUCESS = 17700; //操作部分成功 - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorConditionType.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorConditionType.java deleted file mode 100644 index 2b48dde4..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorConditionType.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant.monitor; - -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.List; - -/** - * 条件类型 - * @author zengqiao - * @date 19/5/12 - */ -public enum MonitorConditionType { - BIGGER(">", "大于"), - EQUAL("=", "等于"), - LESS("<", "小于"), - NOT_EQUAL("!=", "不等于"); - - private String name; - - private String message; - - MonitorConditionType(String name, String message) { - this.name = name; - this.message = message; - } - - public static boolean legal(String name) { - for (MonitorConditionType elem: MonitorConditionType.values()) { - if (elem.name.equals(name)) { - return true; - } - } - return false; - } - - @Override - public String toString() { - return "ConditionType{" + - "name='" + name + '\'' + - ", message='" + message + '\'' + - '}'; - } - - public static List> toList() { - List> conditionTypeList = new ArrayList<>(); - for (MonitorConditionType elem: MonitorConditionType.values()) { - conditionTypeList.add(new AbstractMap.SimpleEntry<>(elem.name, elem.message)); - } - return conditionTypeList; - } - - /** - * 计算 operation(data1, data2) 是否为true - * @param data1 - * @param data2 - * @param operation - * @author zengqiao - * @date 19/5/12 - * @return boolean - */ - public static boolean matchCondition(Double data1, Double data2, String operation) { - switch (operation) { - case ">": return data1 > data2; - case "<": return data1 < data2; - case "=": return data1.equals(data2); - case "!=": return !data1.equals(data2); - default: - } - return false; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMatchStatus.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMatchStatus.java deleted file mode 100644 index 5ab3dd5d..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMatchStatus.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant.monitor; - -/** - * @author zengqiao - * @date 20/3/18 - */ -public enum MonitorMatchStatus { - UNKNOWN(0), - - YES(1), - - NO(2); - - public Integer status; - - MonitorMatchStatus(Integer status) { - this.status = status; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMetricsType.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMetricsType.java deleted file mode 100644 index 1611c55c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorMetricsType.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant.monitor; - -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.List; - -/** - * 指标类型 - * @author zengqiao - * @date 19/5/12 - */ -public enum MonitorMetricsType { - BYTES_IN("BytesIn", "流入流量"), - BYTES_OUT("BytesOut", "流出流量"), - LAG("Lag", "消费组Lag"); - - private String name; - - private String message; - - MonitorMetricsType(String name, String message) { - this.name = name; - this.message = message; - } - - public static boolean legal(String name) { - for (MonitorMetricsType elem: MonitorMetricsType.values()) { - if (elem.name.equals(name)) { - return true; - } - } - return false; - } - - @Override - public String toString() { - return "MetricType{" + - "name='" + name + '\'' + - ", message='" + message + '\'' + - '}'; - } - - public static List> toList() { - List> metricTypeList = new ArrayList<>(); - for (MonitorMetricsType elem: MonitorMetricsType.values()) { - metricTypeList.add(new AbstractMap.SimpleEntry<>(elem.name, elem.message)); - } - return metricTypeList; - } - - public String getName() { - return name; - } - - public String getMessage() { - return message; - } - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorNotifyType.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorNotifyType.java deleted file mode 100644 index d71cda56..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/monitor/MonitorNotifyType.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.constant.monitor; - -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.List; - -/** - * 通知类型 - * @author huangyiminghappy@163.com - * @date 2019-05-06 - */ -public enum MonitorNotifyType { - KAFKA_MESSAGE("KAFKA", "告警发送到KAFKA"); - - String name; - - String message; - - MonitorNotifyType(String name, String message){ - this.name = name; - this.message = message; - } - - public String getName() { - return name; - } - - public String getMessage() { - return message; - } - - public static boolean legal(String name) { - for (MonitorNotifyType elem: MonitorNotifyType.values()) { - if (elem.name.equals(name)) { - return true; - } - } - return false; - } - - @Override - public String toString() { - return "NotifyType{" + - "name='" + name + '\'' + - ", message='" + message + '\'' + - '}'; - } - - public static List> toList() { - List> notifyTypeList = new ArrayList<>(); - for (MonitorNotifyType elem: MonitorNotifyType.values()) { - notifyTypeList.add(new AbstractMap.SimpleEntry<>(elem.name, elem.message)); - } - return notifyTypeList; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetrics.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetrics.java deleted file mode 100644 index d16cb338..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetrics.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity; - -/** - * ConsumerMetrics - * @author tukun - * @date 2015/11/12 - */ -public class ConsumerMetrics { - private Long clusterId; - - private String topicName; - - private String consumerGroup; - - private String location; - - private Long sumLag; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public String getConsumerGroup() { - return consumerGroup; - } - - public void setConsumerGroup(String consumerGroup) { - this.consumerGroup = consumerGroup; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public Long getSumLag() { - return sumLag; - } - - public void setSumLag(Long sumLag) { - this.sumLag = sumLag; - } - - @Override - public String toString() { - return "ConsumerMetrics{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", consumerGroup='" + consumerGroup + '\'' + - ", location='" + location + '\'' + - ", sumLag=" + sumLag + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/annotations/FieldSelector.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/annotations/FieldSelector.java deleted file mode 100644 index 722f20f3..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/annotations/FieldSelector.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.annotations; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * FieldSelector - * @author huangyiminghappy@163.com - * @date 2019-06-19 - */ -@Target(ElementType.FIELD) -@Retention(RUNTIME) -@Documented -public @interface FieldSelector { - //注解的属性 - String name() default ""; - - int[] types() default {}; - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AccountRoleEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AccountRoleEnum.java deleted file mode 100644 index c1c4a769..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AccountRoleEnum.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 用户角色 - * @author zengqiao_cn@163.com - * @date 19/4/15 - */ -public enum AccountRoleEnum { - UNKNOWN(-1), - - NORMAL(0), - - SRE(1), - - ADMIN(2); - - private Integer role; - - AccountRoleEnum(Integer role) { - this.role = role; - } - - public Integer getRole() { - return role; - } - - public static AccountRoleEnum getUserRoleEnum(Integer role) { - for (AccountRoleEnum elem: AccountRoleEnum.values()) { - if (elem.getRole().equals(role)) { - return elem; - } - } - return null; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AdminTopicStatusEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AdminTopicStatusEnum.java deleted file mode 100644 index 883648e4..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/AdminTopicStatusEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 操作Topic的状态 - * @author zengqiao - * @date 19/11/26 - */ -public enum AdminTopicStatusEnum { - SUCCESS(0, "成功"), - REPLACE_DB_FAILED(1, "更新DB失败"), - PARAM_NULL_POINTER(2, "参数错误"), - PARTITION_NUM_ILLEGAL(3, "分区数错误"), - BROKER_NUM_NOT_ENOUGH(4, "Broker数不足错误"), - TOPIC_NAME_ILLEGAL(5, "Topic名称非法"), - TOPIC_EXISTED(6, "Topic已存在"), - UNKNOWN_TOPIC_PARTITION(7, "Topic未知"), - TOPIC_CONFIG_ILLEGAL(8, "Topic配置错误"), - TOPIC_IN_DELETING(9, "Topic正在删除"), - UNKNOWN_ERROR(10, "未知错误"); - - private Integer code; - - private String message; - - AdminTopicStatusEnum(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public String getMessage() { - return message; - } -} - diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/DBStatusEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/DBStatusEnum.java deleted file mode 100644 index 6cd66544..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/DBStatusEnum.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * DBStatus状态含义 - * @author zengqiao_cn@163.com - * @date 19/4/15 - */ -public enum DBStatusEnum { - /** - * 逻辑删除 - */ - DELETED(-1), - - /** - * 普通 - */ - NORMAL(0), - - /** - * 已完成并通过 - */ - PASSED(1); - - private Integer status; - - DBStatusEnum(Integer status) { - this.status = status; - } - - public Integer getStatus() { - return status; - } - - public static DBStatusEnum getDBStatusEnum(Integer status) { - for (DBStatusEnum elem: DBStatusEnum.values()) { - if (elem.getStatus().equals(status)) { - return elem; - } - } - return null; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OperationEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OperationEnum.java deleted file mode 100644 index 6061b81c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OperationEnum.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 操作类型 - * @author zengqiao - * @date 19/11/21 - */ -public enum OperationEnum { - CREATE_TOPIC("create_topic"), - DELETE_TOPIC("delete_topic"), - MODIFY_TOPIC_CONFIG("modify_topic_config"), - EXPAND_TOPIC_PARTITION("expand_topic_partition"); - - public String message; - - OperationEnum(String message) { - this.message = message; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OrderTypeEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OrderTypeEnum.java deleted file mode 100644 index 70de82b4..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/OrderTypeEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 工单类型 - * @author zengqiao - * @date 19/6/23 - */ -public enum OrderTypeEnum { - UNKNOWN(-1), - - APPLY_TOPIC(0), - - APPLY_PARTITION(1); - - private Integer code; - - OrderTypeEnum(Integer code) { - this.code = code; - } - - public Integer getCode() { - return code; - } - - public static OrderTypeEnum getOrderTypeEnum(Integer code) { - for (OrderTypeEnum elem: OrderTypeEnum.values()) { - if (elem.getCode().equals(code)) { - return elem; - } - } - return OrderTypeEnum.UNKNOWN; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/PreferredReplicaElectEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/PreferredReplicaElectEnum.java deleted file mode 100644 index ade9bb8f..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/PreferredReplicaElectEnum.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 优先副本选举状态 - * @author zengqiao - * @date 2017/6/29. - */ -public enum PreferredReplicaElectEnum { - SUCCESS(0, "成功[创建成功|执行成功]"), - RUNNING(1, "正在执行"), - ALREADY_EXIST(2, "任务已存在"), - PARAM_ILLEGAL(3, "参数错误"), - UNKNOWN(4, "进度未知"); - - private Integer code; - - private String message; - - PreferredReplicaElectEnum(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public String getMessage() { - return message; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/ReassignmentStatusEnum.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/ReassignmentStatusEnum.java deleted file mode 100644 index 1bb892db..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/bizenum/ReassignmentStatusEnum.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.bizenum; - -/** - * 迁移状态 - * @author zengqiao - * @date 19/12/29 - */ -public enum ReassignmentStatusEnum { - WAITING(0, "等待执行"), - RUNNING(1, "正在执行"), - SUCCESS(2, "迁移成功"), - FAILED(3, "迁移失败"), - CANCELED(4, "取消任务"); - - private Integer code; - - private String message; - - ReassignmentStatusEnum(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public String getMessage() { - return message; - } - - public static boolean triggerTask(Integer status) { - if (WAITING.code.equals(status) || RUNNING.code.equals(status)) { - return true; - } - return false; - } - - public static boolean cancelTask(Integer status) { - if (WAITING.code.equals(status)) { - return true; - } - return false; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverallDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverallDTO.java deleted file mode 100644 index 07243d48..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverallDTO.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -import com.xiaojukeji.kafka.manager.common.entity.metrics.BrokerMetrics; -import com.xiaojukeji.kafka.manager.common.entity.zookeeper.BrokerMetadata; - -/** - * @author zengqiao - * @date 19/4/21 - */ -public class BrokerOverallDTO { - private Integer brokerId; - - private String host; - - private Integer port; - - private Integer jmxPort; - - private Long startTime; - - private Integer partitionCount; - - private Integer underReplicatedPartitions; - - private Integer leaderCount; - - private Double bytesInPerSec; - - public Integer getBrokerId() { - return brokerId; - } - - public void setBrokerId(Integer brokerId) { - this.brokerId = brokerId; - } - - public String getHost() { - return host; - } - - public void setHost(String host) { - this.host = host; - } - - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public Integer getJmxPort() { - return jmxPort; - } - - public void setJmxPort(Integer jmxPort) { - this.jmxPort = jmxPort; - } - - public Long getStartTime() { - return startTime; - } - - public void setStartTime(Long startTime) { - this.startTime = startTime; - } - - public Integer getPartitionCount() { - return partitionCount; - } - - public void setPartitionCount(Integer partitionCount) { - this.partitionCount = partitionCount; - } - - public Integer getUnderReplicatedPartitions() { - return underReplicatedPartitions; - } - - public void setUnderReplicatedPartitions(Integer underReplicatedPartitions) { - this.underReplicatedPartitions = underReplicatedPartitions; - } - - public Integer getLeaderCount() { - return leaderCount; - } - - public void setLeaderCount(Integer leaderCount) { - this.leaderCount = leaderCount; - } - - public Double getBytesInPerSec() { - return bytesInPerSec; - } - - public void setBytesInPerSec(Double bytesInPerSec) { - this.bytesInPerSec = bytesInPerSec; - } - - @Override - public String toString() { - return "BrokerOverallDTO{" + - "brokerId=" + brokerId + - ", host='" + host + '\'' + - ", port=" + port + - ", jmxPort=" + jmxPort + - ", startTime=" + startTime + - ", partitionCount=" + partitionCount + - ", underReplicatedPartitions=" + underReplicatedPartitions + - ", leaderCount=" + leaderCount + - ", bytesInPerSec=" + bytesInPerSec + - '}'; - } - - public static BrokerOverallDTO newInstance(BrokerMetadata brokerMetadata, BrokerMetrics brokerMetrics) { - BrokerOverallDTO brokerOverallDTO = new BrokerOverallDTO(); - brokerOverallDTO.setBrokerId(brokerMetadata.getBrokerId()); - brokerOverallDTO.setHost(brokerMetadata.getHost()); - brokerOverallDTO.setPort(brokerMetadata.getPort()); - brokerOverallDTO.setJmxPort(brokerMetadata.getJmxPort()); - brokerOverallDTO.setStartTime(brokerMetadata.getTimestamp()); - if (brokerMetrics == null) { - return brokerOverallDTO; - } - brokerOverallDTO.setPartitionCount(brokerMetrics.getPartitionCount()); - brokerOverallDTO.setLeaderCount(brokerMetrics.getLeaderCount()); - brokerOverallDTO.setBytesInPerSec(brokerMetrics.getBytesInPerSec()); - brokerOverallDTO.setUnderReplicatedPartitions(brokerMetrics.getUnderReplicatedPartitions()); - return brokerOverallDTO; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverviewDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverviewDTO.java deleted file mode 100644 index 18ca0eb5..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerOverviewDTO.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -import com.xiaojukeji.kafka.manager.common.entity.metrics.BrokerMetrics; -import com.xiaojukeji.kafka.manager.common.entity.zookeeper.BrokerMetadata; -import com.xiaojukeji.kafka.manager.common.entity.bizenum.DBStatusEnum; - -/** - * @author zengqiao_cn@163.com - * @date 19/4/21 - */ -public class BrokerOverviewDTO { - private Integer brokerId; - - private String host; - - private Integer port; - - private Integer jmxPort; - - private Long startTime; - - private Double byteIn; - - private Double byteOut; - - private Integer status; - - public Integer getBrokerId() { - return brokerId; - } - - public void setBrokerId(Integer brokerId) { - this.brokerId = brokerId; - } - - public String getHost() { - return host; - } - - public void setHost(String host) { - this.host = host; - } - - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public Integer getJmxPort() { - return jmxPort; - } - - public void setJmxPort(Integer jmxPort) { - this.jmxPort = jmxPort; - } - - public Long getStartTime() { - return startTime; - } - - public void setStartTime(Long startTime) { - this.startTime = startTime; - } - - public Double getByteIn() { - return byteIn; - } - - public void setByteIn(Double byteIn) { - this.byteIn = byteIn; - } - - public Double getByteOut() { - return byteOut; - } - - public void setByteOut(Double byteOut) { - this.byteOut = byteOut; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - @Override - public String toString() { - return "BrokerInfoDTO{" + - "brokerId=" + brokerId + - ", host='" + host + '\'' + - ", port=" + port + - ", jmxPort=" + jmxPort + - ", startTime=" + startTime + - ", byteIn=" + byteIn + - ", byteOut=" + byteOut + - ", status=" + status + - '}'; - } - - public static BrokerOverviewDTO newInstance(BrokerMetadata brokerMetadata, BrokerMetrics brokerMetrics) { - BrokerOverviewDTO brokerOverviewDTO = new BrokerOverviewDTO(); - brokerOverviewDTO.setBrokerId(brokerMetadata.getBrokerId()); - brokerOverviewDTO.setHost(brokerMetadata.getHost()); - brokerOverviewDTO.setPort(brokerMetadata.getPort()); - brokerOverviewDTO.setJmxPort(brokerMetadata.getJmxPort()); - brokerOverviewDTO.setStartTime(brokerMetadata.getTimestamp()); - brokerOverviewDTO.setStatus(DBStatusEnum.NORMAL.getStatus()); - if (brokerMetrics == null) { - return brokerOverviewDTO; - } - brokerOverviewDTO.setByteIn(brokerMetrics.getBytesInPerSec()); - brokerOverviewDTO.setByteOut(brokerMetrics.getBytesOutPerSec()); - return brokerOverviewDTO; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ControllerDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ControllerDTO.java deleted file mode 100644 index c798e79f..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ControllerDTO.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -import java.util.Date; - -/** - * @author zengqiao - * @date 19/4/22 - */ -public class ControllerDTO { - private String clusterName; - - private Integer brokerId; - - private String host; - - private Integer controllerVersion; - - private Date controllerTimestamp; - - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public Integer getBrokerId() { - return brokerId; - } - - public void setBrokerId(Integer brokerId) { - this.brokerId = brokerId; - } - - public String getHost() { - return host; - } - - public void setHost(String host) { - this.host = host; - } - - public Integer getControllerVersion() { - return controllerVersion; - } - - public void setControllerVersion(Integer controllerVersion) { - this.controllerVersion = controllerVersion; - } - - public Date getControllerTimestamp() { - return controllerTimestamp; - } - - public void setControllerTimestamp(Date controllerTimestamp) { - this.controllerTimestamp = controllerTimestamp; - } - - @Override - public String toString() { - return "ControllerInfoDTO{" + - "clusterName='" + clusterName + '\'' + - ", brokerId=" + brokerId + - ", host='" + host + '\'' + - ", controllerVersion=" + controllerVersion + - ", controllerTimestamp=" + controllerTimestamp + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicBasicDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicBasicDTO.java deleted file mode 100644 index e8f4e1c1..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicBasicDTO.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -/** - * @author arthur - * @date 2018/09/03 - */ -public class TopicBasicDTO { - private String topicName; - - private Integer partitionNum; - - private Integer replicaNum; - - private Integer brokerNum; - - private String remark; - - private Long modifyTime; - - private Long createTime; - - private String region; - - private Long retentionTime; - - private String principal; - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - - public Integer getReplicaNum() { - return replicaNum; - } - - public void setReplicaNum(Integer replicaNum) { - this.replicaNum = replicaNum; - } - - public Integer getBrokerNum() { - return brokerNum; - } - - public void setBrokerNum(Integer brokerNum) { - this.brokerNum = brokerNum; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public String getRegion() { - return region; - } - - public void setRegion(String region) { - this.region = region; - } - - public Long getRetentionTime() { - return retentionTime; - } - - public void setRetentionTime(Long retentionTime) { - this.retentionTime = retentionTime; - } - - public Long getModifyTime() { - return modifyTime; - } - - public void setModifyTime(Long modifyTime) { - this.modifyTime = modifyTime; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public String getPrincipal() { - return principal; - } - - public void setPrincipal(String principal) { - this.principal = principal; - } - - @Override - public String toString() { - return "TopicBasicInfoDTO{" + - "topicName='" + topicName + '\'' + - ", partitionNum=" + partitionNum + - ", replicaNum=" + replicaNum + - ", brokerNum=" + brokerNum + - ", remark='" + remark + '\'' + - ", modifyTime=" + modifyTime + - ", createTime=" + createTime + - ", region='" + region + '\'' + - ", retentionTime=" + retentionTime + - ", principal='" + principal + '\'' + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicOverviewDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicOverviewDTO.java deleted file mode 100644 index 80647dea..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicOverviewDTO.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -public class TopicOverviewDTO { - private Long clusterId; - - private String topicName; - - private Integer replicaNum; - - private Integer partitionNum; - - private Double bytesInPerSec; - - private Double produceRequestPerSec; - - private Long updateTime; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public Integer getReplicaNum() { - return replicaNum; - } - - public void setReplicaNum(Integer replicaNum) { - this.replicaNum = replicaNum; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - - public Double getBytesInPerSec() { - return bytesInPerSec; - } - - public void setBytesInPerSec(Double bytesInPerSec) { - this.bytesInPerSec = bytesInPerSec; - } - - public Double getProduceRequestPerSec() { - return produceRequestPerSec; - } - - public void setProduceRequestPerSec(Double produceRequestPerSec) { - this.produceRequestPerSec = produceRequestPerSec; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - return "TopicOverviewDTO{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", replicaNum=" + replicaNum + - ", partitionNum=" + partitionNum + - ", bytesInPerSec=" + bytesInPerSec + - ", produceRequestPerSec=" + produceRequestPerSec + - ", updateTime=" + updateTime + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicPartitionDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicPartitionDTO.java deleted file mode 100644 index 154ca694..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/TopicPartitionDTO.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; - -import java.io.Serializable; -import java.util.List; - -/** - * @author arthur - * @date 2017/6/6. - */ -public class TopicPartitionDTO implements Serializable { - - private Integer partitionId; - - private Long offset; - - private Integer leaderBrokerId; - - private Integer preferredBrokerId; - - private Integer leaderEpoch; - - private List replicasBroker; - - private List isr; - - private Boolean underReplicated; - - public Integer getPartitionId() { - return partitionId; - } - - public void setPartitionId(Integer partitionId) { - this.partitionId = partitionId; - } - - public Long getOffset() { - return offset; - } - - public void setOffset(Long offset) { - this.offset = offset; - } - - public Integer getLeaderBrokerId() { - return leaderBrokerId; - } - - public void setLeaderBrokerId(Integer leaderBrokerId) { - this.leaderBrokerId = leaderBrokerId; - } - - public Integer getPreferredBrokerId() { - return preferredBrokerId; - } - - public void setPreferredBrokerId(Integer preferredBrokerId) { - this.preferredBrokerId = preferredBrokerId; - } - - public Integer getLeaderEpoch() { - return leaderEpoch; - } - - public void setLeaderEpoch(Integer leaderEpoch) { - this.leaderEpoch = leaderEpoch; - } - - public List getReplicasBroker() { - return replicasBroker; - } - - public void setReplicasBroker(List replicasBroker) { - this.replicasBroker = replicasBroker; - } - - public List getIsr() { - return isr; - } - - public void setIsr(List isr) { - this.isr = isr; - } - - public boolean isUnderReplicated() { - return underReplicated; - } - - public void setUnderReplicated(boolean underReplicated) { - this.underReplicated = underReplicated; - } - - @Override - public String toString() { - return "TopicPartitionDTO{" + - "partitionId=" + partitionId + - ", offset=" + offset + - ", leaderBrokerId=" + leaderBrokerId + - ", preferredBrokerId=" + preferredBrokerId + - ", leaderEpoch=" + leaderEpoch + - ", replicasBroker=" + replicasBroker + - ", isr=" + isr + - ", underReplicated=" + underReplicated + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmNotifyDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmNotifyDTO.java deleted file mode 100644 index 01b6497c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmNotifyDTO.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.alarm; - -/** - * 告警通知 - * @author zengqiao - * @date 2020-02-14 - */ -public class AlarmNotifyDTO { - private Long alarmRuleId; - - private String actionTag; - - private String message; - - public Long getAlarmRuleId() { - return alarmRuleId; - } - - public void setAlarmRuleId(Long alarmRuleId) { - this.alarmRuleId = alarmRuleId; - } - - public String getActionTag() { - return actionTag; - } - - public void setActionTag(String actionTag) { - this.actionTag = actionTag; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - @Override - public String toString() { - return "AlarmNotifyDTO{" + - "alarmRuleId=" + alarmRuleId + - ", actionTag='" + actionTag + '\'' + - ", message='" + message + '\'' + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmRuleDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmRuleDTO.java deleted file mode 100644 index 8fab24c4..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmRuleDTO.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.alarm; - -import java.util.Map; - -/** - * @author zengqiao - * @date 19/12/16 - */ -public class AlarmRuleDTO { - /** - * 告警ID - */ - private Long id; - - /** - * 告警名称 - */ - private String name; - - /** - * 已持续次数 - */ - private Integer duration; - - /** - * 集群ID, 过滤条件中必有的, 单独拿出来 - */ - private Long clusterId; - - /** - * 告警策略表达式 - */ - private AlarmStrategyExpressionDTO strategyExpression; - - /** - * 告警策略过滤条件 - */ - private Map strategyFilterMap; - - /** - * 告警策略Action方式 - */ - private Map strategyActionMap; - - /** - * 修改时间 - */ - private Long gmtModify; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getDuration() { - return duration; - } - - public void setDuration(Integer duration) { - this.duration = duration; - } - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public AlarmStrategyExpressionDTO getStrategyExpression() { - return strategyExpression; - } - - public void setStrategyExpression(AlarmStrategyExpressionDTO strategyExpression) { - this.strategyExpression = strategyExpression; - } - - public Map getStrategyFilterMap() { - return strategyFilterMap; - } - - public void setStrategyFilterMap(Map strategyFilterMap) { - this.strategyFilterMap = strategyFilterMap; - } - - public Map getStrategyActionMap() { - return strategyActionMap; - } - - public void setStrategyActionMap(Map strategyActionMap) { - this.strategyActionMap = strategyActionMap; - } - - public Long getGmtModify() { - return gmtModify; - } - - public void setGmtModify(Long gmtModify) { - this.gmtModify = gmtModify; - } - - @Override - public String toString() { - return "AlarmRuleDTO{" + - "id=" + id + - ", name='" + name + '\'' + - ", duration=" + duration + - ", clusterId=" + clusterId + - ", strategyExpression=" + strategyExpression + - ", strategyFilterMap=" + strategyFilterMap + - ", strategyActionMap=" + strategyActionMap + - ", gmtModify=" + gmtModify + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyActionDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyActionDTO.java deleted file mode 100644 index c93f18d9..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyActionDTO.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.alarm; - -/** - * @author zengqiao - * @date 19/12/16 - */ -public class AlarmStrategyActionDTO { - private String actionWay; // 告知方式: kafka - - private String actionTag; - - public String getActionWay() { - return actionWay; - } - - public void setActionWay(String actionWay) { - this.actionWay = actionWay; - } - - public String getActionTag() { - return actionTag; - } - - public void setActionTag(String actionTag) { - this.actionTag = actionTag; - } - - @Override - public String toString() { - return "AlarmStrategyActionDTO{" + - "actionWay='" + actionWay + '\'' + - ", actionTag='" + actionTag + '\'' + - '}'; - } - - public boolean legal() { - if (actionWay == null - || actionTag == null) { - return false; - } - return true; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyExpressionDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyExpressionDTO.java deleted file mode 100644 index ca8a030c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyExpressionDTO.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.alarm; - -/** - * 策略表达式 - * @author zengqiao - * @date 19/12/16 - */ -public class AlarmStrategyExpressionDTO { - private String metric; - - private String opt; - - private Long threshold; - - private Integer duration; - - public String getMetric() { - return metric; - } - - public void setMetric(String metric) { - this.metric = metric; - } - - public String getOpt() { - return opt; - } - - public void setOpt(String opt) { - this.opt = opt; - } - - public Long getThreshold() { - return threshold; - } - - public void setThreshold(Long threshold) { - this.threshold = threshold; - } - - public Integer getDuration() { - return duration; - } - - public void setDuration(Integer duration) { - this.duration = duration; - } - - @Override - public String toString() { - return "AlarmStrategyExpressionModel{" + - "metric='" + metric + '\'' + - ", opt='" + opt + '\'' + - ", threshold=" + threshold + - ", duration=" + duration + - '}'; - } - - public boolean legal() { - if (metric == null - || opt == null - || threshold == null - || duration == null || duration <= 0) { - return false; - } - return true; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyFilterDTO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyFilterDTO.java deleted file mode 100644 index e5996a5c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/alarm/AlarmStrategyFilterDTO.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.alarm; - -/** - * 告警过滤条件 - * @author zengqiao - * @date 19/12/16 - */ -public class AlarmStrategyFilterDTO { - private String key; - - private String value; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { - return "AlarmStrategyFilterModel{" + - "key='" + key + '\'' + - ", value='" + value + '\'' + - '}'; - } - - public boolean legal() { - if (key == null - || value == null) { - return false; - } - return true; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java deleted file mode 100644 index e4fc0910..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java +++ /dev/null @@ -1,394 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.metrics; - -import com.xiaojukeji.kafka.manager.common.constant.MetricsType; -import com.xiaojukeji.kafka.manager.common.entity.annotations.FieldSelector; -import com.xiaojukeji.kafka.manager.common.entity.po.BaseEntryDO; - -/** - * @author zengqiao - * @date 19/11/25 - */ -public class BaseMetrics extends BaseEntryDO { - /** - * 每秒流入的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.BROKER_OVER_VIEW_METRICS, - MetricsType.BROKER_ANALYSIS_METRICS, - MetricsType.BROKER_TOPIC_ANALYSIS_METRICS, - MetricsType.TOPIC_FLOW_DETAIL, - MetricsType.TOPIC_FLOW_OVERVIEW, - MetricsType.TOPIC_METRICS_TO_DB - }) - protected Double bytesInPerSec = 0.0; - protected Double bytesInPerSecMeanRate = 0.0; - protected Double bytesInPerSecFiveMinuteRate = 0.0; - protected Double bytesInPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒流出的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.BROKER_OVER_VIEW_METRICS, - MetricsType.BROKER_ANALYSIS_METRICS, - MetricsType.BROKER_TOPIC_ANALYSIS_METRICS, - MetricsType.TOPIC_FLOW_DETAIL, - MetricsType.TOPIC_METRICS_TO_DB - }) - protected Double bytesOutPerSec = 0.0; - protected Double bytesOutPerSecMeanRate = 0.0; - protected Double bytesOutPerSecFiveMinuteRate = 0.0; - protected Double bytesOutPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒流入的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.BROKER_ANALYSIS_METRICS, - MetricsType.BROKER_TOPIC_ANALYSIS_METRICS, - MetricsType.TOPIC_FLOW_DETAIL, - MetricsType.TOPIC_METRICS_TO_DB - }) - protected Double messagesInPerSec = 0.0; - protected Double messagesInPerSecMeanRate = 0.0; - protected Double messagesInPerSecFiveMinuteRate = 0.0; - protected Double messagesInPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒拒绝的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.TOPIC_FLOW_DETAIL, - MetricsType.TOPIC_METRICS_TO_DB - }) - protected Double bytesRejectedPerSec = 0.0; - protected Double bytesRejectedPerSecMeanRate = 0.0; - protected Double bytesRejectedPerSecFiveMinuteRate = 0.0; - protected Double bytesRejectedPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒失败的Produce请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.TOPIC_FLOW_DETAIL - }) - protected Double failProduceRequestPerSec = 0.0; - protected Double failProduceRequestPerSecMeanRate = 0.0; - protected Double failProduceRequestPerSecFiveMinuteRate = 0.0; - protected Double failProduceRequestPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒失败的Fetch请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS, - MetricsType.TOPIC_FLOW_DETAIL - }) - protected Double failFetchRequestPerSec = 0.0; - protected Double failFetchRequestPerSecMeanRate = 0.0; - protected Double failFetchRequestPerSecFiveMinuteRate = 0.0; - protected Double failFetchRequestPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒总Produce请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_ANALYSIS_METRICS, - MetricsType.BROKER_TOPIC_ANALYSIS_METRICS, - MetricsType.TOPIC_FLOW_DETAIL, - MetricsType.TOPIC_METRICS_TO_DB, - MetricsType.TOPIC_FLOW_OVERVIEW - }) - protected Double totalProduceRequestsPerSec = 0.0; - protected Double totalProduceRequestsPerSecMeanRate = 0.0; - protected Double totalProduceRequestsPerSecFiveMinuteRate = 0.0; - protected Double totalProduceRequestsPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒总Fetch请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_ANALYSIS_METRICS, - MetricsType.BROKER_TOPIC_ANALYSIS_METRICS, - MetricsType.TOPIC_FLOW_DETAIL - }) - protected Double totalFetchRequestsPerSec = 0.0; - protected Double totalFetchRequestsPerSecMeanRate = 0.0; - protected Double totalFetchRequestsPerSecFiveMinuteRate = 0.0; - protected Double totalFetchRequestsPerSecFifteenMinuteRate = 0.0; - - public Double getBytesInPerSec() { - return bytesInPerSec; - } - - public void setBytesInPerSec(Double bytesInPerSec) { - this.bytesInPerSec = bytesInPerSec; - } - - public Double getBytesInPerSecMeanRate() { - return bytesInPerSecMeanRate; - } - - public void setBytesInPerSecMeanRate(Double bytesInPerSecMeanRate) { - this.bytesInPerSecMeanRate = bytesInPerSecMeanRate; - } - - public Double getBytesInPerSecFiveMinuteRate() { - return bytesInPerSecFiveMinuteRate; - } - - public void setBytesInPerSecFiveMinuteRate(Double bytesInPerSecFiveMinuteRate) { - this.bytesInPerSecFiveMinuteRate = bytesInPerSecFiveMinuteRate; - } - - public Double getBytesInPerSecFifteenMinuteRate() { - return bytesInPerSecFifteenMinuteRate; - } - - public void setBytesInPerSecFifteenMinuteRate(Double bytesInPerSecFifteenMinuteRate) { - this.bytesInPerSecFifteenMinuteRate = bytesInPerSecFifteenMinuteRate; - } - - public Double getBytesOutPerSec() { - return bytesOutPerSec; - } - - public void setBytesOutPerSec(Double bytesOutPerSec) { - this.bytesOutPerSec = bytesOutPerSec; - } - - public Double getBytesOutPerSecMeanRate() { - return bytesOutPerSecMeanRate; - } - - public void setBytesOutPerSecMeanRate(Double bytesOutPerSecMeanRate) { - this.bytesOutPerSecMeanRate = bytesOutPerSecMeanRate; - } - - public Double getBytesOutPerSecFiveMinuteRate() { - return bytesOutPerSecFiveMinuteRate; - } - - public void setBytesOutPerSecFiveMinuteRate(Double bytesOutPerSecFiveMinuteRate) { - this.bytesOutPerSecFiveMinuteRate = bytesOutPerSecFiveMinuteRate; - } - - public Double getBytesOutPerSecFifteenMinuteRate() { - return bytesOutPerSecFifteenMinuteRate; - } - - public void setBytesOutPerSecFifteenMinuteRate(Double bytesOutPerSecFifteenMinuteRate) { - this.bytesOutPerSecFifteenMinuteRate = bytesOutPerSecFifteenMinuteRate; - } - - public Double getMessagesInPerSec() { - return messagesInPerSec; - } - - public void setMessagesInPerSec(Double messagesInPerSec) { - this.messagesInPerSec = messagesInPerSec; - } - - public Double getMessagesInPerSecMeanRate() { - return messagesInPerSecMeanRate; - } - - public void setMessagesInPerSecMeanRate(Double messagesInPerSecMeanRate) { - this.messagesInPerSecMeanRate = messagesInPerSecMeanRate; - } - - public Double getMessagesInPerSecFiveMinuteRate() { - return messagesInPerSecFiveMinuteRate; - } - - public void setMessagesInPerSecFiveMinuteRate(Double messagesInPerSecFiveMinuteRate) { - this.messagesInPerSecFiveMinuteRate = messagesInPerSecFiveMinuteRate; - } - - public Double getMessagesInPerSecFifteenMinuteRate() { - return messagesInPerSecFifteenMinuteRate; - } - - public void setMessagesInPerSecFifteenMinuteRate(Double messagesInPerSecFifteenMinuteRate) { - this.messagesInPerSecFifteenMinuteRate = messagesInPerSecFifteenMinuteRate; - } - - public Double getBytesRejectedPerSec() { - return bytesRejectedPerSec; - } - - public void setBytesRejectedPerSec(Double bytesRejectedPerSec) { - this.bytesRejectedPerSec = bytesRejectedPerSec; - } - - public Double getBytesRejectedPerSecMeanRate() { - return bytesRejectedPerSecMeanRate; - } - - public void setBytesRejectedPerSecMeanRate(Double bytesRejectedPerSecMeanRate) { - this.bytesRejectedPerSecMeanRate = bytesRejectedPerSecMeanRate; - } - - public Double getBytesRejectedPerSecFiveMinuteRate() { - return bytesRejectedPerSecFiveMinuteRate; - } - - public void setBytesRejectedPerSecFiveMinuteRate(Double bytesRejectedPerSecFiveMinuteRate) { - this.bytesRejectedPerSecFiveMinuteRate = bytesRejectedPerSecFiveMinuteRate; - } - - public Double getBytesRejectedPerSecFifteenMinuteRate() { - return bytesRejectedPerSecFifteenMinuteRate; - } - - public void setBytesRejectedPerSecFifteenMinuteRate(Double bytesRejectedPerSecFifteenMinuteRate) { - this.bytesRejectedPerSecFifteenMinuteRate = bytesRejectedPerSecFifteenMinuteRate; - } - - public Double getFailProduceRequestPerSec() { - return failProduceRequestPerSec; - } - - public void setFailProduceRequestPerSec(Double failProduceRequestPerSec) { - this.failProduceRequestPerSec = failProduceRequestPerSec; - } - - public Double getFailProduceRequestPerSecMeanRate() { - return failProduceRequestPerSecMeanRate; - } - - public void setFailProduceRequestPerSecMeanRate(Double failProduceRequestPerSecMeanRate) { - this.failProduceRequestPerSecMeanRate = failProduceRequestPerSecMeanRate; - } - - public Double getFailProduceRequestPerSecFiveMinuteRate() { - return failProduceRequestPerSecFiveMinuteRate; - } - - public void setFailProduceRequestPerSecFiveMinuteRate(Double failProduceRequestPerSecFiveMinuteRate) { - this.failProduceRequestPerSecFiveMinuteRate = failProduceRequestPerSecFiveMinuteRate; - } - - public Double getFailProduceRequestPerSecFifteenMinuteRate() { - return failProduceRequestPerSecFifteenMinuteRate; - } - - public void setFailProduceRequestPerSecFifteenMinuteRate(Double failProduceRequestPerSecFifteenMinuteRate) { - this.failProduceRequestPerSecFifteenMinuteRate = failProduceRequestPerSecFifteenMinuteRate; - } - - public Double getFailFetchRequestPerSec() { - return failFetchRequestPerSec; - } - - public void setFailFetchRequestPerSec(Double failFetchRequestPerSec) { - this.failFetchRequestPerSec = failFetchRequestPerSec; - } - - public Double getFailFetchRequestPerSecMeanRate() { - return failFetchRequestPerSecMeanRate; - } - - public void setFailFetchRequestPerSecMeanRate(Double failFetchRequestPerSecMeanRate) { - this.failFetchRequestPerSecMeanRate = failFetchRequestPerSecMeanRate; - } - - public Double getFailFetchRequestPerSecFiveMinuteRate() { - return failFetchRequestPerSecFiveMinuteRate; - } - - public void setFailFetchRequestPerSecFiveMinuteRate(Double failFetchRequestPerSecFiveMinuteRate) { - this.failFetchRequestPerSecFiveMinuteRate = failFetchRequestPerSecFiveMinuteRate; - } - - public Double getFailFetchRequestPerSecFifteenMinuteRate() { - return failFetchRequestPerSecFifteenMinuteRate; - } - - public void setFailFetchRequestPerSecFifteenMinuteRate(Double failFetchRequestPerSecFifteenMinuteRate) { - this.failFetchRequestPerSecFifteenMinuteRate = failFetchRequestPerSecFifteenMinuteRate; - } - - public Double getTotalProduceRequestsPerSec() { - return totalProduceRequestsPerSec; - } - - public void setTotalProduceRequestsPerSec(Double totalProduceRequestsPerSec) { - this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; - } - - public Double getTotalProduceRequestsPerSecMeanRate() { - return totalProduceRequestsPerSecMeanRate; - } - - public void setTotalProduceRequestsPerSecMeanRate(Double totalProduceRequestsPerSecMeanRate) { - this.totalProduceRequestsPerSecMeanRate = totalProduceRequestsPerSecMeanRate; - } - - public Double getTotalProduceRequestsPerSecFiveMinuteRate() { - return totalProduceRequestsPerSecFiveMinuteRate; - } - - public void setTotalProduceRequestsPerSecFiveMinuteRate(Double totalProduceRequestsPerSecFiveMinuteRate) { - this.totalProduceRequestsPerSecFiveMinuteRate = totalProduceRequestsPerSecFiveMinuteRate; - } - - public Double getTotalProduceRequestsPerSecFifteenMinuteRate() { - return totalProduceRequestsPerSecFifteenMinuteRate; - } - - public void setTotalProduceRequestsPerSecFifteenMinuteRate(Double totalProduceRequestsPerSecFifteenMinuteRate) { - this.totalProduceRequestsPerSecFifteenMinuteRate = totalProduceRequestsPerSecFifteenMinuteRate; - } - - public Double getTotalFetchRequestsPerSec() { - return totalFetchRequestsPerSec; - } - - public void setTotalFetchRequestsPerSec(Double totalFetchRequestsPerSec) { - this.totalFetchRequestsPerSec = totalFetchRequestsPerSec; - } - - public Double getTotalFetchRequestsPerSecMeanRate() { - return totalFetchRequestsPerSecMeanRate; - } - - public void setTotalFetchRequestsPerSecMeanRate(Double totalFetchRequestsPerSecMeanRate) { - this.totalFetchRequestsPerSecMeanRate = totalFetchRequestsPerSecMeanRate; - } - - public Double getTotalFetchRequestsPerSecFiveMinuteRate() { - return totalFetchRequestsPerSecFiveMinuteRate; - } - - public void setTotalFetchRequestsPerSecFiveMinuteRate(Double totalFetchRequestsPerSecFiveMinuteRate) { - this.totalFetchRequestsPerSecFiveMinuteRate = totalFetchRequestsPerSecFiveMinuteRate; - } - - public Double getTotalFetchRequestsPerSecFifteenMinuteRate() { - return totalFetchRequestsPerSecFifteenMinuteRate; - } - - public void setTotalFetchRequestsPerSecFifteenMinuteRate(Double totalFetchRequestsPerSecFifteenMinuteRate) { - this.totalFetchRequestsPerSecFifteenMinuteRate = totalFetchRequestsPerSecFifteenMinuteRate; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java deleted file mode 100644 index ff7aa04a..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java +++ /dev/null @@ -1,331 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.metrics; - -import com.xiaojukeji.kafka.manager.common.constant.Constant; -import com.xiaojukeji.kafka.manager.common.constant.MetricsType; -import com.xiaojukeji.kafka.manager.common.entity.annotations.FieldSelector; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -/** - * 需要定时拉取的broker数据 - * @author tukun - * @date 2015/11/6. - */ -public class BrokerMetrics extends BaseMetrics { - /** - * 集群ID - */ - private Long clusterId; - - /** - * Topic名称 - */ - private Integer brokerId; - - /** - * 每秒Produce请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS - }) - private Double produceRequestPerSec = 0.0; - private Double produceRequestPerSecMeanRate = 0.0; - private Double produceRequestPerSecFiveMinuteRate = 0.0; - private Double produceRequestPerSecFifteenMinuteRate = 0.0; - - /** - * 每秒Fetch请求数的近一分钟的均值、平均字节数、近五分钟均值、近十五分钟均值 - */ - @FieldSelector(types = { - MetricsType.BROKER_FLOW_DETAIL, - MetricsType.BROKER_TO_DB_METRICS, - MetricsType.BROKER_REAL_TIME_METRICS - }) - private Double fetchConsumerRequestPerSec = 0.0; - private Double fetchConsumerRequestPerSecMeanRate = 0.0; - private Double fetchConsumerRequestPerSecFiveMinuteRate = 0.0; - private Double fetchConsumerRequestPerSecFifteenMinuteRate = 0.0; - - /** - * Broker分区数量 - */ - @FieldSelector(types = {MetricsType.BROKER_OVER_ALL_METRICS, 5}) - private int partitionCount; - - /** - * Broker已同步分区数量 - */ - @FieldSelector(types = {MetricsType.BROKER_OVER_ALL_METRICS}) - private int underReplicatedPartitions; - - /** - * Broker Leader的数量 - */ - @FieldSelector(types = {MetricsType.BROKER_OVER_ALL_METRICS, 5}) - private int leaderCount; - - /** - * Broker请求处理器空闲百分比 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double requestHandlerAvgIdlePercent = 0.0; - - /** - * 网络处理器空闲百分比 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double networkProcessorAvgIdlePercent = 0.0; - - /** - * 请求列表大小 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Integer requestQueueSize = 0; - - /** - * 响应列表大小 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Integer responseQueueSize = 0; - - /** - * 刷日志时间 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double logFlushRateAndTimeMs = 0.0; - - /** - * produce请求总时间-平均值 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double totalTimeProduceMean = 0.0; - - /** - * produce请求总时间-99th - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double totalTimeProduce99Th = 0.0; - - /** - * fetch consumer请求总时间-平均值 - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double totalTimeFetchConsumerMean = 0.0; - - /** - * fetch consumer请求总时间-99th - */ - @FieldSelector(types = {MetricsType.BROKER_TO_DB_METRICS}) - private Double totalTimeFetchConsumer99Th = 0.0; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public Integer getBrokerId() { - return brokerId; - } - - public void setBrokerId(Integer brokerId) { - this.brokerId = brokerId; - } - - public Double getProduceRequestPerSec() { - return produceRequestPerSec; - } - - public void setProduceRequestPerSec(Double produceRequestPerSec) { - this.produceRequestPerSec = produceRequestPerSec; - } - - public Double getProduceRequestPerSecMeanRate() { - return produceRequestPerSecMeanRate; - } - - public void setProduceRequestPerSecMeanRate(Double produceRequestPerSecMeanRate) { - this.produceRequestPerSecMeanRate = produceRequestPerSecMeanRate; - } - - public Double getProduceRequestPerSecFiveMinuteRate() { - return produceRequestPerSecFiveMinuteRate; - } - - public void setProduceRequestPerSecFiveMinuteRate(Double produceRequestPerSecFiveMinuteRate) { - this.produceRequestPerSecFiveMinuteRate = produceRequestPerSecFiveMinuteRate; - } - - public Double getProduceRequestPerSecFifteenMinuteRate() { - return produceRequestPerSecFifteenMinuteRate; - } - - public void setProduceRequestPerSecFifteenMinuteRate(Double produceRequestPerSecFifteenMinuteRate) { - this.produceRequestPerSecFifteenMinuteRate = produceRequestPerSecFifteenMinuteRate; - } - - public Double getFetchConsumerRequestPerSec() { - return fetchConsumerRequestPerSec; - } - - public void setFetchConsumerRequestPerSec(Double fetchConsumerRequestPerSec) { - this.fetchConsumerRequestPerSec = fetchConsumerRequestPerSec; - } - - public Double getFetchConsumerRequestPerSecMeanRate() { - return fetchConsumerRequestPerSecMeanRate; - } - - public void setFetchConsumerRequestPerSecMeanRate(Double fetchConsumerRequestPerSecMeanRate) { - this.fetchConsumerRequestPerSecMeanRate = fetchConsumerRequestPerSecMeanRate; - } - - public Double getFetchConsumerRequestPerSecFiveMinuteRate() { - return fetchConsumerRequestPerSecFiveMinuteRate; - } - - public void setFetchConsumerRequestPerSecFiveMinuteRate(Double fetchConsumerRequestPerSecFiveMinuteRate) { - this.fetchConsumerRequestPerSecFiveMinuteRate = fetchConsumerRequestPerSecFiveMinuteRate; - } - - public Double getFetchConsumerRequestPerSecFifteenMinuteRate() { - return fetchConsumerRequestPerSecFifteenMinuteRate; - } - - public void setFetchConsumerRequestPerSecFifteenMinuteRate(Double fetchConsumerRequestPerSecFifteenMinuteRate) { - this.fetchConsumerRequestPerSecFifteenMinuteRate = fetchConsumerRequestPerSecFifteenMinuteRate; - } - - public int getPartitionCount() { - return partitionCount; - } - - public void setPartitionCount(int partitionCount) { - this.partitionCount = partitionCount; - } - - public int getUnderReplicatedPartitions() { - return underReplicatedPartitions; - } - - public void setUnderReplicatedPartitions(int underReplicatedPartitions) { - this.underReplicatedPartitions = underReplicatedPartitions; - } - - public int getLeaderCount() { - return leaderCount; - } - - public void setLeaderCount(int leaderCount) { - this.leaderCount = leaderCount; - } - - public Double getRequestHandlerAvgIdlePercent() { - return requestHandlerAvgIdlePercent; - } - - public void setRequestHandlerAvgIdlePercent(Double requestHandlerAvgIdlePercent) { - this.requestHandlerAvgIdlePercent = requestHandlerAvgIdlePercent; - } - - public Double getNetworkProcessorAvgIdlePercent() { - return networkProcessorAvgIdlePercent; - } - - public void setNetworkProcessorAvgIdlePercent(Double networkProcessorAvgIdlePercent) { - this.networkProcessorAvgIdlePercent = networkProcessorAvgIdlePercent; - } - - public Integer getRequestQueueSize() { - return requestQueueSize; - } - - public void setRequestQueueSize(Integer requestQueueSize) { - this.requestQueueSize = requestQueueSize; - } - - public Integer getResponseQueueSize() { - return responseQueueSize; - } - - public void setResponseQueueSize(Integer responseQueueSize) { - this.responseQueueSize = responseQueueSize; - } - - public Double getLogFlushRateAndTimeMs() { - return logFlushRateAndTimeMs; - } - - public void setLogFlushRateAndTimeMs(Double logFlushRateAndTimeMs) { - this.logFlushRateAndTimeMs = logFlushRateAndTimeMs; - } - - public Double getTotalTimeProduceMean() { - return totalTimeProduceMean; - } - - public void setTotalTimeProduceMean(Double totalTimeProduceMean) { - this.totalTimeProduceMean = totalTimeProduceMean; - } - - public Double getTotalTimeProduce99Th() { - return totalTimeProduce99Th; - } - - public void setTotalTimeProduce99Th(Double totalTimeProduce99Th) { - this.totalTimeProduce99Th = totalTimeProduce99Th; - } - - public Double getTotalTimeFetchConsumerMean() { - return totalTimeFetchConsumerMean; - } - - public void setTotalTimeFetchConsumerMean(Double totalTimeFetchConsumerMean) { - this.totalTimeFetchConsumerMean = totalTimeFetchConsumerMean; - } - - public Double getTotalTimeFetchConsumer99Th() { - return totalTimeFetchConsumer99Th; - } - - public void setTotalTimeFetchConsumer99Th(Double totalTimeFetchConsumer99Th) { - this.totalTimeFetchConsumer99Th = totalTimeFetchConsumer99Th; - } - - private static void initialization(Field[] fields){ - for(Field field : fields){ - FieldSelector annotation = field.getAnnotation(FieldSelector.class); - if(annotation ==null){ - continue; - } - - String fieldName; - if("".equals(annotation.name())) { - fieldName = field.getName().substring(0,1).toUpperCase() + field.getName().substring(1); - } else{ - fieldName = annotation.name(); - } - for(int type: annotation.types()){ - List list = Constant.BROKER_METRICS_TYPE_MBEAN_NAME_MAP.getOrDefault(type, new ArrayList<>()); - list.add(fieldName); - Constant.BROKER_METRICS_TYPE_MBEAN_NAME_MAP.put(type, list); - } - } - } - - public static List getFieldNameList(int metricsType){ - synchronized (BrokerMetrics.class) { - if (Constant.BROKER_METRICS_TYPE_MBEAN_NAME_MAP.isEmpty()) { - initialization(BrokerMetrics.class.getDeclaredFields()); - initialization(BaseMetrics.class.getDeclaredFields()); - } - } - return Constant.BROKER_METRICS_TYPE_MBEAN_NAME_MAP.getOrDefault(metricsType, new ArrayList<>()); - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java deleted file mode 100644 index 1c09c2ff..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.metrics; - -import com.xiaojukeji.kafka.manager.common.constant.Constant; -import com.xiaojukeji.kafka.manager.common.entity.annotations.FieldSelector; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -public class TopicMetrics extends BaseMetrics { - /** - * 集群ID - */ - private Long clusterId; - - /** - * Topic名称 - */ - private String topicName; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - private static void initialization(Field[] fields){ - for(Field field : fields){ - FieldSelector annotation = field.getAnnotation(FieldSelector.class); - if(annotation ==null){ - continue; - } - String fieldName; - if("".equals(annotation.name())){ - String name = field.getName(); - fieldName = name.substring(0,1).toUpperCase()+name.substring(1); - }else{ - fieldName = annotation.name(); - } - for(int type: annotation.types()){ - List list = Constant.TOPIC_METRICS_TYPE_MBEAN_NAME_MAP.getOrDefault(type, new ArrayList<>()); - list.add(fieldName); - Constant.TOPIC_METRICS_TYPE_MBEAN_NAME_MAP.put(type, list); - } - } - } - - public static List getFieldNameList(int type){ - synchronized (TopicMetrics.class) { - if (Constant.TOPIC_METRICS_TYPE_MBEAN_NAME_MAP.isEmpty()) { - initialization(TopicMetrics.class.getDeclaredFields()); - initialization(BaseMetrics.class.getDeclaredFields()); - } - } - return Constant.TOPIC_METRICS_TYPE_MBEAN_NAME_MAP.get(type); - } - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AlarmRuleDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AlarmRuleDO.java deleted file mode 100644 index 7fdeb1ef..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AlarmRuleDO.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class AlarmRuleDO extends BaseDO { - private String alarmName; - - private String strategyExpressions; - - private String strategyFilters; - - private String strategyActions; - - private String principals; - - public String getAlarmName() { - return alarmName; - } - - public void setAlarmName(String alarmName) { - this.alarmName = alarmName; - } - - public String getStrategyExpressions() { - return strategyExpressions; - } - - public void setStrategyExpressions(String strategyExpressions) { - this.strategyExpressions = strategyExpressions; - } - - public String getStrategyFilters() { - return strategyFilters; - } - - public void setStrategyFilters(String strategyFilters) { - this.strategyFilters = strategyFilters; - } - - public String getStrategyActions() { - return strategyActions; - } - - public void setStrategyActions(String strategyActions) { - this.strategyActions = strategyActions; - } - - public String getPrincipals() { - return principals; - } - - public void setPrincipals(String principals) { - this.principals = principals; - } - - @Override - public String toString() { - return "AlarmRuleDO{" + - "alarmName='" + alarmName + '\'' + - ", strategyExpressions='" + strategyExpressions + '\'' + - ", strategyFilters='" + strategyFilters + '\'' + - ", strategyActions='" + strategyActions + '\'' + - ", principals='" + principals + '\'' + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseDO.java deleted file mode 100644 index 4d56dcbc..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseDO.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -import java.util.Date; - -/** - * @author arthur - * @date 2017/7/25. - */ -public class BaseDO { - protected Long id; - - protected Integer status; - - protected Date gmtCreate; - - protected Date gmtModify; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public Date getGmtCreate() { - return gmtCreate; - } - - public void setGmtCreate(Date gmtCreate) { - this.gmtCreate = gmtCreate; - } - - public Date getGmtModify() { - return gmtModify; - } - - public void setGmtModify(Date gmtModify) { - this.gmtModify = gmtModify; - } - - @Override - public String toString() { - return "BaseDO{" + - "id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseEntryDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseEntryDO.java deleted file mode 100644 index 7cc6bcc4..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BaseEntryDO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -import java.util.Date; - -/** - * @author zengqiao - * @date 19/11/25 - */ -public abstract class BaseEntryDO { - protected Long id; - - protected Date gmtCreate; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Date getGmtCreate() { - return gmtCreate; - } - - public void setGmtCreate(Date gmtCreate) { - this.gmtCreate = gmtCreate; - } - - @Override - public String toString() { - return "BaseEntryDO{" + - "id=" + id + - ", gmtCreate=" + gmtCreate + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterMetricsDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterMetricsDO.java deleted file mode 100644 index c7891ac3..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterMetricsDO.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -import com.xiaojukeji.kafka.manager.common.entity.metrics.BrokerMetrics; - -public class ClusterMetricsDO extends BaseEntryDO { - private Long clusterId; - - private Integer topicNum = 0; - - private Integer partitionNum = 0; - - private Integer brokerNum = 0; - - private Double bytesInPerSec = 0.0; - - private Double bytesOutPerSec = 0.0; - - private Double bytesRejectedPerSec = 0.0; - - private Double messagesInPerSec = 0.0; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public Integer getTopicNum() { - return topicNum; - } - - public void setTopicNum(Integer topicNum) { - this.topicNum = topicNum; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - - public Integer getBrokerNum() { - return brokerNum; - } - - public void setBrokerNum(Integer brokerNum) { - this.brokerNum = brokerNum; - } - - public Double getBytesInPerSec() { - return bytesInPerSec; - } - - public void setBytesInPerSec(Double bytesInPerSec) { - this.bytesInPerSec = bytesInPerSec; - } - - public Double getBytesOutPerSec() { - return bytesOutPerSec; - } - - public void setBytesOutPerSec(Double bytesOutPerSec) { - this.bytesOutPerSec = bytesOutPerSec; - } - - public Double getBytesRejectedPerSec() { - return bytesRejectedPerSec; - } - - public void setBytesRejectedPerSec(Double bytesRejectedPerSec) { - this.bytesRejectedPerSec = bytesRejectedPerSec; - } - - public Double getMessagesInPerSec() { - return messagesInPerSec; - } - - public void setMessagesInPerSec(Double messagesInPerSec) { - this.messagesInPerSec = messagesInPerSec; - } - - public void addBrokerMetrics(BrokerMetrics brokerMetrics) { - this.clusterId = brokerMetrics.getClusterId(); - this.brokerNum += 1; - this.bytesInPerSec += brokerMetrics.getBytesInPerSec(); - this.bytesOutPerSec += brokerMetrics.getBytesOutPerSec(); - this.bytesRejectedPerSec += brokerMetrics.getBytesRejectedPerSec(); - this.messagesInPerSec += brokerMetrics.getMessagesInPerSec(); - } - - @Override - public String toString() { - return "ClusterMetricsDO{" + - "clusterId=" + clusterId + - ", topicNum=" + topicNum + - ", partitionNum=" + partitionNum + - ", brokerNum=" + brokerNum + - ", bytesInPerSec=" + bytesInPerSec + - ", bytesOutPerSec=" + bytesOutPerSec + - ", bytesRejectedPerSec=" + bytesRejectedPerSec + - ", messagesInPerSec=" + messagesInPerSec + - ", id=" + id + - ", gmtCreate=" + gmtCreate + - '}'; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/MigrationTaskDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/MigrationTaskDO.java deleted file mode 100644 index 218bf9f6..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/MigrationTaskDO.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -/** - * migrate topic task do - * @author zengqiao - * @date 19/4/16 - */ -public class MigrationTaskDO extends BaseDO { - private Long clusterId; - - private String topicName; - - private String reassignmentJson; - - private Long throttle; - - private String operator; - - private String description; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getOperator() { - return operator; - } - - public void setOperator(String operator) { - this.operator = operator; - } - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public String getReassignmentJson() { - return reassignmentJson; - } - - public void setReassignmentJson(String reassignmentJson) { - this.reassignmentJson = reassignmentJson; - } - - public Long getThrottle() { - return throttle; - } - - public void setThrottle(Long throttle) { - this.throttle = throttle; - } - - @Override - public String toString() { - return "MigrationTaskDO{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", reassignmentJson='" + reassignmentJson + '\'' + - ", throttle=" + throttle + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } - - public static MigrationTaskDO createInstance(Long clusterId, - String topicName, - String reassignmentJson, - Long throttle, - String description) { - MigrationTaskDO migrationTaskDO = new MigrationTaskDO(); - migrationTaskDO.setClusterId(clusterId); - migrationTaskDO.setTopicName(topicName); - migrationTaskDO.setReassignmentJson(reassignmentJson); - migrationTaskDO.setThrottle(throttle); - migrationTaskDO.setDescription(description); - return migrationTaskDO; - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderPartitionDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderPartitionDO.java deleted file mode 100644 index 01666b18..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderPartitionDO.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class OrderPartitionDO extends BaseDO{ - private Long clusterId; - - private String clusterName; - - private String topicName; - - private String applicant; - - private Integer partitionNum; - - private String brokerList; - - private Long peakBytesIn; - - private String description; - - private Integer orderStatus; - - private String approver; - - private String opinion; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public String getApplicant() { - return applicant; - } - - public void setApplicant(String applicant) { - this.applicant = applicant; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - - public String getBrokerList() { - return brokerList; - } - - public void setBrokerList(String brokerList) { - this.brokerList = brokerList; - } - - public Long getPeakBytesIn() { - return peakBytesIn; - } - - public void setPeakBytesIn(Long peakBytesIn) { - this.peakBytesIn = peakBytesIn; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Integer getOrderStatus() { - return orderStatus; - } - - public void setOrderStatus(Integer orderStatus) { - this.orderStatus = orderStatus; - } - - public String getApprover() { - return approver; - } - - public void setApprover(String approver) { - this.approver = approver; - } - - public String getOpinion() { - return opinion; - } - - public void setOpinion(String opinion) { - this.opinion = opinion; - } - - @Override - public String toString() { - return "OrderPartitionDO{" + - "clusterId=" + clusterId + - ", clusterName='" + clusterName + '\'' + - ", topicName='" + topicName + '\'' + - ", applicant='" + applicant + '\'' + - ", partitionNum=" + partitionNum + - ", brokerList='" + brokerList + '\'' + - ", peakBytesIn=" + peakBytesIn + - ", description='" + description + '\'' + - ", orderStatus=" + orderStatus + - ", approver='" + approver + '\'' + - ", opinion='" + opinion + '\'' + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderTopicDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderTopicDO.java deleted file mode 100644 index ae376323..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OrderTopicDO.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class OrderTopicDO extends BaseDO { - private Long clusterId; - - private String clusterName; - - private String topicName; - - private Long retentionTime; - - private Integer partitionNum; - - private Integer replicaNum; - - private String regions; - - private String brokers; - - private Long peakBytesIn; - - private String applicant; - - private String principals; - - private String description; - - private Integer orderStatus; - - private String approver; - - private String opinion; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public Long getRetentionTime() { - return retentionTime; - } - - public void setRetentionTime(Long retentionTime) { - this.retentionTime = retentionTime; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - - public Integer getReplicaNum() { - return replicaNum; - } - - public void setReplicaNum(Integer replicaNum) { - this.replicaNum = replicaNum; - } - - public String getRegions() { - return regions; - } - - public void setRegions(String regions) { - this.regions = regions; - } - - public String getBrokers() { - return brokers; - } - - public void setBrokers(String brokers) { - this.brokers = brokers; - } - - public Long getPeakBytesIn() { - return peakBytesIn; - } - - public void setPeakBytesIn(Long peakBytesIn) { - this.peakBytesIn = peakBytesIn; - } - - public String getApplicant() { - return applicant; - } - - public void setApplicant(String applicant) { - this.applicant = applicant; - } - - public String getPrincipals() { - return principals; - } - - public void setPrincipals(String principals) { - this.principals = principals; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Integer getOrderStatus() { - return orderStatus; - } - - public void setOrderStatus(Integer orderStatus) { - this.orderStatus = orderStatus; - } - - public String getApprover() { - return approver; - } - - public void setApprover(String approver) { - this.approver = approver; - } - - public String getOpinion() { - return opinion; - } - - public void setOpinion(String opinion) { - this.opinion = opinion; - } - - @Override - public String toString() { - return "OrderTopicDO{" + - "clusterId=" + clusterId + - ", clusterName='" + clusterName + '\'' + - ", topicName='" + topicName + '\'' + - ", retentionTime=" + retentionTime + - ", partitionNum=" + partitionNum + - ", replicaNum=" + replicaNum + - ", regions='" + regions + '\'' + - ", brokers='" + brokers + '\'' + - ", peakBytesIn=" + peakBytesIn + - ", applicant='" + applicant + '\'' + - ", principals='" + principals + '\'' + - ", description='" + description + '\'' + - ", orderStatus=" + orderStatus + - ", approver='" + approver + '\'' + - ", opinion='" + opinion + '\'' + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/RegionDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/RegionDO.java deleted file mode 100644 index 306114cc..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/RegionDO.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class RegionDO extends BaseDO{ - private String regionName; - - private Long clusterId; - - private String brokerList; - - private Integer level; - - private String description; - - private String operator; - - public String getRegionName() { - return regionName; - } - - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getBrokerList() { - return brokerList; - } - - public void setBrokerList(String brokerList) { - this.brokerList = brokerList; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getOperator() { - return operator; - } - - public void setOperator(String operator) { - this.operator = operator; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicDO.java deleted file mode 100644 index e85fe98c..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicDO.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class TopicDO extends BaseDO{ - private Long clusterId; - - private String topicName; - - private String applicant; - - private String principals; - - private String description; - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public String getApplicant() { - return applicant; - } - - public void setApplicant(String applicant) { - this.applicant = applicant; - } - - public String getPrincipals() { - return principals; - } - - public void setPrincipals(String principals) { - this.principals = principals; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public String toString() { - return "TopicDO{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", applicant='" + applicant + '\'' + - ", principals='" + principals + '\'' + - ", description='" + description + '\'' + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicFavoriteDO.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicFavoriteDO.java deleted file mode 100644 index 01683eda..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/TopicFavoriteDO.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; - -public class TopicFavoriteDO extends BaseDO{ - private String username; - - private Long clusterId; - - private String topicName; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - @Override - public String toString() { - return "TopicFavoriteDO{" + - "username='" + username + '\'' + - ", clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/AlarmRuleQueryOption.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/AlarmRuleQueryOption.java deleted file mode 100644 index 09447131..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/AlarmRuleQueryOption.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po.query; - -/** - * @author zengqiao - * @date 19/12/2 - */ -public class AlarmRuleQueryOption extends BaseQueryOption { - private String alarmName; - - public String getAlarmName() { - return alarmName; - } - - public void setAlarmName(String alarmName) { - this.alarmName = alarmName; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/BaseQueryOption.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/BaseQueryOption.java deleted file mode 100644 index 09d59f19..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/BaseQueryOption.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po.query; - -/** - * @author zengqiao - * @date 19/12/2 - */ -public class BaseQueryOption { - protected Long id; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @Override - public String toString() { - return "BaseQueryOption{" + - "id=" + id + - '}'; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/ClusterQueryOption.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/ClusterQueryOption.java deleted file mode 100644 index 5bf8b181..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/query/ClusterQueryOption.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.entity.po.query; - -/** - * @author zengqiao - * @date 19/12/4 - */ -public class ClusterQueryOption extends BaseQueryOption { - private String clusterName; - - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } -} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java deleted file mode 100644 index 64220db3..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.utils; - -import java.util.Calendar; -import java.util.Date; - -/** - * 日期工具 - * @author huangyiminghappy@163.com - * @date 2019-03-20 - */ -public class DateUtils { - public static Date long2Date(Long time){ - return new Date(time); - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java deleted file mode 100644 index 3199bc72..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.utils.jmx; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import java.io.IOException; -import java.net.MalformedURLException; - -/** - * JMXConnector包装类 - * @author tukun - * @date 2015/11/9. - */ -public class JmxConnectorWrap { - private final static Logger logger = LoggerFactory.getLogger(JmxConnectorWrap.class); - - private JMXConnector jmxConnector; - - /** - * JMX连接的主机名 - */ - private String host; - - /** - * JMX连接端口 - */ - private int port; - - public JmxConnectorWrap(String host, int port) { - this.host = host; - this.port = port; - } - - public JMXConnector getJmxConnector() { - // 如果JMX连接断开,则进行重新连接 - if (jmxConnector == null && port != -1) { - createJMXConnector(); - } - return jmxConnector; - } - - private synchronized void createJMXConnector() { - if (jmxConnector != null) { - return; - } - - String jmxUrl = String.format("service:jmx:rmi:///jndi/rmi://%s:%d/jmxrmi", host, port); - try { - JMXServiceURL url = new JMXServiceURL(jmxUrl); - jmxConnector = JMXConnectorFactory.connect(url, null); - } catch (MalformedURLException e) { - logger.error("JMX url exception, host:{} port:{} jmxUrl:{}", host, port, jmxUrl, e); - } catch (IOException e) { - logger.error("JMX connect exception, host:{} port:{}.", host, port, e); - } - logger.info("JMX connect success, host:{} port:{}.", host, port); - } - - public void close() { - if (jmxConnector == null) { - return; - } - try { - jmxConnector.close(); - } catch (IOException e) { - logger.warn("close JmxConnector exception, host:{} port:{}.", host, port, e); - } - } -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java deleted file mode 100644 index a62296b1..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.utils.jmx; - -import java.util.HashMap; -import java.util.Map; - -/** - * kafka集群的mbean的object name集合 - * @author tukun, zengqiao - * @date 2015/11/5. - */ -public class MbeanNameUtil { - - //broker监控参数 - private static final String MESSAGE_IN_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec"; - private static final String BYTES_IN_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec"; - private static final String BYTES_OUT_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec"; - private static final String BYTES_REJECTED_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=BytesRejectedPerSec"; - private static final String FAILED_FETCH_REQUEST_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=FailedFetchRequestsPerSec"; - private static final String FAILED_PRODUCE_REQUEST_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=FailedProduceRequestsPerSec"; - private static final String PRODUCE_REQUEST_PER_SEC = "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce"; - private static final String CONSUMER_REQUEST_PER_SEC = "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=FetchConsumer"; - private static final String TOTAL_PRODUCE_REQUEST_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=TotalProduceRequestsPerSec"; - private static final String TOTAL_FETCH_REQUEST_PER_SEC = "kafka.server:type=BrokerTopicMetrics,name=TotalFetchRequestsPerSec"; - - private static final String REQUEST_HANDLER_AVG_IDLE_PERCENT = "kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent"; - private static final String NETWORK_PROCESSOR_AVG_IDLE_PERCENT = "kafka.network:type=SocketServer,name=NetworkProcessorAvgIdlePercent"; - private static final String REQUEST_QUEUE_SIZE = "kafka.network:type=RequestChannel,name=RequestQueueSize"; - private static final String RESPONSE_QUEUE_SIZE = "kafka.network:type=RequestChannel,name=ResponseQueueSize"; - private static final String LOG_FLUSH_RATE_AND_TIME_MS = "kafka.log:type=LogFlushStats,name=LogFlushRateAndTimeMs"; - private static final String TOTAL_TIME_PRODUCE = "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce"; - private static final String TOTAL_TIME_FETCH_CONSUMER = "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer"; - - private static final String PART_COUNT = "kafka.server:type=ReplicaManager,name=PartitionCount"; - private static final String PARTITION_OFFSET_PULL = "kafka.log:type=Log,name=LogEndOffset,topic=${topic},partition=${partition}"; - private static final String UNDER_REPLICATED_PARTITIONS = "kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions"; - private static final String LEADER_COUNT = "kafka.server:type=ReplicaManager,name=LeaderCount"; - - -// private static final String PRODUCE_REQUEST_TIME = "kafka.network:type=TopicRequestMetrics,name=TotalTimeMs,request=Produce"; -// private static final String FETCH_REQUEST_TIME = "kafka.network:type=TopicRequestMetrics,name=TotalTimeMs,request=FetchConsumer"; - - - //存储监控的参数name到获取的object_name的映射关系图 - private static Map mbeanNameMap = new HashMap(); - static { - //监控参数配置,object_name和监控的属性名 - mbeanNameMap.put("MessagesInPerSec", new Mbean(MESSAGE_IN_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("BytesInPerSec", new Mbean(BYTES_IN_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("BytesOutPerSec", new Mbean(BYTES_OUT_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("BytesRejectedPerSec", new Mbean(BYTES_REJECTED_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("FailFetchRequestPerSec", new Mbean(FAILED_FETCH_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("FailProduceRequestPerSec", new Mbean(FAILED_PRODUCE_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("ProduceRequestPerSec", new Mbean(PRODUCE_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("FetchConsumerRequestPerSec", new Mbean(CONSUMER_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("TotalProduceRequestsPerSec", new Mbean(TOTAL_PRODUCE_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - mbeanNameMap.put("TotalFetchRequestsPerSec", new Mbean(TOTAL_FETCH_REQUEST_PER_SEC,"OneMinuteRate", Double.class)); - - - mbeanNameMap.put("PartitionOffset", new Mbean(PARTITION_OFFSET_PULL,"Value", int.class)); - - mbeanNameMap.put("PartitionCount", new Mbean(PART_COUNT,"Value", int.class)); - mbeanNameMap.put("UnderReplicatedPartitions", new Mbean(UNDER_REPLICATED_PARTITIONS,"Value", int.class)); - mbeanNameMap.put("LeaderCount", new Mbean(LEADER_COUNT,"Value", int.class)); - - mbeanNameMap.put("RequestHandlerAvgIdlePercent", new Mbean(REQUEST_HANDLER_AVG_IDLE_PERCENT,"OneMinuteRate", Double.class)); - mbeanNameMap.put("NetworkProcessorAvgIdlePercent", new Mbean(NETWORK_PROCESSOR_AVG_IDLE_PERCENT,"Value", Double.class)); - mbeanNameMap.put("RequestQueueSize", new Mbean(REQUEST_QUEUE_SIZE,"Value", int.class)); - mbeanNameMap.put("ResponseQueueSize", new Mbean(RESPONSE_QUEUE_SIZE, "Value", int.class)); - mbeanNameMap.put("LogFlushRateAndTimeMs", new Mbean(LOG_FLUSH_RATE_AND_TIME_MS,"OneMinuteRate", Double.class)); - mbeanNameMap.put("TotalTimeProduceMean", new Mbean(TOTAL_TIME_PRODUCE,"Mean", Double.class)); - mbeanNameMap.put("TotalTimeProduce99Th", new Mbean(TOTAL_TIME_PRODUCE,"99thPercentile", Double.class)); - mbeanNameMap.put("TotalTimeFetchConsumerMean", new Mbean(TOTAL_TIME_FETCH_CONSUMER,"Mean", Double.class)); - mbeanNameMap.put("TotalTimeFetchConsumer99Th", new Mbean(TOTAL_TIME_FETCH_CONSUMER,"99thPercentile", Double.class)); - -// mbeanNameMap.put("ProduceRequestTime", new Mbean(PRODUCE_REQUEST_TIME,"Value")); -// mbeanNameMap.put("FetchRequestTime", new Mbean(FETCH_REQUEST_TIME,"Value")); - } - - /** - * 根据属性名,kafka版本,topic获取相应的Mbean - */ - public static Mbean getMbean(String name, String topic) { - Mbean mbean = mbeanNameMap.get(name); - if (mbean == null) { - return null; - } - if (topic != null && !topic.isEmpty()) { - return new Mbean(mbean.getObjectName() + ",topic=" + topic, mbean.getProperty(), mbean.getPropertyClass()); - } - return mbean; - } - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/StateChangeListener.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/StateChangeListener.java deleted file mode 100644 index 62866d6e..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/StateChangeListener.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.utils.zk; - -/** - * Created by limeng on 2017/12/22 - */ -public interface StateChangeListener { - - enum State { - CONNECTION_RECONNECT, // - CONNECTION_DISCONNECT, NODE_DATA_CHANGED, CHILD_UPDATED, CHILD_ADDED, CHILD_DELETED, - // - ; - } - - void onChange(State state, String path); - -} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkPathUtil.java b/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkPathUtil.java deleted file mode 100644 index 97af6ce7..00000000 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkPathUtil.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.xiaojukeji.kafka.manager.common.utils.zk; - -import java.util.HashMap; -import java.util.Map; - -/** - * 存储结构: - * - *
- * /consumers
- *    consumer-group
- *      ids
- *        consumerId
- *      offsets
- *        topic-0
- *           0(partition编号,节点内容表示)
- *           1
- *           2
- *        topic-1
- *      owners
- * /brokers
- *     topics
- *          topic-0  (节点内容是 ("0",[0,1,2]))
- *              partitions
- *                  0
- *                      state(节点内容是leader的brokerId,同步副本信息等)
- *                  1
- *                  2
- *          topic-x
- *     ids
- *          1(临时节点,broker编号,节点信息为broker相关信息,如JMX端口,host和port等)
- *          2
- *          n
- * 
- * - * @author tukun @ 2015-11-5 - * @version 1.0.0 - */ -public class ZkPathUtil { - - public static final String ZOOKEEPER_SEPARATOR = "/"; - - public static final String BROKER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "brokers"; - - public static final String CONTROLLER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "controller"; - - public static final String BROKER_IDS_ROOT = BROKER_ROOT_NODE - + ZOOKEEPER_SEPARATOR + "ids"; - - public static final String BROKER_TOPICS_ROOT = BROKER_ROOT_NODE - + ZOOKEEPER_SEPARATOR + "topics"; - - public static final String CONSUMER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "consumers"; - - public static final String CONFIG_ROOT_NODE = ZOOKEEPER_SEPARATOR + "config"; - - public static final String CONFIG_TOPICS_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "topics"; - - //存储监控的参数name到获取的object_name的映射关系图 - private static Map zkPathMap = new HashMap(); - - static { - zkPathMap.put("ConusmerPartitionOffset", CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR - + "${consumerGroup}" + ZOOKEEPER_SEPARATOR - + "offsets" + ZOOKEEPER_SEPARATOR + "${topic}" - + ZOOKEEPER_SEPARATOR + "${partition}"); - } - - //for broker目录 - public static String getBrokerIdNodePath(long brokerId) { - return String.format(BROKER_IDS_ROOT + ZOOKEEPER_SEPARATOR + "%d", brokerId); - } - - public static String getBrokerTopicRoot(String topic) { - return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topic; - } - - public static String getBrokerTopicPartitionRoot(String topic) { - return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topic + ZOOKEEPER_SEPARATOR - + "partitions"; - } - - public static String getBrokerTopicPartitionStatePath(String topic, int partitionId) { - return String.format(getBrokerTopicPartitionRoot(topic) + ZOOKEEPER_SEPARATOR + "%d" - + ZOOKEEPER_SEPARATOR + "state", partitionId); - } - - //for consumer - public static String getConsumerTopicPartitionOffsetNodePath(String consumerGroup, - String topic, int partitionId) { - return String.format(CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "%s" + ZOOKEEPER_SEPARATOR - + "offset" + "%s" + "%d", consumerGroup, topic, partitionId); - } - - public static String getConsumerGroupRoot(String consumerGroup) { - return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup; - } - - public static String getConsumerGroupIdsRoot(String consumerGroup) { - return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR - + "ids"; - } - - public static String getConsumerGroupOffsetRoot(String consumerGroup) { - return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR - + "offsets"; - } - - public static String getConsumerGroupOwnersRoot(String consumerGroup) { - return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR - + "owners"; - } - - public static String getConsumerGroupConsumerIdsNodePath(String consumerGroup, String consumerId) { - return getConsumerGroupIdsRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + consumerId; - } - - public static String getConsumerGroupOffsetTopicNode(String consumerGroup, String topic) { - return getConsumerGroupOffsetRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; - } - - public static String getConsumerGroupOffsetTopicPartitionNode(String consumerGroup, - String topic, int partitionId) { - return getConsumerGroupOffsetTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR - + partitionId; - } - - public static String getConsumerGroupOwnersTopicNode(String consumerGroup, String topic) { - return getConsumerGroupOwnersRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; - } - - public static String getConsumerGroupOwnersTopicPartitionNode(String consumerGroup, - String topic, int partitionId) { - return getConsumerGroupOwnersTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR - + partitionId; - } - - public static String getConfigTopicNode(String topicName) { - return CONFIG_TOPICS_ROOT_NODE + ZOOKEEPER_SEPARATOR + topicName; - } - - public static String parseLastPartFromZkPath(String zkPath) { - return zkPath.substring(zkPath.lastIndexOf("/") + 1); - } - - public static Map getZkPathMap() { - return zkPathMap; - } - - public static void setZkPathMap(Map zkPathMap) { - ZkPathUtil.zkPathMap = zkPathMap; - } - - public static String getControllerRootNode() { - return CONTROLLER_ROOT_NODE; - } - - public static String getEntityConfigPath(String entityType, String entity) { - return getEntityConfigRootPath(entityType) + "/" + entity; - } - - public static String getEntityConfigRootPath(String entityType) { - return CONFIG_ROOT_NODE + "/" + entityType; - } -} diff --git a/console/package-lock.json b/console/package-lock.json deleted file mode 100644 index 5b64b1b2..00000000 --- a/console/package-lock.json +++ /dev/null @@ -1,9510 +0,0 @@ -{ - "name": "mobx-ts-example", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ant-design/icons": { - "version": "1.2.1", - "resolved": "http://registry.npm.taobao.org/@ant-design/icons/download/@ant-design/icons-1.2.1.tgz", - "integrity": "sha1-jhkwGxQz7GfWu9DoknguKt5WH/k=", - "dev": true - }, - "@ant-design/icons-react": { - "version": "1.1.5", - "resolved": "http://registry.npm.taobao.org/@ant-design/icons-react/download/@ant-design/icons-react-1.1.5.tgz", - "integrity": "sha1-GwPajcztKku5gu97JcHSQBTDWmg=", - "dev": true, - "requires": { - "ant-design-palettes": "^1.1.3", - "babel-runtime": "^6.26.0" - } - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0.tgz", - "integrity": "sha1-BuKrGb21NThVWaq7W6WXKUgoAPg=", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0.tgz", - "integrity": "sha1-9xDDjI1Fjm3ZogGvtjf8t4HOmeQ=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/runtime": { - "version": "7.4.3", - "resolved": "http://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.4.3.tgz", - "integrity": "sha1-eYiORSA0IjrZYJGHoK0f4NKtS9w=", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.2", - "resolved": "http://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.2.tgz", - "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc=", - "dev": true - } - } - }, - "@hot-loader/react-dom": { - "version": "16.8.6", - "resolved": "http://registry.npm.taobao.org/@hot-loader/react-dom/download/@hot-loader/react-dom-16.8.6.tgz", - "integrity": "sha1-eSO6J9sVY6fMSNTgsoeaFA30Yeo=", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.13.6" - } - }, - "@types/anymatch": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz?cache=0&sync_timestamp=1580841236934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fanymatch%2Fdownload%2F%40types%2Fanymatch-1.3.1.tgz", - "integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho=", - "dev": true - }, - "@types/echarts": { - "version": "4.1.9", - "resolved": "https://registry.npm.taobao.org/@types/echarts/download/@types/echarts-4.1.9.tgz", - "integrity": "sha1-hv33yoKYeVNc87GxSQ4vRqDqCTM=", - "dev": true, - "requires": { - "@types/zrender": "*" - } - }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/@types/events/download/@types/events-3.0.0.tgz?cache=0&sync_timestamp=1580841806837&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fevents%2Fdownload%2F%40types%2Fevents-3.0.0.tgz", - "integrity": "sha1-KGLz9Yqaf3w+eNefEw3U1xwlwqc=", - "dev": true - }, - "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.1.tgz", - "integrity": "sha1-qlmhxuP7xCHgfM0xqUTDDrpSFXU=", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/history": { - "version": "4.7.2", - "resolved": "http://registry.npm.taobao.org/@types/history/download/@types/history-4.7.2.tgz", - "integrity": "sha1-DmcOolTVWSQbbus4lPh1SZHnMiA=", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "http://registry.npm.taobao.org/@types/json5/download/@types/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz", - "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=", - "dev": true - }, - "@types/node": { - "version": "13.9.8", - "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-13.9.8.tgz", - "integrity": "sha1-CZdkIPyAp6AL9AaAxjgV7Yx2FvQ=", - "dev": true - }, - "@types/prop-types": { - "version": "15.7.1", - "resolved": "http://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.1.tgz", - "integrity": "sha1-8aEee6uww8rWgQC+OB0eBkxo8fY=", - "dev": true - }, - "@types/q": { - "version": "1.5.2", - "resolved": "http://registry.npm.taobao.org/@types/q/download/@types/q-1.5.2.tgz", - "integrity": "sha1-aQoUdbhPKohP0HzXl8APXzE1bqg=", - "dev": true - }, - "@types/react": { - "version": "16.8.13", - "resolved": "http://registry.npm.taobao.org/@types/react/download/@types/react-16.8.13.tgz", - "integrity": "sha1-qCsVqtmrkcQO3KDWiJt3Ra4k8FM=", - "dev": true, - "requires": { - "@types/prop-types": "*", - "csstype": "^2.2.0" - } - }, - "@types/react-dom": { - "version": "16.8.4", - "resolved": "http://registry.npm.taobao.org/@types/react-dom/download/@types/react-dom-16.8.4.tgz", - "integrity": "sha1-f7e6NohXx6oPTkURxHEMosWhKog=", - "dev": true, - "requires": { - "@types/react": "*" - } - }, - "@types/react-router": { - "version": "4.4.5", - "resolved": "http://registry.npm.taobao.org/@types/react-router/download/@types/react-router-4.4.5.tgz", - "integrity": "sha1-EWaZfcfu8pF7XrzokOvssy7lwbM=", - "dev": true, - "requires": { - "@types/history": "*", - "@types/react": "*" - } - }, - "@types/react-router-dom": { - "version": "4.3.2", - "resolved": "http://registry.npm.taobao.org/@types/react-router-dom/download/@types/react-router-dom-4.3.2.tgz", - "integrity": "sha1-UsF8NoJZdjjzHBfEJiBAPcXCo/U=", - "dev": true, - "requires": { - "@types/history": "*", - "@types/react": "*", - "@types/react-router": "*" - } - }, - "@types/react-slick": { - "version": "0.23.3", - "resolved": "http://registry.npm.taobao.org/@types/react-slick/download/@types/react-slick-0.23.3.tgz", - "integrity": "sha1-ydFDI6dfVPRqZS+3Rf5VOq0JHOA=", - "dev": true, - "requires": { - "@types/react": "*" - } - }, - "@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz", - "integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=", - "dev": true - }, - "@types/tapable": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.5.tgz?cache=0&sync_timestamp=1580844951142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Ftapable%2Fdownload%2F%40types%2Ftapable-1.0.5.tgz", - "integrity": "sha1-mtvBKVBYKqZerXa//fOf4MJ6PAI=", - "dev": true - }, - "@types/uglify-js": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.0.4.tgz", - "integrity": "sha1-lr6uI99vVhhiqDC0KIpJ6GuqwII=", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "@types/webpack": { - "version": "4.41.10", - "resolved": "https://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.41.10.tgz", - "integrity": "sha1-Lh9rNQiiSYVO/j3MdpCQWsXuEL4=", - "dev": true, - "requires": { - "@types/anymatch": "*", - "@types/node": "*", - "@types/tapable": "*", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "@types/webpack-sources": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.7.tgz?cache=0&sync_timestamp=1584978716401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-sources%2Fdownload%2F%40types%2Fwebpack-sources-0.1.7.tgz", - "integrity": "sha1-CjMKlFYRNBDHSl1kGArwy8oAcUE=", - "dev": true, - "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "@types/zrender": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/@types/zrender/download/@types/zrender-4.0.0.tgz", - "integrity": "sha1-poBvEuxOzKrr2bDYFvBJrKYYj70=", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.8.5.tgz", - "integrity": "sha1-UbHF/mV2o0lTv0slPfnw1JDZ41k=", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/floating-point-hex-parser/download/@webassemblyjs/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha1-G6kmopI2E+3OSW/VsC6M6KX0lyE=", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-api-error/download/@webassemblyjs/helper-api-error-1.8.5.tgz", - "integrity": "sha1-xJ2tIvZFInxe22EL25aX8aq3Ifc=", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-buffer/download/@webassemblyjs/helper-buffer-1.8.5.tgz", - "integrity": "sha1-/qk+Qphj3V5DOFVfQikjhaZT8gQ=", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-code-frame/download/@webassemblyjs/helper-code-frame-1.8.5.tgz", - "integrity": "sha1-mnQP9I4/qjAisd/1RCPfmqKTwl4=", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.8.5" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-fsm/download/@webassemblyjs/helper-fsm-1.8.5.tgz", - "integrity": "sha1-ugt9Oz9+RzPaYFnJMyJ12GBwJFI=", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-module-context/download/@webassemblyjs/helper-module-context-1.8.5.tgz", - "integrity": "sha1-3vS5knsBAdyMu9jR7bW3ucguskU=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-wasm-bytecode/download/@webassemblyjs/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha1-U3p1Dt31weky83RCBlUckcG5PmE=", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/helper-wasm-section/download/@webassemblyjs/helper-wasm-section-1.8.5.tgz", - "integrity": "sha1-dMpqa8vhnlCjtrRihH5pUD5r/L8=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/ieee754/download/@webassemblyjs/ieee754-1.8.5.tgz", - "integrity": "sha1-cSMp2+8kDza/V70ve4+5v0FUQh4=", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/leb128/download/@webassemblyjs/leb128-1.8.5.tgz", - "integrity": "sha1-BE7es06mefPgTNT9mCTV41dnrhA=", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/utf8/download/@webassemblyjs/utf8-1.8.5.tgz", - "integrity": "sha1-qL87XY/+mGx8Hjc8y9wqCRXwztw=", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wasm-edit/download/@webassemblyjs/wasm-edit-1.8.5.tgz", - "integrity": "sha1-li2hKqWswcExyBxCMpkcgs5W4Bo=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/helper-wasm-section": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-opt": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "@webassemblyjs/wast-printer": "1.8.5" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wasm-gen/download/@webassemblyjs/wasm-gen-1.8.5.tgz", - "integrity": "sha1-VIQHZsLBAC62TtGr5yCt7XFPmLw=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wasm-opt/download/@webassemblyjs/wasm-opt-1.8.5.tgz", - "integrity": "sha1-sk2fa6UDlK8TSfUQr6j/y4pj0mQ=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.8.5.tgz", - "integrity": "sha1-IVdvDsiLkUJzV7hTY4NmjvfGa40=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wast-parser/download/@webassemblyjs/wast-parser-1.8.5.tgz", - "integrity": "sha1-4Q7s1ULQ5705T2gnxJ899tTu+4w=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/floating-point-hex-parser": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-code-frame": "1.8.5", - "@webassemblyjs/helper-fsm": "1.8.5", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/@webassemblyjs/wast-printer/download/@webassemblyjs/wast-printer-1.8.5.tgz", - "integrity": "sha1-EUu8SB/RDKDiOzVg+oEnSLC65bw=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz", - "integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A=", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "http://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz", - "integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0=", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "6.1.1", - "resolved": "http://registry.npm.taobao.org/acorn/download/acorn-6.1.1.tgz", - "integrity": "sha1-fSWuBbuK0fm2mRCOEJTs14hK3B8=", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/acorn-dynamic-import/download/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha1-SCIQFAWCo2uDw+NC4c/ryqkkCUg=", - "dev": true - }, - "add-dom-event-listener": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/add-dom-event-listener/download/add-dom-event-listener-1.1.0.tgz", - "integrity": "sha1-apLbOg3Qq8JU4JXA8dwUrLuq4xA=", - "dev": true, - "requires": { - "object-assign": "4.x" - } - }, - "ajv": { - "version": "6.10.0", - "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-6.10.0.tgz", - "integrity": "sha1-kNDVRDnaWHzX6EO/twRfUL0ivfE=", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz", - "integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0=", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.0", - "resolved": "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.0.tgz", - "integrity": "sha1-S4Mee1MUFafMUYzUBOc/YZPGNJ0=", - "dev": true - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "http://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz", - "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "http://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "ant-design-palettes": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/ant-design-palettes/download/ant-design-palettes-1.1.3.tgz", - "integrity": "sha1-hBGbGk2GNjrcUqONWH5lM2oKJ90=", - "dev": true, - "requires": { - "tinycolor2": "^1.4.1" - } - }, - "antd": { - "version": "3.16.3", - "resolved": "http://registry.npm.taobao.org/antd/download/antd-3.16.3.tgz", - "integrity": "sha1-Zuzb2Wox4qTSORBqEGsXYpvqoUE=", - "dev": true, - "requires": { - "@ant-design/icons": "~1.2.0", - "@ant-design/icons-react": "~1.1.5", - "@types/react-slick": "^0.23.3", - "array-tree-filter": "^2.1.0", - "babel-runtime": "6.x", - "classnames": "~2.2.6", - "copy-to-clipboard": "^3.0.8", - "create-react-class": "^15.6.3", - "create-react-context": "0.2.2", - "css-animation": "^1.5.0", - "dom-closest": "^0.2.0", - "enquire.js": "^2.1.6", - "lodash": "^4.17.11", - "moment": "^2.24.0", - "omit.js": "^1.0.0", - "prop-types": "^15.6.2", - "raf": "^3.4.0", - "rc-animate": "^2.5.4", - "rc-calendar": "~9.12.1", - "rc-cascader": "~0.17.0", - "rc-checkbox": "~2.1.5", - "rc-collapse": "~1.11.1", - "rc-dialog": "~7.3.0", - "rc-drawer": "~1.7.6", - "rc-dropdown": "~2.4.1", - "rc-editor-mention": "^1.1.7", - "rc-form": "^2.4.0", - "rc-input-number": "~4.4.0", - "rc-menu": "~7.4.12", - "rc-notification": "~3.3.0", - "rc-pagination": "~1.17.7", - "rc-progress": "~2.3.0", - "rc-rate": "~2.5.0", - "rc-select": "~9.0.0", - "rc-slider": "~8.6.5", - "rc-steps": "~3.3.0", - "rc-switch": "~1.9.0", - "rc-table": "~6.4.0", - "rc-tabs": "~9.6.0", - "rc-time-picker": "~3.6.1", - "rc-tooltip": "~3.7.3", - "rc-tree": "~1.15.2", - "rc-tree-select": "~2.6.0", - "rc-trigger": "^2.6.2", - "rc-upload": "~2.6.0", - "rc-util": "^4.5.1", - "react-lazy-load": "^3.0.13", - "react-lifecycles-compat": "^3.0.4", - "react-slick": "~0.23.2", - "resize-observer-polyfill": "^1.5.0", - "shallowequal": "^1.1.0", - "warning": "~4.0.2" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "http://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "http://registry.npm.taobao.org/array-flatten/download/array-flatten-2.1.2.tgz", - "integrity": "sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk=", - "dev": true - }, - "array-tree-filter": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/array-tree-filter/download/array-tree-filter-2.1.0.tgz", - "integrity": "sha1-hzrAD+yDdJ8lWsjdCDgUtPYykZA=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "http://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "http://registry.npm.taobao.org/asn1.js/download/asn1.js-4.10.1.tgz", - "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/assert/download/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "http://registry.npm.taobao.org/util/download/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "http://registry.npm.taobao.org/async/download/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", - "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", - "dev": true - }, - "async-validator": { - "version": "1.8.5", - "resolved": "http://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz", - "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=", - "dev": true, - "requires": { - "babel-runtime": "6.x" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "optional": true - }, - "atob": { - "version": "2.1.2", - "resolved": "http://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", - "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz", - "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=", - "dev": true, - "optional": true - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "http://registry.npm.taobao.org/base/download/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/base64-js/download/base64-js-1.3.0.tgz", - "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "http://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz", - "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", - "dev": true - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "http://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true - }, - "bluebird": { - "version": "3.5.4", - "resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.4.tgz", - "integrity": "sha1-1sxmFZXeMNWzr1/O3TwLPvbsVxQ=", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "http://registry.npm.taobao.org/bn.js/download/bn.js-4.11.8.tgz", - "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "http://registry.npm.taobao.org/body-parser/download/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.23.tgz", - "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "http://registry.npm.taobao.org/bonjour/download/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "http://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/brorand/download/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/browserify-aes/download/browserify-aes-1.2.0.tgz", - "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/browserify-cipher/download/browserify-cipher-1.0.1.tgz", - "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/browserify-des/download/browserify-des-1.0.2.tgz", - "integrity": "sha1-OvTx9Zg5QDVy8cZiBDdfen9wPpw=", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/browserify-rsa/download/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "http://registry.npm.taobao.org/browserify-sign/download/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/browserify-zlib/download/browserify-zlib-0.2.0.tgz", - "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.5.5", - "resolved": "http://registry.npm.taobao.org/browserslist/download/browserslist-4.5.5.tgz", - "integrity": "sha1-/ho1IzDSSQ1XNVdMFJqFvBjvm4I=", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000960", - "electron-to-chromium": "^1.3.124", - "node-releases": "^1.1.14" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "http://registry.npm.taobao.org/buffer/download/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz", - "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/buffer-indexof/download/buffer-indexof-1.1.1.tgz", - "integrity": "sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/buffer-xor/download/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/builtin-modules/download/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/builtin-status-codes/download/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "11.3.2", - "resolved": "http://registry.npm.taobao.org/cacache/download/cacache-11.3.2.tgz", - "integrity": "sha1-LYHjCOPSWMo4Eltna5iyrJzmm/o=", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/caller-path/download/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/caniuse-api/download/caniuse-api-3.0.0.tgz", - "integrity": "sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000962", - "resolved": "http://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000962.tgz", - "integrity": "sha1-bBDDqzBLib6pBeZq35jAkFCI7kQ=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "2.1.5", - "resolved": "http://registry.npm.taobao.org/chokidar/download/chokidar-2.1.5.tgz", - "integrity": "sha1-CuhDTZYigaX1bHKGnnnLbZ2GrU0=", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/chownr/download/chownr-1.1.1.tgz", - "integrity": "sha1-VHJri4//TfBTxCGH6AH7RBLfFJQ=", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.0.tgz", - "integrity": "sha1-Rakb0sIMlBHwljtarrmhuV4JzEg=", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/cipher-base/download/cipher-base-1.0.4.tgz", - "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "http://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "classnames": { - "version": "2.2.6", - "resolved": "http://registry.npm.taobao.org/classnames/download/classnames-2.2.6.tgz", - "integrity": "sha1-Q5Nb/90pHzJtrQogUwmzjQD2UM4=", - "dev": true - }, - "clean-css": { - "version": "4.2.1", - "resolved": "http://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz", - "integrity": "sha1-LUEe92uFabbQyEBo2r6FsKpeXBc=", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "clean-webpack-plugin": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/clean-webpack-plugin/download/clean-webpack-plugin-3.0.0.tgz", - "integrity": "sha1-qZ2Ow0wcYopFQVZ6p7RXRGRgxis=", - "dev": true, - "requires": { - "@types/webpack": "^4.4.31", - "del": "^4.1.1" - }, - "dependencies": { - "del": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz", - "integrity": "sha1-no8RciLqRKMf86FWwEm5kFKp8LQ=", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - } - } - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz", - "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "clone": { - "version": "2.1.2", - "resolved": "http://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "coa": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz", - "integrity": "sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM=", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/color/download/color-3.1.0.tgz", - "integrity": "sha1-2On7CWcyh1d0yEv5IoFd8DCND/w=", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "1.5.3", - "resolved": "http://registry.npm.taobao.org/color-string/download/color-string-1.5.3.tgz", - "integrity": "sha1-ybvF8BtYtUkvPWhXRZy2WQziBMw=", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.7.tgz", - "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.17.1", - "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz", - "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-classes": { - "version": "1.2.6", - "resolved": "http://registry.npm.taobao.org/component-classes/download/component-classes-1.2.6.tgz", - "integrity": "sha1-xkI5TDYYpNiwuJGe/Mu9kw5c1pE=", - "dev": true, - "requires": { - "component-indexof": "0.0.3" - } - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", - "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=", - "dev": true - }, - "component-indexof": { - "version": "0.0.3", - "resolved": "http://registry.npm.taobao.org/component-indexof/download/component-indexof-0.0.3.tgz", - "integrity": "sha1-EdCRMSI5648yyPJa6csAL/6NPCQ=", - "dev": true - }, - "compressible": { - "version": "2.0.16", - "resolved": "http://registry.npm.taobao.org/compressible/download/compressible-2.0.16.tgz", - "integrity": "sha1-pJv5hY84IbZM4b4Clq/HOARmp38=", - "dev": true, - "requires": { - "mime-db": ">= 1.38.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "http://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz", - "integrity": "sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "http://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "http://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/console-browserify/download/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "http://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "http://registry.npm.taobao.org/cookie/download/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "http://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "http://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-to-clipboard": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/copy-to-clipboard/download/copy-to-clipboard-3.1.0.tgz", - "integrity": "sha1-CigUGJnmvSF7ncE/0WibOziCC0Q=", - "dev": true, - "requires": { - "toggle-selection": "^1.0.6" - } - }, - "core-js": { - "version": "2.6.5", - "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.6.5.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.5.tgz", - "integrity": "sha1-RLyNJJ5/sv9dAOA0Gn/7lPv2eJU=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.0", - "resolved": "http://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.0.tgz", - "integrity": "sha1-RQOOTSin/nhyA67enCW8pKCLEsg=", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.0", - "parse-json": "^4.0.0" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.3.tgz", - "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/create-hash/download/create-hash-1.2.0.tgz", - "integrity": "sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY=", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npm.taobao.org/create-hmac/download/create-hmac-1.1.7.tgz", - "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "create-react-class": { - "version": "15.6.3", - "resolved": "http://registry.npm.taobao.org/create-react-class/download/create-react-class-15.6.3.tgz", - "integrity": "sha1-LXMjf7P5cK5uvgEanmb0bbyoADY=", - "dev": true, - "requires": { - "fbjs": "^0.8.9", - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - }, - "create-react-context": { - "version": "0.2.2", - "resolved": "http://registry.npm.taobao.org/create-react-context/download/create-react-context-0.2.2.tgz", - "integrity": "sha1-mDZUL5qqIoaM19Sm+CZn3zgBnco=", - "dev": true, - "requires": { - "fbjs": "^0.8.0", - "gud": "^1.0.0" - } - }, - "cross-env": { - "version": "7.0.2", - "resolved": "https://registry.npm.taobao.org/cross-env/download/cross-env-7.0.2.tgz?cache=0&sync_timestamp=1583443602692&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-env%2Fdownload%2Fcross-env-7.0.2.tgz", - "integrity": "sha1-vV7TEzmpOjQYrE88qco0Awgq5fk=", - "dev": true, - "requires": { - "cross-spawn": "^7.0.1" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.1.tgz", - "integrity": "sha1-CrVihuD3wk4VPQTMKqAn5DqaXRQ=", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz", - "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz?cache=0&sync_timestamp=1567781622888&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-2.0.0.tgz", - "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", - "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", - "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "http://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz", - "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-animation": { - "version": "1.5.0", - "resolved": "http://registry.npm.taobao.org/css-animation/download/css-animation-1.5.0.tgz", - "integrity": "sha1-yWuQl6XvdKe+hIC0XMROTsbKK/U=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "component-classes": "^1.2.5" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "http://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha1-wZiUD2OnbX42wecQGLABchBUyyI=", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-loader": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/css-loader/download/css-loader-2.1.1.tgz", - "integrity": "sha1-2CVPcuQSuyI4u0TdZ0/770lzM+o=", - "dev": true, - "requires": { - "camelcase": "^5.2.0", - "icss-utils": "^4.1.0", - "loader-utils": "^1.2.3", - "normalize-path": "^3.0.0", - "postcss": "^7.0.14", - "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^2.0.6", - "postcss-modules-scope": "^2.1.0", - "postcss-modules-values": "^2.0.0", - "postcss-value-parser": "^3.3.0", - "schema-utils": "^1.0.0" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc=", - "dev": true - }, - "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "http://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha1-joloGQ2IbJR3vI1h6W9hrz9/+n8=", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/css-unit-converter/download/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", - "dev": true - }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/css-url-regex/download/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", - "dev": true - }, - "css-what": { - "version": "2.1.3", - "resolved": "http://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz", - "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI=", - "dev": true - }, - "cssesc": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", - "integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4=", - "dev": true - }, - "cssnano": { - "version": "4.1.10", - "resolved": "http://registry.npm.taobao.org/cssnano/download/cssnano-4.1.10.tgz", - "integrity": "sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI=", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "http://registry.npm.taobao.org/cssnano-preset-default/download/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha1-UexmLM/KD4izltzZZ5zbkxvhf3Y=", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M=", - "dev": true - }, - "csso": { - "version": "3.5.1", - "resolved": "http://registry.npm.taobao.org/csso/download/csso-3.5.1.tgz", - "integrity": "sha1-e564vmFiiXPBsmHhadLwJACOdYs=", - "dev": true, - "requires": { - "css-tree": "1.0.0-alpha.29" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "http://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha1-P6nU7zFCy9HDAedmTB81K9gvWjk=", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "csstype": { - "version": "2.6.4", - "resolved": "http://registry.npm.taobao.org/csstype/download/csstype-2.6.4.tgz", - "integrity": "sha1-1YWmBiCW4yTnGH+A4E+SvQ8A438=", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "http://registry.npm.taobao.org/cyclist/download/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "http://registry.npm.taobao.org/date-now/download/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deepmerge": { - "version": "2.2.1", - "resolved": "http://registry.npm.taobao.org/deepmerge/download/deepmerge-2.2.1.tgz", - "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", - "dev": true - }, - "default-gateway": { - "version": "4.2.0", - "resolved": "http://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz", - "integrity": "sha1-FnEEx1AMIRX23WmwpTa7jtcgVSs=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", - "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/del/download/del-4.1.0.tgz", - "integrity": "sha1-BJVDuCkOGpKT4r0VCrOgb2NzIrg=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/des.js/download/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/detect-file/download/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "detect-node": { - "version": "2.0.4", - "resolved": "http://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz", - "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "http://registry.npm.taobao.org/diff/download/diff-3.5.0.tgz", - "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz", - "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/dns-equal/download/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "http://registry.npm.taobao.org/dns-packet/download/dns-packet-1.3.1.tgz", - "integrity": "sha1-EqpCaYEHW+UAuRDu3NC0fdfe2lo=", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/dns-txt/download/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-align": { - "version": "1.8.2", - "resolved": "http://registry.npm.taobao.org/dom-align/download/dom-align-1.8.2.tgz", - "integrity": "sha1-/c02vOJbqNNP41gu/Vesdn30kL0=", - "dev": true - }, - "dom-closest": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/dom-closest/download/dom-closest-0.2.0.tgz", - "integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=", - "dev": true, - "requires": { - "dom-matches": ">=1.0.1" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz", - "integrity": "sha1-ZyGp2u4uKTaClVtq/kFncWJ7t2g=", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-matches": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/dom-matches/download/dom-matches-2.0.0.tgz", - "integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw=", - "dev": true - }, - "dom-scroll-into-view": { - "version": "1.2.1", - "resolved": "http://registry.npm.taobao.org/dom-scroll-into-view/download/dom-scroll-into-view-1.2.1.tgz", - "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=", - "dev": true - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.1.1.tgz", - "integrity": "sha1-HsQFnihLq+027sKUHUqXChic58A=", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "dom-walk": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/dom-walk/download/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", - "dev": true - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz", - "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "http://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz", - "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "http://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", - "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "http://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "http://registry.npm.taobao.org/dot-prop/download/dot-prop-4.2.0.tgz", - "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "draft-js": { - "version": "0.10.5", - "resolved": "http://registry.npm.taobao.org/draft-js/download/draft-js-0.10.5.tgz", - "integrity": "sha1-v6m+sBj+BTPbsI1mdcNxprCPp0I=", - "dev": true, - "requires": { - "fbjs": "^0.8.15", - "immutable": "~3.7.4", - "object-assign": "^4.1.0" - }, - "dependencies": { - "immutable": { - "version": "3.7.6", - "resolved": "http://registry.npm.taobao.org/immutable/download/immutable-3.7.6.tgz", - "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=", - "dev": true - } - } - }, - "duplexify": { - "version": "3.7.1", - "resolved": "http://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz", - "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "echarts": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.2.1.tgz", - "integrity": "sha1-mo6jsDNU+G+CTZdiXDNM8Wll7wM=", - "dev": true, - "requires": { - "zrender": "4.0.7" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.124", - "resolved": "http://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.124.tgz", - "integrity": "sha1-hh/AFIdIoRs+XM69+LeV/1E/oR8=", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "http://registry.npm.taobao.org/elliptic/download/elliptic-6.4.1.tgz", - "integrity": "sha1-wtC3d2kRuGcixjLDwGxg8vgZk5o=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "http://registry.npm.taobao.org/encoding/download/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.1.tgz", - "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.1.0.tgz", - "integrity": "sha1-Qcfgv9/nSsH/4eV61qXGyfN0Kn8=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "enquire.js": { - "version": "2.1.6", - "resolved": "http://registry.npm.taobao.org/enquire.js/download/enquire.js-2.1.6.tgz", - "integrity": "sha1-PoeAybi4NQhMP2DhZtvDwqPImBQ=", - "dev": true - }, - "entities": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz", - "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "http://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", - "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "http://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", - "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "http://registry.npm.taobao.org/es-abstract/download/es-abstract-1.13.0.tgz", - "integrity": "sha1-rIYUX91QmdjdSVWMy6Lq+biOJOk=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.0.tgz", - "integrity": "sha1-7fckeAM0VujdqO8J4ArZZQcH83c=", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz", - "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "http://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "http://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/eventemitter3/download/eventemitter3-3.1.0.tgz", - "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=", - "dev": true - }, - "eventlistener": { - "version": "0.0.1", - "resolved": "http://registry.npm.taobao.org/eventlistener/download/eventlistener-0.0.1.tgz", - "integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg=", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/events/download/events-3.0.0.tgz", - "integrity": "sha1-mgoN+vYok9krh1uPJpjKQRSXPog=", - "dev": true - }, - "eventsource": { - "version": "1.0.7", - "resolved": "http://registry.npm.taobao.org/eventsource/download/eventsource-1.0.7.tgz", - "integrity": "sha1-j7xyyT/NNAiAkLwKTmT0tc7m2NA=", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/evp_bytestokey/download/evp_bytestokey-1.0.3.tgz", - "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz", - "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/expand-tilde/download/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "express": { - "version": "4.16.4", - "resolved": "http://registry.npm.taobao.org/express/download/express-4.16.4.tgz", - "integrity": "sha1-/d72GSYQniTFFeqX/S8b2/Yt8S4=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "http://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.13.2.tgz", - "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", - "dev": true, - "optional": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "http://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "http://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fbjs": { - "version": "0.8.17", - "resolved": "http://registry.npm.taobao.org/fbjs/download/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", - "dev": true, - "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-1.2.7.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", - "dev": true - } - } - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "http://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.1.tgz", - "integrity": "sha1-hiRwESkBxyeg5JWoB0S9W6odZ5A=", - "dev": true - }, - "file-loader": { - "version": "5.0.2", - "resolved": "https://registry.npm.taobao.org/file-loader/download/file-loader-5.0.2.tgz?cache=0&sync_timestamp=1574689264559&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-loader%2Fdownload%2Ffile-loader-5.0.2.tgz", - "integrity": "sha1-fz2LSshaXo32EzjP7JXXQF+XHKo=", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.5.0" - }, - "dependencies": { - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz", - "integrity": "sha1-086gTWsBeyiUrWkED+yLYj60vVI=", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.1.tgz", - "integrity": "sha1-75FuJxxkrBIXH9g4TqrmsjRYVNo=", - "dev": true - }, - "schema-utils": { - "version": "2.6.1", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.6.1.tgz?cache=0&sync_timestamp=1574946791935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-2.6.1.tgz", - "integrity": "sha1-63jwuUXHvPoggrNWXo2zVIAR3E8=", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.1.tgz", - "integrity": "sha1-7r9O2EAHnIP0JJA4ydcDAIMBsQU=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz", - "integrity": "sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "findup-sync": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/findup-sync/download/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz", - "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "follow-redirects": { - "version": "1.7.0", - "resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.7.0.tgz", - "integrity": "sha1-SJ68GY3A5/ZBZ70jsDxMGbV4THY=", - "dev": true, - "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "http://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "http://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "http://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "http://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "http://registry.npm.taobao.org/from2/download/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "http://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.8", - "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.8.tgz", - "integrity": "sha1-V+pTIPdizUaW5ejocSDszIsRys8=", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz", - "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz", - "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "http://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "http://registry.npm.taobao.org/glob/download/glob-7.1.3.tgz", - "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "global": { - "version": "4.3.2", - "resolved": "http://registry.npm.taobao.org/global/download/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "dev": true, - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/global-modules/download/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/global-prefix/download/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "http://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.15.tgz", - "integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA=", - "dev": true - }, - "gud": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/gud/download/gud-1.0.0.tgz", - "integrity": "sha1-pIlYGxfmpwvsqavjrlfeekmYUsA=", - "dev": true - }, - "hammerjs": { - "version": "2.0.8", - "resolved": "http://registry.npm.taobao.org/hammerjs/download/hammerjs-2.0.8.tgz", - "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=", - "dev": true - }, - "handle-thing": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.0.tgz", - "integrity": "sha1-DgOWlf9QyT/CiFV9aW88HcZ3Z1Q=", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz", - "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/has/download/has-1.0.3.tgz", - "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "http://registry.npm.taobao.org/hash-base/download/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "http://registry.npm.taobao.org/hash.js/download/hash.js-1.1.7.tgz", - "integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/he/download/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", - "dev": true - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz", - "integrity": "sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4=", - "dev": true - }, - "history": { - "version": "4.9.0", - "resolved": "http://registry.npm.taobao.org/history/download/history-4.9.0.tgz", - "integrity": "sha1-hFh8IGgDnq2K92np1qaGChT6G8o=", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "loose-envify": "^1.2.0", - "resolve-pathname": "^2.2.0", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0", - "value-equal": "^0.4.0" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoist-non-react-statics": { - "version": "3.3.0", - "resolved": "http://registry.npm.taobao.org/hoist-non-react-statics/download/hoist-non-react-statics-3.3.0.tgz", - "integrity": "sha1-sJF48BIhhPuVrPUl2q7LTY9FlYs=", - "dev": true, - "requires": { - "react-is": "^16.7.0" - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/homedir-polyfill/download/homedir-polyfill-1.0.3.tgz", - "integrity": "sha1-dDKYzvTlrz4ZQWH7rcwhUdOgWOg=", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "http://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/hsla-regex/download/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/html-comment-regex/download/html-comment-regex-1.1.2.tgz", - "integrity": "sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c=", - "dev": true - }, - "html-entities": { - "version": "1.2.1", - "resolved": "http://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "http://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz", - "integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "http://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "http://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz", - "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "http://registry.npm.taobao.org/loader-utils/download/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "http://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz", - "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "http://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "http://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "http://registry.npm.taobao.org/http-parser-js/download/http-parser-js-0.5.0.tgz", - "integrity": "sha1-1l7b7ehDSdDcMDIIFaFdOcw8u9g=", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "http://registry.npm.taobao.org/http-proxy/download/http-proxy-1.17.0.tgz", - "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "http://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha1-GDx9xKoUeRUDBkmMIQza+WCApDo=", - "dev": true, - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/icss-replace-symbols/download/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.0.tgz", - "integrity": "sha1-M527/7n4cpokO3AeHCnUzFjFLw4=", - "dev": true, - "requires": { - "postcss": "^7.0.14" - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "http://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz", - "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "http://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "http://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fimage-size%2Fdownload%2Fimage-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "immutable": { - "version": "3.8.2", - "resolved": "http://registry.npm.taobao.org/immutable/download/immutable-3.8.2.tgz", - "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", - "dev": true - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/import-fresh/download/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz", - "integrity": "sha1-VQcL44pZk88Y72236WH1vuXFoJ0=", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "http://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "http://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "http://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz", - "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", - "dev": true - }, - "internal-ip": { - "version": "4.3.0", - "resolved": "http://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Finternal-ip%2Fdownload%2Finternal-ip-4.3.0.tgz", - "integrity": "sha1-hFRSuq2dLKO2nGNaE3rLmg2tCQc=", - "dev": true, - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - } - }, - "interpret": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/interpret/download/interpret-1.2.0.tgz", - "integrity": "sha1-1QYaYiS+WOgIOYX1AU2EQ1lXYpY=", - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/invert-kv/download/invert-kv-2.0.0.tgz", - "integrity": "sha1-c5P1r6Weyf9fZ6J2INEcIm4+7AI=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "http://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "http://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.0.tgz", - "integrity": "sha1-N9905DCg5HVQ/lSi3v4w2KzZX2U=", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "http://registry.npm.taobao.org/is-callable/download/is-callable-1.1.4.tgz", - "integrity": "sha1-HhrfIZ4e62hNaR+dagX/DTCiTXU=", - "dev": true - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "http://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", - "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-2.0.0.tgz", - "integrity": "sha1-1Hd6jiJ6AAlqMfAw2zdw+EsRbAI=", - "dev": true - }, - "is-path-in-cwd": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-2.0.0.tgz", - "integrity": "sha1-aORSpu7CYFAM7CHgKcCkTMDc0uo=", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-path-inside/download/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "http://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/is-regex/download/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/is-svg/download/is-svg-3.0.0.tgz", - "integrity": "sha1-kyHb0pwhLlypnE+peUxxS8r6L3U=", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.2.tgz", - "integrity": "sha1-oFX2rlcZLK7jKeeoYBGLSXqVDzg=", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true, - "optional": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "ismobilejs": { - "version": "0.5.1", - "resolved": "http://registry.npm.taobao.org/ismobilejs/download/ismobilejs-0.5.1.tgz", - "integrity": "sha1-Dj+CXinjL4StXdu2Dp4EqJQEZIg=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "http://registry.npm.taobao.org/isomorphic-fetch/download/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "dev": true, - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "http://registry.npm.taobao.org/js-yaml/download/js-yaml-3.13.1.tgz", - "integrity": "sha1-r/FRswv9+o5J4F2iLnQV6d+jeEc=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true, - "optional": true - }, - "json2mq": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/json2mq/download/json2mq-0.2.0.tgz", - "integrity": "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo=", - "dev": true, - "requires": { - "string-convert": "^0.2.0" - } - }, - "json3": { - "version": "3.3.2", - "resolved": "http://registry.npm.taobao.org/json3/download/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz", - "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz", - "integrity": "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", - "dev": true - }, - "last-call-webpack-plugin": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/last-call-webpack-plugin/download/last-call-webpack-plugin-3.0.0.tgz", - "integrity": "sha1-l0LfDhDjz0blwDgcLekNOnotdVU=", - "dev": true, - "requires": { - "lodash": "^4.17.5", - "webpack-sources": "^1.1.0" - } - }, - "lcid": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/lcid/download/lcid-2.0.0.tgz", - "integrity": "sha1-bvXS32DlL4LrIopMNz6NHzlyU88=", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "less": { - "version": "3.9.0", - "resolved": "http://registry.npm.taobao.org/less/download/less-3.9.0.tgz", - "integrity": "sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ=", - "dev": true, - "requires": { - "clone": "^2.1.2", - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "optional": true - } - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "http://registry.npm.taobao.org/less-loader/download/less-loader-4.1.0.tgz", - "integrity": "sha1-LBNSxbCaT4QQFJAnT9UWdN5BNj4=", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "http://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz", - "integrity": "sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c=", - "dev": true - }, - "loader-utils": { - "version": "1.2.3", - "resolved": "http://registry.npm.taobao.org/loader-utils/download/loader-utils-1.2.3.tgz", - "integrity": "sha1-H/XcaRHJ8KBiUxpMBLYJQGEIwsc=", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.11.tgz", - "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "http://registry.npm.taobao.org/lodash._getnative/download/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "http://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/lodash.isarguments/download/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "http://registry.npm.taobao.org/lodash.isarray/download/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "http://registry.npm.taobao.org/lodash.keys/download/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "http://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.throttle": { - "version": "4.1.1", - "resolved": "http://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "loglevel": { - "version": "1.6.1", - "resolved": "http://registry.npm.taobao.org/loglevel/download/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "http://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz", - "integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "http://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz", - "integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "mamacro": { - "version": "0.0.3", - "resolved": "http://registry.npm.taobao.org/mamacro/download/mamacro-0.0.3.tgz", - "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "http://registry.npm.taobao.org/map-age-cleaner/download/map-age-cleaner-0.1.3.tgz", - "integrity": "sha1-fVg6cwZDTAVf5HSw9FB45uG0uSo=", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "http://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz", - "integrity": "sha1-tdB7jjIW4+J81yjXL3DR5qNCAF8=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "1.1.4", - "resolved": "http://registry.npm.taobao.org/mdn-data/download/mdn-data-1.1.4.tgz", - "integrity": "sha1-ULXU/8RXUnZXPE7tuHgIEqhBnwE=", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "http://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.3.0", - "resolved": "http://registry.npm.taobao.org/mem/download/mem-4.3.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fmem%2Fdownload%2Fmem-4.3.0.tgz", - "integrity": "sha1-Rhr0l7xK4JYIzbLmDu+2m/90QXg=", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "http://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/miller-rabin/download/miller-rabin-4.0.1.tgz", - "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "http://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.39.0", - "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.39.0.tgz", - "integrity": "sha1-+VogJ1dC99KtBCms/kD0IzVDeA4=", - "dev": true - }, - "mime-types": { - "version": "2.1.23", - "resolved": "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.23.tgz", - "integrity": "sha1-1OrNh96ZNIpoWP4eR5qth3OI2Xc=", - "dev": true, - "requires": { - "mime-db": "~1.39.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true - }, - "min-document": { - "version": "2.19.0", - "resolved": "http://registry.npm.taobao.org/min-document/download/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dev": true, - "requires": { - "dom-walk": "^0.1.0" - } - }, - "mini-css-extract-plugin": { - "version": "0.6.0", - "resolved": "http://registry.npm.taobao.org/mini-css-extract-plugin/download/mini-css-extract-plugin-0.6.0.tgz", - "integrity": "sha1-o/Ezctb83pEvPuTNA5ZlcEgB47k=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "normalize-url": "^2.0.1", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "mini-store": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/mini-store/download/mini-store-2.0.0.tgz", - "integrity": "sha1-CEPASNaULOVePnixtn/AYwIrVIg=", - "dev": true, - "requires": { - "hoist-non-react-statics": "^2.3.1", - "prop-types": "^15.6.0", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2" - }, - "dependencies": { - "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "http://registry.npm.taobao.org/hoist-non-react-statics/download/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha1-xZA89AnA39kI84jmGdhrnBF0y0c=", - "dev": true - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/minimalistic-assert/download/minimalistic-assert-1.0.1.tgz", - "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mississippi": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/mississippi/download/mississippi-3.0.0.tgz", - "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "http://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.1.tgz", - "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mobx": { - "version": "5.9.4", - "resolved": "http://registry.npm.taobao.org/mobx/download/mobx-5.9.4.tgz", - "integrity": "sha1-He6Sq6M/Z7e67rZ54703ahLlWBI=", - "dev": true - }, - "mobx-react": { - "version": "5.4.3", - "resolved": "http://registry.npm.taobao.org/mobx-react/download/mobx-react-5.4.3.tgz", - "integrity": "sha1-Zwm33YlnDEDpgVkUrCyknMAr+0c=", - "dev": true, - "requires": { - "hoist-non-react-statics": "^3.0.0", - "react-lifecycles-compat": "^3.0.2" - } - }, - "moment": { - "version": "2.24.0", - "resolved": "http://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz", - "integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s=", - "dev": true - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "http://registry.npm.taobao.org/multicast-dns/download/multicast-dns-6.2.3.tgz", - "integrity": "sha1-oOx72QVcQoL3kMPIL04o2zsxsik=", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/multicast-dns-service-types/download/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mutationobserver-shim": { - "version": "0.3.3", - "resolved": "http://registry.npm.taobao.org/mutationobserver-shim/download/mutationobserver-shim-0.3.3.tgz", - "integrity": "sha1-ZYaWMLyJ17+MnNnLghiM2VWqzSs=", - "dev": true - }, - "nan": { - "version": "2.13.2", - "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.13.2.tgz", - "integrity": "sha1-9R3Hrma6fV1V4ebU2AkugCya7+c=", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "http://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/negotiator/download/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.6.0", - "resolved": "http://registry.npm.taobao.org/neo-async/download/neo-async-2.6.0.tgz", - "integrity": "sha1-udFeTXHGdikIZUtRg+04t1M0CDU=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "http://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "http://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz", - "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "http://registry.npm.taobao.org/node-fetch/download/node-fetch-1.7.3.tgz", - "integrity": "sha1-mA9vcthSEaU0fGsrwYxbhMPrR+8=", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "http://registry.npm.taobao.org/node-forge/download/node-forge-0.7.5.tgz", - "integrity": "sha1-bBUsNFzhHFL0ZcKr2VfoY5zWdN8=", - "dev": true - }, - "node-libs-browser": { - "version": "2.2.0", - "resolved": "http://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.0.tgz", - "integrity": "sha1-xy9g2dRt4IqUDe27JfP/ovm7qnc=", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "http://registry.npm.taobao.org/process/download/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - } - } - }, - "node-releases": { - "version": "1.1.15", - "resolved": "http://registry.npm.taobao.org/node-releases/download/node-releases-1.1.15.tgz", - "integrity": "sha1-nnanOw7KO/eAGt2qDmzpDHlfK5o=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "dev": true - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/normalize-url/download/normalize-url-2.0.1.tgz", - "integrity": "sha1-g1qdoVUfom9w6SMpBpojqmV01+Y=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", - "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "http://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz", - "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "http://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/object.values/download/object.values-1.1.0.tgz", - "integrity": "sha1-v2gQ712j5TJXkOqqK+IT6oRiTak=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz", - "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", - "dev": true - }, - "omit.js": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/omit.js/download/omit.js-1.0.2.tgz", - "integrity": "sha1-kaFPDrqEBm36AVvzDkdMR/MLyFg=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz", - "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opn": { - "version": "5.5.0", - "resolved": "http://registry.npm.taobao.org/opn/download/opn-5.5.0.tgz", - "integrity": "sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w=", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optimize-css-assets-webpack-plugin": { - "version": "5.0.1", - "resolved": "http://registry.npm.taobao.org/optimize-css-assets-webpack-plugin/download/optimize-css-assets-webpack-plugin-5.0.1.tgz", - "integrity": "sha1-nrUAcR01FltF5/1gui30DLPrkVk=", - "dev": true, - "requires": { - "cssnano": "^4.1.0", - "last-call-webpack-plugin": "^3.0.0" - } - }, - "original": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/original/download/original-1.0.2.tgz", - "integrity": "sha1-5EKmHP/hxf0gpl8yYcJmY7MD8l8=", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "http://registry.npm.taobao.org/os-browserify/download/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-3.1.0.tgz", - "integrity": "sha1-qAKm7hfyTBBIOrmTVxnO9O0Wvxo=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/p-defer/download/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/p-is-promise/download/p-is-promise-2.1.0.tgz", - "integrity": "sha1-kYzrrqJIpiz3/6uOO8qMX4gvxC4=", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "http://registry.npm.taobao.org/p-limit/download/p-limit-2.2.0.tgz", - "integrity": "sha1-QXyZQeYCepq8ulCS3SkE4lW1+8I=", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz", - "integrity": "sha1-MQko/u+cnsxltosXaTAYpmXOoXU=", - "dev": true - }, - "p-try": { - "version": "2.2.0", - "resolved": "http://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - }, - "pako": { - "version": "1.0.10", - "resolved": "http://registry.npm.taobao.org/pako/download/pako-1.0.10.tgz", - "integrity": "sha1-Qyi621CGpCaqkPVBl31JVdpclzI=", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/parallel-transform/download/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.4", - "resolved": "http://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.4.tgz", - "integrity": "sha1-N/Zij4I/vesic7TVQENKIvPvH8w=", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/parse-passwd/download/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parseurl": { - "version": "1.3.3", - "resolved": "http://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", - "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "http://registry.npm.taobao.org/path-browserify/download/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "http://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "http://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.0.17.tgz", - "integrity": "sha1-l2wgZTBhexTrsyEUI597CTNuk6Y=", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz", - "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-3.0.0.tgz", - "integrity": "sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM=", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "portfinder": { - "version": "1.0.20", - "resolved": "http://registry.npm.taobao.org/portfinder/download/portfinder-1.0.20.tgz", - "integrity": "sha1-vqaGMuVLLhOrewxHdem0G/Jw5Eo=", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "http://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.14", - "resolved": "http://registry.npm.taobao.org/postcss/download/postcss-7.0.14.tgz", - "integrity": "sha1-RSftaxyg2CxTzl7BogQcI0a71uU=", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.1.tgz", - "integrity": "sha1-Ntd7qwI7Dsu5eJ2E3LI8SUEUVDY=", - "dev": true, - "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - }, - "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/cssesc/download/cssesc-2.0.0.tgz", - "integrity": "sha1-OxO9G7HLNuG8taTc0n9UxdyzVwM=", - "dev": true - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "http://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha1-JJBENWaXsztk8aj3yAki3d7nGVw=", - "dev": true, - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/postcss-colormin/download/postcss-colormin-4.0.3.tgz", - "integrity": "sha1-rgYLzpPteUrHEmTwgTLVUJVr04E=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz", - "integrity": "sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha1-H7q9LCRr/2qq15l7KwkY9NevQDM=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha1-P+EzzTyCKC5VD8myORdqkge3hOs=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha1-yMlR6fc+2UKAGUWERKAq2Qu592U=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha1-ZSrvipZybwKfXj4AFG7npOdV/1c=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "http://registry.npm.taobao.org/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ=", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha1-NivqT/Wh+Y5AdacTxsslrv75plA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "http://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz", - "integrity": "sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "http://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-2.0.0.tgz", - "integrity": "sha1-gYcZoa4doyX5gyRGsBE27rSTzX4=", - "dev": true, - "requires": { - "postcss": "^7.0.5" - } - }, - "postcss-modules-local-by-default": { - "version": "2.0.6", - "resolved": "http://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-2.0.6.tgz", - "integrity": "sha1-3ZlT9t1Ha1/R7y2IMMiSl2C1bmM=", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0", - "postcss-value-parser": "^3.3.1" - } - }, - "postcss-modules-scope": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-2.1.0.tgz", - "integrity": "sha1-rT9b94VhFPb8q5AbBQLiorw51Os=", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0" - } - }, - "postcss-modules-values": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-2.0.0.tgz", - "integrity": "sha1-R5tG3Axco9x/pScIUYNrnscVL2Q=", - "dev": true, - "requires": { - "icss-replace-symbols": "^1.1.0", - "postcss": "^7.0.6" - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha1-Db4EpM6QY9RmftK+R2u4MMglk1o=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw=", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha1-jgCcoqOUnNr4rSPmtquZy159KNk=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE=", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "normalize-url": { - "version": "3.3.0", - "resolved": "http://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz", - "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", - "dev": true - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "http://registry.npm.taobao.org/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha1-f9QuvqXpyBRgljniwuhK4nC6SN8=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha1-F++kBerMbge+NBSlyi0QdGgdTik=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.2.tgz", - "integrity": "sha1-k0z3mdAWyDQRhZ4J3Oyt4BKG7Fw=", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "http://registry.npm.taobao.org/postcss-svgo/download/postcss-svgo-4.0.2.tgz", - "integrity": "sha1-F7mXvHEbMzurFDqu07jT1uPTglg=", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "http://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/prepend-http/download/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "prettier": { - "version": "1.17.0", - "resolved": "http://registry.npm.taobao.org/prettier/download/prettier-1.17.0.tgz", - "integrity": "sha1-U7MDZ27tIswUqfDOwJtHezAmwAg=", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "process": { - "version": "0.5.2", - "resolved": "http://registry.npm.taobao.org/process/download/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz", - "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "http://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz", - "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", - "dev": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "http://registry.npm.taobao.org/prop-types/download/prop-types-15.7.2.tgz", - "integrity": "sha1-UsQedbjIfnK52TYOAga5ncv/psU=", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "proxy-addr": { - "version": "2.0.5", - "resolved": "http://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.5.tgz", - "integrity": "sha1-NMvWSi2B9LH9IedvnwbIpFKZ7jQ=", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "psl": { - "version": "1.1.31", - "resolved": "http://registry.npm.taobao.org/psl/download/psl-1.1.31.tgz", - "integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ=", - "dev": true, - "optional": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/public-encrypt/download/public-encrypt-4.0.3.tgz", - "integrity": "sha1-T8ydd6B+SLp1J+fL4N4z0HATMeA=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", - "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "http://registry.npm.taobao.org/pumpify/download/pumpify-1.5.1.tgz", - "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "http://registry.npm.taobao.org/q/download/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "http://registry.npm.taobao.org/query-string/download/query-string-5.1.1.tgz", - "integrity": "sha1-p4wBK3HBfgXy4/ojGd0zBoLvs8s=", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "http://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "http://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/querystringify/download/querystringify-2.1.1.tgz", - "integrity": "sha1-YOWl/WSn+L+k0qsu1v30yFutFU4=", - "dev": true - }, - "raf": { - "version": "3.4.1", - "resolved": "http://registry.npm.taobao.org/raf/download/raf-3.4.1.tgz", - "integrity": "sha1-B0LpmkplUvRF1z4+4DKK8P8e3jk=", - "dev": true, - "requires": { - "performance-now": "^2.1.0" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", - "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/randomfill/download/randomfill-1.0.4.tgz", - "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/range-parser/download/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "http://registry.npm.taobao.org/raw-body/download/raw-body-2.3.3.tgz", - "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.23.tgz", - "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "rc-align": { - "version": "2.4.5", - "resolved": "http://registry.npm.taobao.org/rc-align/download/rc-align-2.4.5.tgz", - "integrity": "sha1-yUGlhvWdEBfyOkKPC0aGY/txAqs=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "dom-align": "^1.7.0", - "prop-types": "^15.5.8", - "rc-util": "^4.0.4" - } - }, - "rc-animate": { - "version": "2.6.0", - "resolved": "http://registry.npm.taobao.org/rc-animate/download/rc-animate-2.6.0.tgz", - "integrity": "sha1-yoRA0EJ4GvehMp2E+X6pR5TF7BU=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "css-animation": "^1.3.2", - "prop-types": "15.x", - "raf": "^3.4.0", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-calendar": { - "version": "9.12.4", - "resolved": "http://registry.npm.taobao.org/rc-calendar/download/rc-calendar-9.12.4.tgz", - "integrity": "sha1-aO46hXtTQdeA2Uc1QZJs/gtEkVQ=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "moment": "2.x", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.0", - "rc-util": "^4.1.1", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-cascader": { - "version": "0.17.1", - "resolved": "http://registry.npm.taobao.org/rc-cascader/download/rc-cascader-0.17.1.tgz", - "integrity": "sha1-kUSBwzcLX9j4Lk+d+bZZbf7aFNU=", - "dev": true, - "requires": { - "array-tree-filter": "^2.1.0", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.0", - "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.4", - "shallow-equal": "^1.0.0", - "warning": "^4.0.1" - } - }, - "rc-checkbox": { - "version": "2.1.6", - "resolved": "http://registry.npm.taobao.org/rc-checkbox/download/rc-checkbox-2.1.6.tgz", - "integrity": "sha1-XcAGU+UncBjEMf7FXji5HB+XbpA=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "2.x", - "prop-types": "15.x", - "rc-util": "^4.0.4" - } - }, - "rc-collapse": { - "version": "1.11.1", - "resolved": "http://registry.npm.taobao.org/rc-collapse/download/rc-collapse-1.11.1.tgz", - "integrity": "sha1-SqCXetv1Ip19tYIFZGsTkFrdcq0=", - "dev": true, - "requires": { - "classnames": "2.x", - "css-animation": "1.x", - "prop-types": "^15.5.6", - "rc-animate": "2.x", - "react-is": "^16.7.0", - "shallowequal": "^1.1.0" - } - }, - "rc-dialog": { - "version": "7.3.1", - "resolved": "http://registry.npm.taobao.org/rc-dialog/download/rc-dialog-7.3.1.tgz", - "integrity": "sha1-RQQew1v8jjN8kbZLUs6+9upc1KI=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "rc-animate": "2.x", - "rc-util": "^4.4.0" - } - }, - "rc-drawer": { - "version": "1.7.8", - "resolved": "http://registry.npm.taobao.org/rc-drawer/download/rc-drawer-1.7.8.tgz", - "integrity": "sha1-5NBlncIDkJ5f+susimiSbgwiL7U=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "prop-types": "^15.5.0", - "rc-util": "^4.5.1" - } - }, - "rc-dropdown": { - "version": "2.4.1", - "resolved": "http://registry.npm.taobao.org/rc-dropdown/download/rc-dropdown-2.4.1.tgz", - "integrity": "sha1-qu9us6UVLN2ZgolcKnjZtfBGzew=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "classnames": "^2.2.6", - "prop-types": "^15.5.8", - "rc-trigger": "^2.5.1", - "react-lifecycles-compat": "^3.0.2" - } - }, - "rc-editor-core": { - "version": "0.8.9", - "resolved": "http://registry.npm.taobao.org/rc-editor-core/download/rc-editor-core-0.8.9.tgz", - "integrity": "sha1-9hGVLI7tll4+NI2ErnvohdrrIhw=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "classnames": "^2.2.5", - "draft-js": "^0.10.0", - "immutable": "^3.7.4", - "lodash": "^4.16.5", - "prop-types": "^15.5.8", - "setimmediate": "^1.0.5" - } - }, - "rc-editor-mention": { - "version": "1.1.12", - "resolved": "http://registry.npm.taobao.org/rc-editor-mention/download/rc-editor-mention-1.1.12.tgz", - "integrity": "sha1-iWvLFyES8YgS6W/dM7pgPA/HMGo=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.0", - "draft-js": "~0.10.0", - "immutable": "^3.7.4", - "prop-types": "^15.5.8", - "rc-animate": "^2.3.0", - "rc-editor-core": "~0.8.3" - } - }, - "rc-form": { - "version": "2.4.4", - "resolved": "http://registry.npm.taobao.org/rc-form/download/rc-form-2.4.4.tgz", - "integrity": "sha1-rA88xkNySZHHQtWuZ0J3f7wLz7s=", - "dev": true, - "requires": { - "async-validator": "~1.8.5", - "babel-runtime": "6.x", - "create-react-class": "^15.5.3", - "dom-scroll-into-view": "1.x", - "hoist-non-react-statics": "^3.3.0", - "lodash": "^4.17.4", - "warning": "^4.0.3" - } - }, - "rc-hammerjs": { - "version": "0.6.9", - "resolved": "http://registry.npm.taobao.org/rc-hammerjs/download/rc-hammerjs-0.6.9.tgz", - "integrity": "sha1-mk3b2hsuyPm5WWCRpqmJhCokOQc=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "hammerjs": "^2.0.8", - "prop-types": "^15.5.9" - } - }, - "rc-input-number": { - "version": "4.4.1", - "resolved": "http://registry.npm.taobao.org/rc-input-number/download/rc-input-number-4.4.1.tgz", - "integrity": "sha1-FjbPKBzejXjqTIuf/P/Xe4A1BnU=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.0", - "prop-types": "^15.5.7", - "rc-util": "^4.5.1", - "rmc-feedback": "^2.0.0" - } - }, - "rc-menu": { - "version": "7.4.22", - "resolved": "http://registry.npm.taobao.org/rc-menu/download/rc-menu-7.4.22.tgz", - "integrity": "sha1-MwVRfMKEuol5pFoNFicXgK2vsu4=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "dom-scroll-into-view": "1.x", - "ismobilejs": "^0.5.1", - "mini-store": "^2.0.0", - "mutationobserver-shim": "^0.3.2", - "prop-types": "^15.5.6", - "rc-animate": "2.x", - "rc-trigger": "^2.3.0", - "rc-util": "^4.1.0", - "resize-observer-polyfill": "^1.5.0" - } - }, - "rc-notification": { - "version": "3.3.1", - "resolved": "http://registry.npm.taobao.org/rc-notification/download/rc-notification-3.3.1.tgz", - "integrity": "sha1-C6o+cPjUCrAVzo+njCYMSQ/HvrQ=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "prop-types": "^15.5.8", - "rc-animate": "2.x", - "rc-util": "^4.0.4" - } - }, - "rc-pagination": { - "version": "1.17.14", - "resolved": "http://registry.npm.taobao.org/rc-pagination/download/rc-pagination-1.17.14.tgz", - "integrity": "sha1-/7KIL9idlbO2A5ONxdsvssMAJtM=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "prop-types": "^15.5.7", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-progress": { - "version": "2.3.0", - "resolved": "http://registry.npm.taobao.org/rc-progress/download/rc-progress-2.3.0.tgz", - "integrity": "sha1-z70H/5AmxFAQCYDeIJqSZQ4k8xM=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "prop-types": "^15.5.8" - } - }, - "rc-rate": { - "version": "2.5.0", - "resolved": "http://registry.npm.taobao.org/rc-rate/download/rc-rate-2.5.0.tgz", - "integrity": "sha1-ctSYSgPQp6Dmd5x6ee/OonYmq/Y=", - "dev": true, - "requires": { - "classnames": "^2.2.5", - "prop-types": "^15.5.8", - "rc-util": "^4.3.0", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-select": { - "version": "9.0.2", - "resolved": "http://registry.npm.taobao.org/rc-select/download/rc-select-9.0.2.tgz", - "integrity": "sha1-zg0pfbX4pcfou8P8JNntW6ZIASw=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "2.x", - "component-classes": "1.x", - "dom-scroll-into-view": "1.x", - "prop-types": "^15.5.8", - "raf": "^3.4.0", - "rc-animate": "2.x", - "rc-menu": "^7.3.0", - "rc-trigger": "^2.5.4", - "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.2", - "warning": "^4.0.2" - } - }, - "rc-slider": { - "version": "8.6.9", - "resolved": "http://registry.npm.taobao.org/rc-slider/download/rc-slider-8.6.9.tgz", - "integrity": "sha1-syFIpJjJJ8k/INwflehoLEkkv44=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "prop-types": "^15.5.4", - "rc-tooltip": "^3.7.0", - "rc-util": "^4.0.4", - "shallowequal": "^1.0.1", - "warning": "^4.0.3" - } - }, - "rc-steps": { - "version": "3.3.1", - "resolved": "http://registry.npm.taobao.org/rc-steps/download/rc-steps-3.3.1.tgz", - "integrity": "sha1-SHfiiXMx47/ba3ieiK6nj08V9zI=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "^2.2.3", - "lodash": "^4.17.5", - "prop-types": "^15.5.7" - } - }, - "rc-switch": { - "version": "1.9.0", - "resolved": "http://registry.npm.taobao.org/rc-switch/download/rc-switch-1.9.0.tgz", - "integrity": "sha1-qyuHjycTxoE1ikUzkZdsm5WykPc=", - "dev": true, - "requires": { - "classnames": "^2.2.1", - "prop-types": "^15.5.6", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-table": { - "version": "6.4.5", - "resolved": "http://registry.npm.taobao.org/rc-table/download/rc-table-6.4.5.tgz", - "integrity": "sha1-siYTeG8Q5Vx+aOvMwYQHoYo8lDE=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "component-classes": "^1.2.6", - "lodash": "^4.17.5", - "mini-store": "^2.0.0", - "prop-types": "^15.5.8", - "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.2", - "shallowequal": "^1.0.2", - "warning": "^3.0.0" - }, - "dependencies": { - "warning": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/warning/download/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, - "rc-tabs": { - "version": "9.6.3", - "resolved": "http://registry.npm.taobao.org/rc-tabs/download/rc-tabs-9.6.3.tgz", - "integrity": "sha1-XuAoFlIXafkuKNwDYKLrEhS1MHU=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "create-react-context": "0.2.2", - "lodash": "^4.17.5", - "prop-types": "15.x", - "raf": "^3.4.1", - "rc-hammerjs": "~0.6.0", - "rc-util": "^4.0.4", - "resize-observer-polyfill": "^1.5.1", - "warning": "^3.0.0" - }, - "dependencies": { - "warning": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/warning/download/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, - "rc-time-picker": { - "version": "3.6.4", - "resolved": "http://registry.npm.taobao.org/rc-time-picker/download/rc-time-picker-3.6.4.tgz", - "integrity": "sha1-P+sF7Ij5yRcB1PaRAl6brZCFrzw=", - "dev": true, - "requires": { - "classnames": "2.x", - "moment": "2.x", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.0" - } - }, - "rc-tooltip": { - "version": "3.7.3", - "resolved": "http://registry.npm.taobao.org/rc-tooltip/download/rc-tooltip-3.7.3.tgz", - "integrity": "sha1-KArsavyqROjf8EgPuv+eh/wArsw=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.2" - } - }, - "rc-tree": { - "version": "1.15.2", - "resolved": "http://registry.npm.taobao.org/rc-tree/download/rc-tree-1.15.2.tgz", - "integrity": "sha1-oNbyD6K9vlHYKdXO6nSkB7BL/qk=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "2.x", - "prop-types": "^15.5.8", - "rc-animate": "^3.0.0-rc.5", - "rc-util": "^4.5.1", - "react-lifecycles-compat": "^3.0.4", - "warning": "^3.0.0" - }, - "dependencies": { - "rc-animate": { - "version": "3.0.0-rc.6", - "resolved": "http://registry.npm.taobao.org/rc-animate/download/rc-animate-3.0.0-rc.6.tgz", - "integrity": "sha1-BCiO76EY4MriFFNsipA/+qwbw/s=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "component-classes": "^1.2.6", - "fbjs": "^0.8.16", - "prop-types": "15.x", - "raf": "^3.4.0", - "rc-util": "^4.5.0", - "react-lifecycles-compat": "^3.0.4" - } - }, - "warning": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/warning/download/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, - "rc-tree-select": { - "version": "2.6.3", - "resolved": "http://registry.npm.taobao.org/rc-tree-select/download/rc-tree-select-2.6.3.tgz", - "integrity": "sha1-N2w2jwvWDSZvJ0C5mrgPGgC9RK0=", - "dev": true, - "requires": { - "classnames": "^2.2.1", - "dom-scroll-into-view": "^1.2.1", - "prop-types": "^15.5.8", - "raf": "^3.4.0", - "rc-animate": "^3.0.0-rc.4", - "rc-tree": "~1.15.0", - "rc-trigger": "^3.0.0-rc.2", - "rc-util": "^4.5.0", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", - "warning": "^4.0.1" - }, - "dependencies": { - "rc-animate": { - "version": "3.0.0-rc.6", - "resolved": "http://registry.npm.taobao.org/rc-animate/download/rc-animate-3.0.0-rc.6.tgz", - "integrity": "sha1-BCiO76EY4MriFFNsipA/+qwbw/s=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "component-classes": "^1.2.6", - "fbjs": "^0.8.16", - "prop-types": "15.x", - "raf": "^3.4.0", - "rc-util": "^4.5.0", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-trigger": { - "version": "3.0.0-rc.3", - "resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-3.0.0-rc.3.tgz", - "integrity": "sha1-NYQt8WdNJTFeFCakSIKkyXZSJYs=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "prop-types": "15.x", - "raf": "^3.4.0", - "rc-align": "^2.4.1", - "rc-animate": "^3.0.0-rc.1", - "rc-util": "^4.4.0" - } - } - } - }, - "rc-trigger": { - "version": "2.6.2", - "resolved": "http://registry.npm.taobao.org/rc-trigger/download/rc-trigger-2.6.2.tgz", - "integrity": "sha1-qcCbpfrWOvOy7EY0nH22y0ZlcAE=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "prop-types": "15.x", - "rc-align": "^2.4.0", - "rc-animate": "2.x", - "rc-util": "^4.4.0" - } - }, - "rc-upload": { - "version": "2.6.3", - "resolved": "http://registry.npm.taobao.org/rc-upload/download/rc-upload-2.6.3.tgz", - "integrity": "sha1-mfD0uUjoLHEoClBzme5L8vwWtEA=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "prop-types": "^15.5.7", - "warning": "4.x" - } - }, - "rc-util": { - "version": "4.6.0", - "resolved": "http://registry.npm.taobao.org/rc-util/download/rc-util-4.6.0.tgz", - "integrity": "sha1-ujNyF4MZLsTzr7JZ4YKwTlXet/Y=", - "dev": true, - "requires": { - "add-dom-event-listener": "^1.1.0", - "babel-runtime": "6.x", - "prop-types": "^15.5.10", - "shallowequal": "^0.2.2" - }, - "dependencies": { - "shallowequal": { - "version": "0.2.2", - "resolved": "http://registry.npm.taobao.org/shallowequal/download/shallowequal-0.2.2.tgz", - "integrity": "sha1-HjL9W8q2rWiKSBLLDMBO/HXHAU4=", - "dev": true, - "requires": { - "lodash.keys": "^3.1.2" - } - } - } - }, - "react": { - "version": "16.8.6", - "resolved": "http://registry.npm.taobao.org/react/download/react-16.8.6.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Freact%2Fdownload%2Freact-16.8.6.tgz", - "integrity": "sha1-rWw6lhT9Ok6e9REX9U2IjaAfK74=", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.13.6" - } - }, - "react-hot-loader": { - "version": "4.8.4", - "resolved": "http://registry.npm.taobao.org/react-hot-loader/download/react-hot-loader-4.8.4.tgz", - "integrity": "sha1-NXujQuNn/ULWqHCpwGAcI/oHMMY=", - "dev": true, - "requires": { - "fast-levenshtein": "^2.0.6", - "global": "^4.3.0", - "hoist-non-react-statics": "^3.3.0", - "loader-utils": "^1.1.0", - "lodash": "^4.17.11", - "prop-types": "^15.6.1", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", - "source-map": "^0.7.3" - } - }, - "react-is": { - "version": "16.8.6", - "resolved": "http://registry.npm.taobao.org/react-is/download/react-is-16.8.6.tgz", - "integrity": "sha1-W7weLSkUHJ+9/tRWND/ivEMKahY=", - "dev": true - }, - "react-lazy-load": { - "version": "3.0.13", - "resolved": "http://registry.npm.taobao.org/react-lazy-load/download/react-lazy-load-3.0.13.tgz", - "integrity": "sha1-OwqS0zbUPT8Nc8vm81sXBQsIuCQ=", - "dev": true, - "requires": { - "eventlistener": "0.0.1", - "lodash.debounce": "^4.0.0", - "lodash.throttle": "^4.0.0", - "prop-types": "^15.5.8" - } - }, - "react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "http://registry.npm.taobao.org/react-lifecycles-compat/download/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha1-TxonOv38jzSIqMUWv9p4+HI1I2I=", - "dev": true - }, - "react-router": { - "version": "5.0.0", - "resolved": "http://registry.npm.taobao.org/react-router/download/react-router-5.0.0.tgz", - "integrity": "sha1-NJhj92n/wvoQ7nMxpCluhrwSh50=", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "create-react-context": "^0.2.2", - "history": "^4.9.0", - "hoist-non-react-statics": "^3.1.0", - "loose-envify": "^1.3.1", - "path-to-regexp": "^1.7.0", - "prop-types": "^15.6.2", - "react-is": "^16.6.0", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0" - } - }, - "react-router-dom": { - "version": "5.0.0", - "resolved": "http://registry.npm.taobao.org/react-router-dom/download/react-router-dom-5.0.0.tgz", - "integrity": "sha1-VCqbhq8mmjfwuHIYxMJeqNzwwHM=", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "history": "^4.9.0", - "loose-envify": "^1.3.1", - "prop-types": "^15.6.2", - "react-router": "5.0.0", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0" - } - }, - "react-slick": { - "version": "0.23.2", - "resolved": "http://registry.npm.taobao.org/react-slick/download/react-slick-0.23.2.tgz", - "integrity": "sha1-jYvbx3pmeOitNvUMMleMfA8cVPY=", - "dev": true, - "requires": { - "classnames": "^2.2.5", - "enquire.js": "^2.1.6", - "json2mq": "^0.2.0", - "lodash.debounce": "^4.0.8", - "prettier": "^1.14.3", - "resize-observer-polyfill": "^1.5.0" - } - }, - "readable-stream": { - "version": "3.3.0", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-3.3.0.tgz", - "integrity": "sha1-y4ARqtAC63F78EApH+uoVpyYb7k=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "http://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "http://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", - "dev": true - }, - "regex-not": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "http://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.3", - "resolved": "http://registry.npm.taobao.org/renderkid/download/renderkid-2.0.3.tgz", - "integrity": "sha1-OAF5wv9a4TZcUivy/Pz/AcW3QUk=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "request": { - "version": "2.88.0", - "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz", - "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "http://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=", - "dev": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "http://registry.npm.taobao.org/resolve/download/resolve-1.10.0.tgz", - "integrity": "sha1-O9qur0XMB/N1ZW39LlTtCBCxAbo=", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/resolve-dir/download/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-pathname": { - "version": "2.2.0", - "resolved": "http://registry.npm.taobao.org/resolve-pathname/download/resolve-pathname-2.2.0.tgz", - "integrity": "sha1-fpriHtgV/WOrGJre7mTcgx7vqHk=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "http://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/rgb-regex/download/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "http://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz", - "integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/ripemd160/download/ripemd160-2.0.2.tgz", - "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rmc-feedback": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/rmc-feedback/download/rmc-feedback-2.0.0.tgz", - "integrity": "sha1-y8bLOuY8emNe7w4l5PuvWsNm7qo=", - "dev": true, - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", - "dev": true - }, - "scheduler": { - "version": "0.13.6", - "resolved": "http://registry.npm.taobao.org/scheduler/download/scheduler-0.13.6.tgz", - "integrity": "sha1-RmpOwzJGezGpG5v3TlNHBy5M2Ik=", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.4", - "resolved": "http://registry.npm.taobao.org/selfsigned/download/selfsigned-1.10.4.tgz", - "integrity": "sha1-zdfsz8pO12NdR6CL8tXTB0CS4s0=", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.7.0", - "resolved": "http://registry.npm.taobao.org/semver/download/semver-5.7.0.tgz", - "integrity": "sha1-eQp89v6lRZuslhELKbYEEtyP+Ws=", - "dev": true - }, - "send": { - "version": "0.16.2", - "resolved": "http://registry.npm.taobao.org/send/download/send-0.16.2.tgz", - "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "mime": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/mime/download/mime-1.4.1.tgz", - "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.7.0", - "resolved": "http://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.7.0.tgz", - "integrity": "sha1-1uDfsqODKoyURo5usduX5VoZKmU=", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "http://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz", - "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "http://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npm.taobao.org/sha.js/download/sha.js-2.4.11.tgz", - "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-equal": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/shallow-equal/download/shallow-equal-1.1.0.tgz", - "integrity": "sha1-zAIvAw3LoNHBmKv2WKPGx0Thcco=", - "dev": true - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/shallowequal/download/shallowequal-1.1.0.tgz", - "integrity": "sha1-GI1SHelbkIdAT9TctosT3wrk5/g=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "http://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz", - "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", - "dev": true - } - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "http://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "http://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "http://registry.npm.taobao.org/sockjs/download/sockjs-0.3.19.tgz", - "integrity": "sha1-2Xa76ACve9IK4IWY1YI5NQiZPA0=", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/sockjs-client/download/sockjs-client-1.3.0.tgz", - "integrity": "sha1-EvydbLZj2lc509xftuhofalcsXc=", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.1", - "resolved": "http://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "sort-keys": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/sort-keys/download/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", - "integrity": "sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ=", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz", - "integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.2.tgz", - "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.12", - "resolved": "http://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.12.tgz", - "integrity": "sha1-tPOxDVGFelrwE4086AA7IBYT1Zk=", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdy": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/spdy/download/spdy-4.0.0.tgz", - "integrity": "sha1-gfIitadDoymqEs6mo5DmDpthPFI=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/spdy-transport/download/spdy-transport-3.0.0.tgz", - "integrity": "sha1-ANSGOmQArXXfkzYaFghgXl3NzzE=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "http://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz", - "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", - "dev": true, - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "http://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz", - "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "http://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz", - "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "http://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.4.0.tgz", - "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/stream-browserify/download/stream-browserify-2.0.2.tgz", - "integrity": "sha1-h1IdOKRKp+6RzhzSpH3wy0ndZgs=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "http://registry.npm.taobao.org/stream-each/download/stream-each-1.2.3.tgz", - "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "http://registry.npm.taobao.org/stream-http/download/stream-http-2.8.3.tgz", - "integrity": "sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw=", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "http://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string-convert": { - "version": "0.2.1", - "resolved": "http://registry.npm.taobao.org/string-convert/download/string-convert-0.2.1.tgz", - "integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.2.0", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.2.0.tgz", - "integrity": "sha1-/obnOLGVRK/nBGkkOyoe6SQOro0=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "style-loader": { - "version": "0.23.1", - "resolved": "http://registry.npm.taobao.org/style-loader/download/style-loader-0.23.1.tgz", - "integrity": "sha1-y5FUYG8+dxq2xKtjcCahBJF02SU=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - } - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/stylehacks/download/stylehacks-4.0.3.tgz", - "integrity": "sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "http://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "svgo": { - "version": "1.2.2", - "resolved": "http://registry.npm.taobao.org/svgo/download/svgo-1.2.2.tgz", - "integrity": "sha1-AlPTTszyrtStTyg+Ee51GY+dcxY=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.28", - "css-url-regex": "^1.1.0", - "csso": "^3.5.1", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "dependencies": { - "css-select": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/css-select/download/css-select-2.0.2.tgz", - "integrity": "sha1-q0OGzsnh9miFVWSxfDcztDsqXt4=", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^2.1.2", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "http://registry.npm.taobao.org/domutils/download/domutils-1.7.0.tgz", - "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - } - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz", - "integrity": "sha1-ofzMBrWNth/XpF2i2kT186Pme6I=", - "dev": true - }, - "terser": { - "version": "3.17.0", - "resolved": "http://registry.npm.taobao.org/terser/download/terser-3.17.0.tgz", - "integrity": "sha1-+I/77aDetWN/nSSw2mb04VqxDLI=", - "dev": true, - "requires": { - "commander": "^2.19.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.10" - }, - "dependencies": { - "commander": { - "version": "2.20.0", - "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.20.0.tgz", - "integrity": "sha1-1YuytcHuj4ew00ACfp6U4iLFpCI=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "1.2.3", - "resolved": "http://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.2.3.tgz", - "integrity": "sha1-P5i8kC+sPl0N5zCGn1BmhWEmLsg=", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "through2": { - "version": "2.0.5", - "resolved": "http://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "thunky": { - "version": "1.0.3", - "resolved": "http://registry.npm.taobao.org/thunky/download/thunky-1.0.3.tgz", - "integrity": "sha1-9d9zJFNAewkZHa5z4qjMc/OBqCY=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "http://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.10.tgz", - "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "http://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tiny-invariant": { - "version": "1.0.4", - "resolved": "http://registry.npm.taobao.org/tiny-invariant/download/tiny-invariant-1.0.4.tgz", - "integrity": "sha1-NGtUFf2Ty2lrDE6Klml/9ZD5JGM=", - "dev": true - }, - "tiny-warning": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/tiny-warning/download/tiny-warning-1.0.2.tgz", - "integrity": "sha1-Hfrnce4aBDlr394no63OvGtkiyg=", - "dev": true - }, - "tinycolor2": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.1.tgz", - "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "http://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "http://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "http://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toggle-selection": { - "version": "1.0.6", - "resolved": "http://registry.npm.taobao.org/toggle-selection/download/toggle-selection-1.0.6.tgz", - "integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI=", - "dev": true - }, - "toposort": { - "version": "1.0.7", - "resolved": "http://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz", - "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=", - "dev": true, - "optional": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - } - } - }, - "ts-loader": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.4.5.tgz", - "integrity": "sha512-XYsjfnRQCBum9AMRZpk2rTYSVpdZBpZK+kDh0TeT3kxmQNBDVIeUjdPjY5RZry4eIAb8XHc4gYSUiUWPYvzSRw==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - } - }, - "tsconfig-paths": { - "version": "3.8.0", - "resolved": "http://registry.npm.taobao.org/tsconfig-paths/download/tsconfig-paths-3.8.0.tgz", - "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "deepmerge": "^2.0.1", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - } - }, - "tsconfig-paths-webpack-plugin": { - "version": "3.2.0", - "resolved": "http://registry.npm.taobao.org/tsconfig-paths-webpack-plugin/download/tsconfig-paths-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-bnC9QpFa0O+2TTOFFj8MEnDz4E0=", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "tsconfig-paths": "^3.4.0" - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz", - "integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=", - "dev": true - }, - "tslint": { - "version": "5.16.0", - "resolved": "http://registry.npm.taobao.org/tslint/download/tslint-5.16.0.tgz", - "integrity": "sha1-rmH5xamNKVuaT0VTsbHoMcGYTWc=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.13.0", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - } - }, - "tslint-react": { - "version": "3.6.0", - "resolved": "http://registry.npm.taobao.org/tslint-react/download/tslint-react-3.6.0.tgz", - "integrity": "sha1-f0YslcSgr6roJQfwZRf/ApQhlqE=", - "dev": true, - "requires": { - "tsutils": "^2.13.1" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "http://registry.npm.taobao.org/tsutils/download/tsutils-2.29.0.tgz", - "integrity": "sha1-MrSIUBRnrL7dS4VJhnOggSrKC5k=", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-is": { - "version": "1.6.16", - "resolved": "http://registry.npm.taobao.org/type-is/download/type-is-1.6.16.tgz", - "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.4.4", - "resolved": "http://registry.npm.taobao.org/typescript/download/typescript-3.4.4.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-3.4.4.tgz", - "integrity": "sha1-qsSgir7KuAkadfEIQv+gYxgY94U=", - "dev": true - }, - "ua-parser-js": { - "version": "0.7.19", - "resolved": "http://registry.npm.taobao.org/ua-parser-js/download/ua-parser-js-0.7.19.tgz", - "integrity": "sha1-lBUb5MCn+x0AGvcCL9rKRkJlnks=", - "dev": true - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz", - "integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz", - "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/union-value/download/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/uniq/download/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz", - "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "http://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.1.tgz", - "integrity": "sha1-Xp7cbRzo+yZNsYpQfvm9hURFHKY=", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "http://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/upath/download/upath-1.1.2.tgz", - "integrity": "sha1-PbZYYA7a7sy+bbXmhNZ+6MKs0Gg=", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "http://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz", - "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "http://registry.npm.taobao.org/url/download/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse": { - "version": "1.4.6", - "resolved": "http://registry.npm.taobao.org/url-parse/download/url-parse-1.4.6.tgz", - "integrity": "sha1-uvkdbmeDyKeV60dokv/vJzf8BFY=", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "http://registry.npm.taobao.org/use/download/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "http://registry.npm.taobao.org/util/download/util-0.11.1.tgz", - "integrity": "sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE=", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz", - "integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "http://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "http://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz", - "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE=", - "dev": true - }, - "v8-compile-cache": { - "version": "2.0.2", - "resolved": "http://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.0.2.tgz", - "integrity": "sha1-pCiyi7JnkHNMT8i8n6EG/M6/amw=", - "dev": true - }, - "value-equal": { - "version": "0.4.0", - "resolved": "http://registry.npm.taobao.org/value-equal/download/value-equal-0.4.0.tgz", - "integrity": "sha1-xb3S9U7gk8BIOdcc4uR1imiQq8c=", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "http://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/vendors/download/vendors-1.0.2.tgz", - "integrity": "sha1-f8te759WI7FWvOqJ7DfWNnbyGAE=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "http://registry.npm.taobao.org/vm-browserify/download/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "warning": { - "version": "4.0.3", - "resolved": "http://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz", - "integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "watchpack": { - "version": "1.6.0", - "resolved": "http://registry.npm.taobao.org/watchpack/download/watchpack-1.6.0.tgz", - "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "http://registry.npm.taobao.org/wbuf/download/wbuf-1.7.3.tgz", - "integrity": "sha1-wdjRSTFtPqhShIiVy2oL/oh7h98=", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webpack": { - "version": "4.30.0", - "resolved": "http://registry.npm.taobao.org/webpack/download/webpack-4.30.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack%2Fdownload%2Fwebpack-4.30.0.tgz", - "integrity": "sha1-rKdu91YwoixJ/MI1s5tMV1kdM6k=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^1.0.0", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - } - }, - "webpack-cli": { - "version": "3.3.0", - "resolved": "http://registry.npm.taobao.org/webpack-cli/download/webpack-cli-3.3.0.tgz", - "integrity": "sha1-VcinTK4eiBF/ndo6gBxycuk8oxg=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.1.0", - "findup-sync": "^2.0.0", - "global-modules": "^1.0.0", - "import-local": "^2.0.0", - "interpret": "^1.1.0", - "loader-utils": "^1.1.0", - "supports-color": "^5.5.0", - "v8-compile-cache": "^2.0.2", - "yargs": "^12.0.5" - } - }, - "webpack-dev-middleware": { - "version": "3.6.2", - "resolved": "http://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.6.2.tgz", - "integrity": "sha1-83onrXwJzX3GfNl2VUE6uqH1WUI=", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "http://registry.npm.taobao.org/mime/download/mime-2.4.2.tgz", - "integrity": "sha1-zlIppemf/DE6usgGtILBDnumrHg=", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.3.1", - "resolved": "http://registry.npm.taobao.org/webpack-dev-server/download/webpack-dev-server-3.3.1.tgz", - "integrity": "sha1-cEbkne1cElWoLF2UK83aVStypi0=", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.5", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.0", - "express": "^4.16.4", - "html-entities": "^1.2.1", - "http-proxy-middleware": "^0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.2.0", - "ip": "^1.1.5", - "killable": "^1.0.1", - "loglevel": "^1.6.1", - "opn": "^5.5.0", - "portfinder": "^1.0.20", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.4", - "semver": "^6.0.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.6.2", - "webpack-log": "^2.0.0", - "yargs": "12.0.5" - }, - "dependencies": { - "semver": { - "version": "6.0.0", - "resolved": "http://registry.npm.taobao.org/semver/download/semver-6.0.0.tgz", - "integrity": "sha1-BeNZ7lceWtftZBpu7B5Ue6Ut6mU=", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/webpack-log/download/webpack-log-2.0.0.tgz", - "integrity": "sha1-W3ko4GN1k/EZ0y9iJ8HgrDHhtH8=", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "http://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.3.0.tgz", - "integrity": "sha1-KijcufH0X+lg2PFJMlK17mUw+oU=", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "http://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "http://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz", - "integrity": "sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk=", - "dev": true - }, - "whatwg-fetch": { - "version": "3.0.0", - "resolved": "http://registry.npm.taobao.org/whatwg-fetch/download/whatwg-fetch-3.0.0.tgz", - "integrity": "sha1-/IBORYzEYACbGiuWa8iBfSV4rvs=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "http://registry.npm.taobao.org/which/download/which-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "http://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "http://registry.npm.taobao.org/worker-farm/download/worker-farm-1.6.0.tgz", - "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fwrap-ansi%2Fdownload%2Fwrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "http://registry.npm.taobao.org/xtend/download/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "http://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", - "dev": true - }, - "yallist": { - "version": "3.0.3", - "resolved": "http://registry.npm.taobao.org/yallist/download/yallist-3.0.3.tgz", - "integrity": "sha1-tLBJ4xS+VF486AIjbWzSLNkcPek=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-12.0.5.tgz", - "integrity": "sha1-BfWZe2CWR7ZPZrgeO0sQo2jnrRM=", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-11.1.1.tgz", - "integrity": "sha1-h5oIZZc7yp9rq1y987HGfsfTvPQ=", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "zrender": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.0.7.tgz", - "integrity": "sha1-Fa6WCCL17+1BCZXTflEH/j3hDm0=", - "dev": true - } - } -} diff --git a/console/src/container/admin-consume/detail.tsx b/console/src/container/admin-consume/detail.tsx deleted file mode 100644 index 0d9183f0..00000000 --- a/console/src/container/admin-consume/detail.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import * as React from 'react'; - -import { PaginationConfig, Table } from 'component/antd'; -import { observer } from 'mobx-react'; -import urlQuery from 'store/url-query'; -import { IConsumeInfo } from 'store/topic'; -import { consume } from 'store/consume'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { modal } from 'store'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminConsume extends SearchAndFilter { - public state = { - searchKey: '', - }; - - public columns = [{ - title: '消费组名称', - dataIndex: 'consumerGroup', - key: 'consumerGroup', - width: '70%', - sorter: (a: IConsumeInfo, b: IConsumeInfo) => a.consumerGroup.charCodeAt(0) - b.consumerGroup.charCodeAt(0), - }, { - title: 'location', - dataIndex: 'location', - key: 'location', - width: '20%', - render: (t: string) => t.toLowerCase(), - }, { - title: '操作', - key: 'operation', - width: '10%', - render: (t: string, r: IConsumeInfo) => { - return ( - 详情); - }, - }, - ]; - - public componentDidMount() { - consume.getConsumeInfo(urlQuery.clusterId); - } - - public render() { - const data = consume.data.filter((d) => d.consumerGroup.includes(this.state.searchKey)); - return ( - <> -
    - {this.renderSearch('请输入消费组名称')} -
-
- - - - ); - } -} diff --git a/console/src/container/admin-consume/index.less b/console/src/container/admin-consume/index.less deleted file mode 100644 index 5e1b9a42..00000000 --- a/console/src/container/admin-consume/index.less +++ /dev/null @@ -1,8 +0,0 @@ -.content-container .table-operation-bar.in-panel { - position: static; - text-align: right; - .new-topic { - margin-right: 0; - margin-left: 30px; - } -} \ No newline at end of file diff --git a/console/src/container/admin-consume/index.tsx b/console/src/container/admin-consume/index.tsx deleted file mode 100644 index 8b2edcb9..00000000 --- a/console/src/container/admin-consume/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import * as React from 'react'; - -import { PaginationConfig, Table } from 'component/antd'; -import { observer } from 'mobx-react'; -import urlQuery from 'store/url-query'; -import { IConsumeInfo } from 'store/topic'; -import { consume } from 'store/consume'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { modal } from 'store'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminConsume extends SearchAndFilter { - public state = { - searchKey: '', - }; - - public columns = [{ - title: '消费组名称', - dataIndex: 'consumerGroup', - key: 'consumerGroup', - width: '70%', - sorter: (a: IConsumeInfo, b: IConsumeInfo) => a.consumerGroup.charCodeAt(0) - b.consumerGroup.charCodeAt(0), - }, { - title: 'location', - dataIndex: 'location', - key: 'location', - width: '20%', - render: (t: string) => t.toLowerCase(), - }, { - title: '操作', - key: 'operation', - width: '10%', - render: (t: string, r: IConsumeInfo) => { - return ( - 详情); - }, - }, - ]; - - public componentDidMount() { - consume.getConsumeInfo(urlQuery.clusterId); - } - - public render() { - const data = consume.data.filter((d) => d.consumerGroup.includes(this.state.searchKey)); - return ( -
-
    - {this.renderSearch('请输入消费组名称')} -
-
-
- - - ); - } -} diff --git a/console/src/container/admin-controller/index.tsx b/console/src/container/admin-controller/index.tsx deleted file mode 100644 index ca51f281..00000000 --- a/console/src/container/admin-controller/index.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, PaginationConfig } from 'component/antd'; -import { observer } from 'mobx-react'; -import urlQuery from 'store/url-query'; -import { controller } from 'store/controller'; -import { SearchAndFilter } from 'container/cluster-topic'; -import moment from 'moment'; - -const TabPane = Tabs.TabPane; - -const columns = [ - { - title: 'BrokerId', - dataIndex: 'brokerId', - key: 'brokerId', - sorter: (a: any, b: any) => a.brokerNum - b.brokerNum, - }, - { - title: 'host', - key: 'host', - dataIndex: 'host', - render: (r: string, t: any) => { - return ( - {r} - - ); }, - }, - { - title: '版本', - dataIndex: 'controllerVersion', - key: 'controllerVersion', - }, - { - title: '变更时间', - dataIndex: 'controllerTimestamp', - key: 'controllerTimestamp', - sorter: (a: any, b: any) => a.controllerTimestamp - b.updacontrollerTimestampteTime, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, -]; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminController extends SearchAndFilter { - public state = { - searchKey: '', - }; - - public componentDidMount() { - controller.getController(urlQuery.clusterId); - } - - public renderController() { - if (!controller.data) return null; - const data = controller.data.filter((d) => d.host.includes(this.state.searchKey)); - return ( -
- ); - } - - public render() { - return ( - <> -
    - {this.renderSearch('请输入关键词')} -
- - - {this.renderController()} - - - - ); - } -} diff --git a/console/src/container/admin-home/cluster-detail.tsx b/console/src/container/admin-home/cluster-detail.tsx deleted file mode 100644 index 2ef7d617..00000000 --- a/console/src/container/admin-home/cluster-detail.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import * as React from 'react'; - -import urlQuery from 'store/url-query'; -import { NetWorkFlow } from 'container/topic-detail/com'; -import { Tabs } from 'component/antd'; -import { broker } from 'store/broker'; -import { BrokerStatus } from 'container/broker-info/base-info'; -import { BrokerList } from 'container/broker-info/base-info'; -import { AdminConsume } from 'container/admin-consume'; -import { AdminRegion } from 'container/admin-region'; -import { AdminController } from 'container/admin-controller'; -import AdminTopic from 'container/admin-topic/index'; -import { handleTabKey } from 'lib/utils'; - -export class ClusterDetail extends React.Component { - - public updateStatus = () => { - broker.getBrokerNetwork(urlQuery.clusterId); - } - public componentDidMount() { - this.updateStatus(); - } - public render() { - return ( - <> - - -
-

历史流量

- -
-
-

实时流量

- - 刷新 - - -
-
- - - - - - - - - - - - - - - -
- - - ); - } -} diff --git a/console/src/container/admin-home/index.less b/console/src/container/admin-home/index.less deleted file mode 100644 index 8987ee75..00000000 --- a/console/src/container/admin-home/index.less +++ /dev/null @@ -1,9 +0,0 @@ -.right-flow { - .k-abs { - right: 24px; - cursor: pointer; - & > i { - margin-right: 5px; - } - } -} diff --git a/console/src/container/admin-home/index.tsx b/console/src/container/admin-home/index.tsx deleted file mode 100644 index a53d9df3..00000000 --- a/console/src/container/admin-home/index.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import * as React from 'react'; -import './index.less'; - -import { Table, Tabs, ColumnProps, PaginationConfig } from 'component/antd'; - -import { modal } from 'store'; -import { cluster } from 'store/cluster'; -import { observer } from 'mobx-react'; -import { IClusterData } from 'types/base-type'; - -const TabPane = Tabs.TabPane; - -const detailUrl = '/admin/cluster_detail?clusterId='; - -const collectionColumns: Array> = [ - { - title: '集群ID', - dataIndex: 'clusterId', - key: 'clusterId', - sorter: (a: IClusterData, b: IClusterData) => a.clusterId - b.clusterId, - }, - { - title: '集群名称', - key: 'clusterName', - sorter: (a: IClusterData, b: IClusterData) => a.clusterName.charCodeAt(0) - b.clusterName.charCodeAt(0), - render: (text, record) => { - const url = `${detailUrl}${record.clusterId}&clusterName=${record.clusterName}`; - return {record.clusterName}; - }, - }, - { - title: 'Topic 数', - key: 'topicNum', - sorter: (a: IClusterData, b: IClusterData) => a.topicNum - b.topicNum, - render: (text, record) => { - return {record.topicNum}; - }, - }, - { - title: 'Broker 数量', - dataIndex: 'brokerNum', - key: 'brokerNum', - sorter: (a: IClusterData, b: IClusterData) => a.brokerNum - b.brokerNum, - render: (text, record) => { - return ( - - {record.brokerNum} - ); - }, - }, - { - title: 'ConsumerGroup 数', - key: 'consumerGroupNum', - sorter: (a: IClusterData, b: IClusterData) => a.consumerGroupNum - b.consumerGroupNum, - render: (text, record) => { - return {record.consumerGroupNum}; - }, - }, - { - title: 'Region 数', - key: 'regionNum', - sorter: (a: IClusterData, b: IClusterData) => a.regionNum - b.regionNum, - render: (text, record) => { - return {record.regionNum}; - }, - }, - { - title: 'ControllerID', - key: 'controllerId', - sorter: (a: IClusterData, b: IClusterData) => a.controllerId - b.controllerId, - render: (text, record) => { - return {record.controllerId}; - }, - }, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - render: (text, record) => { - return ( - - 修改 - - ); - }, - }, -]; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminHome extends React.Component { - public renderList() { - return ( -
- ); - } - - public componentDidMount() { - cluster.getClusters(); - cluster.getKafkaVersions(); - } - - public render() { - return ( - <> -
    -
  • - 添加集群 -
  • -
- - - {this.renderList()} - - - - ); - } -} diff --git a/console/src/container/admin-operation/index.tsx b/console/src/container/admin-operation/index.tsx deleted file mode 100644 index 4fb17ac1..00000000 --- a/console/src/container/admin-operation/index.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, Modal, notification } from 'component/antd'; -import { PaginationConfig } from 'antd/es/table/interface'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { operation, ITask, taskMap } from 'store/operation'; -import { cluster } from 'store/cluster'; -import moment from 'moment'; -import { modifyTask } from 'lib/api'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { tableFilter } from 'lib/utils'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminOperation extends SearchAndFilter { - public state = { - searchKey: '', - filterClusterVisible: false, - filterStatusVisible: false, - }; - - public renderColumns = (data: ITask[]) => { - const cluster = Object.assign({ - title: '集群名称', - dataIndex: 'clusterName', - key: 'clusterId', - filters: tableFilter(data, 'clusterName'), - onFilter: (value: string, record: ITask) => record.clusterName.indexOf(value) === 0, - }, this.renderColumnsFilter('filterClusterVisible')); - - const status = Object.assign({ - title: '状态', - dataIndex: 'status', - key: 'status', - filters: taskMap.map((ele, index) => ({ text: ele, value: index + '' })), - onFilter: (value: string, record: ITask) => record.status === +value, - render: (t: number) => {taskMap[t]}, - }, this.renderColumnsFilter('filterStatusVisible')); - - return [ - { - title: '任务id', - dataIndex: 'taskId', - key: 'taskId', - sorter: (a: ITask, b: ITask) => a.taskId - b.taskId, - }, - cluster, - { - title: 'Topic名称', - dataIndex: 'topicName', - key: 'topicName', - sorter: (a: ITask, b: ITask) => a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0), - }, - { - title: '创建人', - dataIndex: 'operator', - key: 'operator', - sorter: (a: ITask, b: ITask) => a.operator.charCodeAt(0) - b.operator.charCodeAt(0), - }, - { - title: '创建时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - sorter: (a: ITask, b: ITask) => a.gmtCreate - b.gmtCreate, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, - status, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - width: 200, - render: (text: string, record: ITask) => { - const status: number = record.status; - return ( - - 详情 - {+status === 0 || +status === 1 ? 修改 : null} - {!status ? 执行 : null} - {!status ? 撤销 : null} - - ); - }, - }, - ]; - } - - public handleAction(taskId: number, type: string) { - Modal.confirm({ - title: `确认${type === 'start' ? '执行Topic迁移任务' : '撤销任务' + taskId}`, - okText: '确定', - cancelText: '取消', - onOk: () => { - modifyTask({ action: type, taskId }).then(() => { - notification.success({ message: `${type === 'start' ? '执行' : '撤销'}任务成功` }); - operation.getTask(); - }); - }, - }); - } - - public componentDidMount() { - operation.getTask(); - cluster.getClusters(); - } - - public render() { - const { searchKey } = this.state; - const data: ITask[] = operation.tasks && searchKey ? operation.tasks.filter((d) => d.taskId === +searchKey) : operation.tasks; - return ( - <> -
    -
  • - 新建迁移任务 -
  • - {this.renderSearch('请输入关键字')} -
- - -
- - - - ); - } -} diff --git a/console/src/container/admin-order/index.less b/console/src/container/admin-order/index.less deleted file mode 100644 index 9edaa9da..00000000 --- a/console/src/container/admin-order/index.less +++ /dev/null @@ -1,16 +0,0 @@ -.num-container { - position: relative; - .num { - position: absolute; - width: 15px; - height: 15px; - line-height: 15px; - border-radius: 15px; - background-color: #f5222d; - color: #fff; - display: inline-block; - right: -18px; - text-align: center; - top: -1px; - } -} diff --git a/console/src/container/admin-order/index.tsx b/console/src/container/admin-order/index.tsx deleted file mode 100644 index 5251e1d1..00000000 --- a/console/src/container/admin-order/index.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs } from 'component/antd'; -import { PaginationConfig } from 'antd/es/table/interface'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { order, tableStatusFilter } from 'store/order'; -import moment from 'moment'; -import { handleTabKey, tableFilter } from 'lib/utils'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { IBaseOrder } from 'types/base-type'; - -import './index.less'; - -const TabPane = Tabs.TabPane; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminOrder extends SearchAndFilter { - public state = { - searchKey: '', - filterClusterVisible: false, - filterStatusVisible: false, - filterSVisible: false, - filterCVisible: false, - }; - - public componentDidMount() { - order.getAdminOrder(); - } - - public renderColumns = (data: IBaseOrder[], type: boolean) => { - const cluster = Object.assign({ - title: '集群名称', - dataIndex: 'clusterName', - key: 'clusterName', - filters: tableFilter(data, 'clusterName'), - onFilter: (value: string, record: IBaseOrder) => record.clusterName.indexOf(value) === 0, - }, this.renderColumnsFilter(type ? 'filterClusterVisible' : 'filterCVisible')); - - const status = Object.assign({ - title: '审批状态', - dataIndex: 'statusStr', - key: 'statusStr', - width: 100, - filters: tableStatusFilter, - onFilter: (value: string, record: IBaseOrder) => record.statusStr.indexOf(value) === 0, - render: (t: string) => {t}, - }, this.renderColumnsFilter(type ? 'filterStatusVisible' : 'filterSVisible')); - return [ - { - title: '工单 ID', - dataIndex: 'orderId', - key: 'orderId', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.orderId - b.orderId, - }, - cluster, - { - title: 'Topic 名称', - dataIndex: 'topicName', - key: 'topicName', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0), - }, - { - title: '申请人', - dataIndex: 'applicant', - key: 'applicant', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.applicant.charCodeAt(0) - b.applicant.charCodeAt(0), - }, - { - title: '审批人', - dataIndex: 'approver', - key: 'approver', - }, - { - title: '申请时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.gmtCreate - b.gmtCreate, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, - status, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - width: 100, - render: (text: string, r: IBaseOrder) => { - if (!+location.hash.substr(1)) { - return ( - - 详情 - {r.orderStatus === 0 ? 审批 : null} - - ); - } else { - return ( - - 详情 - {r.orderStatus === 0 ? 审批 : null} - - ); - } - }, - }, - ]; - } - - public renderTopic() { - const data = order.adminTopicOrder.filter((d) => d.topicName.includes(this.state.searchKey)); - return ( -
- ); - } - - public renderPartition() { - const data = order.adminPartitionOrder.filter((d) => d.topicName.includes(this.state.searchKey)); - return ( -
- ); - } - - public render() { - const defaultKey = location.hash.substr(1) || '0'; - return ( - <> -
    - {this.renderSearch('请输入topic名称')} -
- - - {order.pendingTopic ? {order.pendingTopic} : null} - Topic 申请 - - } - > - {this.renderTopic()} - - - {order.pendingOrder ? {order.pendingOrder} : null} - 扩容申请 - - } - key="1" - > - {this.renderPartition()} - - - - ); - } -} diff --git a/console/src/container/admin-region/index.tsx b/console/src/container/admin-region/index.tsx deleted file mode 100644 index bfed9637..00000000 --- a/console/src/container/admin-region/index.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, Modal, PaginationConfig, notification } from 'component/antd'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { IRegionData, region, statusMap, levelMap } from 'store/region'; -import urlQuery from 'store/url-query'; -import { SearchAndFilter } from 'container/cluster-topic'; - -const TabPane = Tabs.TabPane; - -const handleDeleteRegion = (record: IRegionData) => { - Modal.confirm({ - title: `确认删除 ${record.regionName} ?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - region.delRegion(record.regionId).then(() => { - notification.success({ message: '删除成功' }); - region.getRegions(urlQuery.clusterId); - }); - }, - }); -}; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class AdminRegion extends SearchAndFilter { - public state = { - searchKey: '', - filterStatus: false, - filterLevel: false, - }; - - public renderColumns = () => { - const status = Object.assign({ - title: '状态', - dataIndex: 'status', - key: 'status', - filters: statusMap.map((ele, index) => ({ text: ele, value: index + '' })), - render: (t: number) => {statusMap[t + 1]}, - onFilter: (value: string, record: IRegionData) => record.status + 1 === +value, - }, this.renderColumnsFilter('filterStatus')); - - const level = Object.assign({ - title: '重要程度', - dataIndex: 'level', - key: 'level', - filters: levelMap.map((ele, index) => ({ text: ele, value: index + '' })), - render: (t: number) => { - return levelMap[t]; - }, - onFilter: (value: string, record: IRegionData) => record.level === +value, - }, this.renderColumnsFilter('filterLevel')); - - return [ - { - title: 'Region名称', - dataIndex: 'regionName', - key: 'regionName', - }, - { - title: 'BrokerList', - key: 'brokerIdList', - render: (text: string, record: IRegionData) => { - return {record.brokerIdList.join(', ')}; - }, - }, - { - title: '操作者', - dataIndex: 'operator', - key: 'operator', - }, - status, - level, - { - title: '备注', - dataIndex: 'description', - key: 'description', - }, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - width: 200, - render: (text: string, record: IRegionData) => { - return ( - - 编辑 - 删除 - - ); - }, - }, - ]; - } - - public componentDidMount() { - region.getRegions(urlQuery.clusterId); - } - - public renderRegion() { - if (!region.data) return null; - const data = region.data.filter((d) => d.regionName.includes(this.state.searchKey)); - return ( -
- ); - } - - public render() { - return ( - <> -
    -
  • - 新增Region -
  • - {this.renderSearch('请输入关键词')} -
- - - {this.renderRegion()} - - - - ); - } -} diff --git a/console/src/container/admin-topic/index.tsx b/console/src/container/admin-topic/index.tsx deleted file mode 100644 index aa3e36cc..00000000 --- a/console/src/container/admin-topic/index.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, Form, notification, Modal, Tooltip } from 'component/antd'; -import { PaginationConfig } from 'antd/es/table/interface'; -import { UserHome } from 'container/user-home'; -import { topic } from 'store/topic'; -import urlQuery from 'store/url-query'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { deleteTopic } from 'lib/api'; -import { cluster } from 'store/cluster'; -import { ITopic } from 'types/base-type'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -class AdminTopic extends UserHome { - - public cols = [ - { - title: 'Topic名称', - dataIndex: 'topicName', - key: 'topicName', - width: 350, - onCell: () => ({ - style: { - maxWidth: 250, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - sorter: (a: ITopic, b: ITopic) => a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0), - render: (t: string, r: ITopic) => { - return {t}; - }, - }, - { - title: '分区数', - dataIndex: 'partitionNum', - key: 'partitionNum', - sorter: (a: ITopic, b: ITopic) => b.partitionNum - a.partitionNum, - }, - { - title: '副本数', - dataIndex: 'replicaNum', - key: 'replicaNum', - sorter: (a: ITopic, b: ITopic) => b.replicaNum - a.replicaNum, - }, - { - title: '流入 (KB/s)', - dataIndex: 'byteIn', - key: 'byteIn', - sorter: (a: ITopic, b: ITopic) => b.byteIn - a.byteIn, - render: (t: number) => (t / 1024).toFixed(2), - }, - { - title: '流入(QPS)', - dataIndex: 'produceRequest', - key: 'produceRequest', - width: 150, - sorter: (a: ITopic, b: ITopic) => b.produceRequest - a.produceRequest, - render: (t: number) => t.toFixed(2), - }, - { - title: '负责人', - dataIndex: 'principals', - key: 'principals', - width: 120, - onCell: () => ({ - style: { - maxWidth: 100, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (t: string) => {t}, - sorter: (a: ITopic, b: ITopic) => - a.principals && b.principals ? a.principals.charCodeAt(0) - b.principals.charCodeAt(0) : (-1), - }, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - width: 200, - render: (text: string, r: ITopic) => { - return ( - - 扩分区 - 编辑 - 删除 - - ); - }, - }, - ]; - - public handleDelete = ({ clusterId, topicName }: ITopic) => { - const topicNameList = [topicName]; - Modal.confirm({ - title: `确认删除${topicName}?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - deleteTopic({ clusterId, topicNameList }).then(() => { - notification.success({ message: '删除成功' }); - topic.getAdminTopics(urlQuery.clusterId); - }); - }, - }); - } - - public renderTable() { - - return ( - <> - - -
- - - - ); - } - - public componentDidMount() { - cluster.getClusters(); - topic.getAdminTopics(urlQuery.clusterId); - } - - public renderClusterTopic() { - return ( - <> - {this.renderSearch('请输入Topic名称或者负责人')} - - ); - } -} - -export default Form.create({ name: 'aminTopic' })(AdminTopic); diff --git a/console/src/container/admin-usermanage/index.less b/console/src/container/admin-usermanage/index.less deleted file mode 100644 index 1c637537..00000000 --- a/console/src/container/admin-usermanage/index.less +++ /dev/null @@ -1,12 +0,0 @@ -.u-container { - width: 100%; - height: 48px; - background: rgba(0,0,0,0.02); - display: flex; - justify-content: space-between; - vertical-align: middle; - line-height: 48px; - padding: 0 12px; - margin-top: 20px; - position: relative; -} diff --git a/console/src/container/admin-usermanage/index.tsx b/console/src/container/admin-usermanage/index.tsx deleted file mode 100644 index 7bb4c47c..00000000 --- a/console/src/container/admin-usermanage/index.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import * as React from 'react'; - -import { Table, notification, PaginationConfig, Modal } from 'component/antd'; -import { observer } from 'mobx-react'; -import { users } from 'store/users'; -import { deleteUser } from 'lib/api'; -import { modal } from 'store'; -import { SearchAndFilter } from 'container/cluster-topic'; -import './index.less'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -const handleForbidden = (record: any) => { - Modal.confirm({ - title: `确认删除 ${record.username} ?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - deleteUser(record.username).then(() => { - notification.success({ message: '删除成功' }); - users.getUsers(); - }); - }, - }); -}; - -@observer -export class UserManage extends SearchAndFilter { - public state = { - searchKey: '', - filterVisible: false, - }; - - public renderColumns = () => { - const role = Object.assign({ - title: '角色', - key: 'roleName', - dataIndex: 'roleName', - filters: users.filterRole, - onFilter: (value: string, record: any) => record.roleName.indexOf(value) === 0, - }, this.renderColumnsFilter('filterVisible')); - - return [ - { - title: '用户名', - dataIndex: 'username', - key: 'username', - }, - role, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - render: (t: any, r: any) => { - return ( - - 修改 - 删除 - - ); - }, - }, - ]; - } - - public componentDidMount() { - users.getUsers(); - } - - public render() { - const data = users.userData.filter((d) => d.username.includes(this.state.searchKey)); - return ( - <> -
- 管理员授权 -
    -
  • - 新建用户 -
  • - {this.renderSearch('用户名称')} -
-
-
- - ); - } -} diff --git a/console/src/container/alarm/index.tsx b/console/src/container/alarm/index.tsx deleted file mode 100644 index 8c5a2703..00000000 --- a/console/src/container/alarm/index.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, Select, Input, notification, Modal } from 'component/antd'; -import { PaginationConfig } from 'antd/es/table/interface'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { alarm, IAlarm } from 'store/alarm'; -import { deleteAlarm } from 'lib/api'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { getCookie } from 'lib/utils'; -import moment = require('moment'); - -const TabPane = Tabs.TabPane; -const Search = Input.Search; - -const handleDeleteAlarm = (record: IAlarm) => { - Modal.confirm({ - title: `确认删除 ${record.alarmName} ?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - deleteAlarm(record.id).then(() => { - notification.success({ message: '删除成功' }); - alarm.getAlarm(); - }); - }, - }); -}; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class Alarm extends SearchAndFilter { - public state = { - searchKey: '', - filterVisible: false, - }; - - public componentDidMount() { - alarm.getAlarm(); - alarm.getAlarmConstant(); - } - - public renderColumns = () => { - const status = Object.assign({ - title: '状态', - dataIndex: 'status', - key: 'status', - filters: [{ text: '已启用', value: '1' }, { text: '暂停', value: '0' }], - onFilter: (value: string, record: IAlarm) => record.status === +value, - render: (t: string) => {t ? '已启用' : '暂停'}, - }, this.renderColumnsFilter('filterVisible')); - - return [ - { - title: '配置名称', - dataIndex: 'alarmName', - key: 'alarmName', - sorter: (a: IAlarm, b: IAlarm) => a.alarmName.charCodeAt(0) - b.alarmName.charCodeAt(0), - }, - { - title: '负责人', - dataIndex: 'principalList', - key: 'principalList', - render: (t: string[]) => t.join(','), - }, - { - title: '创建时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - sorter: (a: IAlarm, b: IAlarm) => a.gmtCreate - b.gmtCreate, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, - status, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - width: 200, - render: (text: string, record: IAlarm) => { - return ( - - 修改 - 删除 - - ); - }, - }, - ]; - } - - public renderAlarm() { - const data = alarm.data.filter((d) => { - return d.alarmName.includes(this.state.searchKey) || d.principalList.includes(this.state.searchKey); - }); - return ( -
- ); - } - - public handleModify = (record: IAlarm) => { - if (!getCookie('username') && !record.principalList.includes(getCookie('username'))) { - notification.success({ message: '抱歉,没有修改权限' }); - return false; - } - modal.showAlarmModify(record); - } - - public render() { - return ( - <> -
    -
  • - 添加告警配置 -
  • - {this.renderSearch('请输入关键字')} -
- - - {this.renderAlarm()} - - - - ); - } -} diff --git a/console/src/container/broker-detail/base-detail.tsx b/console/src/container/broker-detail/base-detail.tsx deleted file mode 100644 index 88c9cfe0..00000000 --- a/console/src/container/broker-detail/base-detail.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import * as React from 'react'; -import { TopicDetail } from 'container/topic-detail'; -import './index.less'; -import { broker, IBrokerNetworkInfo } from 'store/broker'; -import { observer } from 'mobx-react'; -import { StatusGraghCom } from 'component/flow-table'; -import urlQuery from 'store/url-query'; -import { NetWorkFlow } from 'container/topic-detail/com'; - -@observer -export class OneBrokerStatus extends StatusGraghCom { - public getData() { - return broker.oneNetwork; - } -} - -export class BrokerBaseDetail extends TopicDetail { - public componentDidMount() { - broker.getOneBrokerNetwork(urlQuery.clusterId, urlQuery.brokerId); - broker.getBrokerTopicAnalyzer(urlQuery.clusterId, urlQuery.brokerId); - } - - public render() { - return ( - <> -
-

基本信息

- -
-
-

历史流量

- -
-
-

实时流量

- 刷新 - -
- - ); - } -} - -@observer -class Summary extends React.Component { - public componentDidMount() { - broker.getBrokerBaseInfo(urlQuery.clusterId, urlQuery.brokerId); - } - - public render() { - return ( -
-
-
主机:{broker.brokerBaseInfo.host}
-
启动时间:{broker.brokerBaseInfo.startTime}
-
-
-
- Topic数 -

{broker.brokerBaseInfo.topicNum}

-
-
- 分区数 -

{broker.brokerBaseInfo.partitionCount}

-
-
- 分区Leader -

{broker.brokerBaseInfo.leaderCount}

-
-
- Port -

{broker.brokerBaseInfo.port}

-
-
- JMX Port -

{broker.brokerBaseInfo.jmxPort}

-
-
-
- ); - } -} diff --git a/console/src/container/broker-detail/broker-index.tsx b/console/src/container/broker-detail/broker-index.tsx deleted file mode 100644 index fdf4dbb9..00000000 --- a/console/src/container/broker-detail/broker-index.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { observer } from 'mobx-react'; -import { broker } from 'store/broker'; -import urlQuery from 'store/url-query'; -import echarts from 'echarts/lib/echarts'; -import { getBrokerMetricOption } from 'lib/charts-config'; -import { MetricChartList as list } from './constant'; -import { Spin, DatePicker, notification, Button } from 'component/antd'; -import './index.less'; - -// 引入柱状图 -import 'echarts/lib/chart/line'; -// 引入提示框和标题组件 -import 'echarts/lib/component/tooltip'; -import 'echarts/lib/component/title'; -import 'echarts/lib/component/legend'; -import moment from 'moment'; - -@observer -export class BrokerMetrics extends React.Component { - public chartId: HTMLDivElement[] = []; - public charts: echarts.ECharts[] = []; - - public state = { - loading: true, - }; - - public renderCharts(startTime: moment.Moment, endTime: moment.Moment) { - broker.getBrokerKeyMetrics(urlQuery.clusterId, urlQuery.brokerId, - startTime.format('x'), - endTime.format('x')).then(data => { - getBrokerMetricOption(list, data).forEach((ele: object, index) => { - if (ele) { - this.charts[index] = echarts.init(this.chartId[index]); - this.charts[index].setOption(ele); - this.setState({ loading: false }); - } - this.charts[index] = null; - }); - }); - } - - public componentDidMount() { - this.renderCharts(broker.startTime, broker.endTime); - } - - public handleSearch = () => { - const { startTime, endTime } = broker; - if (startTime >= endTime) { - notification.error({ message: '开始时间不能大于或等于结束时间' }); - return false; - } - this.setState({ loading: true }); - this.renderCharts(startTime, endTime); - } - - public render() { - const charts = list.map((item, index) => { - if (!item.value) return
this.chartId.push(id)} />; - return ( -
-

{item.label}

- -
this.chartId.push(id)} /> - -
- ); - }); - return ( - <> -
-
    -
  • - 开始时间 - -
  • -
  • - 结束时间 - -
  • -
  • -
-
-
- {charts} -
- - ); - } -} diff --git a/console/src/container/broker-detail/broker-partition.tsx b/console/src/container/broker-detail/broker-partition.tsx deleted file mode 100644 index 428b83c3..00000000 --- a/console/src/container/broker-detail/broker-partition.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import React from 'react'; -import { Table, PaginationConfig } from 'component/antd'; -import { observer } from 'mobx-react'; -import { broker, IPartitions } from 'store/broker'; -import { columsDefault } from './constant'; -import urlQuery from 'store/url-query'; -import './index.less'; - -const columns = [{ - title: 'Topic', - dataIndex: 'topicName', - key: 'topicName', -}, { - title: 'Leader', - dataIndex: 'leaderPartitionList', - onCell: () => ({ - style: { - maxWidth: 250, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (value: number[]) => { - return value.map(i => {i}); - }, -}, { - title: '副本', - dataIndex: 'followerPartitionIdList', - onCell: () => ({ - style: { - maxWidth: 250, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (value: number[]) => { - return value.map(i => {i}); - }, -}, { - title: '未同步副本', - dataIndex: 'notUnderReplicatedPartitionIdList', - render: (value: number[]) => { - return value.map(i => {i}); - }, -}, { - title: '状态', - dataIndex: 'underReplicated', - render: (value: boolean) => { - return value ? '已同步' : '未同步'; - }, -}, { - title: '操作', - render: (record: IPartitions) => { - return (查看详情); - }, -}, -]; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class BrokerPartition extends React.Component { - - public componentDidMount() { - broker.getPartitions(urlQuery.clusterId, urlQuery.brokerId); - } - - public getDescription = (value: any, record: IPartitions) => { - return Object.keys(value).map((key: keyof IPartitions) => { - return ( -

{value[key]}{(record[key] as []).join(',')} - (共{(record[key] as []).length}个)

); - }); - } - - public getMoreDetail = (record: IPartitions) => { - return ( -
-

Topic: {record.topicName}

-

isUnderReplicated:{record.underReplicated ? '已同步' : '未同步'}

- {this.getDescription(columsDefault, record)} -
- ); - } - - public render() { - return ( -
- ); - } -} diff --git a/console/src/container/broker-detail/constant.ts b/console/src/container/broker-detail/constant.ts deleted file mode 100644 index 434672ed..00000000 --- a/console/src/container/broker-detail/constant.ts +++ /dev/null @@ -1,64 +0,0 @@ -export const MetricChartList = [ - { - value: 'requestHandlerIdlPercent', - label: '请求处理器空闲百分比(%)', - }, - { - value: 'networkProcessorIdlPercent', - label: '网络处理器空闲百分比(%)', - }, - { - value: 'requestQueueSize', - label: '请求列表大小(个)', - }, - { - value: 'responseQueueSize', - label: '响应列表大小(个)', - }, - { - value: 'logFlushTime', - label: '刷日志时间(ms)', - }, - { - value: '', - label: '', - }, - { - value: 'totalTimeProduceMean', - label: 'produce请求时间-平均值(ms)', - }, - { - value: 'totalTimeFetchConsumerMean', - label: 'fetch请求处理时间-平均值(ms)', - }, - { - value: 'totalTimeProduce99Th', - label: 'produce请求时间-99分位(ms)', - }, - { - value: 'totalTimeFetchConsumer99Th', - label: 'fetch请求处理时间-99分位(ms)', - }, - { - value: 'failProduceRequest', - label: '每秒生产失败数(条/秒)', - }, - { - value: 'failFetchRequest', - label: '每秒消费失败数(条/秒)', - }, -]; - -export const columsDefault = { - leaderPartitionList: 'leaderPartitions:', - followerPartitionIdList: 'followerPartitions:', - notUnderReplicatedPartitionIdList: 'notUnderReplicatedPartitions:', -}; - -export const brokerMetrics = { - bytesIn: 'Bytes In(MB/ 秒)', - bytesOut: 'Bytes Out(MB/ 秒)', - messagesIn: 'Messages In(条)', - totalFetchRequests: 'Total Fetch Requests(QPS)', - totalProduceRequests: 'Total Produce Requests(QPS)', -}; diff --git a/console/src/container/broker-detail/index.tsx b/console/src/container/broker-detail/index.tsx deleted file mode 100644 index ffc4dc44..00000000 --- a/console/src/container/broker-detail/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import * as React from 'react'; -import { Tabs } from 'component/antd'; -import { BrokerBaseDetail } from './base-detail'; -import { TopicAnalysis } from './topic-analysis'; -import { BrokerTopicInfo } from './topic-info'; -import { BrokerPartition } from './broker-partition'; -import { BrokerMetrics } from './broker-index'; -import { handleTabKey } from 'lib/utils'; - -const TabPane = Tabs.TabPane; - -export class BrokerDetail extends React.Component { - public render() { - return ( - - - - - - - - - - - {/* - - */} - - - - - - - - ); - } -} diff --git a/console/src/container/broker-detail/topic-analysis.tsx b/console/src/container/broker-detail/topic-analysis.tsx deleted file mode 100644 index 57eb787c..00000000 --- a/console/src/container/broker-detail/topic-analysis.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import * as React from 'react'; -import { Table } from 'component/antd'; -import urlQuery from 'store/url-query'; -import { broker, IBrokerMetrics } from 'store/broker'; -import { brokerMetrics } from './constant'; -import { observer } from 'mobx-react'; - -const columns = [{ - title: 'Topic名称', - dataIndex: 'topicName', - key: 'topicName', -}, -{ - title: 'Bytes In(MB/s)', - dataIndex: 'bytesInRate', - key: 'bytesInRate', - render: (t: number, record: any) => `${record && record.bytesIn} (${+Math.ceil((t * 100))}%)`, -}, -{ - title: 'Bytes Out(MB/s)', - dataIndex: 'bytesOutRate', - key: 'bytesOutRate', - render: (t: number, record: any) => `${record && record.bytesOut} (${+Math.ceil((t * 100))}%)`, -}, -{ - title: 'Message In(秒)', - dataIndex: 'messagesInRate', - key: 'messagesInRate', - render: (t: number, record: any) => `${record && record.messagesIn} (${+Math.ceil((t * 100))}%)`, -}, -{ - title: 'Total Fetch Requests(秒)', - dataIndex: 'totalFetchRequestsRate', - key: 'totalFetchRequestsRate', - render: (t: number, record: any) => `${record && record.totalFetchRequests} (${+Math.ceil((t * 100))}%)`, -}, -{ - title: 'Total Produce Requests(秒)', - dataIndex: 'totalProduceRequestsRate', - key: 'totalProduceRequestsRate', - render: (t: number, record: any) => `${record && record.totalProduceRequests} (${+Math.ceil((t * 100))}%)`, -}]; -@observer -export class TopicAnalysis extends React.Component { - public componentDidMount() { - broker.getOneBrokerNetwork(urlQuery.clusterId, urlQuery.brokerId); - broker.getBrokerTopicAnalyzer(urlQuery.clusterId, urlQuery.brokerId); - } - - public render() { - return ( - <> -
-

Broker 状态

- -
-
-

Topic 状态

- 说明:数值后的百分比表示“占Broker总量的百分比” -
; - - - ); - } -} -@observer -class BrokerStatus extends React.Component { - public render() { - return ( -
-
-
- Broker ID -

{urlQuery.brokerId}

-
- {broker.analyzerData ? - Object.keys(brokerMetrics).map((i: keyof IBrokerMetrics) => { - return ( -
- 25 ? 'long-text' : ''}>{brokerMetrics[i]} -

{broker.analyzerData[i] && broker.analyzerData[i].toFixed(2)}

-
- ); - }) : ''} -
-
- ); - } -} diff --git a/console/src/container/broker-detail/topic-info.tsx b/console/src/container/broker-detail/topic-info.tsx deleted file mode 100644 index 8e1dea06..00000000 --- a/console/src/container/broker-detail/topic-info.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import React from 'react'; -import { Table, PaginationConfig } from 'component/antd'; -import { observer } from 'mobx-react'; -import { broker } from 'store/broker'; -import urlQuery from 'store/url-query'; -import moment from 'moment'; -import { ITopic } from 'types/base-type'; -import { SearchAndFilter } from 'container/cluster-topic'; - -const cloumns = [{ - title: 'Topic名称', - key: 'topicName', - width: 350, - onCell: () => ({ - style: { - maxWidth: 250, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - sorter: (a: ITopic, b: ITopic) => a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0), - render: (t: string, r: ITopic) => { - return ( - - {r.topicName} - - ); - }, -}, { - title: '分区数', - dataIndex: 'partitionNum', - key: 'partitionNum', - sorter: (a: ITopic, b: ITopic) => b.partitionNum - a.partitionNum, -}, { - title: '副本数', - dataIndex: 'replicaNum', - key: 'replicaNum', - sorter: (a: ITopic, b: ITopic) => b.replicaNum - a.replicaNum, -}, { - title: '流入(KB/s)', - dataIndex: 'byteIn', - key: 'byteIn', - sorter: (a: ITopic, b: ITopic) => b.byteIn - a.byteIn, - render: (t: number) => (t / 1024).toFixed(2), -}, { - title: '流入(QPS)', - dataIndex: 'produceRequest', - key: 'produceRequest', - sorter: (a: ITopic, b: ITopic) => b.produceRequest - a.produceRequest, - render: (t: number) => t.toFixed(2), -}, { - title: '负责人', - dataIndex: 'principals', - key: 'principals', -}, { - title: '修改时间', - dataIndex: 'updateTime', - key: 'updateTime', - sorter: (a: ITopic, b: ITopic) => a.updateTime - b.updateTime, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), -}, { -}]; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class BrokerTopicInfo extends SearchAndFilter { - public state = { - searchKey: '', - filterClusterVisible: false, - filterStatusVisible: false, - }; - - public componentDidMount() { - broker.getBrokerTopic(urlQuery.clusterId, urlQuery.brokerId); - } - public render() { - const { searchKey } = this.state; - const data: ITopic[] = broker.topics.filter((d) => d.topicName.includes(searchKey) || - (d.principals && d.principals.includes(searchKey))); - return ( - <> -
-
    - {this.renderSearch('请输入Topic名称或者负责人')} -
-
-
- - ); - } -} diff --git a/console/src/container/broker-info/base-info.tsx b/console/src/container/broker-info/base-info.tsx deleted file mode 100644 index df26b25a..00000000 --- a/console/src/container/broker-info/base-info.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import * as React from 'react'; -import './index.less'; -import { Table, Modal, notification, PaginationConfig, Button, Spin } from 'component/antd'; -import { broker, IBroker, IBrokerNetworkInfo, IBrokerPartition } from 'store/broker'; -import { observer } from 'mobx-react'; -import { StatusGraghCom } from 'component/flow-table'; -import urlQuery from 'store/url-query'; -import moment from 'moment'; -import { deleteBroker } from 'lib/api'; -import { SearchAndFilter } from 'container/cluster-topic'; - -import './index.less'; -import { modal } from 'store'; -import { tableFilter } from 'lib/utils'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 5, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class BrokerStatus extends StatusGraghCom { - public getData() { - return broker.network; - } -} - -@observer -export class BrokerList extends SearchAndFilter { - public state = { - searchKey: '', - searchId: '', - filterRegionVisible: false, - filterStatusVisible: false, - filterVisible: false, - filterRVisible: false, - }; - - public colPartition = (list: IBroker[]) => { - const region = Object.assign({ - title: 'Region', - dataIndex: 'regionName', - key: 'regionName', - filters: tableFilter(list, 'regionName'), - onFilter: (value: string, record: IBroker) => record.regionName === value, - }, this.renderColumnsFilter('filterRVisible')); - - const status = Object.assign({ - title: '已同步', - dataIndex: 'underReplicatedPartitionCount', - key: 'underReplicatedPartitionCount', - filters: [{ text: '是', value: '1' }, { text: '否', value: '0' }], - onFilter: (value: string, record: IBrokerPartition) => { - // underReplicatedPartitionCount > 0 表示未同步完成 - const syncStatus = record.underReplicatedPartitionCount ? '0' : '1'; - return syncStatus === value; - }, - render: (text: number) => ( - <> - {text ? '否' : '是'} - - ), - }, this.renderColumnsFilter('filterVisible')); - - return [{ - title: 'BrokerID', - dataIndex: 'brokerId', - key: 'brokerId', - sorter: (a: IBrokerPartition, b: IBrokerPartition) => a.brokerId - b.brokerId, - }, { - title: '峰值(MB/s)', - dataIndex: 'bytesInPerSec', - key: 'bytesInPerSec', - sorter: (a: IBrokerPartition, b: IBrokerPartition) => a.bytesInPerSec - b.bytesInPerSec, - render: (t: number) => (t / (1024 * 1024)).toFixed(2), - }, { - title: '分区数量', - dataIndex: 'partitionCount', - key: 'partitionCount', - sorter: (a: IBrokerPartition, b: IBrokerPartition) => a.partitionCount - b.partitionCount, - }, { - title: 'Leader数量', - dataIndex: 'leaderCount', - key: 'leaderCount', - sorter: (a: IBrokerPartition, b: IBrokerPartition) => a.leaderCount - b.leaderCount, - }, { - title: '未同步副本数量', - dataIndex: 'notUnderReplicatedPartitionCount', - key: 'notUnderReplicatedPartitionCount', - sorter: (a: IBrokerPartition, b: IBrokerPartition) => - a.notUnderReplicatedPartitionCount - b.notUnderReplicatedPartitionCount, - }, - status, - region, - ]; - } - - public colList = (list: IBroker[]) => { - const region = Object.assign({ - title: 'Region', - dataIndex: 'regionName', - key: 'regionName', - filters: tableFilter(list, 'regionName'), - onFilter: (value: string, record: IBroker) => record.regionName === value, - }, this.renderColumnsFilter('filterRegionVisible')); - - const status = Object.assign({ - title: '状态', - dataIndex: 'status', - key: 'status', - filters: [{ text: '未使用', value: '未使用' }, { text: '使用中', value: '使用中' }], - onFilter: (value: string, record: IBroker) => record.status === value, - render: (t: number) => t ? '未使用' : '使用中', - }, this.renderColumnsFilter('filterStatusVisible')); - - return [{ - title: 'BrokerID', - dataIndex: 'brokerId', - key: 'brokerId', - sorter: (a: IBroker, b: IBroker) => a.brokerId - b.brokerId, - render: (t: string, record: IBroker) => { - return ( - - {t} - - ); - }, - }, { - title: '主机', - dataIndex: 'host', - key: 'host', - sorter: (a: IBroker, b: IBroker) => a.host.charCodeAt(0) - b.host.charCodeAt(0), - }, { - title: 'Port', - dataIndex: 'port', - key: 'port', - sorter: (a: IBroker, b: IBroker) => a.port - b.port, - }, { - title: 'JMX Port', - dataIndex: 'jmxPort', - key: 'jmxPort', - sorter: (a: IBroker, b: IBroker) => a.jmxPort - b.jmxPort, - }, { - title: '启动时间', - dataIndex: 'startTime', - key: 'startTime', - sorter: (a: IBroker, b: IBroker) => a.startTime - b.startTime, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, { - title: '流入(KB/s)', - dataIndex: 'byteIn', - key: 'byteIn', - sorter: (a: IBroker, b: IBroker) => b.byteIn - a.byteIn, - render: (t: number) => (t / 1024).toFixed(2), - }, { - title: '流出(KB/s)', - dataIndex: 'byteOut', - key: 'byteOut', - sorter: (a: IBroker, b: IBroker) => b.byteOut - a.byteOut, - render: (t: number) => (t / 1024).toFixed(2), - }, - region, - status, - { - title: '操作', - render: (text: string, record: IBroker) => { - return ( - <> - - 详情 - - { } : this.deleteBroker.bind(null, record)} - style={!record.status ? { cursor: 'not-allowed', color: '#999' } : {}} - >删除 - - - - ); - }, - }]; - } - - public deleteBroker = ({ brokerId }: IBroker) => { - Modal.confirm({ - title: `确认删除${brokerId}?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - deleteBroker(urlQuery.clusterId, brokerId).then(() => { - notification.success({ message: '删除成功' }); - broker.getBrokerList(urlQuery.clusterId); - }); - }, - }); - } - - public componentDidMount() { - broker.getBrokerList(urlQuery.clusterId); - broker.getBrokerPartition(urlQuery.clusterId); - } - - public render() { - const dataList = this.state.searchKey !== '' ? - broker.list.filter((d) => d.host.includes(this.state.searchKey) || d.brokerId === +this.state.searchKey) - : broker.list; - const dataPartitions = this.state.searchId !== '' ? - broker.partitions.filter((d) => d.brokerId === +this.state.searchId) : broker.partitions; - return ( - -
-
    -
  • Broker概览
  • -
  • - -
  • - {this.renderSearch('请输入主机或BrokerId')} -
-
-
- - - -
-
    -
  • Broker分区概览
  • -
  • - -
  • - {this.renderSearch('请输入BrokerId', 'searchId')} -
-
- - - ); - } -} diff --git a/console/src/container/broker-info/broker-overview.tsx b/console/src/container/broker-info/broker-overview.tsx deleted file mode 100644 index 1ba42de5..00000000 --- a/console/src/container/broker-info/broker-overview.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import * as React from 'react'; -import { Select, Button, Tooltip } from 'component/antd'; -import { observer } from 'mobx-react'; -import urlQuery from 'store/url-query'; -import './index.less'; -import moment = require('moment'); -import { modal } from 'store'; -import { selecOptions } from './constant'; -import { broker, IBrokerPartition, IOverviewKey } from 'store/broker'; - -@observer -export class BrokerOverview extends React.Component { - public renderSquare = (type: IOverviewKey) => { - return broker.realPartitions.map((item: IBrokerPartition) => { - const brokerDetail = ( -
-

ID:{item.brokerId}

-

{selecOptions[type]}{item[type]}

-

主机: {item.host}

-

端口:{item.port}

-

jmx端口:{item.jmxPort}

-

启动时间:{moment(item.startTime).format('YYYY-MM-DD HH:mm:ss')}

-
- ); - return ( - - {item[type]} - - - ); - }); - } - - public render() { - return ( - <> -
    -
  • - Region - -
  • -
  • - 维度 - -
  • -
  • - -
  • - { - broker.viewType === 'notUnderReplicatedPartitionCount' ? -
  • - - 同步 - - 未同步 -
  • : '' - } -
-
- {this.renderSquare(broker.viewType)} -
- - ); - } -} diff --git a/console/src/container/broker-info/constant.ts b/console/src/container/broker-info/constant.ts deleted file mode 100644 index 1a66c45c..00000000 --- a/console/src/container/broker-info/constant.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const selecOptions = { - partitionCount: '分区数量', - leaderCount: 'leader数量', - notUnderReplicatedPartitionCount: '副本状态', -}; diff --git a/console/src/container/broker-info/index.less b/console/src/container/broker-info/index.less deleted file mode 100644 index 328230fb..00000000 --- a/console/src/container/broker-info/index.less +++ /dev/null @@ -1,84 +0,0 @@ -.square-container { - width: 100%; - background-color: #fff; - padding: 17px 20px; - a { - display: inline-block; - width: 35px; - height: 22px; - background: rgba(255, 241, 240, 1); - border-radius: 4px; - line-height: 22px; - margin-right: 20px; - text-align: center; - color: #f5222d; - &.finished { - background: rgba(47, 194, 91, 0.2); - color: #2fc25b; - } - } -} - -.topic-line-tool { - height: 48px; - font-size: 14px; - font-family: PingFangSC-Regular; - font-weight: 400; - color: rgba(0, 0, 0, 0.85); - background: rgba(250, 250, 250); - li { - display: inline-block; - vertical-align: middle; - margin-left: 24px; - line-height: 48px; - span.label { - padding-right: 10px; - } - &.introduce { - float: right; - span.common { - display: inline-block; - width: 16px; - height: 16px; - border-radius: 8px; - vertical-align: middle; - margin-right: 10px; - &-green { - background: rgba(47, 194, 91, 1); - } - &-red { - background: rgba(245, 34, 45, 1); - } - } - } - } -} - -.k-tab { - width: 100%; - height: 48px; - line-height: 48px; - background: rgba(0, 0, 0, 0.02); - padding: 0px 24px; - font-size: 14px; - font-family: PingFangSC-Medium; - font-weight: 500; - color: rgba(0, 0, 0, 0.85); - display: flex; - justify-content: space-between; - position: relative; - margin: 0; - .k-tab-button { - position: absolute; - right: 213px; - } -} - -.deleteButton { - &.ant-btn { - color: #f38031; - text-decoration: none; - border: none; - background-color: transparent; - } -} diff --git a/console/src/container/broker-info/index.tsx b/console/src/container/broker-info/index.tsx deleted file mode 100644 index f8477379..00000000 --- a/console/src/container/broker-info/index.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from 'react'; -import { Tabs } from 'component/antd'; -import { BrokerList } from './base-info'; -import { BrokerOverview } from './broker-overview'; - -const TabPane = Tabs.TabPane; - -export class BrokerInfo extends React.Component { - public render() { - return ( - - - - - {/* - - */} - - ); - } -} diff --git a/console/src/container/cluster-topic/index.tsx b/console/src/container/cluster-topic/index.tsx deleted file mode 100644 index cde5193b..00000000 --- a/console/src/container/cluster-topic/index.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import * as React from 'react'; -import { Select, Input, Checkbox, Icon } from 'component/antd'; -import { cluster } from 'store/cluster'; -import { IFiler } from 'types/base-type'; - -const Option = Select.Option; -const Search = Input.Search; - -interface IParams { - filters: IFiler[]; - setSelectedKeys: (selectedKeys: string[]) => void; - confirm?: () => void; -} - -interface IState { - [filter: string]: boolean | string; -} - -export class SearchAndFilter extends React.Component { - public timer: number; - - public renderCluster() { - return ( -
  • - -
  • - ); - } - - public renderSearch(placeholder?: string, keyName: string = 'searchKey') { - return ( -
  • - ); - } - - public onSearchChange = (keyName: string, e: React.ChangeEvent) => { - const searchKey = e.target.value.trim(); - this.setState({ - [keyName]: searchKey, - }); - } - - public handleChange(params: IParams, e: []) { - const { setSelectedKeys, confirm } = params; - setSelectedKeys(e); - confirm(); - } - - public handleVisble = (type: string) => { - if (this.timer) window.clearTimeout(this.timer); - window.setTimeout(() => { - this.setState({ [type]: true }); - }); - } - - public handleUnVisble = (type: string) => { - this.timer = window.setTimeout(() => { - this.setState({ [type]: false }); - }, 100); - } - - public renderFilter = (type: string, params: IParams) => { - const { filters } = params; - return filters !== undefined ? ( -
      - - {filters.map(i =>
    • - {i.text} -
    • )} -
      -
    - ) :
    ; - } - - public renderFilterIcon = (type: string) => { - return ( - - - ); - } - - public renderColumnsFilter = (type: string) => { - return { - filterIcon: this.renderFilterIcon.bind(null, type), - filterDropdownVisible: this.state[type], - filterDropdown: this.renderFilter.bind(null, type), - }; - } -} diff --git a/console/src/container/consumer/index.less b/console/src/container/consumer/index.less deleted file mode 100644 index bec5606f..00000000 --- a/console/src/container/consumer/index.less +++ /dev/null @@ -1,34 +0,0 @@ -.ant-table-title { - padding: 0px 0px 16px 0px; -} - -.consumer-container { - .ant-table-title { - position: absolute; - top: -38px; - } -} - -.group-title { - display: inline-block; - font-size: 14px; - font-weight: 700; - color: rgb(105, 105, 105); - > div { - display: inline-block; - border: 0.5px dashed rgba(0, 0, 0, 0.3); - padding: 5px 8px; - margin-right: 10px; - span { - color: #f38031; - font-weight: 700; - } - &.group-select { - width: 250px; - border: none; - .ant-select { - width: 100%; - } - } - } -} diff --git a/console/src/container/consumer/index.tsx b/console/src/container/consumer/index.tsx deleted file mode 100644 index 54c40454..00000000 --- a/console/src/container/consumer/index.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, PaginationConfig, Select } from 'component/antd'; -import Url from 'lib/url-parser'; -import { topic, IGroupInfo } from 'store/topic'; -import { observer } from 'mobx-react'; -import { TopicDetail } from 'container/topic-detail'; - -import './index.less'; - -const TabPane = Tabs.TabPane; - -const parColumns = [ - { - title: 'Partition ID', - dataIndex: 'partitionId', - key: 'partitionId', - sorter: (a: IGroupInfo, b: IGroupInfo) => a.partitionId - b.partitionId, - }, - { - title: 'Consume ID', - dataIndex: 'clientId', - key: 'clientId', - sorter: (a: IGroupInfo, b: IGroupInfo) => +a.clientId - +b.clientId, - }, - { - title: 'Consumer Offset', - dataIndex: 'consumeOffset', - key: 'consumeOffset', - sorter: (a: IGroupInfo, b: IGroupInfo) => a.consumeOffset - b.consumeOffset, - }, - { - title: 'Partition Offset', - dataIndex: 'partitionOffset', - key: 'partitionOffset', - sorter: (a: IGroupInfo, b: IGroupInfo) => a.partitionOffset - b.partitionOffset, - }, - { - title: 'Lag', - dataIndex: 'lag', - key: 'lag', - sorter: (a: IGroupInfo, b: IGroupInfo) => a.lag - b.lag, - }, -]; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class Consumer extends TopicDetail { - public clusterId: number; - public topicName: string; - public group: string; - public location: string; - - constructor(props: any) { - super(props); - const url = Url(); - this.clusterId = Number(url.search.clusterId); - this.topicName = url.search.topic; - this.location = url.search.location; - this.group = url.search.group; - this.handleGroupChange(this.group + ',' + this.location); - } - - public handleGroupChange = (value: string) => { - const { topicName, clusterId } = this; - topic.getGroupInfo(topicName, clusterId, value.split(',')[0], value.split(',')[1]); - } - - public renderHeader = () => { - return ( -
    - consumerGroup: -
    - -
    -
    - ); - } - - public renderConsumer() { - const data = this.state.searchKey ? - topic.groupInfo.filter((g) => g.partitionId === Number(this.state.searchKey)) : topic.groupInfo; - return ( -
    - ); - } - - public renderTab() { - return ( - - {this.renderConsumer()} - - ); - } -} diff --git a/console/src/container/drawer/index.less b/console/src/container/drawer/index.less deleted file mode 100644 index d3da1937..00000000 --- a/console/src/container/drawer/index.less +++ /dev/null @@ -1,31 +0,0 @@ -.o-container { - width: 100%; - padding: 40px 0 0 10px; - .b-list { - button { - margin: 0 5px 0 10px; - } - } - .headLine { - padding-top: 30px; - margin-top: 30px; - color: #f38031; - border-top: 1px solid rgb(216, 216, 216); - } - .timeButton { - position: relative; - left: 260px; - top: 40px; - } - .partionButton { - float: right; - margin: 20px 15px 0 0; - } - .b-item { - margin-top: 20px; - padding-left: 222px; - button { - margin-right: 10px; - } - } -} diff --git a/console/src/container/drawer/index.tsx b/console/src/container/drawer/index.tsx deleted file mode 100644 index 21d3a4ec..00000000 --- a/console/src/container/drawer/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from 'react'; -import { observer } from 'mobx-react'; -import { drawer } from 'store/drawer'; - -import ResetOffset from './reset-offset'; -import TopicSample from './topic-sample'; - -@observer -export default class AllDrawerInOne extends React.Component { - public render() { - if (!drawer.id) return null; - return ( - <> - {drawer.id === 'showResetOffset' ? : null} - {drawer.id === 'showTopicSample' ? : null} - - ); - } -} diff --git a/console/src/container/drawer/reset-offset.tsx b/console/src/container/drawer/reset-offset.tsx deleted file mode 100644 index f9690045..00000000 --- a/console/src/container/drawer/reset-offset.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import * as React from 'react'; -import { Drawer, Form, Row, Button, Input, DatePicker, Col, Select, message, Alert } from 'component/antd'; -import { drawer } from 'store/drawer'; -import { topic } from 'store/topic'; -import { consume } from 'store/consume'; -import { observer } from 'mobx-react'; - -import './index.less'; -import moment = require('moment'); - -@observer -class ResetOffset extends React.Component { - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { timestamp } = values; - consume.offsetPartition(Object.assign({ timestamp: +moment(timestamp).format('x') }, topic.currentGroup)) - .then(() => { - message.success('重置时间成功'); - window.setTimeout(() => { - location.reload(); - }, 200); - }); - }); - } - public submitPartiton = () => { - consume.offsetPartition(topic.currentGroup, 1).then(() => { - message.success('重置分区成功'); - window.setTimeout(() => { - location.reload(); - }, 200); - }); - } - - public render() { - const { getFieldDecorator } = this.props.form; - return ( - - -
    -
    - -

    重置到指定时间

    -
    - -
    - - {getFieldDecorator('timestamp', { - rules: [{ required: true, message: '请选择时间' }], - initialValue: moment(), - })( - , - )} - - - - - - - - - -

    重置到指定分区

    -
    - - - -
    partitionId - partitionOffset - - {consume.offsetList.map((ele, index) => { - return ( - - - - - - - - - - - - - - - ); - } -} - -export default Form.create({ name: 'topicSample' })(ResetOffset); diff --git a/console/src/container/drawer/topic-sample.tsx b/console/src/container/drawer/topic-sample.tsx deleted file mode 100644 index c69c8e3a..00000000 --- a/console/src/container/drawer/topic-sample.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import * as React from 'react'; -import { Drawer, Form, Row, Button, Input, InputNumber, notification } from 'component/antd'; -import { drawer } from 'store/drawer'; - -import './index.less'; -import { topic } from 'store/topic'; - -const topicFormItemLayout = { - labelCol: { - span: 5, - }, - wrapperCol: { - span: 14, - }, -}; - -class TopicSample extends React.Component { - public state = { - loading: false, - }; - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { offset, partitionId } = values; - const bothExist = [offset, partitionId].filter(item => item === undefined || item === null).length; - if (bothExist === 1) { - notification.error({ message: '分区号和偏移量必须同时存在' }); - return false; - } - this.setState({ loading: true }); - topic.addSample(Object.assign(drawer.topicData, values)).then(() => this.setState({ loading: false })); - }); - } - - public cleanData = () => { - topic.sampleData = null; - drawer.close(); - } - public render() { - const { getFieldDecorator } = this.props.form; - return ( - -
    -
    - - - {getFieldDecorator('maxMsgNum', { - rules: [{ required: true, message: '请输入最大采样条数' }], - initialValue: 1, - })()} - - - - - {getFieldDecorator('timeout', { - rules: [{ required: true, message: '请输入最大采样时间' }], - initialValue: 3000, - })()} - - - - - {getFieldDecorator('partitionId')()} - - - - - {getFieldDecorator('offset')()} - - - - - - - - - - { - topic.sampleData ? - topic.sampleData.map((i: any, index: number) => { - return ; - }) : null - } -
    -
    - ); - } -} - -export default Form.create({ name: 'topicSample' })(TopicSample); diff --git a/console/src/container/header/index.less b/console/src/container/header/index.less deleted file mode 100644 index c0aec734..00000000 --- a/console/src/container/header/index.less +++ /dev/null @@ -1,103 +0,0 @@ -.kafka-header-container { - height: 64px; - background-color: #fff; - box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, .1); - position: relative; - z-index: 100; - display: flex; - flex-flow: row nowrap; - .left-content { - width: 220px; - margin-left: 16px; - } - .mid-content { - flex: 1; - padding-left: 100px; - a { - color: #4A4A4A; - &:hover { - color: #f38031; - } - } - span { - display: inline-block; - vertical-align: middle; - position: relative; - line-height: 64px; - width: 120px; - text-align: center; - &.k-active { - a { - color: #f38031; - } - &:after { - width: 100%; - content: ''; - height: 4px; - position: absolute; - bottom: 0; - left: 0; - background: #f38031; - } - } - } - } - .right-content { - margin-right: 24px; - position: relative; - .kafka-avatar-icon { - font-size: 24px; - position: absolute; - top: 15px; - left: -30px; - width: 32px; - height: 32px; - } - .kafka-header-text { - font-size: 14px; - } - } - .left-content, - .right-content { - font-size: 0; - & > span { - display: inline-block; - line-height: 64px; - vertical-align: middle; - } - } - - .kafka-header-icon { - height: 45px; - width: 45px; - img { - width: 100%; - height: 100%; - } - } - .kafka-header-text { - margin-left: 16px; - font-size: 18px; - font-weight: 500; - font-family: PingFangSC-Medium; - color: rgba(25,24,24,1); - cursor: pointer; - } -} -.kafka-header-menu { - width: 88px; - background-color: #fff; - position: absolute; - top: -20px; - box-shadow: 0px 0px 4px 0px rgba(217,217,217); - border-radius: 4px; - li { - text-align: center; - height: 32px; - line-height: 32px; - cursor: pointer; - &:hover { - background: rgba(236,111,38,0.1); - } - } -} \ No newline at end of file diff --git a/console/src/container/header/index.tsx b/console/src/container/header/index.tsx deleted file mode 100644 index dfb6a419..00000000 --- a/console/src/container/header/index.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import * as React from 'react'; - -import './index.less'; -import { getCookie, deleteCookie } from 'lib/utils'; -import { userLogoff } from 'lib/api'; -import { notification, Dropdown } from 'component/antd'; -import { users } from 'store/users'; -import logoUrl from '../../assets/image/kafka-logo.png'; -import devIcon from '../../assets/image/devops.png'; -import adminIcon from '../../assets/image/admin.png'; -import userIcon from '../../assets/image/normal.png'; - -interface IHeader { - active: string; -} - -export const Header = (props: IHeader) => { - const { active } = props; - const username = getCookie('username'); - const role = Number(getCookie('role')); - - const logoff = () => { - userLogoff(username).then(() => { - notification.success({ message: '退出成功' }); - deleteCookie(['username', 'role']); - location.reload(); - }); - }; - - const menu = ( -
      - {role ?
    • 管理
    • : ''} -
    • 退出
    • -
    - ); - - return ( -
    -
    - - Kafka Manager -
    -
    - 集群监控 - {role ? 集群管控 : ''} -
    -
    - - - - {users.mapRole(role)} : {username} - -
    -
    - ); -}; diff --git a/console/src/container/left-menu/constant.ts b/console/src/container/left-menu/constant.ts deleted file mode 100644 index 054e8389..00000000 --- a/console/src/container/left-menu/constant.ts +++ /dev/null @@ -1,79 +0,0 @@ -export const userMenu = [{ - href: '/', - i: 'k-icon-iconfontzhizuobiaozhun023110', - title: 'Topic列表', -}, { - href: '/user/my_order', - i: 'k-icon-order1', - title: '工单列表', -}, { - href: '/user/alarm', - i: 'k-icon-gaojing', - title: '告警配置', -}, { - href: '/user/modify_user', - i: 'k-icon-yonghuguanli', - title: '密码修改', -}]; - -export const adminMenu = [{ - href: '/admin', - i: 'k-icon-jiqun', - title: '集群列表', -}, { - href: '/admin/order', - i: 'k-icon-order1', - title: '资源审批', -}, -// }, { -// href: '/admin/task', -// i: 'k-icon-renwuliebiao', -// title: '任务列表', -// }, { -// { -// href: '/admin/alarm', -// i: 'k-icon-gaojing', -// title: '告警配置', -// }, { -{ - href: '/admin/user_manage', - i: 'k-icon-yonghuguanli', - title: '用户管理', -}, -// }, { -// href: '/admin/auto_approval', -// i: 'k-icon-shenpi1', -// title: '自动审批管理', -// }, { -{ - href: '/admin/operation', - i: 'k-icon-xiaofeikecheng', - title: '任务管理', -// }, { -// href: '/admin/modify_user', -// i: 'k-icon-jiaoseshouquan', -// title: '密码修改', -}]; - -export interface IMenuItem { - href: string; - i: string; - title: string; -} - -export const userMap = new Map(); -userMenu.forEach(m => { - userMap.set(m.href, m); -}); - -export const adminMap = new Map(); -adminMenu.forEach(m => { - adminMap.set(m.href, m); -}); - -export const getActiveMenu = (mode: 'admin' | 'user', href: string) => { - const map = mode === 'admin' ? adminMap : userMap; - const defaultMenu = mode === 'admin' ? '/admin' : '/'; - const menuItem = map.get(href); - return menuItem && menuItem.href || defaultMenu; -}; diff --git a/console/src/container/left-menu/index.tsx b/console/src/container/left-menu/index.tsx deleted file mode 100644 index 4c142e44..00000000 --- a/console/src/container/left-menu/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import * as React from 'react'; - -import './index.less'; -import { Tooltip, Icon } from 'component/antd'; -import { adminMenu, userMenu } from './constant'; -import { BrowserRouter as Router, NavLink } from 'react-router-dom'; - -interface ILeftMenuProps { - page: string; - mode?: 'admin' | 'user'; -} - -export class LeftMenu extends React.Component { - public state = { - status: 'k-open', - }; - - public open = () => { - const { status } = this.state; - const newStatus = !status ? 'k-open' : ''; - this.setState({ - status: newStatus, - }); - } - - public render() { - const { status } = this.state; - const { page, mode } = this.props; - const menu = mode === 'admin' ? adminMenu : userMenu; - return ( -
    -
      - { - menu.map((m, i) => { - const cnt = ( -
    • - - - {status ? {m.title} : null} - -
    • - ); - - if (!status) { - return {cnt}; - } - return cnt; - }) - } -
    -
    - -
    -
    - ); - } -} diff --git a/console/src/container/modal/admin-expand.tsx b/console/src/container/modal/admin-expand.tsx deleted file mode 100644 index 6925e854..00000000 --- a/console/src/container/modal/admin-expand.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, notification } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { operation } from 'store/operation'; -import { topic, IAdminExpand } from 'store/topic'; -import { observer } from 'mobx-react'; -import { broker } from 'store/broker'; -import { topicDilatation } from 'lib/api'; -import urlQuery from 'store/url-query'; -import { IValueLabel } from 'types/base-type'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; -@observer -class Topic extends React.Component { - - public handleSubmit = () => { - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - values.partitionNum = +values.partitionNum; - topicDilatation(values).then(() => { - topic.getAdminTopics(urlQuery.clusterId); - notification.success({ message: '扩容成功' }); - modal.close(); - }); - }); - } - - public componentDidMount() { - const { clusterId, topicName } = modal.topicDetail; - operation.initRegionOptions(clusterId); - broker.initBrokerOptions(clusterId); - cluster.getClusters(); - topic.getTopicMetaData(clusterId, topicName); - } - - public render() { - const { getFieldDecorator } = this.props.form; - const initialData = topic.topicDetail || {} as IAdminExpand; - return ( - -
    - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: +initialData.clusterId || +cluster.data[1].clusterId, - })( - , - )} - - - - - {getFieldDecorator('topicName', { - rules: [{ required: true, message: '请选择Topic' }], - initialValue: initialData.topicName, - })( - , - )} - - - - - - - - - - - - - {getFieldDecorator('brokerIdList', { - initialValue: initialData.brokerIdList || [], - rules: [{ - required: true, - validator: (_: any, value: string, callback: (wrong?: string) => void) => { - if (initialData.replicaNum > value.length) { - callback('Broker数需要大于或等于副本数'); - } - callback(); - }, - }], - })( - , - )} - - - {getFieldDecorator('partitionNum', { - rules: [{ required: true, message: '请输入新增分区数' }], - })( - , - )} - - -
    - ); - } -} - -export default Form.create({ name: 'topic' })(Topic); diff --git a/console/src/container/modal/alarm-config.tsx b/console/src/container/modal/alarm-config.tsx deleted file mode 100644 index 611dff41..00000000 --- a/console/src/container/modal/alarm-config.tsx +++ /dev/null @@ -1,303 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, notification, Col, Radio } from 'component/antd'; -import { modal } from 'store/modal'; -import { alarm } from 'store/alarm'; -import { observer } from 'mobx-react'; -import { cluster } from 'store/cluster'; -import { addAlarm, modifyAlarm } from 'lib/api'; -import { topic } from 'store/topic'; -import { broker } from 'store/broker'; -import { getRandomPassword, getCookie } from 'lib/utils'; -import { IAlarmBase } from 'types/base-type'; - -const Option = Select.Option; - -const topicFormItemLayout = { - labelCol: { - span: 6, - }, - wrapperCol: { - span: 14, - }, -}; - -@observer -class Alarm extends React.Component { - public data: any = null; - public state = { - loading: false, - type: 'Lag', - }; - - public handleSubmit = () => { - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - this.setState({ loading: true }); - const { metric, opt, threshold, duration, alarmName, principalList: principal, actionTag, status } = values; - const principalList = typeof (principal) === 'object' ? principal : principal.split(','); - const strategyActionList = [{ actionTag, actionWay: 'KAFKA' }]; - const strategyFilterList = Array.from(['topicName', 'consumerGroup', 'brokerId', 'clusterId'], (item) => { - if ((this.state.type === 'Lag' || !+getCookie('role')) && item === 'brokerId') return; - if (this.state.type !== 'Lag' && item === 'consumerGroup' || JSON.stringify(values[item]) === '[]') return; - return { - key: item, - value: values[item], - }; - }).filter(i => i); - const params: IAlarmBase = { - status, strategyActionList, strategyFilterList, alarmName, principalList, - strategyExpressionList: [{ metric, opt, threshold: +threshold, duration: +duration }], - }; - const notiMessage = alarm.curData ? { message: '修改成功' } : { message: '添加告警成功' }; - const fn = alarm.curData ? modifyAlarm : addAlarm; - fn(alarm.curData ? Object.assign({ id: alarm.curData.id }, params) : params).then(() => { - notification.success(notiMessage); - alarm.getAlarm(); - modal.close(); - }, (err) => { - this.setState({ loading: false }); - }); - }); - } - - public initSelection = (value: number) => { - topic.getTopicList(value); - broker.initBrokerOptions(value); - } - - public componentDidMount = () => { - cluster.getClusters(); - if (this.isModify()) { - this.setState({ type: alarm.curData.strategyExpressionList[0].metric }, () => { - this.data = this.getFilterList(); - }); - } - } - - public onChange = (type: any) => { - this.setState({ type }); - } - - public filterSelection = (input: string, option: any) => { - return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0; - } - - public getFilterList = () => { - const filterList = new Map(); - alarm.curData.strategyFilterList.forEach(item => { - filterList.set(item.key, item.value); - }); - this.initSelection(+filterList.get('clusterId')); - return filterList; - } - - public getActionTag = () => { - this.props.form.setFieldsValue({ - actionTag: 'KAFKA_' + getRandomPassword(), - }); - } - - public isModify = () => !!alarm.curData; - - public render() { - const { getFieldDecorator } = this.props.form; - const { loading, type } = this.state; - const isModify = this.isModify(); - const initialData = alarm.curData; - const { data } = this; - const role = +getCookie('role'); - return ( - -
    - - {getFieldDecorator('alarmName', { - rules: [{ required: true, message: '告警规则名称' }], - initialValue: isModify ? initialData.alarmName : '', - })( - , - )} - - - {getFieldDecorator('principalList', { - rules: [{ required: true, message: '请输入负责人' }], - initialValue: isModify ? initialData.principalList : getCookie('username'), - })( - , - )} - - -
    -

    告警规则:

    - -
    - - - - {getFieldDecorator('metric', { - rules: [{ required: true, message: '请选择 Metric' }], - initialValue: isModify ? initialData.strategyExpressionList[0].metric : '', - })( - , - )} - - - - - {getFieldDecorator('opt', { - rules: [{ required: true, message: '请选择 Condition' }], - initialValue: isModify ? initialData.strategyExpressionList[0].opt : '', - })( - , - )} - - - - - - - {getFieldDecorator('threshold', { - rules: [{ required: true, message: '请输入 value' }], - initialValue: isModify ? initialData.strategyExpressionList[0].threshold : '', - })( - , - )} - - - - - {getFieldDecorator('duration', { - rules: [{ required: true, message: '请输入持续时间' }], - initialValue: isModify ? initialData.strategyExpressionList[0].duration : '', - })( - , - )} - - - - - - - -

    过滤规则:

    - -
    - 集群名称 - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: data && +data.get('clusterId') || '', - })( - , - )} - - - Topic名称 - - {getFieldDecorator('topicName', { - rules: [{ required: type === 'Lag' || !role, message: '请选择Topic' }], - initialValue: data && data.get('topicName') || '', - })( - , - )} - - - {type !== 'Lag' ? role ? ( - - BrokeId - - {getFieldDecorator('brokerId', { - initialValue: data && data.get('brokerId') || [], - })( - , - )} - - - ) : null : ( - <> - 消费组 - - {getFieldDecorator('consumerGroup', { - rules: [{ required: type === 'Lag', message: '请输入消费组' }], - initialValue: data && data.get('consumerGroup') || '', - })( - , - )} - - - )} - - - - {getFieldDecorator('actionTag', { - rules: [{ required: true, message: '请输入tag' }], - initialValue: isModify ? initialData.strategyActionList[0].actionTag : '', - })( - 自动生成} />, - )} - - - {getFieldDecorator('status', { - initialValue: isModify ? initialData.status : 1, - })( - - - - , - )} - - - - ); - } -} - -export default Form.create({ name: 'alarm' })(Alarm); diff --git a/console/src/container/modal/cluster-network.tsx b/console/src/container/modal/cluster-network.tsx deleted file mode 100644 index 610205ec..00000000 --- a/console/src/container/modal/cluster-network.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from 'react'; -import { Modal } from 'component/antd'; -import { modal } from 'store/modal'; -import { NetWorkFlow } from 'container/topic-detail/com'; - -export class ClusterDetail extends React.Component { - public render() { - return ( - -
    - -
    -
    - ); - } -} diff --git a/console/src/container/modal/cluster.tsx b/console/src/container/modal/cluster.tsx deleted file mode 100644 index 6a96445c..00000000 --- a/console/src/container/modal/cluster.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, Radio, message } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { INewCluster } from 'types/base-type'; -import { newCluster, modifyCluster } from 'lib/api'; - -const Option = Select.Option; - -const topicFormItemLayout = { - labelCol: { - span: 8, - }, - wrapperCol: { - span: 12, - }, -}; - -class Cluster extends React.Component { - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - const { clusterId } = modal.currentCluster; - this.props.form.validateFieldsAndScroll((err: any, values: INewCluster) => { - if (err) return; - const commonFn = (fn: any) => { - fn.then(() => { - message.success(this.getTips()); - modal.close(); - cluster.getClusters(); - }); - }; - clusterId ? - commonFn(modifyCluster(Object.assign(values, {clusterId}))) : commonFn(newCluster(values)); - }); -} - - public getTips() { - if (modal.currentCluster.clusterId) return '修改成功'; - return '添加成功'; - } - - public getTitle() { - if (modal.currentCluster.clusterId) return '修改集群'; - return '添加集群'; - } - - public render() { - const { getFieldDecorator } = this.props.form; - return ( - -
    - - - {getFieldDecorator('clusterName', { - rules: [{ required: true, message: '请输入集群名称' }], - initialValue: modal.currentCluster.clusterName, - })( - , - )} - - - - - {getFieldDecorator('zookeeper', { - rules: [{ required: true, message: '请输入 zookeeper 地址' }], - initialValue: modal.currentCluster.zookeeper, - })( - , - )} - - - - - {getFieldDecorator('kafkaVersion', { - rules: [{ required: true, message: '请选择 kafka 版本' }], - initialValue: modal.currentCluster.kafkaVersion, - })( - , - )} - - - - - {getFieldDecorator('bootstrapServers', { - rules: [{ required: true, message: '请输入集群访问地址' }], - initialValue: modal.currentCluster.bootstrapServers, - })( - , - )} - - - - - {getFieldDecorator('saslJaasConfig', { - initialValue: modal.currentCluster.saslJaasConfig, - })( - , - )} - - - - - {getFieldDecorator('saslMechanism', { - initialValue: modal.currentCluster.saslMechanism, - })( - , - )} - - - - - {getFieldDecorator('securityProtocol', { - initialValue: modal.currentCluster.securityProtocol, - })( - , - )} - - - - - {getFieldDecorator('alarmFlag', { - rules: [{ required: true, message: '请选择是否开启告警' }], - initialValue: modal.currentCluster.alarmFlag === undefined ? 1 : modal.currentCluster.alarmFlag, - })( - - - - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'cluster' })(Cluster); diff --git a/console/src/container/modal/cosumer-topic.tsx b/console/src/container/modal/cosumer-topic.tsx deleted file mode 100644 index 6d2ccf5a..00000000 --- a/console/src/container/modal/cosumer-topic.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from 'react'; -import { modal } from 'store/modal'; -import { consume } from 'store/consume'; -import Modal from 'antd/es/modal'; -import { observer } from 'mobx-react'; -import Table from 'antd/es/table'; - -const columns = [ - { - title: 'Topic 列表', - dataIndex: 'topicName', - key: 'topicName', - }, -]; - -@observer -export default class ConsumerTopic extends React.Component { - public componentDidMount() { - const { clusterId, consumerGroup, location } = modal.consumberGroup; - consume.getConsumerTopic(clusterId, consumerGroup, location.toLowerCase()); - } - public render() { - return ( - -
    - - ); - } -} diff --git a/console/src/container/modal/index.tsx b/console/src/container/modal/index.tsx deleted file mode 100644 index 647d07d0..00000000 --- a/console/src/container/modal/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import * as React from 'react'; -import { observer } from 'mobx-react'; -import { modal } from 'store/modal'; -import TopicNew from './topic-new'; -import TopicExpand from './topic-expand'; -import Alarm from './alarm-config'; -import ClusterNew from './cluster'; -import LeaderRebalance from './leader-rebalance'; -import Task from './task-new'; -import OrderApprove from './order-approve'; -import PartitionApprove from './partition-approve'; -import NewUser from './new-user'; -import Region from './region'; -import TopicCreate from './topic-create'; -import AdminExpand from './admin-expand'; -import ConsumerTopic from './cosumer-topic'; - -import './index.less'; - -@observer -export default class AllModalInOne extends React.Component { - public render() { - if (!modal.id) return null; - return ( - <> - {modal.id === 'showNewTopic' ? : null} - {modal.id === 'showNewCluster' ? : null} - {modal.id === 'showModifyCluster' ? : null} - {modal.id === 'showAdimTopic' ? : null} - {modal.id === 'showExpandTopic' ? : null} - {modal.id === 'showExpandAdmin' ? : null} - {modal.id === 'showAlarm' ? : null} - {modal.id === 'showAlarmModify' ? : null} - {modal.id === 'showRegion' ? : null} - {modal.id === 'showLeaderRebalance' ? : null} - {modal.id === 'showTask' ? : null} - {modal.id === 'showTaskDetail' ? : null} - {modal.id === 'showOrderApprove' ? : null} - {modal.id === 'showOrderDetail' ? : null} - {modal.id === 'showPartitionDetail' ? : null} - {modal.id === 'showPartition' ? : null} - {modal.id === 'showNewUser' ? : null} - {modal.id === 'showConsumerTopic' ? : null} - - ); - } -} diff --git a/console/src/container/modal/leader-rebalance.tsx b/console/src/container/modal/leader-rebalance.tsx deleted file mode 100644 index 57d4ff7d..00000000 --- a/console/src/container/modal/leader-rebalance.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Input, Button, Table } from 'component/antd'; -import { modal } from 'store/modal'; -import Url from 'lib/url-parser'; -import { cluster } from 'store/cluster'; -import { addRebalance } from 'lib/api'; -import { observer } from 'mobx-react'; - -const topicFormItemLayout = { - labelCol: { - span: 5, - }, - wrapperCol: { - span: 16, - }, -}; - -const columns = [ - { - title: '集群', - dataIndex: 'clusterName', - key: 'clusterName', - }, - { - title: 'Broker ID', - dataIndex: 'brokerId', - key: 'brokerId', - }, - { - title: 'Status', - dataIndex: 'status', - key: 'status', - }, -]; - -@observer -class LeaderRebalance extends React.Component { - public clusterName: string; - public clusterId: number; - public brokerId: number; - - public state = { - loading: false, - }; - constructor(props: any) { - super(props); - const url = Url(); - if (url.search.clusterName) { - this.clusterName = decodeURI(url.search.clusterName); - } - this.clusterId = Number(url.search.clusterId); - } - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - this.props.form.validateFieldsAndScroll((err: any, values: any) => { - if (err) { - return; - } - this.setState({ loading: true }); - this.brokerId = Number(values.brokerId); - addRebalance({ brokerId: this.brokerId, clusterId: this.clusterId, dimension: 0 }).then(() => { - cluster.getRebalance(this.clusterId).then(() => { - if (cluster.leaderStatus && cluster.leaderStatus !== 'RUNNING') { - this.setState({ loading: false }); - } - }); - }); - }); - } - - public render() { - const { getFieldDecorator } = this.props.form; - const { brokerId, clusterName } = this; - return ( - -
    - - - - - {getFieldDecorator('brokerId', { - rules: [{ required: true, message: 'brokerId 不能为空' }], - })()} - - - - - - { - cluster.leaderStatus ?
    : '' - } - - ); - } -} - -export default Form.create({ name: 'LeaderRebalance' })(LeaderRebalance); diff --git a/console/src/container/modal/new-user.tsx b/console/src/container/modal/new-user.tsx deleted file mode 100644 index 775af0e8..00000000 --- a/console/src/container/modal/new-user.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, notification, Select } from 'component/antd'; -import { modal } from 'store/modal'; -import { users } from 'store/users'; -import { addUser, modifyUser } from 'lib/api'; -import { getRandomPassword } from 'lib/utils'; -import { IUserDetail } from 'store/users'; - -import './index.less'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; - -class NewUser extends React.Component { - - public handleSubmit = () => { - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - this.getIsModify() ? - modifyUser(values).then(() => { - notification.success({ message: '修改成功' }); - modal.close(); - users.getUsers(); - }) : - addUser(values).then(() => { - notification.success({ message: '创建用户成功' }); - modal.close(); - users.getUsers(); - }); - }); - } - - public getPassword = () => { - this.props.form.setFieldsValue({ - password: getRandomPassword(6), - }); - } - - public getIsModify = () => !!modal.userDetail; - - public render() { - const { getFieldDecorator } = this.props.form; - const initailData = modal.userDetail || {} as IUserDetail; - const isModify = this.getIsModify(); - return ( - -
    - - - {getFieldDecorator('username', { - rules: [{ required: true, message: '请输入用户名' }], - initialValue: initailData.username, - })( - , - )} - - - - - {getFieldDecorator('password', { - rules: [ - { required: !isModify, message: '请输入密码' }, - { pattern: /^[a-zA-Z0-9]{6,10}$/, message: '请输入6-10位密码' }], - nitialValue: initailData.password, - })( - 随机生成密码} - placeholder="请输入密码" - />, - )} - - - - - {getFieldDecorator('role', { - rules: [{ required: true, message: '请选择角色' }], - initialValue: initailData.role, - })( - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'newUser' })(NewUser); diff --git a/console/src/container/modal/order-approve.tsx b/console/src/container/modal/order-approve.tsx deleted file mode 100644 index 2bb112c6..00000000 --- a/console/src/container/modal/order-approve.tsx +++ /dev/null @@ -1,250 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Col, Input, Select, Button, notification, Collapse, Switch } from 'component/antd'; -import { modal } from 'store/modal'; -import { addTopicApprove } from 'lib/api'; -import { region } from 'store/region'; -import './index.less'; -import { broker } from 'store/broker'; -import moment from 'moment'; -import { observer } from 'mobx-react'; -import { order } from 'store/order'; -import { IValueLabel } from 'types/base-type'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 16, - }, -}; - -@observer -class OrderApprove extends React.Component { - public state = { - broker: false, - orderStatus: 1, - }; - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - if (modal.id === 'showOrderDetail') { modal.close(); return false; } - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { orderStatus } = this.state; - const { orderId } = modal.orderDetail; - const params = Object.assign(values, { orderStatus, orderId }); - addTopicApprove(params).then(() => { - notification.success({ message: '审批成功' }); - order.getAdminOrder(); - modal.close(); - }); - }); - } - - public handleReject = (e: React.MouseEvent) => { - const event = e.currentTarget; - this.setState({orderStatus: 2}, () => { - event.nextElementSibling.click(); - }); - } - - public changeBroker = (broker: boolean) => { - this.setState({ broker }); - } - - public componentDidMount = () => { - region.getRegions(modal.orderDetail.clusterId); - broker.initBrokerOptions(modal.orderDetail.clusterId); - } - - public renderFooter = () => { - return ( - - { - modal.id !== 'showOrderDetail' ? - <> - - - - : null - } - - ); - } - - public render() { - const { orderDetail } = modal; - const disabled = modal.id === 'showOrderDetail'; - const { getFieldDecorator } = this.props.form; - const { orderStatus } = this.state; - return ( - - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - - - { - this.state.broker ? - - {getFieldDecorator('regionIdList', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - })( - , - )} - - : - - {getFieldDecorator('brokerIdList', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - initialValue: (orderDetail.brokers && orderDetail.brokers.split(',')) || - (orderDetail.regions && orderDetail.regions.split(',')) || [], - })( - , - )} - - } - - - - {getFieldDecorator('replicaNum', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - initialValue: orderDetail.replicaNum || '', - })()} - - - - - - - {getFieldDecorator('retentionTime', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - initialValue: orderDetail && orderDetail.retentionTime / 3600000 || '', - })()} - - - - - {getFieldDecorator('partitionNum', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - initialValue: orderDetail.partitionNum, - })()} - - - - - - - {getFieldDecorator('approvalOpinions', { - rules: [{ required: orderStatus === 2, message: '审批意见不能为空' }], - initialValue: orderDetail.approvalOpinions || undefined, - })()} - - - - - - - - ); - } -} - -export default Form.create({ name: 'orderApprove' })(OrderApprove); diff --git a/console/src/container/modal/partition-approve.tsx b/console/src/container/modal/partition-approve.tsx deleted file mode 100644 index 40efe441..00000000 --- a/console/src/container/modal/partition-approve.tsx +++ /dev/null @@ -1,209 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Col, Input, Select, Button, notification, Switch } from 'component/antd'; -import { modal } from 'store/modal'; -import { addAdminPartition } from 'lib/api'; -import { broker } from 'store/broker'; -import { observer } from 'mobx-react'; -import moment from 'moment'; -import { getCookie } from 'lib/utils'; -import { order } from 'store/order'; -import { IValueLabel } from 'types/base-type'; -import './index.less'; - -const topicFormItemLayout = { - labelCol: { - span: 8, - }, - wrapperCol: { - span: 14, - }, -}; - -@observer -class PartitionApprove extends React.Component { - public state = { - orderStatus: 1, - }; - public componentDidMount() { - const { clusterId } = modal.orderDetail; - broker.initBrokerOptions(clusterId); - } - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - if (modal.id === 'showPartitionDetail') { modal.close(); return false; } - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { orderStatus } = this.state; - const { orderId } = modal.orderDetail; - const { partitionNum: num } = values; - values.partitionNum = +num; - const params = Object.assign(values, { orderStatus, orderId }); - addAdminPartition(params).then(() => { - notification.success({ message: '审批成功' }); - order.getAdminOrder(); - modal.close(); - }); - }); - } - - public handleReject = (e: React.MouseEvent) => { - const event = e.currentTarget; - this.setState({ orderStatus: 2 }, () => { - event.nextElementSibling.click(); - }); - } - - public renderFooter = () => { - return ( - - { - modal.id !== 'showPartitionDetail' ? - <> - - - - : null - } - - ); - } - - public render() { - const { orderDetail } = modal; - const disabled = modal.id === 'showPartitionDetail'; - const { getFieldDecorator } = this.props.form; - const { orderStatus } = this.state; - return ( - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {getFieldDecorator('partitionNum', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - })()} - - - - - - {getFieldDecorator('brokerIdList', { - rules: [{ required: orderStatus === 1, message: '不能为空' }], - initialValue: orderDetail.brokerIdList || [], - })( - , - )} - - - - - - {getFieldDecorator('approvalOpinions', { - rules: [{ required: orderStatus === 2, message: '审批意见不能为空' }], - initialValue: orderDetail.approvalOpinions || undefined, - })()} - - - - - - ); - } -} - -export default Form.create({ name: 'partitionApprove' })(PartitionApprove); diff --git a/console/src/container/modal/region.tsx b/console/src/container/modal/region.tsx deleted file mode 100644 index 9a124cc0..00000000 --- a/console/src/container/modal/region.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { Modal, Form, Row, Select, Input, message } from 'component/antd'; -import { IRegionData, statusMap, region } from 'store/region'; -import { cluster } from 'store/cluster'; -import urlQuery from 'store/url-query'; -import { observer } from 'mobx-react'; -import { modal } from 'store'; -import React from 'react'; -import { addRegion, modifyRegion } from 'lib/api'; -import { broker } from 'store/broker'; -import { IValueLabel } from 'types/base-type'; - -const regionFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; - -@observer -export class Region extends React.Component { - public componentDidMount() { - cluster.getClusters(); - broker.initBrokerOptions(urlQuery.clusterId); - } - - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - this.props.form.validateFieldsAndScroll((err: any, values: any) => { - if (err) return; - const commonFn = (fn: any) => { - fn.then(() => { - message.success(this.getTips()); - region.getRegions(urlQuery.clusterId); - modal.close(); - }); - }; - modal.regionData ? - commonFn(modifyRegion(Object.assign(values, { regionId: modal.regionData.regionId }))) : commonFn(addRegion(values)); - }); - } - - public getTips() { - if (modal.regionData) return '修改成功'; - return '添加成功'; - } - - public getTitle() { - if (modal.regionData) return '修改Region'; - return '添加Region'; - } - - public render() { - const { getFieldDecorator } = this.props.form; - let title = '新增Region'; - if (modal.regionData) title = '更新Region'; - const regionData = modal.regionData || {} as IRegionData; - return ( - -
    - - - {getFieldDecorator('regionName', { - rules: [{ required: true, message: '请输入Region名称' }], - initialValue: regionData.regionName, - })( - , - )} - - - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: urlQuery.clusterId, - })( - , - )} - - - - - {getFieldDecorator('brokerIdList', { - rules: [{ required: true, message: '请输入brokerList' }], - initialValue: regionData.brokerIdList, - })( - , - )} - - - - - {getFieldDecorator('status', { - initialValue: regionData.status || 0, - })( - , - )} - - - - - {getFieldDecorator('level', { - initialValue: regionData.level || 0, - })( - , - )} - - - - - {getFieldDecorator('description', { - rules: [{ required: false }], - initialValue: regionData.description, - })( - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'Region' })(Region); diff --git a/console/src/container/modal/reset-offset.tsx b/console/src/container/modal/reset-offset.tsx deleted file mode 100644 index 45154f6e..00000000 --- a/console/src/container/modal/reset-offset.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, DatePicker, Col, Button } from 'component/antd'; -import { modal } from 'store/modal'; - -const Option = Select.Option; - -const topicFormItemLayout = { - labelCol: { - span: 8, - }, - wrapperCol: { - span: 16, - }, -}; - -class ResetOffset extends React.Component { - public handleSubmit = () => { - debugger - } - - public render() { - const { getFieldDecorator } = this.props.form; - return ( - -
    - -
    - - - - - {/* - - - - */} - - - - - - - - - - - - - - - - - - - ); - } -} - -export default Form.create({ name: 'topic' })(ResetOffset); diff --git a/console/src/container/modal/task-new.tsx b/console/src/container/modal/task-new.tsx deleted file mode 100644 index 91ec125a..00000000 --- a/console/src/container/modal/task-new.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, notification, InputNumber, Switch, Icon, Tooltip, Col } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { executeTask, modifyTask } from 'lib/api'; -import { operation, ITask } from 'store/operation'; -import { observer } from 'mobx-react'; -import { IValueLabel } from 'types/base-type'; -import { topic } from 'store/topic'; -import { broker } from 'store/broker'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; - -@observer -class Task extends React.Component { - public handleSubmit = () => { - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { throttle, partitionIdList } = values; - values.throttle = throttle * 1024 * 1024; - values.partitionIdList = typeof partitionIdList === 'string' ? values.partitionIdList.split(',') : []; - if (this.getDisabled()) { - const { taskId } = operation.taskDetail; - modifyTask({ throttle: values.throttle, taskId, action: 'modify' }).then(() => { - notification.success({ message: '修改成功' }); - operation.getTask(); - modal.close(); - }); - } else { - executeTask(values).then(() => { - notification.success({ message: '迁移任务创建成功' }); - operation.getTask(); - modal.close(); - }); - } - }); - } - - public getDisabled = () => !!operation.taskDetail; - - public initSelection = (value: number) => { - topic.getTopicList(value); - broker.initBrokerOptions(value); - } - - public filterSelection = (input: string, option: any) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0; - - public test = (): any => { - if (modal.id === 'showTaskDetail') return null; - } - public render() { - const disabled = this.getDisabled(); - const { getFieldDecorator } = this.props.form; - const initialData = operation.taskDetail || {} as ITask; - const isModify = modal.id === 'showTaskDetail'; - return ( - -
    - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: initialData.clusterId, - })( - , - )} - - - - - {getFieldDecorator('topicName', { - rules: [{ required: true, message: '请选择Topic' }], - initialValue: initialData.topicName, - })( - , - )} - - - - - {getFieldDecorator('partitionIdList', { - initialValue: initialData.partitionIdList || [], - })( - , - )} - - - - - 流量上限  - - - - } - > - {getFieldDecorator('throttle', { - rules: [{ required: true, message: '请输入限流值' }], - initialValue: +(initialData.throttle / (1024 * 1024)).toFixed(2) || 1, - })( - , - )} - MB/s - - - { - isModify ? ( - -
    - 分区列表  - 无色:待迁移
    半绿:迁移中
    全绿:迁移成功
    红色:迁移失败}> - -
    : - -
    -
      - {initialData.regionList && initialData.regionList.map((i, index) => { - return
    • 分区{i[0]}: {i[1].join(',')} -
    • ; - })} -
    - - - ) : null - } - { - !disabled ? ( - <> - - - {getFieldDecorator('brokerIdList', { - rules: [{ required: true, message: '请输入broker' }], - })( - , - )} - - - - - {getFieldDecorator('description', { - rules: [{ required: true, message: '请输入迁移说明' }], - })( - , - )} - - - - ) : null - } - - - ); - } -} - -export default Form.create({ name: 'task' })(Task); diff --git a/console/src/container/modal/topic-create.tsx b/console/src/container/modal/topic-create.tsx deleted file mode 100644 index de060efd..00000000 --- a/console/src/container/modal/topic-create.tsx +++ /dev/null @@ -1,220 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, InputNumber, notification, Switch } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { adminCreateTopic, modifyTopic } from 'lib/api'; -import { ITopic, IValueLabel } from 'types/base-type'; -import { operation } from 'store/operation'; -import { broker } from 'store/broker'; -import urlQuery from 'store/url-query'; -import { observer } from 'mobx-react'; -import { topic } from 'store/topic'; -import { getCookie } from 'lib/utils'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; - -const bussDesc = `概要描述Topic的数据源, Topic数据的生产者/消费者, Topic的申请原因及备注信息等。`; - -@observer -class Topic extends React.Component { - public state = { - loading: false, - targetType: false, - }; - - public getDisabled = () => !!modal.topicData; - - public handleTarget = (targetType: boolean) => { - this.setState({ targetType }); - } - - public handleSubmit = () => { - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { principalList, retentionTime } = values; - values.principalList = typeof principalList === 'string' ? principalList.split(',') : values.principalList; - values.retentionTime = retentionTime * 3600000; - this.setState({ loading: true }); - const fn = this.getDisabled() ? modifyTopic : adminCreateTopic; - fn(values).then(data => { - topic.getAdminTopics(urlQuery.clusterId); - notification.success(this.getDisabled() ? { message: '修改Topic成功' } : { message: 'Topic创建成功' }); - modal.close(); - }, (err) => { - this.setState({ loading: false }); - }); - }); - } - public componentDidMount() { - operation.initRegionOptions(urlQuery.clusterId); - broker.initBrokerOptions(urlQuery.clusterId); - } - - public render() { - const { getFieldDecorator } = this.props.form; - const { loading } = this.state; - const initialData = modal.topicData || {} as ITopic; - const disabled = this.getDisabled(); - return ( - -
    - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: +urlQuery.clusterId, - })( - , - )} - - - - - {getFieldDecorator('topicName', { - rules: [{ required: true, message: '请输入Topic 名称' }, - { pattern: /^[a-zA-Z0-9_-]{1,64}$/, message: '格式不正确' }], - initialValue: initialData.topicName, - })( - , - )} - - - - - {getFieldDecorator('principalList', { - rules: [{ required: true, message: '请输入负责人' }], - initialValue: disabled ? initialData.principalList || ' ' : getCookie('username'), - })( - , - )} - - - - - {getFieldDecorator('retentionTime', { - rules: [{ required: true, message: '请输入保存时间' }], - initialValue: disabled ? (initialData.retentionTime / 3600000).toFixed(0) : 24, - })( - , - )} - 小时 - - - {!disabled ? - <> - - - - - - - { - this.state.targetType ? ( - - {getFieldDecorator('regionIdList', { - rules: [{ required: true, message: '请输入选择' }], - })( - , - )} - - ) : ( - - {getFieldDecorator('brokerIdList', { - rules: [{ required: true, message: '请输入broker' }], - })( - , - )} - - ) - } - - : null - } - - - {getFieldDecorator('partitionNum', { - rules: [{ required: true, message: '请输入partition数' }], - initialValue: topic.topicDetail && topic.topicDetail.partitionNum, - })( - , - )} - - - - - {getFieldDecorator('replicaNum', { - rules: [{ required: true, message: '请输入副本数' }], - initialValue: topic.topicDetail && topic.topicDetail.replicaNum, - })( - , - )} - - - - - {getFieldDecorator('properties', { - initialValue: initialData.properties, - })( - , - )} - - - - - {getFieldDecorator('description', { - initialValue: initialData.description || disabled && ' ', - })( - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'topic' })(Topic); diff --git a/console/src/container/modal/topic-expand.tsx b/console/src/container/modal/topic-expand.tsx deleted file mode 100644 index 12b320d4..00000000 --- a/console/src/container/modal/topic-expand.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, notification } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { addPartitionApprove } from 'lib/api'; -import { IBaseOrder } from 'types/base-type'; -import { topic } from 'store/topic'; -import { observer } from 'mobx-react'; -import { order } from 'store/order'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; -@observer -class Topic extends React.Component { - - public handleSubmit = () => { - if (!!modal.topicDetail) modal.close(); - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - if (modal.topicDetail) values.clusterId = modal.topicDetail.clusterId || values.clusterId; - addPartitionApprove(values).then(() => { - notification.success({ message: '申请成功' }); - order.getOrder(); - modal.close(); - }); - }); - } - - public filterSelection = (input: string, option: any) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0; - - public initSelection = (value: number) => { - topic.getTopicList(value); - cluster.getClusters(); - } - - public componentDidMount() { - const value = !!modal.topicDetail ? modal.topicDetail.clusterId : cluster.data[1].clusterId; - this.initSelection(value); - } - - public render() { - const { getFieldDecorator } = this.props.form; - const initialData = modal.topicDetail || {} as IBaseOrder; - const disabled = !!modal.topicDetail; - const isDetail = location.pathname.includes('topic_detai'); - return ( - -
    - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: +initialData.clusterId || +cluster.data[1].clusterId, - })( - , - )} - - - - - {getFieldDecorator('topicName', { - rules: [{ required: true, message: '请选择Topic' }], - initialValue: initialData.topicName, - })( - , - )} - - - - {getFieldDecorator('predictBytesIn', { - rules: [{ required: true, message: '请输入预估峰值流量' }], - initialValue: initialData.predictBytesIn, - })( - , - )} - MB/s - - { - !isDetail && disabled ? ( - <> - - - - - - - ) : null - } - - - {getFieldDecorator('description', { - rules: [{ required: true, message: '请输入申请原因' }], - initialValue: initialData.description, - })( - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'topic' })(Topic); diff --git a/console/src/container/modal/topic-new.tsx b/console/src/container/modal/topic-new.tsx deleted file mode 100644 index 813d5040..00000000 --- a/console/src/container/modal/topic-new.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import * as React from 'react'; -import { Modal, Form, Row, Input, Select, InputNumber, notification } from 'component/antd'; -import { modal } from 'store/modal'; -import { cluster } from 'store/cluster'; -import { createTopic } from 'lib/api'; -import { ITopic } from 'types/base-type'; -import { operation } from 'store/operation'; -import urlQuery from 'store/url-query'; -import { getCookie } from 'lib/utils'; - -const topicFormItemLayout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 11, - }, -}; - -const bussDesc = `概要描述Topic的数据源, Topic数据的生产者/消费者, Topic的申请原因及备注信息等。`; - -class Topic extends React.Component { - public state = { - loading: false, - }; - - public getDisabled = () => !!modal.topicData; - - public handleSubmit = () => { - if (this.getDisabled()) return modal.close(); - this.props.form.validateFields((err: Error, values: any) => { - if (err) return; - const { principalList, retentionTime } = values; - values.principalList = principalList.split(','); - values.retentionTime = retentionTime; - this.setState({ loading: true }); - createTopic(values).then(data => { - notification.success({ message: '申请Topic成功' }); - window.setTimeout(() => location.assign('/user/my_order'), 500); - modal.close(); - }, (err) => { - this.setState({ loading: false }); - }); - }); - } - - public render() { - const { getFieldDecorator } = this.props.form; - const disabled = this.getDisabled(); - const { loading } = this.state; - const initialData = modal.topicData || {} as ITopic; - return ( - -
    - - - {getFieldDecorator('clusterId', { - rules: [{ required: true, message: '请选择集群' }], - initialValue: +urlQuery.clusterId || initialData.clusterId || (cluster.data[1] && cluster.data[1].clusterId), - })( - , - )} - - - - - {getFieldDecorator('topicName', { - rules: [{ required: true, message: '请输入Topic 名称' }, - { pattern: /^[a-zA-Z0-9_-]{1,64}$/, message: '格式不正确' }], - initialValue: initialData.topicName, - })( - , - )} - - - - - {getFieldDecorator('principalList', { - rules: [{ required: true, message: '请输入负责人' }], - initialValue: disabled ? initialData.principals || ' ' : getCookie('username'), - })( - , - )} - - - - - {getFieldDecorator('retentionTime', { - rules: [{ required: true, message: '请输入保存时间' }], - initialValue: (initialData.retentionTime / 3600000) || 24, - })( - , - )} - 小时 - - - - - {getFieldDecorator('peakBytesIn', { - rules: [{ required: true, message: '请输入限流值' }], - initialValue: initialData.peakBytesIn || 1, - })( - , - )} - MB/s - - - - - {getFieldDecorator('description', { - rules: [{ required: true, message: '请输入业务说明' }], - initialValue: initialData.description || '', - })( - , - )} - - - -
    - ); - } -} - -export default Form.create({ name: 'topic' })(Topic); diff --git a/console/src/container/modify-user/index.less b/console/src/container/modify-user/index.less deleted file mode 100644 index a4df476e..00000000 --- a/console/src/container/modify-user/index.less +++ /dev/null @@ -1,45 +0,0 @@ -.fw-container { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; - margin: auto; - height: 425px; - width: 415px; - display: flex; - justify-content: center; - align-items: center; - border: 1px solid rgba(0, 0, 0, 0.1); - background: #fff; - transition: all 500ms ease-in-out; - &:hover { - box-shadow: 0px 0px 14px 0px #afafaf; - } - .ant-form-item-control { - margin-bottom: 10px; - } - .ant-input { - height: 40px; - font-size: 14px; - border-radius: 0; - } - .style-button { - text-align: right; - .ant-btn { - width: 50%; - height: 40px; - border-radius: 0px; - border-right: 1px solid #fff; - } - .b-item { - text-align: right; - .ant-col-10 { - width: 55%; - button { - margin: 20px 10px 0 0; - } - } - } - } -} diff --git a/console/src/container/modify-user/index.tsx b/console/src/container/modify-user/index.tsx deleted file mode 100644 index e0009760..00000000 --- a/console/src/container/modify-user/index.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import * as React from 'react'; - -import { Form, Row, Input, notification, Button } from 'component/antd'; -import { modifyUser } from 'lib/api'; -import { getCookie } from 'lib/utils'; - -import './index.less'; - -class ModifyUser extends React.Component { - public handleSubmit = (e: React.MouseEvent) => { - e.preventDefault(); - this.props.form.validateFields((err: Error, values: any) => { - const username = getCookie('username'); - const role = getCookie('role'); - const { oldPassword, password } = values; - if (err) return; - modifyUser({ role, username, oldPassword, password }).then(() => { - notification.success({ message: '修改成功' }); - this.handleReset(); - }); - }); - } - - public comparePassword = (rule: any, value: any, callback: any) => { - const { form } = this.props; - if (value && value !== form.getFieldValue('password')) { - callback('两次密码不相同'); - } else { - callback(); - } - } - - public handleReset = () => { - this.props.form.resetFields(); - } - - public render() { - const { getFieldDecorator } = this.props.form; - return ( -
    -
    - - - {getFieldDecorator('oldPassword', { - rules: [{ required: true, message: '请输入原密码' }], - })( - , - )} - - - - - {getFieldDecorator('password', { - rules: [{ required: true, message: '请输入新密码' }], - })( - , - )} - - - - - {getFieldDecorator('confirm password', { - rules: [{ required: true, message: '请重新输入新密码' }, { - validator: this.comparePassword, - }], - })( - , - )} - - - - - - - - - -
    - ); - } -} - -export default Form.create({ name: 'modifyUser' })(ModifyUser); diff --git a/console/src/container/my-order/index.tsx b/console/src/container/my-order/index.tsx deleted file mode 100644 index fc9124d2..00000000 --- a/console/src/container/my-order/index.tsx +++ /dev/null @@ -1,205 +0,0 @@ -import * as React from 'react'; - -import { Table, Tabs, Select, Input, notification, Modal } from 'component/antd'; -import { PaginationConfig } from 'antd/es/table/interface'; -import { modal } from 'store'; -import { observer } from 'mobx-react'; -import { order, tableStatusFilter } from 'store/order'; -import { cluster } from 'store/cluster'; -import { recallPartition, recallOrder } from 'lib/api'; -import moment from 'moment'; -import { handleTabKey, tableFilter } from 'lib/utils'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { IBaseOrder } from 'types/base-type'; - -const TabPane = Tabs.TabPane; -const Search = Input.Search; -const Option = Select.Option; - -const handleRecallOrder = (record: IBaseOrder) => { - const flag = +location.hash.substr(1); - Modal.confirm({ - title: `确认撤回 Topic: ${record.topicName}${flag ? ' 扩容的' : ''}申请 ?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - if (flag) { - recallPartition(record.orderId).then(() => { - notification.success({ message: '撤回成功' }); - order.getOrder(); - }); - } else { - recallOrder(record.orderId).then(() => { - notification.success({ message: '撤回成功' }); - order.getOrder(); - }); - } - }, - }); -}; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class MyOrder extends SearchAndFilter { - public state = { - searchKey: '', - filterStatusVisible: false, - filterClusterVisible: false, - filterSVisible: false, - filterCVisible: false, - }; - - public componentDidMount() { - order.getOrder(); - cluster.getClustersBasic(); - } - - public renderColumns = (data: IBaseOrder[], type: boolean) => { - const cluster = Object.assign({ - title: '集群名称', - dataIndex: 'clusterName', - key: 'clusterName', - filters: tableFilter(data, 'clusterName'), - onFilter: (value: string, record: IBaseOrder) => record.clusterName.indexOf(value) === 0, - }, this.renderColumnsFilter(type ? 'filterClusterVisible' : 'filterCVisible')); - - const status = Object.assign({ - title: '工单状态', - dataIndex: 'statusStr', - key: 'statusStr', - filters: tableStatusFilter, - onFilter: (value: string, record: IBaseOrder) => record.statusStr.indexOf(value) === 0, - render: (t: string) => {t}, - }, this.renderColumnsFilter(type ? 'filterStatusVisible' : 'filterSVisible')); - - return [ - { - title: '工单 ID', - dataIndex: 'orderId', - key: 'orderId', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.orderId - b.orderId, - }, - cluster, - { - title: 'Topic 名称', - dataIndex: 'topicName', - key: 'topicName', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0), - }, - { - title: 'Topic申请人', - dataIndex: 'applicant', - key: 'applicant', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.principals.charCodeAt(0) - b.principals.charCodeAt(0), - }, - { - title: '申请时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - sorter: (a: IBaseOrder, b: IBaseOrder) => a.gmtCreate - b.gmtCreate, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, - status, - { - title: '审批人', - dataIndex: 'approver', - key: 'approver', - }, - { - title: '操作', - dataIndex: 'operation', - key: 'operation', - render: (text: string, r: IBaseOrder) => { - return ( - - 详情 - - {r.orderStatus === 0 ? 撤回 : null} - - ); - }, - }, - ]; - } - - public renderTopic() { - return ( -
    - ); - } - - public renderPartition() { - return ( -
    - ); - } - - public getData(origin: T[]) { - let data: T[] = []; - origin.forEach((d) => { - if (cluster.active === -1 || d.clusterId === cluster.active) { - return data.push(d); - } - }); - const { searchKey } = this.state; - - if (searchKey) { - data = data.filter((d) => d.topicName.includes(searchKey)); - } - - return data; - } - - public render() { - const activeKey = location.hash.substr(1); - return ( - <> -
      -
    • - {+activeKey ? '扩容申请' : 'Topic申请'} -
    • -
    • - -
    • -
    • -
    - - - {this.renderTopic()} - - - {this.renderPartition()} - - - - ); - } - - private onSearch = (e: React.ChangeEvent) => { - const searchKey = e.target.value.trim(); - this.setState({ - searchKey, - }); - } -} diff --git a/console/src/container/topic-detail/com.tsx b/console/src/container/topic-detail/com.tsx deleted file mode 100644 index 1930c2b7..00000000 --- a/console/src/container/topic-detail/com.tsx +++ /dev/null @@ -1,198 +0,0 @@ -import * as React from 'react'; -import { Table, DatePicker, Select, Button, PaginationConfig, notification, Spin, Tooltip } from 'component/antd'; -import echarts from 'echarts/lib/echarts'; -import { cluster } from 'store/cluster'; - -// 引入柱状图 -import 'echarts/lib/chart/line'; -// 引入提示框和标题组件 -import 'echarts/lib/component/tooltip'; -import 'echarts/lib/component/title'; -import 'echarts/lib/component/legend'; -import { observer } from 'mobx-react'; -import { topic, IConsumeInfo, ITopicStatusInfo } from 'store/topic'; -import { StatusGraghCom } from 'component/flow-table'; -import { IOptionType } from 'types/base-type'; -import moment from 'moment'; - -export const Base = observer(() => { - if (!topic.baseInfo) return null; - return ( -
      -
    • 负责人: - - {topic.baseInfo.principals} - -
    • -
    • 分区数: {topic.baseInfo.partitionNum} 个
    • -
    • 储存时间: {(topic.baseInfo.retentionTime / 3600000).toFixed(0)} 小时
    • -
    • 副本数: {topic.baseInfo.replicaNum} 个
    • -
    • 创建时间:{moment(topic.baseInfo.createTime).format('YYYY-MM-DD HH:mm:ss')}
    • -
    • Broker数:{topic.baseInfo.brokerNum} 个
    • -
    • 修改时间:{moment(topic.baseInfo.modifyTime).format('YYYY-MM-DD HH:mm:ss')}
    • -
    • Region:{topic.baseInfo.regionNames}
    • -
    • 描述信息: - - {topic.baseInfo.description} - -
    • -
    - ); -}); - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 6, - showTotal: (total) => `共 ${total} 条`, -}; - -interface IGroupProps { - data: IConsumeInfo[]; - pagination?: PaginationConfig; -} - -// export const Group = (props: IGroupProps) => { -// return ( -//
    -//
    -// -// ); -// }; - -export class Group extends React.Component { - public columns = [{ - title: '消费组名称', - dataIndex: 'consumerGroup', - key: 'consumerGroup', - width: '80%', - render: (t: string, r: IConsumeInfo) => this.renderOp(r), - }, { - title: 'location', - dataIndex: 'location', - key: 'location', - width: '20%', - render: (t: string) => t.toLowerCase(), - }, - ]; - - public renderOp = (record: IConsumeInfo) => { - return ( - - - {record.consumerGroup} - - - ); - } - - public render() { - return ( -
    -
    - - ); - } -} - -@observer -export class StatusGragh extends StatusGraghCom { - public getData = () => { - return topic.statusInfo; - } -} -@observer -export class NetWorkFlow extends React.Component { - public id: HTMLDivElement = null; - public chart: echarts.ECharts; - - public state = { - loading: true, - data: false, - type: 'normal', - }; - - public componentDidMount() { - this.chart = echarts.init(this.id); - cluster.initTime(); - this.handleSearch(); - } - - public handleApi = () => { - const { topicName, brokerId, clusterId } = this.props; - if (topicName) { - this.setState({ type: 'topic' }); - return cluster.getMetriceInfo(clusterId, topicName); - } - if (brokerId !== undefined) return cluster.getBrokerMetrics(clusterId, brokerId); - return cluster.getClusterMetricsHistory(clusterId); - } - - public handleSearch = () => { - const { startTime, endTime } = cluster; - if (startTime >= endTime) { - notification.error({ message: '开始时间不能大于或等于结束时间' }); - return false; - } - this.setState({ loading: true }); - this.handleApi().then(data => { - this.setState({ loading: false }); - this.setState({ data: !data.xAxis.data.length }); - this.chart.setOption(data as any, true); - }); - } - public handleChange = (value: IOptionType) => { - this.chart.setOption(cluster.changeType(value) as any, true); - } - - public handleStartTimeChange(value: moment.Moment) { - cluster.changeStartTime(value); - } - - public handleEndTimeChange(value: moment.Moment) { - cluster.changeEndTime(value); - } - - public render() { - return ( - <> -
    -
      -
    • - 开始时间 - -
    • -
    • - 结束时间 - -
    • -
    • - 类型 - -
    • -
    • - {/*
    • */} -
    -
    - - {this.state.data ?
    暂无数据
    : null} -
    this.id = id} /> - - - ); - } -} diff --git a/console/src/container/topic-detail/index.less b/console/src/container/topic-detail/index.less deleted file mode 100644 index 4a005673..00000000 --- a/console/src/container/topic-detail/index.less +++ /dev/null @@ -1,173 +0,0 @@ -p.k-title { - width: 100%; - font-size: 14px; - font-family: PingFangSC-Medium; - font-weight: 500; - color: rgba(0, 0, 0, 0.85); - height: 48px; - line-height: 48px; - background: rgba(0, 0, 0, 0.02); - padding-left: 24px; - margin: 0; -} -.right-flow { - .k-abs { - right: 24px; - cursor: pointer; - & > i { - margin-right: 5px; - } - } -} -.status-graph { - position: relative; - height: 48px; - width: 100%; - background: rgba(250, 250, 250, 1); -} -.topic-line-tool { - font-size: 14px; - font-family: PingFangSC-Regular; - font-weight: 400; - color: rgba(0, 0, 0, 0.85); - background: rgba(250, 250, 250); - li { - margin-right: 20px; - & > span.label { - padding-right: 10px; - } - } -} -.base-detail { - overflow: hidden; - width: 100%; - li { - float: left; - color: rgba(3, 2, 2, 0.85); - background: #fff; - line-height: 52px; - font-size: 14px; - font-family: PingFangSC-Regular; - white-space: nowrap; - &:nth-child(2n + 1) { - width: 65%; - span:first-child { - width: 30%; - } - } - &:nth-child(2n) { - width: 35%; - padding-left: 13px; - } - &.special { - width: 100%; - padding-left: 13px; - height: 52px; - span:first-child { - width: 20%; - text-align: left; - } - .principal { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 70%; - display: inline-block; - vertical-align: top; - } - } - span:first-child { - display: inline-block; - font-size: 12px; - font-family: PingFangSC-Regular; - font-weight: 400; - color: rgba(0, 0, 0, 0.45); - width: 54%; - text-align: left; - } - } -} - -.k-row { - width: 100%; - overflow: hidden; - position: relative; - .k-abs { - position: absolute; - top: 15px; - } - .k-tab { - width: 100%; - height: 48px; - line-height: 48px; - background: rgba(0, 0, 0, 0.02); - padding: 0px 24px; - font-size: 14px; - font-family: PingFangSC-Medium; - font-weight: 500; - color: rgba(0, 0, 0, 0.85); - display: flex; - justify-content: space-between; - margin: 0; - } -} - -.k-top-row { - position: relative; - & + .k-top-row { - padding-left: 8px; - } - .group-search { - position: absolute; - top: 8px; - right: 24px; - width: 220px; - } -} - -.k-toolbar { - margin: 0; - position: absolute; - right: 0; - li { - display: inline-block; - vertical-align: middle; - line-height: 48px; - } -} - -.nav { - color: #3f3f3fc9; - p { - display: inline-block; - font-size: 20px; - height: 48px; - line-height: 48px; - font-weight: 800; - } -} -.t-button { - font-size: 12px; - button { - border: 1px solid #f38031; - color: #f38031; - margin-left: 10px; - background: transparent; - } -} -.group-detail { - .ant-table-body { - height: 270px; - } - .ant-table-placeholder { - display: none; - } -} - -.nothing-style { - position: absolute; - font-size: 18px; - color: #999; - top: 175px; - left: 520px; -} diff --git a/console/src/container/topic-detail/index.tsx b/console/src/container/topic-detail/index.tsx deleted file mode 100644 index 5d9232a5..00000000 --- a/console/src/container/topic-detail/index.tsx +++ /dev/null @@ -1,302 +0,0 @@ -import * as React from 'react'; -import './index.less'; -import { NetWorkFlow, StatusGragh, Group, Base } from './com'; -import { Table, Tabs, Button, PaginationConfig } from 'component/antd'; -import Url from 'lib/url-parser'; -import { topic, ITopicPartition, ITopicBroker } from 'store/topic'; -import { observer } from 'mobx-react'; -import { modal } from 'store'; -import { drawer } from 'store/drawer'; -import { handleTabKey } from 'lib/utils'; -import { getCookie } from 'lib/utils'; -import { SearchAndFilter } from 'container/cluster-topic'; -import { broker } from 'store/broker'; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class TopicDetail extends SearchAndFilter { - public clusterId: number; - public topicName: string; - public role: string; - - public brokerColumns = [{ - title: 'BrokerID', - key: 'brokerId', - dataIndex: 'brokerId', - sorter: (a: ITopicBroker, b: ITopicBroker) => a.brokerId - b.brokerId, - render: (t: string) => { - return ( - - {t} - - ); - }, - }, { - title: 'Host', - key: 'host', - dataIndex: 'host', - }, { - title: 'Leader个数', - key: 'leaderPartitionIdListLength', - dataIndex: 'leaderPartitionIdList', - render: (t: []) => { - return t.length; - }, - }, { - title: '分区LeaderID', - key: 'leaderPartitionIdList', - dataIndex: 'leaderPartitionIdList', - onCell: () => ({ - style: { - maxWidth: 180, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (t: []) => { - return t.map(i => {i}); - }, - }, { - title: '分区个数', - key: 'partitionNum', - dataIndex: 'partitionNum', - }, { - title: '分区ID', - key: 'partitionIdList', - dataIndex: 'partitionIdList', - onCell: () => ({ - style: { - maxWidth: 180, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (t: []) => { - return t.map(i => {i}); - }, - }, { - title: '操作', - render: (record: ITopicBroker) => { - return (查看详情); - }, - }]; - - public state = { - searchKey: '', - partitionKey: '', - brokerKey: '', - consumerKey: '', - filterVisible: false, - }; - - constructor(props: any) { - super(props); - const url = Url(); - this.clusterId = Number(url.search.clusterId); - this.topicName = url.search.topic; - this.role = getCookie('role'); - } - - public renderColumns = () => { - const underReplicated = Object.assign({ - title: '已同步', - key: 'underReplicated', - dataIndex: 'underReplicated', - filters: [{ text: '是', value: '0' }, { text: '否', value: '1' }], - onFilter: (value: string, record: ITopicPartition) => +record.underReplicated === +value, - render: (t: any) => {t ? '否' : '是'}, - }, this.renderColumnsFilter('filterVisible')); - - return [{ - title: '分区号', - key: 'partitionId', - dataIndex: 'partitionId', - sorter: (a: ITopicPartition, b: ITopicPartition) => a.partitionId - b.partitionId, - }, { - title: '偏移量', - key: 'offset', - dataIndex: 'offset', - }, { - title: 'LeaderBrokerID', - key: 'leaderBrokerId', - dataIndex: 'leaderBrokerId', - }, { - title: '副本BrokerID', - key: 'replicaBrokerIdList', - dataIndex: 'replicaBrokerIdList', - render: (t: []) => { - return t.map(i => {i}); - }, - }, { - title: 'ISR', - key: 'isrBrokerIdList', - dataIndex: 'isrBrokerIdList', - render: (t: []) => { - return t.map(i => {i}); - }, - }, { - title: '首选Leader副本', - key: 'preferredBrokerId', - dataIndex: 'preferredBrokerId', - }, - underReplicated]; - } - - public componentDidMount() { - const { topicName, clusterId } = this; - topic.getTopicBasicInfo(topicName, clusterId); - topic.getTopicStatusInfo(topicName, clusterId); - topic.getTopicConsumeInfo(clusterId, topicName); - topic.getTopicBroker(clusterId, topicName); - topic.getTopicPartition(clusterId, topicName); - } - - public updateStatus = () => { - topic.getTopicStatusInfo(this.topicName, this.clusterId); - } - - public getMoreDetail = (record: ITopicBroker) => { - return ( -
    -

    BrokerID: {record.brokerId}

    -

    Host:{record.host}

    -

    LeaderID: {record.leaderPartitionIdList.join(',')}(共{record.leaderPartitionIdList.length}个)

    -

    分区ID:{record.partitionIdList.join(',')}(共{record.partitionIdList.length}个)

    -
    - ); - } - - public renderMore() { - const data = this.state.brokerKey ? - topic.topicBrokers.filter((d) => d.host.includes(this.state.brokerKey)) : topic.topicBrokers; - return ( - <> -
    -
      -
    • Broker信息
    • - {this.renderSearch('请输入Host', 'brokerKey')} -
    -
    -
    - - - - ); - } - - public renderOperation() { - const { topicName, clusterId } = this; - return ( -
    - {location.hash.substr(1) === '2' ? : - <> - - - } -
    - ); - } - - public renderFlow() { - return ( - <> -
    -

    历史流量

    - -
    -
    -

    实时流量

    - - 刷新 - - -
    - - ); - } - - public renderMessage() { - const data = this.state.partitionKey ? - topic.topicPartitions.filter((d) => d.partitionId + '' === this.state.partitionKey) : topic.topicPartitions; - const consumerData = this.state.consumerKey ? - topic.consumeInfo.filter((d) => d.consumerGroup.includes(this.state.consumerKey)) : topic.consumeInfo; - return ( - <> -
    -
    -

    基本信息

    - -
    -
    -
      -
    • 消费组信息
    • - {this.renderSearch('请输入消费组名称', 'consumerKey')} -
    - -
    -
    - {+this.role ? this.renderMore() : null} -
    -
      -
    • 分区信息
    • - {this.renderSearch('请输入分区号', 'partitionKey')} -
    -
    -
    - - - - ); - } - - public renderTab() { }; - - public render() { - return ( - <> -
    -

    {this.topicName}

    -
    - - - {this.renderMessage()} - - - {this.renderFlow()} - - {this.renderTab()} - - - ); - } -} diff --git a/console/src/container/user-home/index.less b/console/src/container/user-home/index.less deleted file mode 100644 index 990d47ad..00000000 --- a/console/src/container/user-home/index.less +++ /dev/null @@ -1,73 +0,0 @@ -.content-container { - position: relative; - .table-operation { - a { - color: #f38031; - } - a + a { - margin-left: 10px; - } - } - .table-operation-bar { - position: absolute; - right: 24px; - z-index: 100; - li { - display: inline-block; - vertical-align: middle; - .ant-select { - width: 150px; - } - .ant-input-search { - width: 200px; - } - &.new-topic { - margin-right: 30px; - cursor: pointer; - & > i { - margin-right: 5px; - } - } - } - } - .k-collect { - width: 300px; - position: relative; - margin-bottom: 12px; - .ant-alert-close-icon { - top: 7px; - } - .k-coll-btn { - position: absolute; - top: 9px; - right: 15px; - } - } - .p-params { - display: inline-block; - padding: 0px 10px; - border-radius: 4px; - border: 1px solid rgba(217, 217, 217, 1); - margin: 0px 8px 8px 0px; - &-unFinished { - background: rgba(245, 34, 45, 0.2); - } - } -} - -.icon:hover { - position: relative; - .ant-checkbox-disabled { - &::after { - content: '已收藏'; - color: #fff; - background-color: rgba(0, 0, 0, 0.65); - position: absolute; - padding: 8px 0px; - width: 60px; - border-radius: 4px; - top: -30px; - left: 1px; - } - } -} diff --git a/console/src/container/user-home/index.tsx b/console/src/container/user-home/index.tsx deleted file mode 100644 index 859a0998..00000000 --- a/console/src/container/user-home/index.tsx +++ /dev/null @@ -1,286 +0,0 @@ -import * as React from 'react'; -import './index.less'; - -import { Table, Tabs, Alert, notification, PaginationConfig, Modal, Tooltip } from 'component/antd'; -import { modal } from 'store'; -import { cluster } from 'store/cluster'; -import { observer } from 'mobx-react'; -import { topic } from 'store/topic'; -import ReactDOM from 'react-dom'; -import { collect, uncollect } from 'lib/api'; -import { SearchAndFilter } from 'container/cluster-topic'; -import moment from 'moment'; -import { handleTabKey, tableFilter } from 'lib/utils'; -import { ITopic } from 'types/base-type'; - -const TabPane = Tabs.TabPane; - -const pagination: PaginationConfig = { - position: 'bottom', - showQuickJumper: true, - pageSize: 10, - showTotal: (total) => `共 ${total} 条`, -}; - -@observer -export class UserHome extends SearchAndFilter { - public state = { - searchKey: '', - filterCollVisible: false, - filterUnCollVisible: false, - filterFavorite: false, - }; - - public collRef: HTMLDivElement = null; - public uncollRef: HTMLDivElement = null; - - public rowSelection = { - onChange: (selectedRowKeys: string[], selectedRows: ITopic[]) => { - const num = selectedRows.length; - ReactDOM.render( - selectedRows.length ? ( - <> - - 收藏 - ) : null, - this.collRef, - ); - }, - getCheckboxProps: (record: any) => ({ disabled: record.favorite, className: 'icon' }), - }; - - public unrowSelection = { - onChange: (selectedRowKeys: string[], selectedRows: ITopic[]) => { - const num = selectedRows.length; - ReactDOM.render( - selectedRows.length ? ( - <> - - 取消收藏 - ) : null, - this.uncollRef, - ); - }, - }; - - public renderColumns = (data: ITopic[], type: boolean) => { - const cluster = Object.assign({ - title: '集群名称', - dataIndex: 'clusterName', - key: 'clusterName', - width: '12%', - filters: tableFilter(data, 'clusterName'), - onFilter: (value: string, record: ITopic) => record.clusterName.indexOf(value) === 0, - }, this.renderColumnsFilter(type ? 'filterCollVisible' : 'filterUnCollVisible')); - - const favorite = Object.assign({ - title: '状态', - dataIndex: 'favorite', - key: 'favorite', - filters: [{ text: '已收藏', value: 'true' }, { text: '未收藏', value: 'false' }], - onFilter: (value: string, record: ITopic) => record.favorite + '' === value, - render: (t: boolean) => t ? '已收藏' : '未收藏', - }, this.renderColumnsFilter('filterFavorite')); - - const columns = [ - { - title: 'Topic 名称', - dataIndex: 'topicName', - key: 'topicName', - width: 250, - onCell: () => ({ - style: { - maxWidth: 250, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - sorter: (a: ITopic, b: ITopic) => a.topicName ? a.topicName.charCodeAt(0) - b.topicName.charCodeAt(0) : null, - render: (t: string, r: ITopic) => { - return ( - - {t} - ); - }, - }, - cluster, - { - title: '分区数', - dataIndex: 'partitionNum', - key: 'partitionNum', - width: 120, - sorter: (a: ITopic, b: ITopic) => b.partitionNum - a.partitionNum, - }, - { - title: '流入(KB/s)', - dataIndex: 'byteIn', - key: 'byteIn', - width: 120, - sorter: (a: ITopic, b: ITopic) => b.byteIn - a.byteIn, - render: (t: number) => (t / 1024).toFixed(2), - }, - { - title: '流入(QPS)', - dataIndex: 'produceRequest', - key: 'produceRequest', - width: 120, - sorter: (a: ITopic, b: ITopic) => b.produceRequest - a.produceRequest, - render: (t: number) => t.toFixed(2), - }, - { - title: '负责人', - dataIndex: 'principals', - key: 'principals', - width: 120, - onCell: () => ({ - style: { - maxWidth: 100, - overflow: 'hidden', - whiteSpace: 'nowrap', - textOverflow: 'ellipsis', - cursor: 'pointer', - }, - }), - render: (t: string) => {t}, - sorter: (a: ITopic, b: ITopic) => - a.principals && b.principals ? a.principals.charCodeAt(0) - b.principals.charCodeAt(0) : (-1), - }, - { - title: '修改时间', - dataIndex: 'updateTime', - key: 'updateTime', - width: '15%', - sorter: (a: ITopic, b: ITopic) => a.updateTime - b.updateTime, - render: (t: number) => moment(t).format('YYYY-MM-DD HH:mm:ss'), - }, - favorite, - ]; - if (!type) return columns.splice(0, columns.length - 1); - return columns; - } - - public renderCollection(favData: ITopic[]) { - return ( -
    - ); - } - - public renderList(data: ITopic[]) { - return ( -
    - ); - } - - public componentDidMount() { - if (cluster.data.length === 0) { - cluster.getClustersBasic(); - } - - if (topic.data.length === 0) { - topic.getTopics(); - } - } - - public collect = (selectedRowKeys: ITopic[]) => { - collect(selectedRowKeys.map(s => ({ clusterId: s.clusterId, topicName: s.topicName } as ITopic))).then(() => { - ReactDOM.unmountComponentAtNode(this.collRef); - topic.getTopics(); - notification.success({ message: '收藏成功' }); - }); - } - - public uncollect = (selectedRowKeys: ITopic[]) => { - Modal.confirm({ - title: `确认取消收藏?`, - okText: '确定', - cancelText: '取消', - onOk: () => { - uncollect(selectedRowKeys.map(s => ({ clusterId: s.clusterId, topicName: s.topicName } as ITopic))).then(() => { - ReactDOM.unmountComponentAtNode(this.uncollRef); - notification.success({ message: '取消收藏成功' }); - topic.getTopics(); - }); - }, - }); - } - - public getData(origin: T[]) { - let data: T[] = []; - origin.forEach((d) => { - if (cluster.active === -1 || d.clusterId === cluster.active) { - return data.push(d); - } - }); - const { searchKey } = this.state; - - if (searchKey) { - data = origin.filter((d) => d.topicName.includes(searchKey) || - (d.principals && d.principals.includes(searchKey))); - } - - return data; - } - - public renderTable() { - return ( - - -
    this.uncollRef = id} /> - {this.renderCollection(this.getData(topic.favData))} - - -
    this.collRef = id} /> - {this.renderList(this.getData(topic.data))} - - - ); - } - - public renderClusterTopic() { - return ( - <> - {this.renderCluster()} - {this.renderSearch('请输入Topic名称或者负责人')} - - ); - } - - public render() { - const isAdmin = location.pathname.includes('admin'); - return ( - <> -
      -
    • - {`Topic${isAdmin ? '创建' : '申请'}`} -
    • - {this.renderClusterTopic()} -
    - {this.renderTable()} - - ); - } -} diff --git a/console/src/lib/api.ts b/console/src/lib/api.ts deleted file mode 100644 index d3b9e294..00000000 --- a/console/src/lib/api.ts +++ /dev/null @@ -1,379 +0,0 @@ -import fetch from './fetch'; -import { INewCluster, ITopic, IAlarmBase, IDilation, ITaskBase, IRebalance, IOrderTopic, IUser, ISample, IDeleteTopic, IOffset } from 'types/base-type'; -import { IRegionData } from 'store/region'; - -export const getClusters = (cluster?: number) => { - return fetch(`/clusters${cluster ? '/' + cluster : ''}`); -}; - -export const getTopic = (clusterId?: number, favorite?: boolean) => { - const query = !clusterId && favorite === undefined ? '/topics' : - (clusterId ? `/topics?clusterId=${clusterId}` : `/topics?favorite=${favorite}`); - return fetch(query); -}; - -export const collect = (topicFavoriteList: ITopic[]) => { - return fetch('/topics/favorite', { - body: { - topicFavoriteList, - }, - }); -}; - -export const uncollect = (topicFavoriteList: ITopic[]) => { - return fetch('/topics/favorite', { - method: 'DELETE', - body: { - topicFavoriteList, - }, - }); -}; - -export const getTopicBasicInfo = (topicName: string, clusterId: number) => { - return fetch(`/${clusterId}/topics/${topicName}/basic-info`); -}; - -export const getTopicConsumeInfo = (clusterId: number, topicName: string) => { - return fetch(`/${clusterId}/topics/${topicName}/consumer-groups`); -}; - -export const getConsumeInfo = (clusterId: number) => { - return fetch(`/${clusterId}/consumers/consumer-groups`); -}; - -export const getTopicStatusInfo = (topicName: string, clusterId: number) => { - return fetch(`/${clusterId}/topics/${topicName}/metrics`); -}; - -export const getGroupInfo = (topicName: string, clusterId: number, group: string, location: string) => { - return fetch(`/${clusterId}/consumers/${group}/topics/${topicName}/consume-detail?location=${location}`); -}; - -export const getTopicOrder = () => { - return fetch('/orders/topic'); -}; - -export const getPartitionOrder = () => { - return fetch('/orders/partition'); -}; - -export const getAlarm = () => { - return fetch(`/alarms/alarm-rules`); -}; - -export const createTopic = (params: ITopic) => { - return fetch('/orders/topic', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const getRegions = (clusterId: number) => { - return fetch(`/admin/${clusterId}/regions`); -}; - -export const delRegion = (regionId: number) => { - return fetch(`/admin/regions/${regionId}`, { - method: 'DELETE', - }); -}; - -export const addRegion = (params: IRegionData) => { - return fetch(`/admin/regions/region`, { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const modifyRegion = (params: IRegionData) => { - return fetch(`/admin/regions/region`, { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const topicDilatation = (params: IDilation) => { - return fetch('/admin/utils/topic/dilatation', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const addAlarm = (params: IAlarmBase) => { - return fetch('/alarms/alarm-rule', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const modifyAlarm = (params: IAlarmBase) => { - return fetch('/alarms/alarm-rule', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const deleteAlarm = (alarmRuleId: number) => { - return fetch(`/alarms/alarm-rule?alarmRuleId=${alarmRuleId}`, { - method: 'DELETE', - }); -}; - -export const recallOrder = (orderId: number) => { - return fetch(`/orders/topic?orderId=${orderId}`, { - method: 'DELETE', - }); -}; - -export const getBrokerBaseInfo = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}/basic-info`); -}; - -export const getBrokerList = (clusterId: number) => { - return fetch(`/${clusterId}/brokers/overview`); -}; - -export const getTopicBroker = (clusterId: number, topicName: string) => { - return fetch(`/${clusterId}/topics/${topicName}/brokers`); -}; - -export const getTopicPartition = (clusterId: number, topicName: string) => { - return fetch(`/${clusterId}/topics/${topicName}/partitions`); -}; - -export const getBrokerNetwork = (clusterId: number) => { - return fetch(`/clusters/${clusterId}/metrics`); -}; - -export const getOneBrokerNetwork = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}/metrics`); -}; - -export const getBrokerPartition = (clusterId: number) => { - return fetch(`/${clusterId}/brokers/overall`); -}; - -export const getBrokerTopic = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}/topics`); -}; - -export const getController = (clusterId: number) => { - return fetch(`/clusters/${clusterId}/controller-history`); -}; - -export const getConsumeGroup = (clusterId: number, consumerGroup: string, location: string) => { - return fetch(`/${clusterId}/consumer/${consumerGroup}/topics?location=${location}`); -}; - -export const newCluster = (cluster: INewCluster) => { - return fetch(`/clusters`, { - method: 'POST', - body: JSON.stringify(cluster), - }); -}; - -export const modifyCluster = (cluster: INewCluster) => { - return fetch(`/clusters`, { - method: 'PUT', - body: JSON.stringify(cluster), - }); -}; - -export const getKafkaVersion = () => { - return fetch(`/clusters/kafka-version`); -}; - -export const getClusterMetricsHistory = (clusterId: number, startTime: string, endTime: string) => { - return fetch(`/clusters/${clusterId}/metrics-history?startTime=${startTime}&endTime=${endTime}`); -}; - -export const getPartitions = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}/partitions`); -}; - -export const getBrokerKeyMetrics = (clusterId: number, brokerId: number, startTime: string, endTime: string) => { - return fetch(`/${clusterId}/brokers/${brokerId}/key-metrics?startTime=${startTime}&endTime=${endTime}`); -}; - -export const getTask = (value?: number) => { - return fetch(`/admin/migration/tasks${value ? '/' + value : ''}`); -}; - -export const executeTask = (params: ITaskBase) => { - return fetch('/admin/migration/tasks', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const modifyTask = (params: ITaskBase) => { - return fetch('/admin/migration/tasks', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const getAdminTopicOrder = () => { - return fetch('/admin/orders/topic'); -}; - -export const getAdminPartitionOrder = (orderId?: number) => { - return fetch(`/admin/orders/partition${orderId ? '?orderId=' + orderId : ''}`); -}; - -export const getRebalanceStatus = (clusterId: number) => { - return fetch(`/admin/utils/rebalance/clusters/${clusterId}/status`); -}; - -export const addRebalance = (params: IRebalance) => { - return fetch('/admin/utils/rebalance', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const getBrokerTopicAnalyzer = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}/analysis`); -}; - -export const addTopicApprove = (params: IOrderTopic) => { - return fetch('/admin/orders/topic', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const addAdminPartition = (params: IOrderTopic) => { - return fetch('/admin/orders/partition', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const addPartitionApprove = (params: IOrderTopic) => { - return fetch('/orders/partition', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const getUsers = () => { - return fetch('/admin/accounts'); -}; - -export const addUser = (params: IUser) => { - return fetch('/admin/accounts/account', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const deleteUser = (username: string) => { - return fetch(`/admin/accounts/account?username=${username}`, { - method: 'DELETE', - }); -}; - -export const modifyUser = (params: IUser) => { - return fetch('/admin/accounts/account', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const getLogin = () => { - return fetch('/login/loginPage'); -}; - -export const userLogin = (params: IUser) => { - return fetch('/login/login', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const userLogoff = (value: string) => { - return fetch(`/login/logoff?username=${value}`, { - method: 'POST', - }); -}; - -export const addSample = (params: ISample) => { - const {clusterId, topicName, ...rest} = params; - return fetch(`/${clusterId}/topics/${topicName}/sample`, { - method: 'POST', - body: JSON.stringify(rest), - }); -}; - -export const deleteTopic = (params: IDeleteTopic) => { - return fetch(`/admin/utils/topic`, { - method: 'DELETE', - body: JSON.stringify(params), - }); -}; - -export const modifyTopic = (params: ITopic) => { - return fetch('/admin/utils/topic/config', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const resetOffset = (params: IOffset) => { - return fetch('/consumers/offsets', { - method: 'PUT', - body: JSON.stringify(params), - }); -}; - -export const getClustersBasic = () => { - return fetch('/clusters/basic-info'); -}; - -export const getAlarmConstant = () => { - return fetch('/alarms/alarm/constant'); -}; - -export const getTopicNameById = (clusterId: number) => { - return fetch(`/${clusterId}/topics/topic-names`); -}; - -export const deleteBroker = (clusterId: number, brokerId: number) => { - return fetch(`/${clusterId}/brokers/${brokerId}`, { - method: 'DELETE', - }); -}; - -export const recallPartition = (orderId: number) => { - return fetch(`/orders/partition?orderId=${orderId}`, { - method: 'DELETE', - }); -}; - -export const getBrokerNameList = (clusterId: number) => { - return fetch(`/${clusterId}/brokers/broker-metadata`); -}; - -export const adminCreateTopic = (params: ITopic) => { - return fetch('/admin/utils/topic', { - method: 'POST', - body: JSON.stringify(params), - }); -}; - -export const getAdminTopicDetail = (clusterId: number, topicName: string) => { - return fetch(`/admin/utils/${clusterId}/topics/${topicName}/detail`); -}; - -export const getTopicMetriceInfo = (clusterId: number, topicName: string, startTime: string, endTime: string) => { - return fetch(`/${clusterId}/topics/${topicName}/metrics-history?startTime=${startTime}&endTime=${endTime}`); -}; - -export const getBrokerMetrics = (clusterId: number, brokerId: number, startTime: string, endTime: string) => { - return fetch(`/${clusterId}/brokers/${brokerId}/metrics-history?startTime=${startTime}&endTime=${endTime}`); -}; - -export const getTopicMetaData = (clusterId: number, topicName: string) => { - return fetch(`/${clusterId}/topics/${topicName}/metadata`); -}; diff --git a/console/src/lib/charts-config.ts b/console/src/lib/charts-config.ts deleted file mode 100644 index 3b57654c..00000000 --- a/console/src/lib/charts-config.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { ISeriesOption, IOptionType, IClusterMetrics, IBrokerMetrics, IValueLabel } from 'types/base-type'; -import moment = require('moment'); - -export const getClusterMetricOption = (type: IOptionType, data: IClusterMetrics[]) => { - let name; - let series: ISeriesOption[]; - const date = data.map(i => moment(i.gmtCreate).format('YYYY-MM-DD HH:mm:ss')); - const legend = type === 'byteIn/byteOut' ? ['bytesInPerSec', 'bytesOutPerSec'] : - type === 'messageIn/totalProduceRequests' ? ['messagesInPerSec', 'totalProduceRequestsPerSec'] : [type]; - series = Array.from(legend, (item: IOptionType) => ({ - name: item, - type: 'line', - symbol: 'circle', - data: data.map(i => { - let seriesType = item as keyof IClusterMetrics; - if (type !== 'byteIn/byteOut' && type !== 'messageIn/totalProduceRequests') { - seriesType = item === 'byteRejected' ? 'bytesRejectedPerSec' : 'messagesInPerSec'; - } - return Number(i[seriesType]); - }), - })); - switch (type) { - case 'byteRejected': - name = 'B/s'; - break; - case 'messageIn/totalProduceRequests': - name = 'QPS'; - break; - case 'messageIn': - name = '条'; - break; - default: - if (series.map(i => isMB(i.data)).some(i => i === true)) { - name = 'MB/s'; - series.map(i => {i.data = i.data.map(ele => (ele / (1024 * 1024)).toFixed(2)) as []; }); - } else { - name = 'KB/s'; - series.map(i => {i.data = i.data.map(ele => (ele / 1024).toFixed(2)) as []; }); - } - } - return { - tooltip: { - trigger: 'axis', - padding: 10, - backgroundColor: 'rgba(0,0,0,0.7)', - borderColor: '#333', - textStyle: { - color: '#f3f3f3', - fontSize: '12px', - }, - }, - xAxis: { - boundaryGap: false, - data: date, - }, - legend: { - data: legend, - right: '1%', - top: '10px', - }, - yAxis: { - type: 'value', - name, - nameLocation: 'end', - nameGap: 10, - }, - grid: { - left: '1%', - right: '1%', - bottom: '3%', - top: '40px', - containLabel: true, - }, - series, - }; -}; - -export const getBrokerMetricOption = (charts: IValueLabel[], data: any) => { - const legend: string[] = []; - const seriesData = new Map(); - let date: string[] = []; - const valueData = Object.keys(data).map(item => { - legend.push(item); - return data[item]; - }); - - if (valueData.length) { - date = valueData[0].map((i: IBrokerMetrics) => moment(i.gmtCreate).format('HH:mm:ss')); - } - charts.forEach(item => { - if (!item.value) return false; - seriesData.set(item.value, legend.map((ele, index) => { - return { - name: ele, - type: 'line', - smooth: true, - symbol: 'circle', - data: valueData[index].map((i: IBrokerMetrics) => i[item.value as keyof IBrokerMetrics]), - }; - })); - }); - return charts.map(i => { - if (!i.value) return null; - return { - tooltip: { - trigger: 'axis', - padding: 10, - backgroundColor: 'rgba(0,0,0,0.7)', - borderColor: '#333', - textStyle: { - color: '#f3f3f3', - fontSize: '12px', - }, - }, - xAxis: { - boundaryGap: false, - data: date, - }, - legend: { - data: legend, - right: '1%', - top: '10px', - }, - yAxis: {}, - grid: { - left: '1%', - right: '1%', - bottom: '3%', - top: '40px', - containLabel: true, - }, - series: seriesData.get(i.value), - }; - }); -}; - -function isMB(arr: number[]) { - const filterData = arr.filter(i => i !== 0); - if (filterData.length) return filterData.reduce((cur, pre) => cur + pre) / filterData.length >= 100000; - return false; -} diff --git a/console/src/lib/fetch.ts b/console/src/lib/fetch.ts deleted file mode 100644 index 0be22f53..00000000 --- a/console/src/lib/fetch.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { notification } from 'component/antd'; - -const window = self.window; - -export interface IRes { - code: number; - message: string; - data: any; -} - -const checkStatus = (res: Response) => { - if (res.status === 200 && res.redirected) { - let url = res.url; - - if (!/^http(s)?:\/\//.test(url)) { - url = `${window.location.protocol}//${url}`; - } - - if (url) { - window.location.href = `${url}?jumpto=${encodeURIComponent(window.location.href)}`; - return null; - } - - return res; - } - return res; -}; - -const filter = (init: IInit) => (res: IRes) => { - if (res.code === 401) { - let url = res.data; - - if (!/^http(s)?:\/\//.test(url)) { - url = `${window.location.protocol}//${url}`; - } - - window.location.href = `${url}?jumpto=${encodeURIComponent(window.location.href)}`; - return null; - } - - if (res.code !== 0) { - if (!init.errorNoTips) { - notification.error({ - message: '错误', - description: res.message || '服务器错误,请重试!', - }); - } - throw res; - } - - return res.data; -}; - -const preFix = '/api/v1'; - -interface IInit extends RequestInit { - errorNoTips?: boolean; - body?: BodyInit | null | any; -} - -const csrfTokenMethod = ['POST', 'PUT', 'DELETE']; - -export default function fetch(url: string, init?: IInit) { - if (!init) init = {}; - - if (!init.credentials) init.credentials = 'include'; - if (init.body && typeof init.body === 'object') init.body = JSON.stringify(init.body); - if (init.body && !init.method) init.method = 'POST'; - if (init.method) init.method = init.method.toUpperCase(); - - if (csrfTokenMethod.includes(init.method)) { - init.headers = Object.assign({}, init.headers || { - 'Content-Type': 'application/json', - }); - } - - let realUrl = url; - if (!/^http(s)?:\/\//.test(url)) { - realUrl = `${preFix}${url}`; - } - return window - .fetch(realUrl, init) - .then(res => checkStatus(res)) - .then((res) => res.json()) - .then(filter(init)); -} diff --git a/console/src/lib/utils.ts b/console/src/lib/utils.ts deleted file mode 100644 index e4c6a24e..00000000 --- a/console/src/lib/utils.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { IFiler } from 'types/base-type'; - -export interface IMap { - [index: string]: string; -} -interface ICookie { - key: string; - value?: string; - time?: number; -} -export const getCookie = (key: string): string => { - const map: IMap = {}; - document.cookie.split(';').map((kv) => { - const d = kv.trim().split('='); - map[d[0]] = d[1]; - return null; - }); - return map[key]; -}; - -export const uuid = (): string => { - return 'c' + `${Math.random()}`.slice(2); -}; - -export const getRandomPassword = (len?: number) => { - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - if (len) { - let res = ''; - for (let i = 0; i < len; i++) { - const id = Math.ceil(Math.random() * 62); - res += chars[id]; - } - return res; - } - return Math.ceil(Math.random() * 100000); -}; - -export const setCookie = (cData: ICookie[]) => { - const date = new Date(); - cData.forEach(ele => { - date.setTime(date.getTime() + (ele.time * 24 * 60 * 60 * 1000)); - const expires = 'expires=' + date.toUTCString(); - document.cookie = ele.key + '=' + ele.value + '; ' + expires + '; path=/'; - }); -}; - -export const deleteCookie = (cData: string[]) => { - setCookie(cData.map(i => ({key: i, value: '', time: -1}))); -}; - -export const handleTabKey = (key: string) => { - location.hash = key; -}; - -export const tableFilter = (data: T[], name: keyof T): IFiler[] => { - if (!data) return []; - const obj: any = {}; - return data.reduce((cur, pre) => { - if (!obj[pre[name]]) { - obj[pre[name]] = true; - cur.push({ text: pre[name], value: pre[name] }); - } - return cur; - }, []); -}; diff --git a/console/src/routers/page/admin/index.tsx b/console/src/routers/page/admin/index.tsx deleted file mode 100644 index 2e2d0106..00000000 --- a/console/src/routers/page/admin/index.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from 'react'; - -import 'component/antd'; -import { Header } from 'container/header'; -import { LeftMenu } from 'container/left-menu'; -import AllModalInOne from 'container/modal'; -import { TopicDetail } from 'container/topic-detail'; -import { BrokerDetail } from 'container/broker-detail'; -import { BrokerInfo } from 'container/broker-info'; -import { AdminHome } from 'container/admin-home'; -import AdminTopic from 'container/admin-topic'; -import { BrowserRouter as Router, Route } from 'react-router-dom'; -import { AdminOrder } from 'container/admin-order'; -import urlParser from 'lib/url-parser'; -import urlQuery from 'store/url-query'; -// import { AdminAlarm } from 'container/admin-alarm'; -import { AdminRegion } from 'container/admin-region'; -import { AdminController } from 'container/admin-controller'; -import { AdminConsume } from 'container/admin-consume'; -// import { ConsumerDetail } from 'container/admin-consume/detail'; -import { AdminOperation } from 'container/admin-operation'; -import { UserManage } from 'container/admin-usermanage'; -import ModifyUser from 'container/modify-user'; -import AllDrawerInOne from 'container/drawer'; -import { ClusterDetail } from 'container/admin-home/cluster-detail'; - -export default class Home extends React.Component { - constructor(props: any) { - super(props); - const search = urlParser().search; - urlQuery.clusterId = Number(search.clusterId); - urlQuery.brokerId = Number(search.brokerId); - urlQuery.group = search.group; - urlQuery.location = search.location; - urlQuery.topicName = search.topic; - } - - public render() { - const { match } = this.props; - const page = match.url; - return ( - <> -
    - -
    - -
    - - - - - {/* */} - - - - - - {/* */} - - - - -
    -
    -
    - - - - ); - } -} diff --git a/console/src/routers/page/home/index.tsx b/console/src/routers/page/home/index.tsx deleted file mode 100644 index bce5d649..00000000 --- a/console/src/routers/page/home/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import * as React from 'react'; - -import 'component/antd'; -import './index.less'; -import { Header } from 'container/header'; -import { LeftMenu } from 'container/left-menu'; -import { UserHome } from 'container/user-home'; -import { TopicDetail } from 'container/topic-detail'; -import AllModalInOne from 'container/modal'; -import AllDrawerInOne from 'container/drawer'; -import { MyOrder } from 'container/my-order'; -import { Alarm } from 'container/alarm'; -import { Consumer } from 'container/consumer'; -import ModifyUser from 'container/modify-user'; -import { BrowserRouter as Router, Route } from 'react-router-dom'; - -export default class Home extends React.Component { - - public render() { - const { match } = this.props; - const page = match.url; - return ( - <> -
    - -
    - -
    - - - - - - -
    -
    -
    - - - - ); - } -} diff --git a/console/src/routers/router.tsx b/console/src/routers/router.tsx deleted file mode 100644 index 57b3caf9..00000000 --- a/console/src/routers/router.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; -import { hot } from 'react-hot-loader/root'; -import * as React from 'react'; -import { notification } from 'component/antd'; -import { getCookie } from 'lib/utils'; - -import Home from './page/home'; -import Admin from './page/admin'; -import Login from './page/login'; - -class RouterDom extends React.Component { - public render() { - return ( - - - - - - - - - - - - ); - } -} - -class RouteGuard extends React.Component { - public isLogin = getCookie('username'); - public isAdmin = getCookie('role'); - public render() { - const { component: Component, ...rest } = this.props; - const renderRoute = (props: any) => { - if (!this.isLogin) { - return ; - } else if (this.props.path.indexOf('admin') !== -1 && this.isAdmin === '0') { - notification.error({ message: '暂无权限,请联系管理员' }); - window.history.go(-1); - } else { - return ; - } - }; - return ( - - ); - } -} -export default hot(RouterDom); diff --git a/console/src/store/alarm.ts b/console/src/store/alarm.ts deleted file mode 100644 index 2ab1c6b7..00000000 --- a/console/src/store/alarm.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { observable, action } from 'mobx'; -import { getAlarm, getAlarmConstant } from 'lib/api'; -import { IAlarmBase } from 'types/base-type'; - -export interface IAlarm extends IAlarmBase { - gmtCreate: number; - gmtModify: number; - status: number; - key?: number; -} - -export interface IConstant { - conditionTypeList: []; - ruleTypeList: []; - notifyTypeList: []; - metricTypeList: []; -} - -class Alarm { - @observable - public data: IAlarm[] = []; - - @observable - public alarmConstant: IConstant = null; - - public curData: IAlarm = null; - - public setCurData(data: IAlarm) { - this.curData = data; - } - - @action.bound - public setAlarm(data: IAlarm[]) { - this.data = data.map((d, i) => { - d.key = i; - return d; - }); - } - - @action.bound - public setAlarmConstant(data: IConstant) { - this.alarmConstant = data; - } - - public getAlarm() { - getAlarm().then(this.setAlarm); - } - - public getAlarmConstant() { - getAlarmConstant().then(this.setAlarmConstant); - } -} - -export const alarm = new Alarm(); diff --git a/console/src/store/broker.ts b/console/src/store/broker.ts deleted file mode 100644 index f09470bf..00000000 --- a/console/src/store/broker.ts +++ /dev/null @@ -1,266 +0,0 @@ -import { observable, action } from 'mobx'; -import { getBrokerBaseInfo, getBrokerList, getBrokerNetwork, getBrokerPartition, getOneBrokerNetwork, getBrokerTopic, getPartitions, getBrokerKeyMetrics, getBrokerTopicAnalyzer, getBrokerNameList } from 'lib/api'; -import { IFlowInfo } from 'component/flow-table'; -import { ITopic, IValueLabel } from 'types/base-type'; -import moment from 'moment'; - -export interface IBrokerBaseInfo { - host: string; - jmxPort: number; - leaderCount: number; - partitionCount: number; - port: number; - startTime: number | string; - topicNum: number; -} - -export interface IBroker { - brokerId: number; - byteIn: number; - byteOut: number; - host: string; - jmxPort: number; - port: number; - startTime: number; - status: string; - regionName: string; -} - -export interface IBrokerNetworkInfo extends IFlowInfo { - produceRequest: number[]; - fetchConsumerRequest: number[]; -} - -export interface IBrokerPartition extends IBroker { - leaderCount: number; - partitionCount: number; - notUnderReplicatedPartitionCount: number; - underReplicatedPartitionCount?: number; - regionName: string; - bytesInPerSec: number; -} - -export interface IPartitions { - followerPartitionIdList: number[]; - leaderPartitionList: number[]; - topicName: string; - underReplicated: boolean; - underReplicatedPartitionsIdList: number[]; -} - -export interface ITopicStatus { - BytesOutPerSec_rate: number; - BytesInPerSec_rate: number; -} - -export interface IBrokerMetrics { - bytesIn?: number; - bytesOut?: number; - messagesIn?: number; - totalFetchRequests?: number; - totalProduceRequests?: number; -} - -export interface IAnalyzerData extends IBrokerMetrics { - topicAnalysisVOList: []; - baseTime?: number; - brokerId?: number; -} - -export type IOverviewKey = 'partitionCount' | 'leaderCount' | 'notUnderReplicatedPartitionCount'; - -interface IBrokerOption { - host: string; - brokerId: string; -} - -class Broker { - @observable - public loading: boolean = false; - - @observable - public brokerBaseInfo: IBrokerBaseInfo = {} as IBrokerBaseInfo; - - @observable - public list: IBroker[] = []; - - @observable - public network: IBrokerNetworkInfo = null; - - @observable - public oneNetwork: IBrokerNetworkInfo = null; - - @observable - public partitions: IBrokerPartition[] = []; - - @observable - public topics: ITopic[] = []; - - @observable - public topicPartitionsInfo: [] = []; - - @observable - public openKeys: string[] = []; - - @observable - public realPartitions: IBrokerPartition[] = []; - - @observable - public analyzerData: IAnalyzerData = {topicAnalysisVOList: []}; - - @observable - public viewType: IOverviewKey = 'partitionCount'; - - @observable - public regionOption: any = ['all']; - - @observable - public endTime = moment(); - - @observable - public startTime = moment().subtract(1, 'hour'); - - @observable - public BrokerOptions: IValueLabel[] = [{ value: null, label: '请选择Broker' }]; - - @action.bound - public setLoading(value: boolean) { - this.loading = value; - } - - @action.bound - public setBrokerBaseInfo(data: IBrokerBaseInfo) { - data.startTime = moment(data.startTime).format('YYYY-MM-DD HH:mm:ss'), - this.brokerBaseInfo = data; - } - - @action.bound - public setBrokerList(list: IBroker[]) { - this.list = list; - } - - @action.bound - public setBrokerNetWork(network: IBrokerNetworkInfo) { - if (!network) return false; - this.network = network; - } - - @action.bound - public setBrokerPartition(pars: IBrokerPartition[]) { - const res = new Map(); - this.partitions = pars.map(i => { - i.status = i.notUnderReplicatedPartitionCount ? '是' : '否'; - return i; - }); - this.realPartitions = pars; - this.regionOption = pars.filter((a) => !res.has(a.regionName) && res.set(a.regionName, 1)); - } - - @action.bound - public setOneBrokerNetwork(network: IBrokerNetworkInfo) { - this.oneNetwork = network; - } - - @action.bound - public setBrokerTopic(topics: ITopic[]) { - this.topics = topics; - } - - @action.bound - public setPartitionsInfo(pI: []) { - this.topicPartitionsInfo = pI; - } - - @action.bound - public handleOpen(key: string) { - if (this.openKeys.includes(key)) { - this.openKeys = this.openKeys.filter(k => k !== key); - } else { - this.openKeys.push(key); - this.openKeys = this.openKeys.slice(0); - } - } - - @action.bound - public handleOverview(type: IOverviewKey) { - this.viewType = type; - } - - @action.bound - public filterSquare(type: string) { - this.realPartitions = this.partitions; - if (type !== 'all') { - this.realPartitions = this.partitions.filter(i => i.regionName === type); - } - } - - @action.bound - public setBrokerTopicAnalyzer(data: IAnalyzerData) { - for (const item of Object.keys(data)) { - if (item === 'bytesIn' || item === 'bytesOut') data[item] = +(data[item] / (1024 * 1024)).toFixed(2); - } - this.analyzerData = data; - } - - @action.bound - public changeStartTime(value: moment.Moment) { - this.startTime = value; - } - - @action.bound - public changeEndTime(value: moment.Moment) { - this.endTime = value; - } - - @action.bound - public setBrokerOptions(data: IBrokerOption[]) { - this.BrokerOptions = data.map(i => ({ - label: `BrokerID: ${i.brokerId}, Host: ${i.host}`, - value: i.brokerId, - })); - } - - public getBrokerBaseInfo(clusterId: number, brokerId: number) { - getBrokerBaseInfo(clusterId, brokerId).then(this.setBrokerBaseInfo); - } - - public getBrokerList(clusterId: number) { - this.setLoading(true); - getBrokerList(clusterId).then(this.setBrokerList).finally(() => this.setLoading(false)); - } - - public getBrokerNetwork(clusterId: number) { - getBrokerNetwork(clusterId).then(this.setBrokerNetWork); - } - - public getBrokerPartition(clusterId: number) { - this.setLoading(true); - getBrokerPartition(clusterId).then(this.setBrokerPartition).finally(() => this.setLoading(false)); - } - - public getOneBrokerNetwork(clusterId: number, brokerId: number) { - getOneBrokerNetwork(clusterId, brokerId).then(this.setOneBrokerNetwork); - } - - public getBrokerTopic(clusterId: number, brokerId: number) { - getBrokerTopic(clusterId, brokerId).then(this.setBrokerTopic); - } - - public getPartitions(clusterId: number, brokerId: number) { - getPartitions(clusterId, brokerId).then(this.setPartitionsInfo); - } - - public getBrokerKeyMetrics(clusterId: number, brokerId: number, startTime: string, endTime: string) { - return getBrokerKeyMetrics(clusterId, brokerId, startTime, endTime); - } - - public getBrokerTopicAnalyzer(clusterId: number, brokerId: number) { - getBrokerTopicAnalyzer(clusterId, brokerId).then(this.setBrokerTopicAnalyzer); - } - - public initBrokerOptions = (clusterId: number) => { - getBrokerNameList(clusterId).then(this.setBrokerOptions); - } -} - -export const broker = new Broker(); diff --git a/console/src/store/cluster.ts b/console/src/store/cluster.ts deleted file mode 100644 index 34e957bd..00000000 --- a/console/src/store/cluster.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { observable, action } from 'mobx'; -import { getClusters, getKafkaVersion, getClusterMetricsHistory, getRebalanceStatus, getClustersBasic, getTopicMetriceInfo, getBrokerMetrics } from 'lib/api'; -import { getClusterMetricOption } from 'lib/charts-config'; -import { IClusterData, IClusterMetrics, IOptionType } from 'types/base-type'; - -import moment from 'moment'; - -class Cluster { - @observable - public data: IClusterData[] = []; - - @observable - public active: number = null; - - @observable - public kafkaVersions: string[] = []; - - @observable - public startTime: moment.Moment; - - @observable - public endTime: moment.Moment; - - @observable - public clusterMetrics: IClusterMetrics[] = []; - - @observable - public leaderStatus: string = ''; - - @observable - public type: IOptionType = 'byteIn/byteOut' ; - - @action.bound - public setData(data: IClusterData[]) { - data.unshift({ - clusterId: -1, - clusterName: '所有集群', - } as IClusterData); - this.data = data; - this.active = (this.data[0] || { clusterId: null }).clusterId; - } - - @action.bound - public changeCluster(data: number) { - this.active = data; - } - - @action.bound - public setKafkaVersion(data: string[]) { - this.kafkaVersions = data; - } - - @action.bound - public setChartsOpton(data: IClusterMetrics[]) { - this.clusterMetrics = data; - return this.changeType(this.type); - } - - @action.bound - public changeType(type: IOptionType) { - cluster.type = type; - return getClusterMetricOption(type, this.clusterMetrics); - } - - @action.bound - public changeStartTime(value: moment.Moment) { - this.startTime = value; - } - - @action.bound - public changeEndTime(value: moment.Moment ) { - this.endTime = value; - } - - @action.bound - public initTime() { - this.startTime = moment().subtract(1, 'hour'); - this.endTime = moment(); - } - - @action.bound - public setLeaderStatus(type: string) { - this.leaderStatus = type; - } - - public getClusters() { - getClusters().then(this.setData); - } - - public getClustersBasic() { - getClustersBasic().then(this.setData); - } - - public getKafkaVersions() { - getKafkaVersion().then(this.setKafkaVersion); - } - - public getClusterMetricsHistory(clusterId: number) { - return getClusterMetricsHistory(clusterId, - this.startTime.format('x'), - this.endTime.format('x')).then(this.setChartsOpton); - } - - public getMetriceInfo(clusterId: number, topicName: string) { - return getTopicMetriceInfo(clusterId, topicName, - this.startTime.format('x'), - this.endTime.format('x')).then(this.setChartsOpton); - } - - public getRebalance(clusterId: number) { - return getRebalanceStatus(clusterId).then((type) => { - this.setLeaderStatus(type); - if (type === 'RUNNING') { - window.setTimeout(() => { - this.getRebalance(clusterId); - }, 1000 * 2); - } - }); - } - - public getBrokerMetrics(clusterId: number, brokerId: number) { - return getBrokerMetrics(clusterId, brokerId, - this.startTime.format('x'), - this.endTime.format('x')).then(this.setChartsOpton); - } -} - -export const cluster = new Cluster(); diff --git a/console/src/store/controller.ts b/console/src/store/controller.ts deleted file mode 100644 index c102b43a..00000000 --- a/console/src/store/controller.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { observable, action } from 'mobx'; -import { getController } from 'lib/api'; - -export interface IController { - brokerId: number; - controllerTimestamp: number; - controllerVersion: number; - host: string; -} - -class Controller { - @observable - public data: IController[] = []; - - @action.bound - public setData(data: IController[]) { - this.data = data; - } - - public getController(clusterId: number) { - getController(clusterId).then(this.setData); - } -} - -export const controller = new Controller(); diff --git a/console/src/store/drawer.ts b/console/src/store/drawer.ts deleted file mode 100644 index 8dcd30de..00000000 --- a/console/src/store/drawer.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { observable, action } from 'mobx'; - -class Drawer { - @observable - public id: string = null; - - @observable - public topicData: any = null; - - @observable - public offsetDetail: any = null; - - @action.bound - public showResetOffset(r: any) { - this.id = 'showResetOffset'; - this.offsetDetail = r; - } - - @action.bound - public showTopicSample({ clusterId, topicName }: any) { - this.id = 'showTopicSample'; - this.topicData = { clusterId, topicName }; - } - - @action.bound - public close() { - this.id = null; - } -} - -export const drawer = new Drawer(); diff --git a/console/src/store/modal.ts b/console/src/store/modal.ts deleted file mode 100644 index e6098e69..00000000 --- a/console/src/store/modal.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { observable, action } from 'mobx'; -import { alarm, IAlarm } from './alarm'; -import { IRegionData } from './region'; -import { operation, ITask } from './operation'; -import { IClusterData, IBaseOrder, ITopic } from 'types/base-type'; -import { getAdminPartitionOrder, getAdminTopicDetail } from 'lib/api'; -import { IUserDetail } from './users'; -import { topic, IConsumeInfo } from './topic'; - -class Modal { - @observable - public id: string = null; - - @observable - public orderDetail: IBaseOrder = {} as IBaseOrder; - - @observable - public topicData: ITopic = null; - - public topicDetail: IBaseOrder = null; - public regionData: IRegionData = null; - public currentCluster: IClusterData = {} as IClusterData; - public userDetail: IUserDetail = null; - public consumberGroup: IConsumeInfo = null; - - @action.bound - public showNewTopic(r: ITopic) { - this.topicData = r; - this.id = 'showNewTopic'; - } - - @action.bound - public showNewCluster() { - this.id = 'showNewCluster'; - } - - @action.bound - public showModifyCluster(cluster: IClusterData) { - this.id = 'showModifyCluster'; - this.currentCluster = cluster; - } - - @action.bound - public setTopic(data: ITopic) { - this.topicData = data; - } - - @action.bound - public showAdimTopic(r: ITopic) { - this.id = 'showAdimTopic'; - this.topicData = r; - if (r) { - getAdminTopicDetail(r.clusterId, r.topicName).then(this.setTopic); - topic.getTopicMetaData(r.clusterId, r.topicName); - } - } - - @action.bound - public showAlarm(r: IAlarm) { - alarm.setCurData(r); - this.id = 'showAlarm'; - } - - @action.bound - public showRegion(r: IRegionData) { - this.id = 'showRegion'; - this.regionData = r; - } - - @action.bound - public showExpandTopic(data: IBaseOrder) { - this.topicDetail = data; - this.id = 'showExpandTopic'; - } - - @action.bound - public showExpandAdmin(data: IBaseOrder) { - this.topicDetail = data; - this.id = 'showExpandAdmin'; - } - - @action.bound - public showResetOffset() { - this.id = 'showResetOffset'; - } - - @action.bound - public showLeaderRebalance() { - this.id = 'showLeaderRebalance'; - } - - @action.bound - public showTask(value: ITask, type?: string) { - this.id = type === 'detail' ? 'showTaskDetail' : 'showTask'; - value ? operation.getTaskDetail(value.taskId) : operation.setTaskDetail(value); - } - - @action.bound - public showOrderApprove(value: any, type: string) { - this.id = type === 'showOrderApprove' ? 'showOrderApprove' : 'showOrderDetail'; - this.orderDetail = value; - } - - @action.bound - public setDetail(data: any) { - if (data[0]) this.orderDetail = data[0]; - } - - @action.bound - public showPartition(value: any, type: string) { - this.orderDetail = value; - this.id = type === 'showPartition' ? 'showPartition' : 'showPartitionDetail'; - getAdminPartitionOrder(value.orderId).then(this.setDetail); - } - - @action.bound - public showNewUser(data: IUserDetail) { - this.userDetail = data; - this.id = 'showNewUser'; - } - - @action.bound - public shoeTopicConfig(data: IBaseOrder) { - this.topicDetail = data; - this.id = 'shoeTopicConfig'; - } - - @action.bound - public showAlarmModify(r: IAlarm) { - alarm.setCurData(r); - this.id = 'showAlarmModify'; - } - - @action.bound - public showConsumerTopic(r: IConsumeInfo) { - this.consumberGroup = r; - this.id = 'showConsumerTopic'; - } - - @action.bound - public close() { - this.id = null; - this.currentCluster = {} as IClusterData; - } -} - -export const modal = new Modal(); diff --git a/console/src/store/operation.ts b/console/src/store/operation.ts deleted file mode 100644 index 9152342d..00000000 --- a/console/src/store/operation.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { observable, action } from 'mobx'; -import { getTask, getRegions } from 'lib/api'; -import { ITaskBase } from 'types/base-type'; - -interface IReassign { - [propname: string]: number[]; -} - -interface IMigration { - [index: string]: number; -} - -export const taskMap = ['待执行', '执行中', '迁移成功', '迁移失败', '已撤销']; - -export interface ITask extends ITaskBase { - clusterName: string; - gmtCreate: number; - operator: string; - reassignmentMap?: IReassign; - migrationStatus?: IMigration; - regionList?: Array<[string, number[]]>; -} - -class Operation { - @observable - public tasks: ITask[] = null; - - @observable - public taskDetail: ITask = null; - - @observable - public RegionOptions: any[] = ['请选择集群']; - - @action.bound - public setTask(data: ITask[]) { - this.tasks = data; - } - - @action.bound - public setTaskDetail(data: ITask) { - if (data) data.regionList = Object.keys(data.reassignmentMap).map(i => [i, data.reassignmentMap[i]]); - this.taskDetail = data; - } - - @action.bound - public setRegionOptions(data: any) { - this.RegionOptions = data.map((i: any) => ({ - value: i.regionId, - label: i.regionName, - })); - } - - public getTask() { - getTask().then(this.setTask); - } - - public initRegionOptions = (clusterId: number) => { - getRegions(clusterId).then(this.setRegionOptions); - } - - public getTaskDetail(value: number) { - getTask(value).then(this.setTaskDetail); - } -} - -export const operation = new Operation(); diff --git a/console/src/store/order.ts b/console/src/store/order.ts deleted file mode 100644 index 811a17bc..00000000 --- a/console/src/store/order.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { observable, action } from 'mobx'; -import { getTopicOrder, getPartitionOrder, getAdminTopicOrder, getAdminPartitionOrder } from 'lib/api'; -import { IBaseOrder } from 'types/base-type'; - -const statusMap = ['待审批', '通过', '拒绝', '撤销']; -export const tableStatusFilter = statusMap.map(i => ({text: i, value: i})); - -export interface IPartitionOrder extends IBaseOrder { - peakAvgBytesInPerSec: number; -} - -class Order { - @observable - public topicOrder: IBaseOrder[] = []; - - @observable - public partitionOrder: IPartitionOrder[] = []; - - @observable - public adminTopicOrder: IBaseOrder[] = []; - - @observable - public adminPartitionOrder: IPartitionOrder[] = []; - - @observable - public pendingTopic: number = 0; - - @observable - public pendingOrder: number = 0; - - @action - public mapData(data: any, type?: 'pendingTopic' | 'pendingOrder') { - this[type] = 0; - return data.map((d: any) => { - if (!d.orderStatus) this[type] += 1; - d.statusStr = statusMap[d.orderStatus]; - d.key = d.orderId; - return d; - }); - } - - @action.bound - public setTopicOrder(data: IBaseOrder[]) { - this.topicOrder = this.mapData(data); - } - - @action.bound - public setPartitionOrder(data: IPartitionOrder[]) { - this.partitionOrder = this.mapData(data); - } - - @action.bound - public setAdiminTopicOrder(data: IBaseOrder[]) { - this.adminTopicOrder = this.mapData(data, 'pendingTopic'); - } - - @action.bound - public setAdminPartitionOrder(data: IPartitionOrder[]) { - this.adminPartitionOrder = this.mapData(data, 'pendingOrder'); - } - - public getOrder() { - getTopicOrder().then(this.setTopicOrder); - getPartitionOrder().then(this.setPartitionOrder); - } - - public getAdminOrder() { - getAdminTopicOrder().then(this.setAdiminTopicOrder); - getAdminPartitionOrder().then(this.setAdminPartitionOrder); - } -} - -export const order = new Order(); diff --git a/console/src/store/region.ts b/console/src/store/region.ts deleted file mode 100644 index 4c41e1e9..00000000 --- a/console/src/store/region.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { observable, action } from 'mobx'; -import { getRegions, delRegion } from 'lib/api'; - -export const statusMap = ['废弃', '正常', '容量已满']; -export const levelMap = ['普通', '重要']; -export interface IRegionData { - brokerIdList: number[]; - clusterId: number; - description: string; - gmtCreate: number; - gmtModify: number; - level: number; - regionId: number; - regionName: string; - status: number; -} - -class Region { - @observable - public data: IRegionData[] = []; - - @action.bound - public setData(data: IRegionData[]) { - this.data = data; - } - - public getRegions(clusterId: number) { - getRegions(clusterId).then(this.setData); - } - - public delRegion(regionId: number) { - return delRegion(regionId); - } -} - -export const region = new Region(); diff --git a/console/src/store/topic.ts b/console/src/store/topic.ts deleted file mode 100644 index 3ee2489e..00000000 --- a/console/src/store/topic.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { observable, action } from 'mobx'; -import { getTopic, getTopicBasicInfo, getTopicConsumeInfo, getTopicStatusInfo, getGroupInfo, getConsumeGroup, addSample, getTopicBroker, getTopicPartition, getTopicNameById, getTopicMetaData } from 'lib/api'; -import { IFlowInfo } from 'component/flow-table'; -import urlQuery from './url-query'; -import { ITopic, IOffset, ISample } from 'types/base-type'; - -export interface ITopicBaseInfo { - brokerNum: number; - createTime: string; - description: string; - modifyTime: string; - partitionNum: number; - principals: string; - regionNames: string; - replicaNum: number; - retentionTime: number; - topicName: string; -} - -export interface IConsumeInfo { - location: string; - consumerGroup: string; - clusterId?: number; - key?: string; -} - -export interface ITopicStatusInfo extends IFlowInfo { - totalProduceRequest: number[]; -} - -export interface IGroupInfo { - clientId: string; - clusterId: number; - consumeOffset: number; - consumerGroup: string; - lag: number; - location: string; - partitionId: number; - partitionOffset: number; - topicName: string; - key?: string; -} - -export interface ITopicBroker { - brokerId: number; - host: string; - leaderPartitionIdList: number[]; - partitionIdList: number[]; - partitionNum: number; -} - -export interface ITopicPartition { - isrBrokerIdList: number[]; - leaderBrokerId: number; - leaderEpoch: number; - offset: number; - partitionId: number; - preferredBrokerId: number; - replicaBrokerIdList: number[]; - underReplicated: boolean; -} - -export interface IAdminExpand { - brokerIdList: number[]; - clusterId: number; - partitionNum: number; - replicaNum: number; - topicName: string; -} - -class Topic { - @observable - public data: ITopic[] = []; - - @observable - public favData: ITopic[] = []; - - @observable - public comsumeTopics: string[] = []; - - @observable - public baseInfo: ITopicBaseInfo = null; - - @observable - public consumeInfo: IConsumeInfo[] = []; - - @observable - public groupInfo: IGroupInfo[] = []; - - @observable - public statusInfo: ITopicStatusInfo = null; - - @observable - public sampleData: ISample[] = null; - - @observable - public topicBrokers: ITopicBroker[] = []; - - @observable - public topicPartitions: ITopicPartition[] = []; - - @observable - public topicNameList: string[] = []; - - @observable - public topicDetail: IAdminExpand = null; - - public currentTopicName = ''; - public currentClusterId: number = null; - public currentGroup: IOffset = null; - - @action.bound - public setData(data: ITopic[]) { - this.data = data.map((i, index) => { - i.key = index; - return i; - }); - } - - @action.bound - public setFavData(data: ITopic[]) { - this.favData = data.map((i, index) => { - i.key = index; - return i; - }); - } - - @action.bound - public setTopicBaseInfo(data: ITopicBaseInfo) { - this.baseInfo = data; - } - - @action.bound - public setTopicConsumeInfo(data: IConsumeInfo[]) { - this.consumeInfo = data.map(d => { - d.key = d.consumerGroup; - return d; - }); - } - - @action.bound - public setTopicStatusInfo(data: ITopicStatusInfo) { - this.statusInfo = data; - } - - @action.bound - public setGroupInfo(data: IGroupInfo[]) { - this.groupInfo = data.map(d => { d.key = d.clientId; return d; }); - } - - @action.bound - public setComsumeTopics(topics: string[]) { - this.comsumeTopics = topics; - } - - @action.bound - public setSampleData(data: ISample[]) { - this.sampleData = data; - } - - @action.bound - public setTopicBrokers(tb: ITopicBroker[]) { - this.topicBrokers = tb; - } - - @action.bound - public setTopicPartitions(tp: ITopicPartition[]) { - this.topicPartitions = tp; - } - - @action.bound - public setTopicNameList(data: string[]) { - this.topicNameList = data; - } - - @action.bound - public setTopicDetail(data: IAdminExpand) { - this.topicDetail = data; - } - - public setCurrent({ topicName, clusterId }: ITopic) { - this.currentTopicName = topicName; - this.currentClusterId = clusterId; - } - - public getTopics() { - getTopic(null, false).then(this.setData); - getTopic(null, true).then(this.setFavData); - } - - public getAdminTopics(clusterId: number) { - getTopic(clusterId).then(this.setData); - } - - public getTopicBasicInfo(topic: string, clusterId: number) { - getTopicBasicInfo(topic, clusterId).then(this.setTopicBaseInfo); - } - - public getTopicConsumeInfo(clusterId: number, topicName: string) { - getTopicConsumeInfo(clusterId, topicName).then(this.setTopicConsumeInfo); - } - - public getTopicStatusInfo(topic: string, clusterId: number) { - this.currentTopicName = topic; - this.currentClusterId = clusterId; - getTopicStatusInfo(topic, clusterId).then(this.setTopicStatusInfo); - } - - public getGroupInfo(topicName: string, clusterId: number, consumerGroup: string, location: string) { - this.currentGroup = { topicName, clusterId, consumerGroup, location: location.toLowerCase() }; - getGroupInfo(topicName, clusterId, consumerGroup, location).then(this.setGroupInfo); - } - - public getConsumeGroup(group: string, location: string) { - return getConsumeGroup(urlQuery.clusterId, group, location).then(this.setComsumeTopics); - } - - public addSample(params: ISample) { - return addSample(params).then(this.setSampleData); - } - - public getTopicBroker(clusterId: number, topicName: string) { - return getTopicBroker(clusterId, topicName).then(this.setTopicBrokers); - } - - public getTopicPartition(clusterId: number, topicName: string) { - return getTopicPartition(clusterId, topicName).then(this.setTopicPartitions); - } - - public getTopicList = (value: number) => { - getTopicNameById(value).then(this.setTopicNameList); - } - - public getTopicMetaData = (clusterId: number, topicName: string) => { - getTopicMetaData(clusterId, topicName).then(this.setTopicDetail); - } -} - -export const topic = new Topic(); diff --git a/console/src/store/users.ts b/console/src/store/users.ts deleted file mode 100644 index 0a74bd39..00000000 --- a/console/src/store/users.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { observable, action } from 'mobx'; -import { getUsers } from 'lib/api'; - -export interface IUserDetail { - password: number; - role: number; - username: string; -} - -export class Users { - public roleMap = ['普通用户', '运维人员', '管理员']; - public filterRole = this.roleMap.map(i => ({ text: i, value: i })); - - @observable - public userData: IUserDetail[] = []; - - @action.bound - public setUserData(data: []) { - this.userData = data.map((d: any) => { - d.roleName = this.roleMap[d.role]; - return d; - }); - } - - public mapRole(role: number) { - return this.roleMap[role]; - } - - public getUsers() { - getUsers().then(this.setUserData); - } -} - -export const users = new Users(); diff --git a/console/src/types/base-type.ts b/console/src/types/base-type.ts deleted file mode 100644 index c9589318..00000000 --- a/console/src/types/base-type.ts +++ /dev/null @@ -1,218 +0,0 @@ -export interface INewCluster { - alarmFlag: number; - bootstrapServers: string; - clusterId: number; - clusterName: string; - kafkaVersion: string; - saslJaasConfig: string; - saslMechanism: string; - securityProtocol: string; - zookeeper: string; -} - -export interface IClusterData { - bootstrapServers: string; - brokerNum: number; - clusterId: number; - clusterName: string; - controllerId: number; - consumerGroupNum: number; - gmtCreate: string; - gmtModify: string; - kafkaVersion: string; - regionNum: number; - status: number; - topicNum: number; - zookeeper: string; - alarmFlag: number; - saslJaasConfig: string; - saslMechanism: string; - securityProtocol: string; -} - -export interface ISeriesOption { - name: string; - type: string; - data: number[]; -} - -export interface IClusterMetrics { - gmtCreate: number; - bytesInPerSec: number; - bytesOutPerSec: number; - bytesRejectedPerSec: number; - messagesInPerSec: number; -} - -export interface IBrokerMetrics { - requestHandlerIdlPercent: number; - networkProcessorIdlPercent: number; - requestQueueSize: number; - responseQueueSize: number; - logFlushTime: number; - failFetchRequest: number; - failProduceRequest: number; - totalTimeProduceMean: number; - totalTimeProduce99Th: number; - totalTimeFetchConsumerMean: number; - totalTimeFetchConsumer99Th: number; - gmtCreate: number; -} - -export interface IValueLabel { - value: string; - label: string; -} - -export type IOptionType = 'byteIn/byteOut' | 'byteRejected' | 'messageIn' | 'messageIn/totalProduceRequests'; - -export interface ITaskDetail { - clusterId: number; - operator: number; - throttle: number; - topicName: string; - brokerIdList: number[]; -} - -interface IBase { - clusterId: number; - clusterName: string; - topicName: string; - principals: string; - description: string; - brokerIdList: string[]; - partitionNum: number; -} - -export interface IBaseOrder extends IBase { - peakBytesInPerSec: number; - orderId: number; - gmtModify: number; - gmtCreate: number; - orderStatus: number; - approver: string; - approvalOpinions: string; - applicant: string; - predictBytesIn: number; - realBytesIn: number; - regionBrokerIdList: any[]; - regionNameList: string[]; - statusStr?: string; - replicaNum?: number; - retentionTime?: number; - peakBytesIn?: number; - regions?: string; - brokers?: string; -} - -export interface ITopic extends IBase { - brokerNum: number; - byteIn: number; - byteOut: number; - favorite: boolean; - messageIn: number; - produceRequest: number; - replicaNum: number; - updateTime: number; - principalList: string[]; - properties: string; - regionIdList: number[]; - retentionTime: number; - peakBytesIn: number; - key?: number; -} - -export interface IFiler { - text: string; - value: string; -} - -export interface IDilation { - brokerIdList: number[]; - clusterId: number; - partitionNum: number; - regionIdList: number[]; - topicName: string; -} - -export interface IAlarmBase { - alarmName: string; - id?: number; - strategyExpressionList: IExpressionList[]; - strategyFilterList: IStrategyFilter[]; - strategyActionList: IActionList[]; - principalList: string[]; - status: number; -} - -export interface IExpressionList { - metric: string; - opt: string; - threshold: number; - duration: number; -} -export interface IStrategyFilter { - key: string | string[]; - value: string; -} - -export interface IActionList { - actionWay: string; - actionTag: string; -} -export interface ITaskBase { - taskId: number; - clusterId?: number; - topicName?: string; - status?: number; - throttle?: number; - partitionIdList?: string[]; - brokerIdList?: number[]; - description?: string; - action: string; -} - -export interface IRebalance { - brokerId: number; - clusterId: number; - dimension: number; -} - -export interface IOrderTopic { - orderId: number; - orderStatus: number; - retentionTime: number; - regionIdList: number[]; - brokerIdList: number[]; - approvalOpinions: string; - partitionNum: number; - replicaNum: number; -} - -export interface IUser { - password: string; - role: string; - username: string; - oldPassword: string; -} - -export interface ISample { - maxMsgNum: number; - offset: number; - partitionId: number; - clusterId: number; - topicName: string; -} - -export interface IDeleteTopic { - clusterId: number; - topicNameList: string[]; -} - -export interface IOffset { - clusterId: number; - consumerGroup: string; - location: string; - offsetList?: []; - topicName: string; -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/AlarmRuleDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/AlarmRuleDao.java deleted file mode 100644 index 4f98264e..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/AlarmRuleDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.AlarmRuleDO; - -import java.util.List; - -public interface AlarmRuleDao { - int insert(AlarmRuleDO alarmRuleDO); - - int deleteById(Long id); - - int updateById(AlarmRuleDO alarmRuleDO); - - AlarmRuleDO getById(Long id); - - List listAll(); -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/MigrationTaskDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/MigrationTaskDao.java deleted file mode 100644 index 692c38cc..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/MigrationTaskDao.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.MigrationTaskDO; - -import java.util.List; - -/** - * migrate topic task dao - * @author zengqiao_cn@163.com - * @date 19/4/16 - */ -public interface MigrationTaskDao { - - /** - * 增加一个迁移任务 - */ - int addMigrationTask(MigrationTaskDO migrationTaskDO); - - /** - * 查询迁移任务 - */ - MigrationTaskDO getById(Long id); - - /** - * 查询所有的迁移任务 - */ - List listAll(); - - /** - * 查询所有的迁移任务 - */ - List getByStatus(Integer status); - - /** - * 修改任务 - */ - int updateById(Long id, Integer status, Long throttle); -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OperationHistoryDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OperationHistoryDao.java deleted file mode 100644 index fd127256..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OperationHistoryDao.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.OperationHistoryDO; - -/** - * @author arthur - * @date 2017/7/20. - */ -public interface OperationHistoryDao { - int insert(OperationHistoryDO operationHistoryDO); -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderPartitionDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderPartitionDao.java deleted file mode 100644 index 335c207b..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderPartitionDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.OrderPartitionDO; - -import java.util.List; - -public interface OrderPartitionDao { - int insert(OrderPartitionDO orderPartitionDO); - - int deleteById(Long id); - - int updateById(OrderPartitionDO orderPartitionDO); - - OrderPartitionDO getById(Long id); - - List list(); -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderTopicDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderTopicDao.java deleted file mode 100644 index 61b5e1c0..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/OrderTopicDao.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.OrderTopicDO; - -import java.util.List; - -public interface OrderTopicDao { - int insert(OrderTopicDO orderTopicDO); - - int deleteById(Long id); - - int updateById(OrderTopicDO orderTopicDO); - - OrderTopicDO getById(Long id); - - List list(); - - List getByUsername(String username); -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/TopicFavoriteDao.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/TopicFavoriteDao.java deleted file mode 100644 index 8810364d..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/TopicFavoriteDao.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao; - -import com.xiaojukeji.kafka.manager.common.entity.po.TopicFavoriteDO; - -import java.util.List; - -public interface TopicFavoriteDao { - int batchAdd(List topicFavoriteDOList); - - Boolean batchDelete(List idList); - - List getByUserName(String username); - - List getByUserNameAndClusterId(String username, Long clusterId); -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/AlarmRuleDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/AlarmRuleDaoImpl.java deleted file mode 100644 index d7fb6332..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/AlarmRuleDaoImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.AlarmRuleDO; -import com.xiaojukeji.kafka.manager.common.entity.po.query.AlarmRuleQueryOption; -import com.xiaojukeji.kafka.manager.dao.AlarmRuleDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @author zengqiao - * @date 19/6/23 - */ -@Repository("alarmRuleDao") -public class AlarmRuleDaoImpl implements AlarmRuleDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int insert(AlarmRuleDO alarmRuleDO) { - return sqlSession.insert("AlarmRuleDao.insert", alarmRuleDO); - } - - @Override - public int deleteById(Long id) { - return sqlSession.delete("AlarmRuleDao.deleteById", id); - } - - @Override - public int updateById(AlarmRuleDO alarmRuleDO) { - return sqlSession.update("AlarmRuleDao.updateById", alarmRuleDO); - } - - @Override - public AlarmRuleDO getById(Long id) { - AlarmRuleQueryOption alarmRuleQueryOption = new AlarmRuleQueryOption(); - alarmRuleQueryOption.setId(id); - List alarmRuleDOList = sqlSession.selectList("AlarmRuleDao.getByOption", alarmRuleQueryOption); - if (alarmRuleDOList == null || alarmRuleDOList.isEmpty()) { - return null; - } - return alarmRuleDOList.get(0); - } - - @Override - public List listAll() { - return sqlSession.selectList("AlarmRuleDao.getByOption", new AlarmRuleQueryOption()); - } -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/KafkaManagerProperties.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/KafkaManagerProperties.java deleted file mode 100644 index d762c4ce..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/KafkaManagerProperties.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -@Component -@ConfigurationProperties("spring.datasource.kafka-manager") -public class KafkaManagerProperties { - private String jdbcUrl; - - public String getJdbcUrl() { - return jdbcUrl; - } - - public void setJdbcUrl(String jdbcUrl) { - this.jdbcUrl = jdbcUrl; - } - - public boolean hasPG() { - return jdbcUrl.startsWith("jdbc:postgres"); - } -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/MigrationTaskDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/MigrationTaskDaoImpl.java deleted file mode 100644 index a537c7ae..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/MigrationTaskDaoImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.MigrationTaskDO; -import com.xiaojukeji.kafka.manager.dao.MigrationTaskDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * migrate topic task dao - * @author zengqiao_cn@163.com - * @date 19/4/16 - */ -@Repository("migrationTaskDao") -public class MigrationTaskDaoImpl implements MigrationTaskDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int addMigrationTask(MigrationTaskDO migrationTaskDO) { - return sqlSession.insert("MigrationTaskDao.addMigrationTask", migrationTaskDO); - } - - @Override - public MigrationTaskDO getById(Long id) { - return sqlSession.selectOne("MigrationTaskDao.getById", id); - } - - @Override - public List listAll() { - return sqlSession.selectList("MigrationTaskDao.listAll"); - } - - @Override - public List getByStatus(Integer status) { - return sqlSession.selectList("MigrationTaskDao.getByStatus", status); - } - - @Override - public int updateById(Long id, Integer status, Long throttle) { - Map params = new HashMap<>(); - params.put("id", id); - params.put("status", status); - params.put("throttle", throttle); - return sqlSession.update("MigrationTaskDao.updateById", params); - } -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OperationHistoryDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OperationHistoryDaoImpl.java deleted file mode 100644 index 23015526..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OperationHistoryDaoImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.OperationHistoryDO; -import com.xiaojukeji.kafka.manager.dao.OperationHistoryDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -/** - * @author arthur - * @date 2017/7/20. - */ -@Repository("operationHistoryDao") -public class OperationHistoryDaoImpl implements OperationHistoryDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int insert(OperationHistoryDO operationHistoryDO) { - return sqlSession.insert("OperationHistoryDao.insert", operationHistoryDO); - } -} diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderPartitionDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderPartitionDaoImpl.java deleted file mode 100644 index 3a3877af..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderPartitionDaoImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.OrderPartitionDO; -import com.xiaojukeji.kafka.manager.dao.OrderPartitionDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @author zengqiao - * @date 19/6/21 - */ -@Repository("orderPartitionDao") -public class OrderPartitionDaoImpl implements OrderPartitionDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int insert(OrderPartitionDO orderPartitionDO) { - return sqlSession.insert("OrderPartitionDao.insert", orderPartitionDO); - } - - @Override - public int deleteById(Long id) { - return sqlSession.delete("OrderPartitionDao.deleteById", id); - } - - @Override - public int updateById(OrderPartitionDO orderPartitionDO) { - return sqlSession.update("OrderPartitionDao.updateById", orderPartitionDO); - } - - @Override - public OrderPartitionDO getById(Long id) { - return sqlSession.selectOne("OrderPartitionDao.getById", id); - } - - @Override - public List list() { - return sqlSession.selectList("OrderPartitionDao.list"); - } -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderTopicDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderTopicDaoImpl.java deleted file mode 100644 index dacd3891..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/OrderTopicDaoImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.OrderTopicDO; -import com.xiaojukeji.kafka.manager.dao.OrderTopicDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @author zengqiao - * @date 19/6/21 - */ -@Repository("orderTopicDao") -public class OrderTopicDaoImpl implements OrderTopicDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int insert(OrderTopicDO orderTopicDO) { - return sqlSession.insert("OrderTopicDao.insert", orderTopicDO); - } - - @Override - public int deleteById(Long id) { - return sqlSession.delete("OrderTopicDao.deleteById", id); - } - - @Override - public int updateById(OrderTopicDO orderTopicDO) { - return sqlSession.update("OrderTopicDao.updateById", orderTopicDO); - } - - @Override - public OrderTopicDO getById(Long id) { - return sqlSession.selectOne("OrderTopicDao.getById", id); - } - - @Override - public List list() { - return sqlSession.selectList("OrderTopicDao.list"); - } - - @Override - public List getByUsername(String username) { - return sqlSession.selectList("OrderTopicDao.getByUsername", username); - } -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicDaoImpl.java deleted file mode 100644 index 7c5bac5f..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicDaoImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.TopicDO; -import com.xiaojukeji.kafka.manager.dao.TopicDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author zengqiao - * @date 19/7/12 - */ -@Repository("TopicDao") -public class TopicDaoImpl implements TopicDao { - @Autowired - private SqlSessionTemplate sqlSession; - - @Autowired - private KafkaManagerProperties kafkaManagerProperties; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int replace(TopicDO topicDO) { - if (kafkaManagerProperties.hasPG()) { - return sqlSession.insert("TopicDao.replaceOnPG", topicDO); - } - return sqlSession.insert("TopicDao.replace", topicDO); - } - - @Override - public int deleteById(Long id) { - return sqlSession.delete("TopicDao.deleteById", id); - } - - @Override - public int deleteByName(Long clusterId, String topicName) { - Map params = new HashMap<>(); - params.put("clusterId", clusterId); - params.put("topicName", topicName); - return sqlSession.delete("TopicDao.deleteByName", params); - } - - @Override - public TopicDO getByTopicName(Long clusterId, String topicName) { - Map params = new HashMap<>(); - params.put("clusterId", clusterId); - params.put("topicName", topicName); - return sqlSession.selectOne("TopicDao.getByTopicName", params); - } - - @Override - public List getByClusterId(Long clusterId) { - return sqlSession.selectList("TopicDao.getByClusterId", clusterId); - } - - @Override - public List list() { - return sqlSession.selectList("TopicDao.list"); - } -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicFavoriteDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicFavoriteDaoImpl.java deleted file mode 100644 index f8d0c7fc..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicFavoriteDaoImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.po.TopicFavoriteDO; -import com.xiaojukeji.kafka.manager.dao.TopicFavoriteDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; -import org.springframework.transaction.TransactionStatus; -import org.springframework.transaction.support.TransactionCallback; -import org.springframework.transaction.support.TransactionTemplate; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author zengqiao - * @date 19/6/23 - */ -@Repository("topicFavoriteDao") -public class TopicFavoriteDaoImpl implements TopicFavoriteDao { - @Autowired - private SqlSessionTemplate sqlSession; - - @Autowired - private TransactionTemplate transactionTemplate; - - @Autowired - private KafkaManagerProperties kafkaManagerProperties; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int batchAdd(List topicFavoriteDOList) { - if (kafkaManagerProperties.hasPG()) { - return sqlSession.insert("TopicFavoriteDao.batchAddOnPG", topicFavoriteDOList); - } - return sqlSession.insert("TopicFavoriteDao.batchAdd", topicFavoriteDOList); - } - - @Override - public Boolean batchDelete(List idList) { - return transactionTemplate.execute(new TransactionCallback() { - @Override - public Boolean doInTransaction(TransactionStatus status) { - if (idList == null) { - return Boolean.TRUE; - } - for (Long id: idList) { - try { - if (deleteById(id) <= 0) { - status.setRollbackOnly(); - return Boolean.FALSE; - } - } catch (Throwable t) { - status.setRollbackOnly(); - return Boolean.FALSE; - } - } - return Boolean.TRUE; - } - }); - } - - private int deleteById(Long id) { - return sqlSession.delete("TopicFavoriteDao.deleteById", id); - } - - @Override - public List getByUserName(String username) { - return sqlSession.selectList("TopicFavoriteDao.getByUserName", username); - } - - @Override - public List getByUserNameAndClusterId(String username, Long clusterId) { - Map params = new HashMap<>(); - params.put("username", username); - params.put("clusterId", clusterId); - return sqlSession.selectList("TopicFavoriteDao.getByUserNameAndClusterId", params); - } - -} \ No newline at end of file diff --git a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicMetricsDaoImpl.java b/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicMetricsDaoImpl.java deleted file mode 100644 index 8585ced5..00000000 --- a/dao/src/main/java/com/xiaojukeji/kafka/manager/dao/impl/TopicMetricsDaoImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xiaojukeji.kafka.manager.dao.impl; - -import com.xiaojukeji.kafka.manager.common.entity.metrics.TopicMetrics; -import com.xiaojukeji.kafka.manager.dao.TopicMetricsDao; -import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; - -import java.util.*; - -/** - * dao实现 - * @author tukun - * @date 2015/11/11. - */ -@Repository("topicMetricDao") -public class TopicMetricsDaoImpl implements TopicMetricsDao { - @Autowired - private SqlSessionTemplate sqlSession; - - public void setSqlSession(SqlSessionTemplate sqlSession) { - this.sqlSession = sqlSession; - } - - @Override - public int batchAdd(List topicMetricsList) { - return sqlSession.insert("TopicMetricsDao.batchAdd", topicMetricsList); - } - - @Override - public List getTopicMetricsByInterval(Long clusterId, - String topicName, - Date startTime, - Date endTime) { - Map map = new HashMap<>(); - map.put("clusterId", clusterId); - map.put("topicName", topicName); - map.put("startTime", startTime); - map.put("endTime", endTime); - return sqlSession.selectList("TopicMetricsDao.getTopicMetricsByInterval", map); - } - - @Override - public int deleteBeforeTime(Date endTime) { - return sqlSession.delete("TopicMetricsDao.deleteBeforeTime", endTime); - } -} diff --git a/dao/src/main/resources/mapper/AccountDao.xml b/dao/src/main/resources/mapper/AccountDao.xml deleted file mode 100644 index feed2727..00000000 --- a/dao/src/main/resources/mapper/AccountDao.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - DELETE FROM account WHERE username = #{username} - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/AlarmRuleDao.xml b/dao/src/main/resources/mapper/AlarmRuleDao.xml deleted file mode 100644 index a2e038e2..00000000 --- a/dao/src/main/resources/mapper/AlarmRuleDao.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/BrokerDao.xml b/dao/src/main/resources/mapper/BrokerDao.xml deleted file mode 100644 index 50af2ef1..00000000 --- a/dao/src/main/resources/mapper/BrokerDao.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - REPLACE broker - (cluster_id, broker_id, host, port, timestamp, status) - VALUES - (#{clusterId}, #{brokerId}, #{host}, #{port}, #{timestamp}, #{status}) - - - - insert into broker - (cluster_id, broker_id, host, port, timestamp, status) - values (#{clusterId}, #{brokerId}, #{host}, #{port}, #{timestamp}, #{status}) - on conflict (cluster_id, broker_id) do update set host = excluded.host, - port = excluded.port, - timestamp = excluded.timestamp, - status = excluded.status - - - - DELETE FROM broker WHERE cluster_id = #{clusterId} AND broker_id = #{brokerId} - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/BrokerMetricsDao.xml b/dao/src/main/resources/mapper/BrokerMetricsDao.xml deleted file mode 100644 index b932a010..00000000 --- a/dao/src/main/resources/mapper/BrokerMetricsDao.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO broker_metrics (cluster_id, broker_id, bytes_in, bytes_out, messages_in, bytes_rejected, fail_fetch_request, fail_produce_request, fetch_consumer_request, produce_request, request_handler_idl_percent, network_processor_idl_percent, request_queue_size, response_queue_size, log_flush_time, total_time_produce_mean, total_time_produce_99th, total_time_fetch_consumer_mean, total_time_fetch_consumer_99th, gmt_create) - VALUES - - (#{BrokerMetrics.clusterId}, #{BrokerMetrics.brokerId}, #{BrokerMetrics.bytesInPerSec}, #{BrokerMetrics.bytesOutPerSec}, #{BrokerMetrics.messagesInPerSec}, #{BrokerMetrics.bytesRejectedPerSec}, #{BrokerMetrics.failFetchRequestPerSec}, #{BrokerMetrics.failProduceRequestPerSec}, #{BrokerMetrics.fetchConsumerRequestPerSec}, #{BrokerMetrics.produceRequestPerSec}, #{BrokerMetrics.requestHandlerAvgIdlePercent}, #{BrokerMetrics.networkProcessorAvgIdlePercent}, #{BrokerMetrics.requestQueueSize}, #{BrokerMetrics.responseQueueSize}, #{BrokerMetrics.logFlushRateAndTimeMs}, #{BrokerMetrics.totalTimeProduceMean}, #{BrokerMetrics.totalTimeProduce99Th}, #{BrokerMetrics.totalTimeFetchConsumerMean}, #{BrokerMetrics.totalTimeFetchConsumer99Th}, now()) - - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/ClusterDao.xml b/dao/src/main/resources/mapper/ClusterDao.xml deleted file mode 100644 index 153dd00b..00000000 --- a/dao/src/main/resources/mapper/ClusterDao.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - INSERT INTO cluster ( - cluster_name, zookeeper, bootstrap_servers, kafka_version, alarm_flag, - security_protocol, sasl_mechanism, sasl_jaas_config - ) VALUES ( - #{clusterName}, #{zookeeper}, #{bootstrapServers}, #{kafkaVersion}, #{alarmFlag}, - #{securityProtocol}, #{saslMechanism}, #{saslJaasConfig} - ) - - - - DELETE FROM cluster id = #{id} - - - - UPDATE cluster SET - cluster_name=#{clusterName}, - zookeeper=#{zookeeper}, - bootstrap_servers=#{bootstrapServers}, - kafka_version=#{kafkaVersion}, - alarm_flag=#{alarmFlag}, - security_protocol=#{securityProtocol}, - sasl_mechanism=#{saslMechanism}, - sasl_jaas_config=#{saslJaasConfig} - WHERE id = #{id} - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/ClusterMetricsDao.xml b/dao/src/main/resources/mapper/ClusterMetricsDao.xml deleted file mode 100644 index 6b726639..00000000 --- a/dao/src/main/resources/mapper/ClusterMetricsDao.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - INSERT INTO cluster_metrics (cluster_id, topic_num, partition_num, broker_num, bytes_in, bytes_out, bytes_rejected, messages_in, gmt_create) - VALUES - - (#{ClusterMetricsDO.clusterId}, #{ClusterMetricsDO.topicNum}, #{ClusterMetricsDO.partitionNum}, #{ClusterMetricsDO.brokerNum}, #{ClusterMetricsDO.bytesInPerSec}, #{ClusterMetricsDO.bytesOutPerSec}, #{ClusterMetricsDO.bytesRejectedPerSec}, #{ClusterMetricsDO.messagesInPerSec}, now()) - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/MigrationTaskDao.xml b/dao/src/main/resources/mapper/MigrationTaskDao.xml deleted file mode 100644 index d2f9ce24..00000000 --- a/dao/src/main/resources/mapper/MigrationTaskDao.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - SELECT LAST_INSERT_ID() - - - - - - - - - - - - UPDATE migration_task - SET - real_throttle=#{throttle}, - status=#{status} - WHERE id=#{id} - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/OperationHistoryDao.xml b/dao/src/main/resources/mapper/OperationHistoryDao.xml deleted file mode 100644 index e9870a5c..00000000 --- a/dao/src/main/resources/mapper/OperationHistoryDao.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - INSERT INTO operation_history ( - cluster_id, topic_name, operator, operation) - VALUES ( - #{clusterId}, #{topicName}, #{operator}, #{operation} - ) - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/OrderPartitionDao.xml b/dao/src/main/resources/mapper/OrderPartitionDao.xml deleted file mode 100644 index 8214865b..00000000 --- a/dao/src/main/resources/mapper/OrderPartitionDao.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO order_partition ( - cluster_id, cluster_name, topic_name, applicant, - peak_bytes_in, description, order_status) - VALUES ( - #{clusterId}, #{clusterName}, #{topicName}, #{applicant}, - #{peakBytesIn}, #{description}, #{orderStatus} - ) - - - - DELETE FROM order_partition WHERE id=#{id} - - - - UPDATE order_partition SET - cluster_id=#{clusterId}, - cluster_name=#{clusterName}, - topic_name=#{topicName}, - applicant=#{applicant}, - - - partition_num=#{partitionNum}, - - - - - broker_list=#{brokerList}, - - - peak_bytes_in=#{peakBytesIn}, - description=#{description}, - order_status=#{orderStatus}, - approver=#{approver}, - opinion=#{opinion} - WHERE id=#{id} - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/OrderTopicDao.xml b/dao/src/main/resources/mapper/OrderTopicDao.xml deleted file mode 100644 index 32e50032..00000000 --- a/dao/src/main/resources/mapper/OrderTopicDao.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO order_topic ( - cluster_id, cluster_name, topic_name, - retention_time, partition_num, replica_num, - applicant, peak_bytes_in, description, principals - ) - VALUES ( - #{clusterId}, #{clusterName}, #{topicName}, - #{retentionTime}, #{partitionNum}, #{replicaNum}, - #{applicant}, #{peakBytesIn}, #{description}, #{principals} - ) - - - - DELETE FROM order_topic WHERE id=#{id} - - - - UPDATE order_topic SET - cluster_id=#{clusterId}, - cluster_name=#{clusterName}, - topic_name=#{topicName}, - retention_time=#{retentionTime}, - partition_num=#{partitionNum}, - replica_num=#{replicaNum}, - regions=#{regions}, - brokers=#{brokers}, - applicant=#{applicant}, - principals=#{principals}, - peak_bytes_in=#{peakBytesIn}, - description=#{description}, - order_status=#{orderStatus}, - approver=#{approver}, - opinion=#{opinion} - WHERE id=#{id} - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/RegionDao.xml b/dao/src/main/resources/mapper/RegionDao.xml deleted file mode 100644 index 7b1c7daa..00000000 --- a/dao/src/main/resources/mapper/RegionDao.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - REPLACE region - (region_name, cluster_id, broker_list, description, operator) - VALUES - (#{regionName}, #{clusterId}, #{brokerList}, #{description}, #{operator}) - - - - insert into region - (region_name, cluster_id, broker_list, description, operator) - values (#{regionName}, #{clusterId}, #{brokerList}, #{description}, #{operator}) - on conflict (region_name, cluster_id) do update set broker_list = excluded.broker_list, - description = excluded.description, - operator = excluded.operator - - - - DELETE FROM region WHERE id = #{id} - - - - UPDATE region SET - region_name=#{regionName}, - cluster_id=#{clusterId}, - broker_list=#{brokerList}, - description=#{description}, - operator=#{operator}, - status=#{status}, - level=#{level} - WHERE id=#{id} - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/TopicDao.xml b/dao/src/main/resources/mapper/TopicDao.xml deleted file mode 100644 index b078d4cf..00000000 --- a/dao/src/main/resources/mapper/TopicDao.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - REPLACE topic - (cluster_id, topic_name, principals, description, status) - VALUES - (#{clusterId}, #{topicName}, #{principals}, #{description}, #{status}) - - - - insert into topic - (cluster_id, topic_name, principals, description, status) - values (#{clusterId}, #{topicName}, #{principals}, #{description}, #{status}) - on conflict (cluster_id, topic_name) do update set principals = excluded.principals, - description = excluded.description, - status = excluded.status - - - - DELETE FROM topic WHERE id = #{id} - - - - DELETE FROM topic WHERE cluster_id = #{clusterId} and topic_name = #{topicName} - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/TopicFavoriteDao.xml b/dao/src/main/resources/mapper/TopicFavoriteDao.xml deleted file mode 100644 index 218a714c..00000000 --- a/dao/src/main/resources/mapper/TopicFavoriteDao.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - REPLACE topic_favorite (cluster_id, topic_name, username) - VALUES - - (#{TopicFavoriteDO.clusterId}, #{TopicFavoriteDO.topicName}, #{TopicFavoriteDO.username}) - - - - - insert into topic_favorite (cluster_id, topic_name, username) - values - - (#{TopicFavoriteDO.clusterId}, #{TopicFavoriteDO.topicName}, #{TopicFavoriteDO.username}) - - on conflict (cluster_id, topic_name, username) do update set gmt_modify = now(); - - - - DELETE FROM topic_favorite WHERE id=#{id} - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/mapper/TopicMetricsDao.xml b/dao/src/main/resources/mapper/TopicMetricsDao.xml deleted file mode 100644 index ece8f826..00000000 --- a/dao/src/main/resources/mapper/TopicMetricsDao.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - INSERT INTO topic_metrics - (cluster_id, topic_name, messages_in, bytes_in, bytes_out, bytes_rejected, total_produce_requests, gmt_create) - values - - (#{TopicMetrics.clusterId}, #{TopicMetrics.topicName}, #{TopicMetrics.messagesInPerSec}, #{TopicMetrics.bytesInPerSec}, #{TopicMetrics.bytesOutPerSec}, #{TopicMetrics.bytesRejectedPerSec}, #{TopicMetrics.totalProduceRequestsPerSec}, now()) - - - - - - - - - \ No newline at end of file diff --git a/dao/src/main/resources/spring-dao.xml b/dao/src/main/resources/spring-dao.xml deleted file mode 100644 index 8bb03753..00000000 --- a/dao/src/main/resources/spring-dao.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/assets/images/kafka_manager_cn_guide/admin_add_cluster.jpg b/doc/assets/images/kafka_manager_cn_guide/admin_add_cluster.jpg deleted file mode 100644 index 20acd79c..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/admin_add_cluster.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/admin_cluster_broker_detail.jpg b/doc/assets/images/kafka_manager_cn_guide/admin_cluster_broker_detail.jpg deleted file mode 100644 index 8b69f47b..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/admin_cluster_broker_detail.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/admin_cluster_details.jpg b/doc/assets/images/kafka_manager_cn_guide/admin_cluster_details.jpg deleted file mode 100644 index 8b1f5025..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/admin_cluster_details.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/admin_manager_account.jpg b/doc/assets/images/kafka_manager_cn_guide/admin_manager_account.jpg deleted file mode 100644 index 52ac59a1..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/admin_manager_account.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/admin_order.jpg b/doc/assets/images/kafka_manager_cn_guide/admin_order.jpg deleted file mode 100644 index ad857e3b..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/admin_order.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/my_order_list.jpg b/doc/assets/images/kafka_manager_cn_guide/my_order_list.jpg deleted file mode 100644 index 8583a359..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/my_order_list.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/normal_create_alarm_rule.jpg b/doc/assets/images/kafka_manager_cn_guide/normal_create_alarm_rule.jpg deleted file mode 100644 index f2cc38b4..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/normal_create_alarm_rule.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/normal_modify_password.jpg b/doc/assets/images/kafka_manager_cn_guide/normal_modify_password.jpg deleted file mode 100644 index 0fd68e98..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/normal_modify_password.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/normal_reset_consume_offset.jpg b/doc/assets/images/kafka_manager_cn_guide/normal_reset_consume_offset.jpg deleted file mode 100644 index 0f1c41c6..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/normal_reset_consume_offset.jpg and /dev/null differ diff --git a/doc/assets/images/kafka_manager_cn_guide/normal_topic_detail.jpg b/doc/assets/images/kafka_manager_cn_guide/normal_topic_detail.jpg deleted file mode 100644 index 99df01c3..00000000 Binary files a/doc/assets/images/kafka_manager_cn_guide/normal_topic_detail.jpg and /dev/null differ diff --git a/doc/create_mysql_table.sql b/doc/create_mysql_table.sql deleted file mode 100644 index 9a66ac67..00000000 --- a/doc/create_mysql_table.sql +++ /dev/null @@ -1,243 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `kafka_manager`; - -USE `kafka_manager`; - -CREATE TABLE `account` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', - `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码', - `role` int(16) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_username` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账号表'; -INSERT INTO account(username, password, role) VALUES ('admin', '21232f297a57a5a743894a0e4a801fc3', 2); - - -CREATE TABLE `alarm_rule` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID', - `alarm_name` varchar(128) NOT NULL DEFAULT '' COMMENT '告警名字', - `strategy_expressions` text COMMENT '表达式', - `strategy_filters` text COMMENT '过滤条件', - `strategy_actions` text COMMENT '响应', - `principals` varchar(512) NOT NULL DEFAULT '' COMMENT '负责人', - `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '-1:逻辑删除, 0:关闭, 1:正常', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_alarm_name` (`alarm_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='告警规则表'; - - -CREATE TABLE `broker` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', - `host` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker主机名', - `port` int(32) NOT NULL DEFAULT '-1' COMMENT 'Broker端口', - `timestamp` bigint(128) NOT NULL DEFAULT '-1' COMMENT '启动时间', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态0有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_broker_id` (`cluster_id`,`broker_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Broker信息表'; - - -CREATE TABLE `broker_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒被拒绝字节数', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消息数流入', - `fail_fetch_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消费失败数', - `fail_produce_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒失败生产数', - `fetch_consumer_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消费请求数', - `produce_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒生产数', - `request_handler_idl_percent` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '请求处理器繁忙百分比', - `network_processor_idl_percent` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '网络处理器繁忙百分比', - `request_queue_size` bigint(20) NOT NULL DEFAULT '0' COMMENT '请求列表大小', - `response_queue_size` bigint(20) NOT NULL DEFAULT '0' COMMENT '响应列表大小', - `log_flush_time` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '刷日志时间', - `total_time_produce_mean` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'produce请求处理总时间-平均值', - `total_time_produce_99th` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'produce请求处理总时间-99分位', - `total_time_fetch_consumer_mean` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'fetch请求总时间-平均值', - `total_time_fetch_consumer_99th` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'fetch请求总时间-99分位', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_broker_id_gmt_create` (`cluster_id`,`broker_id`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='BrokerMetric信息表'; - - -CREATE TABLE `cluster` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `zookeeper` varchar(512) NOT NULL DEFAULT '' COMMENT 'ZK地址', - `bootstrap_servers` varchar(512) NOT NULL DEFAULT '' COMMENT 'Server地址', - `kafka_version` varchar(32) NOT NULL DEFAULT '' COMMENT 'Kafka版本', - `alarm_flag` int(4) NOT NULL DEFAULT '0' COMMENT '0:不开启告警, 1开启告警', - `security_protocol` varchar(512) NOT NULL DEFAULT '' COMMENT '安全协议', - `sasl_mechanism` varchar(512) NOT NULL DEFAULT '' COMMENT '安全机制', - `sasl_jaas_config` varchar(512) NOT NULL DEFAULT '' COMMENT 'Jaas配置', - `status` int(4) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_name` (`cluster_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cluster表'; - - -CREATE TABLE `cluster_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', - `topic_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Topic数', - `partition_num` int(11) NOT NULL DEFAULT '0' COMMENT '分区数', - `broker_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Broker数', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒流入(B)', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒流出(B)', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒拒绝(B)', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消息数(条)', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_gmt_create` (`cluster_id`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ClusterMetrics信息'; - - -CREATE TABLE `controller` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerId', - `host` varchar(256) NOT NULL DEFAULT '' COMMENT '主机名', - `timestamp` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'Controller变更时间', - `version` int(11) NOT NULL DEFAULT '-1' COMMENT 'Controller格式版本', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_broker_id_timestamp` (`cluster_id`,`broker_id`,`timestamp`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Controller历史变更记录表'; - -CREATE TABLE `migration_task` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `reassignment_json` text COMMENT '任务参数', - `real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际限流值(B/s)', - `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', - `description` varchar(256) NOT NULL DEFAULT '' COMMENT '备注说明', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '任务创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '任务修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic迁移信息'; - -CREATE TABLE `operation_history` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', - `operation` varchar(256) NOT NULL DEFAULT '' COMMENT '操作描述', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='操作记录表'; - - -CREATE TABLE `order_partition` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表, 逗号分割', - `partition_num` int(11) NOT NULL DEFAULT 0 COMMENT '新增分区数', - `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', - `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量', - `description` text COMMENT '备注信息', - `order_status` int(16) NOT NULL DEFAULT '0' COMMENT '工单状态', - `approver` varchar(128) NOT NULL DEFAULT '' COMMENT '审批人', - `opinion` varchar(256) NOT NULL DEFAULT '' COMMENT '审批意见', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态,0标识有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分区申请工单'; - -CREATE TABLE `order_topic` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `retention_time` bigint(20) NOT NULL DEFAULT '-1' COMMENT '保留时间(ms)', - `partition_num` int(16) NOT NULL DEFAULT '-1' COMMENT '分区数', - `replica_num` int(16) NOT NULL DEFAULT '-1' COMMENT '副本数', - `regions` varchar(128) NOT NULL DEFAULT '' COMMENT 'RegionId列表', - `brokers` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker列表', - `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流入流量(KB)', - `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', - `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', - `description` text COMMENT '备注信息', - `order_status` int(16) NOT NULL DEFAULT '0' COMMENT '工单状态', - `approver` varchar(128) NOT NULL DEFAULT '' COMMENT '审批人', - `opinion` varchar(256) NOT NULL DEFAULT '' COMMENT '审批意见', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '状态,0标识有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic申请工单'; - -CREATE TABLE `region` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `region_name` varchar(128) NOT NULL DEFAULT '' COMMENT 'Region名称', - `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表', - `level` int(16) NOT NULL DEFAULT '0' COMMENT 'Region重要等级, 0级普通, 1极重要,2级极重要', - `operator` varchar(45) NOT NULL DEFAULT '' COMMENT '操作人', - `description` text COMMENT '备注说明', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态,0正常,-1废弃,1容量已满', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_region_name` (`cluster_id`,`region_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Region信息表'; - -CREATE TABLE `topic` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称', - `applicant` varchar(256) NOT NULL DEFAULT '' COMMENT '申请人', - `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', - `description` text COMMENT '备注信息', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_topic_name` (`cluster_id`,`topic_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic信息表'; - - -CREATE TABLE `topic_favorite` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', - `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_username_cluster_id_topic_name` (`username`,`cluster_id`,`topic_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户收藏的Topic表'; - -CREATE TABLE `topic_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒进入消息条数', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒拒绝字节数', - `total_produce_requests` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒请求数', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_topic_name_gmt_create` (`cluster_id`,`topic_name`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='TopicMetrics表'; \ No newline at end of file diff --git a/doc/create_postgresql_table.sql b/doc/create_postgresql_table.sql deleted file mode 100644 index 6d03c005..00000000 --- a/doc/create_postgresql_table.sql +++ /dev/null @@ -1,325 +0,0 @@ --- CREATE DATABASE kafka_manager; --- \c kafka_manager; -SET TIME ZONE 'Asia/Chongqing'; -SET CLIENT_ENCODING TO 'UTF-8'; - -CREATE OR REPLACE FUNCTION on_update_timestamp() RETURNS TRIGGER AS -$$ -BEGIN - new.gmt_modify = current_timestamp; - return new; -END; -$$ LANGUAGE plpgsql; - --- 账号表 -CREATE TABLE account -( - id bigserial NOT NULL, -- 'ID', - username varchar(64) NOT NULL UNIQUE DEFAULT '', -- '用户名', - password varchar(128) NOT NULL DEFAULT '', -- '密码', - role int NOT NULL DEFAULT 0, -- '角色类型, 0:普通用户', - status int NOT NULL DEFAULT 0, -- '0标识使用中,-1标识已废弃', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT account_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX account_uniq_username ON account (username); -INSERT INTO account(username, password, role) -VALUES ('admin', '21232f297a57a5a743894a0e4a801fc3', 2); -CREATE TRIGGER account_trig_gmt_modify - BEFORE UPDATE - ON account - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- 告警规则表 -CREATE TABLE alarm_rule -( - id bigserial, -- '自增ID', - alarm_name varchar(128) NOT NULL DEFAULT '', -- '告警名字', - strategy_expressions text, -- '表达式', - strategy_filters text, -- '过滤条件', - strategy_actions text, -- '响应', - principals varchar(512) NOT NULL DEFAULT '', -- '负责人', - status int2 NOT NULL DEFAULT 1, -- '-1:逻辑删除, 0:关闭, 1:正常', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT alarm_rule_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX alarm_rule_uniq_alarm_name ON alarm_rule (alarm_name); -CREATE TRIGGER alarm_rule_trig_gmt_modify - BEFORE UPDATE - ON alarm_rule - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- Broker信息表 -CREATE TABLE broker -( - id bigserial, -- 'id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - broker_id int NOT NULL DEFAULT '-1', -- 'BrokerID', - host varchar(128) NOT NULL DEFAULT '', -- 'Broker主机名', - port int NOT NULL DEFAULT '-1', -- 'Broker端口', - timestamp bigint NOT NULL DEFAULT '-1', -- '启动时间', - status int NOT NULL DEFAULT '0', -- '状态0有效,-1无效', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT broker_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX broker_uniq_cluster_id_broker_id ON broker (cluster_id, broker_id); -CREATE TRIGGER broker_trig_gmt_modify - BEFORE UPDATE - ON broker - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- BrokerMetric信息表 -CREATE TABLE broker_metrics -( - id bigserial, -- '自增id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - broker_id int NOT NULL DEFAULT '-1', -- 'BrokerID', - bytes_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒字节流入', - bytes_out decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒字节流出', - bytes_rejected decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒被拒绝字节数', - messages_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒消息数流入', - fail_fetch_request decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒消费失败数', - fail_produce_request decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒失败生产数', - fetch_consumer_request decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒消费请求数', - produce_request decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒生产数', - request_handler_idl_percent decimal(53, 2) NOT NULL DEFAULT '0.00', -- '请求处理器繁忙百分比', - network_processor_idl_percent decimal(53, 2) NOT NULL DEFAULT '0.00', -- '网络处理器繁忙百分比', - request_queue_size bigint NOT NULL DEFAULT '0', -- '请求列表大小', - response_queue_size bigint NOT NULL DEFAULT '0', -- '响应列表大小', - log_flush_time decimal(53, 2) NOT NULL DEFAULT '0.00', -- '刷日志时间', - total_time_produce_mean decimal(53, 2) NOT NULL DEFAULT '0.00', -- 'produce请求处理总时间-平均值', - total_time_produce_99th decimal(53, 2) NOT NULL DEFAULT '0.00', -- 'produce请求处理总时间-99分位', - total_time_fetch_consumer_mean decimal(53, 2) NOT NULL DEFAULT '0.00', -- 'fetch请求总时间-平均值', - total_time_fetch_consumer_99th decimal(53, 2) NOT NULL DEFAULT '0.00', -- 'fetch请求总时间-99分位', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - CONSTRAINT broker_metrics_pk PRIMARY KEY (id) -); -CREATE INDEX broker_metrics_idx_cluster_id_broker_id_gmt_create ON broker_metrics (cluster_id, broker_id, gmt_create); - --- Cluster表 -CREATE TABLE cluster -( - id bigserial, -- '集群ID', - cluster_name varchar(128) NOT NULL DEFAULT '', -- '集群名称', - zookeeper varchar(512) NOT NULL DEFAULT '', -- 'ZK地址', - bootstrap_servers varchar(512) NOT NULL DEFAULT '', -- 'Server地址', - kafka_version varchar(32) NOT NULL DEFAULT '', -- 'Kafka版本', - alarm_flag int2 NOT NULL DEFAULT '0', -- '0:不开启告警, 1开启告警', - security_protocol varchar(512) NOT NULL DEFAULT '', -- '安全协议', - sasl_mechanism varchar(512) NOT NULL DEFAULT '', -- '安全机制', - sasl_jaas_config varchar(512) NOT NULL DEFAULT '', -- 'Jaas配置', - status int2 NOT NULL DEFAULT '0', -- '删除标记, 0表示未删除, -1表示删除', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT cluster_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX cluster_uniq_cluster_name ON cluster (cluster_name); -CREATE TRIGGER cluster_trig_gmt_modify - BEFORE UPDATE - ON cluster - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- ClusterMetrics信息 -CREATE TABLE cluster_metrics -( - id bigserial, -- '自增id', - cluster_id bigint NOT NULL DEFAULT '0', -- '集群ID', - topic_num int NOT NULL DEFAULT '0', -- 'Topic数', - partition_num int NOT NULL DEFAULT '0', -- '分区数', - broker_num int NOT NULL DEFAULT '0', -- 'Broker数', - bytes_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒流入(B)', - bytes_out decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒流出(B)', - bytes_rejected decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒拒绝(B)', - messages_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒消息数(条)', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - CONSTRAINT cluster_metrics_pk PRIMARY KEY (id) -); -CREATE INDEX cluster_metrics_idx_cluster_id_gmt_create ON cluster_metrics (cluster_id, gmt_create); - --- Controller历史变更记录表 -CREATE TABLE controller -( - id bigserial, -- '自增id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - broker_id int NOT NULL DEFAULT '-1', -- 'BrokerId', - host varchar(256) NOT NULL DEFAULT '', -- '主机名', - timestamp bigint NOT NULL DEFAULT '-1', -- 'Controller变更时间', - version int NOT NULL DEFAULT '-1', -- 'Controller格式版本', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - CONSTRAINT controller_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX controller_uniq_cluster_id_broker_id_timestamp ON controller (cluster_id, broker_id, timestamp); - --- Topic迁移信息 -CREATE TABLE migration_task -( - id bigserial, -- '自增id', - cluster_id bigint NOT NULL DEFAULT '0', -- '集群ID', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - reassignment_json text, -- '任务参数', - real_throttle bigint NOT NULL DEFAULT '0', -- '实际限流值(B/s)', - operator varchar(128) NOT NULL DEFAULT '', -- '操作人', - description varchar(256) NOT NULL DEFAULT '', -- '备注说明', - status int NOT NULL DEFAULT '0', -- '任务状态', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '任务创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '任务修改时间', - CONSTRAINT migration_task_pk PRIMARY KEY (id) -); -CREATE TRIGGER migration_task_trig_gmt_modify - BEFORE UPDATE - ON migration_task - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - -CREATE TABLE operation_history -( - id bigserial, -- 'id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - operator varchar(128) NOT NULL DEFAULT '', -- '操作人', - operation varchar(256) NOT NULL DEFAULT '', -- '操作描述', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - PRIMARY KEY (id) -); ---='操作记录表'; - --- 分区申请工单 -CREATE TABLE order_partition -( - id bigserial, -- 'id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - cluster_name varchar(128) NOT NULL DEFAULT '', -- '集群名称', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - applicant varchar(128) NOT NULL DEFAULT '', -- '申请人', - partition_num int NOT NULL DEFAULT '0', -- '分区数', - broker_list varchar(128) NOT NULL DEFAULT '', -- 'Broker列表', - peak_bytes_in bigint NOT NULL DEFAULT '0', -- '峰值流量', - description text, -- '备注信息', - order_status int NOT NULL DEFAULT '0', -- '工单状态', - approver varchar(128) NOT NULL DEFAULT '', -- '审批人', - opinion varchar(256) NOT NULL DEFAULT '', -- '审批意见', - status int NOT NULL DEFAULT '0', -- '状态,0标识有效,-1无效', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT order_partition_pk PRIMARY KEY (id) -); -CREATE TRIGGER order_partition_trig_gmt_modify - BEFORE UPDATE - ON order_partition - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- Topic申请工单 -CREATE TABLE order_topic -( - id bigserial, -- 'ID', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - cluster_name varchar(128) NOT NULL DEFAULT '', -- '集群名称', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - retention_time bigint NOT NULL DEFAULT '-1', -- '保留时间(ms)', - partition_num int NOT NULL DEFAULT '-1', -- '分区数', - replica_num int NOT NULL DEFAULT '-1', -- '副本数', - regions varchar(128) NOT NULL DEFAULT '', -- 'RegionId列表', - brokers varchar(128) NOT NULL DEFAULT '', -- 'Broker列表', - peak_bytes_in bigint NOT NULL DEFAULT '0', -- '峰值流入流量(KB)', - applicant varchar(128) NOT NULL DEFAULT '', -- '申请人', - principals varchar(256) NOT NULL DEFAULT '', -- '负责人', - description text, -- '备注信息', - order_status int NOT NULL DEFAULT '0', -- '工单状态', - approver varchar(128) NOT NULL DEFAULT '', -- '审批人', - opinion varchar(256) NOT NULL DEFAULT '', -- '审批意见', - status int NOT NULL DEFAULT '0', -- '状态,0标识有效,-1无效', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT order_topic_pk PRIMARY KEY (id) -); -CREATE TRIGGER order_topic_trig_gmt_modify - BEFORE UPDATE - ON order_topic - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- Region信息表 -CREATE TABLE region -( - id bigserial, -- 'id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - region_name varchar(128) NOT NULL DEFAULT '', -- 'Region名称', - broker_list varchar(256) NOT NULL DEFAULT '', -- 'Broker列表', - level int NOT NULL DEFAULT '0', -- 'Region重要等级, 0级普通, 1极重要,2级极重要', - operator varchar(45) NOT NULL DEFAULT '', -- '操作人', - description text, -- '备注说明', - status int NOT NULL DEFAULT '0', -- '状态,0正常,-1废弃,1容量已满', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT region_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX region_uniq_cluster_id_region_name ON region (cluster_id, region_name); -CREATE TRIGGER region_trig_gmt_modify - BEFORE UPDATE - ON region - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- Topic信息表 -CREATE TABLE topic -( - id bigserial, -- 'ID', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - applicant varchar(256) NOT NULL DEFAULT '', -- '申请人', - principals varchar(256) NOT NULL DEFAULT '', -- '负责人', - description text, -- '备注信息', - status int NOT NULL DEFAULT '0', -- '0标识使用中,-1标识已废弃', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT topic_pk PRIMARY KEY (id) -); --=''; -CREATE UNIQUE INDEX topic_uniq_cluster_id_topic_name ON topic (cluster_id, topic_name); -CREATE TRIGGER topic_trig_gmt_modify - BEFORE UPDATE - ON topic - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- 用户收藏的Topic表 -CREATE TABLE topic_favorite -( - id bigserial, -- '自增Id', - username varchar(64) NOT NULL DEFAULT '', -- '用户名', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - status int NOT NULL DEFAULT '0', -- '删除标记, 0表示未删除, -1表示删除', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - gmt_modify timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '修改时间', - CONSTRAINT topic_favorite_pk PRIMARY KEY (id) -); -CREATE UNIQUE INDEX topic_favorite_uniq_username_cluster_id_topic_name ON topic_favorite (username, cluster_id, topic_name); -CREATE TRIGGER topic_favorite_trig_gmt_modify - BEFORE UPDATE - ON topic_favorite - FOR EACH ROW -EXECUTE PROCEDURE on_update_timestamp(); - --- TopicMetrics表 -CREATE TABLE topic_metrics -( - id bigserial, -- '自增id', - cluster_id bigint NOT NULL DEFAULT '-1', -- '集群ID', - topic_name varchar(192) NOT NULL DEFAULT '', -- 'Topic名称', - messages_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒进入消息条数', - bytes_in decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒字节流入', - bytes_out decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒字节流出', - bytes_rejected decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒拒绝字节数', - total_produce_requests decimal(53, 2) NOT NULL DEFAULT '0.00', -- '每秒请求数', - gmt_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- '创建时间', - CONSTRAINT topic_metrics_pk PRIMARY KEY (id) -); -CREATE INDEX topic_metrics_idx_cluster_id_topic_name_gmt_create ON topic_metrics (cluster_id, topic_name, gmt_create); diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 10c69adf..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: '2' -services: - mysqldbserver: - container_name: mysqldbserver - image: mysql:5.7 - build: - context: . - dockerfile: docker/mysql/Dockerfile - ports: - - "3306:3306" - command: [ - 'mysqld', - '--character-set-server=utf8', - '--collation-server=utf8_general_ci', - '--default-time-zone=+8:00' - ] - environment: - MYSQL_ROOT_PASSWORD: 12345678 - MYSQL_DATABASE: kafka_manager - MYSQL_USER: admin - MYSQL_PASSWORD: 12345678 - restart: always - kafka-manager-web: - container_name: kafka-manager-web - build: - context: . - dockerfile: Dockerfile - ports: - - "8080:8080" - links: - - mysqldbserver - restart: always \ No newline at end of file diff --git a/docker/kafka-manager/Dockerfile b/docker/kafka-manager/Dockerfile deleted file mode 100644 index de8d2f25..00000000 --- a/docker/kafka-manager/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM java:8 -MAINTAINER xuzhengxi -ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ADD ../../web/target/kafka-manager-web-1.1.0-SNAPSHOT.jar kafka-manager-web.jar -ADD ./application.yml application.yml -ENTRYPOINT ["java","-jar","/kafka-manager-web.jar","--spring.config.location=./application.yml"] -EXPOSE 8080 \ No newline at end of file diff --git a/docker/kafka-manager/application-standalone.yml b/docker/kafka-manager/application-standalone.yml deleted file mode 100644 index 581170bc..00000000 --- a/docker/kafka-manager/application-standalone.yml +++ /dev/null @@ -1,32 +0,0 @@ -server: - port: 8080 - tomcat: - accept-count: 100 - max-connections: 1000 - max-threads: 20 - min-spare-threads: 20 - -spring: - application: - name: kafkamanager - datasource: - kafka-manager: - jdbc-url: jdbc:mysql://mysqldbserver:3306/kafka_manager?characterEncoding=UTF-8&serverTimezone=GMT%2B8 - username: admin - password: 12345678 - driver-class-name: org.mariadb.jdbc.Driver - main: - allow-bean-definition-overriding: true - - profiles: - active: dev - -logging: - config: classpath:logback-spring.xml - -# kafka监控 -kafka-monitor: - enabled: true - notify-kafka: - cluster-id: 95 - topic-name: kmo_monitor diff --git a/docker/kafka-manager/application.yml b/docker/kafka-manager/application.yml deleted file mode 100644 index 581170bc..00000000 --- a/docker/kafka-manager/application.yml +++ /dev/null @@ -1,32 +0,0 @@ -server: - port: 8080 - tomcat: - accept-count: 100 - max-connections: 1000 - max-threads: 20 - min-spare-threads: 20 - -spring: - application: - name: kafkamanager - datasource: - kafka-manager: - jdbc-url: jdbc:mysql://mysqldbserver:3306/kafka_manager?characterEncoding=UTF-8&serverTimezone=GMT%2B8 - username: admin - password: 12345678 - driver-class-name: org.mariadb.jdbc.Driver - main: - allow-bean-definition-overriding: true - - profiles: - active: dev - -logging: - config: classpath:logback-spring.xml - -# kafka监控 -kafka-monitor: - enabled: true - notify-kafka: - cluster-id: 95 - topic-name: kmo_monitor diff --git a/docker/mysql/Dockerfile b/docker/mysql/Dockerfile deleted file mode 100644 index b2e4afed..00000000 --- a/docker/mysql/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM mysql:5.7 -MAINTAINER xuzhengxi -COPY ./docker/mysql/create_mysql_table.sql /docker-entrypoint-initdb.d/ \ No newline at end of file diff --git a/docker/mysql/create_mysql_table.sql b/docker/mysql/create_mysql_table.sql deleted file mode 100644 index 9a66ac67..00000000 --- a/docker/mysql/create_mysql_table.sql +++ /dev/null @@ -1,243 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `kafka_manager`; - -USE `kafka_manager`; - -CREATE TABLE `account` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', - `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码', - `role` int(16) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_username` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账号表'; -INSERT INTO account(username, password, role) VALUES ('admin', '21232f297a57a5a743894a0e4a801fc3', 2); - - -CREATE TABLE `alarm_rule` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID', - `alarm_name` varchar(128) NOT NULL DEFAULT '' COMMENT '告警名字', - `strategy_expressions` text COMMENT '表达式', - `strategy_filters` text COMMENT '过滤条件', - `strategy_actions` text COMMENT '响应', - `principals` varchar(512) NOT NULL DEFAULT '' COMMENT '负责人', - `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '-1:逻辑删除, 0:关闭, 1:正常', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_alarm_name` (`alarm_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='告警规则表'; - - -CREATE TABLE `broker` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', - `host` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker主机名', - `port` int(32) NOT NULL DEFAULT '-1' COMMENT 'Broker端口', - `timestamp` bigint(128) NOT NULL DEFAULT '-1' COMMENT '启动时间', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态0有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_broker_id` (`cluster_id`,`broker_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Broker信息表'; - - -CREATE TABLE `broker_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒被拒绝字节数', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消息数流入', - `fail_fetch_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消费失败数', - `fail_produce_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒失败生产数', - `fetch_consumer_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消费请求数', - `produce_request` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒生产数', - `request_handler_idl_percent` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '请求处理器繁忙百分比', - `network_processor_idl_percent` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '网络处理器繁忙百分比', - `request_queue_size` bigint(20) NOT NULL DEFAULT '0' COMMENT '请求列表大小', - `response_queue_size` bigint(20) NOT NULL DEFAULT '0' COMMENT '响应列表大小', - `log_flush_time` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '刷日志时间', - `total_time_produce_mean` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'produce请求处理总时间-平均值', - `total_time_produce_99th` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'produce请求处理总时间-99分位', - `total_time_fetch_consumer_mean` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'fetch请求总时间-平均值', - `total_time_fetch_consumer_99th` double(53,2) NOT NULL DEFAULT '0.00' COMMENT 'fetch请求总时间-99分位', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_broker_id_gmt_create` (`cluster_id`,`broker_id`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='BrokerMetric信息表'; - - -CREATE TABLE `cluster` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `zookeeper` varchar(512) NOT NULL DEFAULT '' COMMENT 'ZK地址', - `bootstrap_servers` varchar(512) NOT NULL DEFAULT '' COMMENT 'Server地址', - `kafka_version` varchar(32) NOT NULL DEFAULT '' COMMENT 'Kafka版本', - `alarm_flag` int(4) NOT NULL DEFAULT '0' COMMENT '0:不开启告警, 1开启告警', - `security_protocol` varchar(512) NOT NULL DEFAULT '' COMMENT '安全协议', - `sasl_mechanism` varchar(512) NOT NULL DEFAULT '' COMMENT '安全机制', - `sasl_jaas_config` varchar(512) NOT NULL DEFAULT '' COMMENT 'Jaas配置', - `status` int(4) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_name` (`cluster_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cluster表'; - - -CREATE TABLE `cluster_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', - `topic_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Topic数', - `partition_num` int(11) NOT NULL DEFAULT '0' COMMENT '分区数', - `broker_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Broker数', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒流入(B)', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒流出(B)', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒拒绝(B)', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消息数(条)', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_gmt_create` (`cluster_id`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ClusterMetrics信息'; - - -CREATE TABLE `controller` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerId', - `host` varchar(256) NOT NULL DEFAULT '' COMMENT '主机名', - `timestamp` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'Controller变更时间', - `version` int(11) NOT NULL DEFAULT '-1' COMMENT 'Controller格式版本', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_broker_id_timestamp` (`cluster_id`,`broker_id`,`timestamp`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Controller历史变更记录表'; - -CREATE TABLE `migration_task` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `reassignment_json` text COMMENT '任务参数', - `real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际限流值(B/s)', - `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', - `description` varchar(256) NOT NULL DEFAULT '' COMMENT '备注说明', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '任务创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '任务修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic迁移信息'; - -CREATE TABLE `operation_history` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', - `operation` varchar(256) NOT NULL DEFAULT '' COMMENT '操作描述', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='操作记录表'; - - -CREATE TABLE `order_partition` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表, 逗号分割', - `partition_num` int(11) NOT NULL DEFAULT 0 COMMENT '新增分区数', - `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', - `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量', - `description` text COMMENT '备注信息', - `order_status` int(16) NOT NULL DEFAULT '0' COMMENT '工单状态', - `approver` varchar(128) NOT NULL DEFAULT '' COMMENT '审批人', - `opinion` varchar(256) NOT NULL DEFAULT '' COMMENT '审批意见', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态,0标识有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分区申请工单'; - -CREATE TABLE `order_topic` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `retention_time` bigint(20) NOT NULL DEFAULT '-1' COMMENT '保留时间(ms)', - `partition_num` int(16) NOT NULL DEFAULT '-1' COMMENT '分区数', - `replica_num` int(16) NOT NULL DEFAULT '-1' COMMENT '副本数', - `regions` varchar(128) NOT NULL DEFAULT '' COMMENT 'RegionId列表', - `brokers` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker列表', - `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流入流量(KB)', - `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', - `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', - `description` text COMMENT '备注信息', - `order_status` int(16) NOT NULL DEFAULT '0' COMMENT '工单状态', - `approver` varchar(128) NOT NULL DEFAULT '' COMMENT '审批人', - `opinion` varchar(256) NOT NULL DEFAULT '' COMMENT '审批意见', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '状态,0标识有效,-1无效', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic申请工单'; - -CREATE TABLE `region` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `region_name` varchar(128) NOT NULL DEFAULT '' COMMENT 'Region名称', - `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表', - `level` int(16) NOT NULL DEFAULT '0' COMMENT 'Region重要等级, 0级普通, 1极重要,2级极重要', - `operator` varchar(45) NOT NULL DEFAULT '' COMMENT '操作人', - `description` text COMMENT '备注说明', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态,0正常,-1废弃,1容量已满', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_region_name` (`cluster_id`,`region_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Region信息表'; - -CREATE TABLE `topic` ( - `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称', - `applicant` varchar(256) NOT NULL DEFAULT '' COMMENT '申请人', - `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', - `description` text COMMENT '备注信息', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_cluster_id_topic_name` (`cluster_id`,`topic_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Topic信息表'; - - -CREATE TABLE `topic_favorite` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', - `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `status` int(16) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uniq_username_cluster_id_topic_name` (`username`,`cluster_id`,`topic_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户收藏的Topic表'; - -CREATE TABLE `topic_metrics` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', - `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒进入消息条数', - `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', - `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', - `bytes_rejected` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒拒绝字节数', - `total_produce_requests` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒请求数', - `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `idx_cluster_id_topic_name_gmt_create` (`cluster_id`,`topic_name`,`gmt_create`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='TopicMetrics表'; \ No newline at end of file diff --git a/doc/assets/images/common/arch.png b/docs/assets/images/common/arch.png similarity index 100% rename from doc/assets/images/common/arch.png rename to docs/assets/images/common/arch.png diff --git a/doc/assets/images/common/dingding_group.jpg b/docs/assets/images/common/dingding_group.jpg similarity index 100% rename from doc/assets/images/common/dingding_group.jpg rename to docs/assets/images/common/dingding_group.jpg diff --git a/doc/assets/images/common/logo_name.png b/docs/assets/images/common/logo_name.png similarity index 100% rename from doc/assets/images/common/logo_name.png rename to docs/assets/images/common/logo_name.png diff --git a/docs/create_mysql_table.sql b/docs/create_mysql_table.sql new file mode 100644 index 00000000..9b4bfe35 --- /dev/null +++ b/docs/create_mysql_table.sql @@ -0,0 +1,577 @@ +-- +-- Table structure for table `account` +-- + +-- DROP TABLE IF EXISTS `account`; +CREATE TABLE `account` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `username` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', + `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码', + `role` tinyint(8) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户 1:研发 2:运维', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_username` (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账号表'; +INSERT INTO account(username, password, role) VALUES ('admin', '21232f297a57a5a743894a0e4a801fc3', 2); + +-- +-- Table structure for table `app` +-- + +-- DROP TABLE IF EXISTS `app`; +CREATE TABLE `app` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `app_id` varchar(128) NOT NULL DEFAULT '' COMMENT '应用id', + `name` varchar(192) NOT NULL DEFAULT '' COMMENT '应用名称', + `password` varchar(256) NOT NULL DEFAULT '' COMMENT '应用密码', + `type` int(11) NOT NULL DEFAULT '0' COMMENT '类型, 0:普通用户, 1:超级用户', + `applicant` varchar(64) NOT NULL DEFAULT '' COMMENT '申请人', + `principals` text COMMENT '应用负责人', + `description` text COMMENT '应用描述', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`name`), + UNIQUE KEY `uniq_app_id` (`app_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用信息'; +INSERT INTO app(app_id, name, password, type, applicant, principals, description) VALUES ('km-admin-tmp', 'km-admin-tmp', '123456', 0, 'admin', 'admin', '临时应用'); + + +-- +-- Table structure for table `authority` +-- + +-- DROP TABLE IF EXISTS `authority`; +CREATE TABLE `authority` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `app_id` varchar(128) NOT NULL DEFAULT '' COMMENT '应用id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'topic名称', + `access` int(11) NOT NULL DEFAULT '0' COMMENT '0:无权限, 1:读, 2:写, 3:读写', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_app_id_cluster_id_topic_name` (`app_id`,`cluster_id`,`topic_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限信息(kafka-manager)'; + +-- +-- Table structure for table `broker` +-- + +-- DROP TABLE IF EXISTS `broker`; +CREATE TABLE `broker` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `broker_id` int(16) NOT NULL DEFAULT '-1' COMMENT 'brokerid', + `host` varchar(128) NOT NULL DEFAULT '' COMMENT 'broker主机名', + `port` int(16) NOT NULL DEFAULT '-1' COMMENT 'broker端口', + `timestamp` bigint(20) NOT NULL DEFAULT '-1' COMMENT '启动时间', + `max_avg_bytes_in` bigint(20) NOT NULL DEFAULT '-1' COMMENT '峰值的均值流量', + `version` varchar(128) NOT NULL DEFAULT '' COMMENT 'broker版本', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '状态: 0有效,-1无效', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_broker_id` (`cluster_id`,`broker_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='broker信息表'; + +-- +-- Table structure for table `broker_metrics` +-- + +-- DROP TABLE IF EXISTS `broker_metrics`; +CREATE TABLE `broker_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `broker_id` int(16) NOT NULL DEFAULT '-1' COMMENT 'brokerid', + `metrics` text COMMENT '指标', + `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒消息数流入', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_broker_id_gmt_create` (`cluster_id`,`broker_id`,`gmt_create`), + KEY `idx_gmt_create` (`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='broker-metric信息表'; + +-- +-- Table structure for table `cluster` +-- + +-- DROP TABLE IF EXISTS `cluster`; +CREATE TABLE `cluster` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '集群id', + `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', + `zookeeper` varchar(512) NOT NULL DEFAULT '' COMMENT 'zk地址', + `bootstrap_servers` varchar(512) NOT NULL DEFAULT '' COMMENT 'server地址', + `kafka_version` varchar(32) NOT NULL DEFAULT '' COMMENT 'kafka版本', + `idc` varchar(64) NOT NULL DEFAULT '' COMMENT '数据中心', + `mode` tinyint(4) NOT NULL DEFAULT '0' COMMENT '集群模式, 0:共享, 1:独享, 2:独立', + `security_properties` text COMMENT '安全认证参数', + `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT ' 监控标记, 0表示未监控, 1表示监控中', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_name` (`cluster_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='cluster信息表'; + +-- +-- Table structure for table `cluster_metrics` +-- + +-- DROP TABLE IF EXISTS `cluster_metrics`; +CREATE TABLE `cluster_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `metrics` text COMMENT '指标', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_gmt_create` (`cluster_id`,`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='clustermetrics信息'; + +-- +-- Table structure for table `cluster_tasks` +-- + +-- DROP TABLE IF EXISTS `cluster_tasks`; +CREATE TABLE `cluster_tasks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `uuid` varchar(128) NOT NULL DEFAULT '' COMMENT '任务UUID', + `cluster_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '集群id', + `task_type` varchar(128) NOT NULL DEFAULT '' COMMENT '任务类型', + `kafka_package` text COMMENT 'kafka包', + `kafka_package_md5` varchar(128) NOT NULL DEFAULT '' COMMENT 'kafka包的md5', + `server_properties` text COMMENT 'kafkaserver配置', + `server_properties_md5` varchar(128) NOT NULL DEFAULT '' COMMENT '配置文件的md5', + `agent_task_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '任务id', + `agent_rollback_task_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '回滚任务id', + `host_list` text COMMENT '升级的主机', + `pause_host_list` text COMMENT '暂停点', + `rollback_host_list` text COMMENT '回滚机器列表', + `rollback_pause_host_list` text COMMENT '回滚暂停机器列表', + `operator` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人', + `task_status` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='集群任务(集群升级部署)'; + +-- +-- Table structure for table `config` +-- + +-- DROP TABLE IF EXISTS `config`; +CREATE TABLE `config` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `config_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '配置key', + `config_value` text COMMENT '配置value', + `config_description` text COMMENT '备注说明', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_config_key` (`config_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='配置表'; + +-- +-- Table structure for table `controller` +-- + +-- DROP TABLE IF EXISTS `controller`; +CREATE TABLE `controller` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `broker_id` int(16) NOT NULL DEFAULT '-1' COMMENT 'brokerid', + `host` varchar(256) NOT NULL DEFAULT '' COMMENT '主机名', + `timestamp` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'controller变更时间', + `version` int(16) NOT NULL DEFAULT '-1' COMMENT 'controller格式版本', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_broker_id_timestamp` (`cluster_id`,`broker_id`,`timestamp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='controller记录表'; + +-- +-- Table structure for table `gateway_config` +-- + +-- DROP TABLE IF EXISTS `gateway_config`; +CREATE TABLE `gateway_config` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `type` varchar(128) NOT NULL DEFAULT '' COMMENT '配置类型', + `name` varchar(128) NOT NULL DEFAULT '' COMMENT '配置名称', + `value` text COMMENT '配置值', + `version` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '版本信息', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_type_name` (`type`,`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='gateway配置'; + +-- +-- Table structure for table `heartbeat` +-- + +-- DROP TABLE IF EXISTS `heartbeat`; +CREATE TABLE `heartbeat` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `ip` varchar(128) NOT NULL DEFAULT '' COMMENT '主机ip', + `hostname` varchar(256) NOT NULL DEFAULT '' COMMENT '主机名', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_ip` (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='心跳信息'; + +-- +-- Table structure for table `kafka_acl` +-- + +-- DROP TABLE IF EXISTS `kafka_acl`; +CREATE TABLE `kafka_acl` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `app_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `access` int(11) NOT NULL DEFAULT '0' COMMENT '0:无权限, 1:读, 2:写, 3:读写', + `operation` int(11) NOT NULL DEFAULT '0' COMMENT '0:创建, 1:更新 2:删除, 以最新的一条数据为准', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限信息(kafka-broker)'; + +-- +-- Table structure for table `kafka_bill` +-- + +-- DROP TABLE IF EXISTS `kafka_bill`; +CREATE TABLE `kafka_bill` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `principal` varchar(64) NOT NULL DEFAULT '' COMMENT '负责人', + `quota` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '配额, 单位mb/s', + `cost` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '成本, 单位元', + `cost_type` int(16) NOT NULL DEFAULT '0' COMMENT '成本类型, 0:共享集群, 1:独享集群, 2:独立集群', + `gmt_day` varchar(64) NOT NULL DEFAULT '' COMMENT '计价的日期, 例如2019-02-02的计价结果', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_topic_name_gmt_day` (`cluster_id`,`topic_name`,`gmt_day`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='kafka账单'; + +-- +-- Table structure for table `kafka_file` +-- + +-- DROP TABLE IF EXISTS `kafka_file`; +CREATE TABLE `kafka_file` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `storage_name` varchar(128) NOT NULL DEFAULT '' COMMENT '存储位置', + `file_name` varchar(128) NOT NULL DEFAULT '' COMMENT '文件名', + `file_md5` varchar(256) NOT NULL DEFAULT '' COMMENT '文件md5', + `file_type` int(16) NOT NULL DEFAULT '-1' COMMENT '0:kafka压缩包, 1:kafkaserver配置', + `description` text COMMENT '备注信息', + `operator` varchar(64) NOT NULL DEFAULT '' COMMENT '创建用户', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '状态, 0:正常, -1:删除', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_file_name_storage_name` (`cluster_id`,`file_name`,`storage_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文件管理'; + +-- +-- Table structure for table `kafka_user` +-- + +-- DROP TABLE IF EXISTS `kafka_user`; +CREATE TABLE `kafka_user` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `app_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '应用id', + `password` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '密码', + `user_type` int(11) NOT NULL DEFAULT '0' COMMENT '0:普通用户, 1:超级用户', + `operation` int(11) NOT NULL DEFAULT '0' COMMENT '0:创建, 1:更新 2:删除, 以最新一条的记录为准', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='kafka用户表'; + +-- +-- Table structure for table `logical_cluster` +-- + +-- DROP TABLE IF EXISTS `logical_cluster`; +CREATE TABLE `logical_cluster` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `name` varchar(192) NOT NULL DEFAULT '' COMMENT '逻辑集群名称', + `mode` int(16) NOT NULL DEFAULT '0' COMMENT '逻辑集群类型, 0:共享集群, 1:独享集群, 2:独立集群', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT '所属应用', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `region_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'regionid列表', + `description` text COMMENT '备注说明', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='逻辑集群信息表'; + +-- +-- Table structure for table `monitor_rule` +-- + +-- DROP TABLE IF EXISTS `monitor_rule`; +CREATE TABLE `monitor_rule` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `name` varchar(192) NOT NULL DEFAULT '' COMMENT '告警名称', + `strategy_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '监控id', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'appid', + `operator` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监控规则'; + +-- +-- Table structure for table `operate_record` +-- + +-- DROP TABLE IF EXISTS `operate_record`; +CREATE TABLE `operate_record` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `module_id` int(16) NOT NULL DEFAULT '-1' COMMENT '模块类型, 0:topic, 1:应用, 2:配额, 3:权限, 4:集群, -1:未知', + `operate_id` int(16) NOT NULL DEFAULT '-1' COMMENT '操作类型, 0:新增, 1:删除, 2:修改', + `resource` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称、app名称', + `content` text COMMENT '操作内容', + `operator` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + KEY `idx_module_id_operate_id_operator` (`module_id`,`operate_id`,`operator`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='操作记录'; + +-- +-- Table structure for table `reassign_task` +-- + +-- DROP TABLE IF EXISTS `reassign_task`; +CREATE TABLE `reassign_task` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `task_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '任务ID', + `name` varchar(256) NOT NULL DEFAULT '' COMMENT '任务名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `partitions` text COMMENT '分区', + `reassignment_json` text COMMENT '任务参数', + `real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '限流值', + `max_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '限流上限', + `min_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '限流下限', + `begin_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间', + `operator` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人', + `description` varchar(256) NOT NULL DEFAULT '' COMMENT '备注说明', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '任务状态', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '任务创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '任务修改时间', + `original_retention_time` bigint(20) NOT NULL DEFAULT '86400000' COMMENT 'Topic存储时间', + `reassign_retention_time` bigint(20) NOT NULL DEFAULT '86400000' COMMENT '迁移时的存储时间', + `src_brokers` text COMMENT '源Broker', + `dest_brokers` text COMMENT '目标Broker', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic迁移信息'; + +-- +-- Table structure for table `region` +-- + +-- DROP TABLE IF EXISTS `region`; +CREATE TABLE `region` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `name` varchar(192) NOT NULL DEFAULT '' COMMENT 'region名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'broker列表', + `capacity` bigint(20) NOT NULL DEFAULT '0' COMMENT '容量(B/s)', + `real_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际使用量(B/s)', + `estimate_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '预估使用量(B/s)', + `description` text COMMENT '备注说明', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '状态,0正常,1已满', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='region信息表'; + +-- +-- Table structure for table `topic` +-- + +-- DROP TABLE IF EXISTS `topic`; +CREATE TABLE `topic` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'topic所属appid', + `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量', + `description` text COMMENT '备注信息', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_topic_name` (`cluster_id`,`topic_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic信息表'; + +-- +-- Table structure for table `topic_app_metrics` +-- + +-- DROP TABLE IF EXISTS `topic_app_metrics`; +CREATE TABLE `topic_app_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'appid', + `metrics` text COMMENT '指标', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_topic_name_app_id_gmt_create` (`cluster_id`,`topic_name`,`app_id`,`gmt_create`), + KEY `idx_gmt_create` (`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic app metrics'; + +-- +-- Table structure for table `topic_connections` +-- + +-- DROP TABLE IF EXISTS `topic_connections`; +CREATE TABLE `topic_connections` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT '应用id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `type` varchar(16) NOT NULL DEFAULT '' COMMENT 'producer or consumer', + `ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'ip地址', + `client_version` varchar(8) NOT NULL DEFAULT '' COMMENT '客户端版本', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_app_id_cluster_id_topic_name_type_ip_client_version` (`app_id`,`cluster_id`,`topic_name`,`type`,`ip`,`client_version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic连接信息表'; + +-- +-- Table structure for table `topic_expired` +-- + +-- DROP TABLE IF EXISTS `topic_expired`; +CREATE TABLE `topic_expired` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `produce_connection_num` bigint(20) NOT NULL DEFAULT '0' COMMENT '发送连接数', + `fetch_connection_num` bigint(20) NOT NULL DEFAULT '0' COMMENT '消费连接数', + `expired_day` bigint(20) NOT NULL DEFAULT '0' COMMENT '过期天数', + `gmt_retain` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '保留截止时间', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '-1:可下线, 0:过期待通知, 1+:已通知待反馈', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_topic_name` (`cluster_id`,`topic_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic过期信息表'; + +-- +-- Table structure for table `topic_metrics` +-- + +-- DROP TABLE IF EXISTS `topic_metrics`; +CREATE TABLE `topic_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'topic名称', + `metrics` text COMMENT '指标数据JSON', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_topic_name_gmt_create` (`cluster_id`,`topic_name`,`gmt_create`), + KEY `idx_gmt_create` (`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topicmetrics表'; + +-- +-- Table structure for table `topic_report` +-- + +-- DROP TABLE IF EXISTS `topic_report`; +CREATE TABLE `topic_report` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始上报时间', + `end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结束上报时间', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_topic_name` (`cluster_id`,`topic_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='开启jmx采集的topic'; + +-- +-- Table structure for table `topic_request_time_metrics` +-- + +-- DROP TABLE IF EXISTS `topic_request_time_metrics`; +CREATE TABLE `topic_request_time_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `metrics` text COMMENT '指标', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_topic_name_gmt_create` (`cluster_id`,`topic_name`,`gmt_create`), + KEY `idx_gmt_create` (`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic请求耗时信息'; + +-- +-- Table structure for table `topic_statistics` +-- + +-- DROP TABLE IF EXISTS `topic_statistics`; +CREATE TABLE `topic_statistics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic名称', + `offset_sum` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'offset和', + `max_avg_bytes_in` double(53,2) NOT NULL DEFAULT '-1.00' COMMENT '峰值的均值流量', + `gmt_day` varchar(64) NOT NULL DEFAULT '' COMMENT '日期2020-03-30的形式', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `max_avg_messages_in` double(53,2) NOT NULL DEFAULT '-1.00' COMMENT '峰值的均值消息条数', + PRIMARY KEY (`id`), + UNIQUE KEY `uniq_cluster_id_topic_name_gmt_day` (`cluster_id`,`topic_name`,`gmt_day`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic统计信息表'; + +-- +-- Table structure for table `topic_throttled_metrics` +-- + +-- DROP TABLE IF EXISTS `topic_throttled_metrics`; +CREATE TABLE `topic_throttled_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群id', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'topic name', + `app_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'app', + `produce_throttled` tinyint(8) NOT NULL DEFAULT '0' COMMENT '是否是生产耗时', + `fetch_throttled` tinyint(8) NOT NULL DEFAULT '0' COMMENT '是否是消费耗时', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`), + KEY `idx_cluster_id_topic_name_app_id` (`cluster_id`,`topic_name`,`app_id`), + KEY `idx_gmt_create` (`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='topic限流信息'; + +-- +-- Table structure for table `work_order` +-- + +-- DROP TABLE IF EXISTS `work_order`; +CREATE TABLE `work_order` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `type` int(16) NOT NULL DEFAULT '-1' COMMENT '工单类型', + `title` varchar(512) NOT NULL DEFAULT '' COMMENT '工单标题', + `applicant` varchar(64) NOT NULL DEFAULT '' COMMENT '申请人', + `description` text COMMENT '备注信息', + `approver` varchar(64) NOT NULL DEFAULT '' COMMENT '审批人', + `gmt_handle` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '审批时间', + `opinion` varchar(256) NOT NULL DEFAULT '' COMMENT '审批信息', + `extensions` text COMMENT '扩展信息', + `status` int(16) NOT NULL DEFAULT '0' COMMENT '工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消', + `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工单表'; \ No newline at end of file diff --git a/docs/install_cn_guide.md b/docs/install_cn_guide.md new file mode 100644 index 00000000..311b92ab --- /dev/null +++ b/docs/install_cn_guide.md @@ -0,0 +1,58 @@ + +--- + +![kafka-manager-logo](./assets/images/common/logo_name.png) + +**一站式`Apache Kafka`集群指标监控与运维管控平台** + +--- + +# 安装手册 + + +## 环境依赖 + +- `Maven 3.2+`(后端打包依赖) +- `node 10+`(前端打包依赖) +- `Java 8+`(运行环境需要) +- `MySQL`(数据存储) + +--- + +## 环境初始化 + +执行[create_mysql_table.sql](./create_mysql_table.sql)中的SQL命令,从而创建所需的MySQL库及表,默认创建的库名是`kafka_manager`。 + +``` +# 示例: +mysql -uXXXX -pXXX -h XXX.XXX.XXX.XXX -PXXXX < ./create_mysql_table.sql +``` + +--- + +## 打包 + +```bash + +# 一次性打包 +cd .. +mvn install + +``` + +--- + +## 启动 + +``` +# application.yml 是配置文件 + +cp web/src/main/resources/application.yml web/target/ +cd web/target/ +nohup java -jar kafka-manager-web-2.0.0-SNAPSHOT.jar --spring.config.location=./application.yml > /dev/null 2>&1 & +``` + +## 使用 + +本地启动的话,访问`http://localhost:8080`,输入帐号及密码进行登录。更多参考:[kafka-manager使用手册](./user_cn_guide.md) + diff --git a/docs/manual_kafka_op/add_cluster.md b/docs/manual_kafka_op/add_cluster.md new file mode 100644 index 00000000..ded5ef93 --- /dev/null +++ b/docs/manual_kafka_op/add_cluster.md @@ -0,0 +1,39 @@ + +--- + +![kafka-manager-logo](../assets/images/common/logo_name.png) + +**一站式`Apache Kafka`集群指标监控与运维管控平台** + +--- + +# 集群接入 + +集群的接入总共需要三个步骤,分别是: +1. 接入物理集群 +2. 创建Region +3. 创建逻辑集群 + +备注:接入集群需要2、3两步是因为普通用户的视角下,看到的都是逻辑集群,如果没有2、3两步,那么普通用户看不到任何信息。 + + +## 1、接入物理集群 + +![op_add_cluster](./imgs/op_add_cluster.jpg) + +如上图所示,填写集群信息,然后点击确定,即可完成集群的接入。因为考虑到分布式部署,添加集群之后,需要稍等**`1分钟`**才可以在界面上看到集群的详细信息。 + +## 2、创建Region + +![op_add_region](./imgs/op_add_region.jpg) + +如上图所示,填写Region信息,然后点击确定,即可完成Region的创建。 + +备注:Region即为Broker的集合,可以按照业务需要,将Broker归类,从而创建相应的Region。 + +## 3、创建逻辑集群 + +![op_add_logical_cluster](./imgs/op_add_logical_cluster.jpg) + + +如上图所示,填写逻辑集群信息,然后点击确定,即可完成逻辑集群的创建。 \ No newline at end of file diff --git a/docs/manual_kafka_op/imgs/op_add_cluster.jpg b/docs/manual_kafka_op/imgs/op_add_cluster.jpg new file mode 100644 index 00000000..98d239ae Binary files /dev/null and b/docs/manual_kafka_op/imgs/op_add_cluster.jpg differ diff --git a/docs/manual_kafka_op/imgs/op_add_logical_cluster.jpg b/docs/manual_kafka_op/imgs/op_add_logical_cluster.jpg new file mode 100644 index 00000000..8650fa94 Binary files /dev/null and b/docs/manual_kafka_op/imgs/op_add_logical_cluster.jpg differ diff --git a/docs/manual_kafka_op/imgs/op_add_region.jpg b/docs/manual_kafka_op/imgs/op_add_region.jpg new file mode 100644 index 00000000..fe2669a6 Binary files /dev/null and b/docs/manual_kafka_op/imgs/op_add_region.jpg differ diff --git a/doc/user_cn_guide.md b/docs/user_cn_guide.md similarity index 100% rename from doc/user_cn_guide.md rename to docs/user_cn_guide.md diff --git a/kafka-manager-common/pom.xml b/kafka-manager-common/pom.xml new file mode 100644 index 00000000..2782e5eb --- /dev/null +++ b/kafka-manager-common/pom.xml @@ -0,0 +1,105 @@ + + + 4.0.0 + com.xiaojukeji.kafka + kafka-manager-common + 2.0.0-SNAPSHOT + jar + + + kafka-manager + com.xiaojukeji.kafka + 2.0.0-SNAPSHOT + + + + 1.0.0-SNAPSHOT + true + true + 1.8 + 1.8 + UTF-8 + UTF-8 + + + + + org.apache.httpcomponents + httpcore + + + org.apache.httpcomponents + httpclient + + + commons-httpclient + commons-httpclient + + + org.apache.httpcomponents + httpmime + + + + commons-beanutils + commons-beanutils + 1.9.3 + + + org.apache.curator + curator-recipes + 2.10.0 + + + org.apache.zookeeper + zookeeper + + + com.alibaba + fastjson + + + org.apache.kafka + kafka_2.10 + + + commons-lang + commons-lang + + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-swagger-ui + + + io.swagger + swagger-annotations + 1.5.13 + + + org.springframework + spring-web + 5.0.9.RELEASE + compile + + + com.fasterxml.jackson.core + jackson-databind + 2.9.7 + + + org.apache.commons + commons-pool2 + + + javax.servlet + javax.servlet-api + + + \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/annotations/ApiLevel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/annotations/ApiLevel.java new file mode 100644 index 00000000..1a3e91d7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/annotations/ApiLevel.java @@ -0,0 +1,24 @@ +package com.xiaojukeji.kafka.manager.common.annotations; + +import com.xiaojukeji.kafka.manager.common.constant.ApiLevelContent; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * 接口分级限流 + * @author zengqiao + * @date 2020-07-20 + */ +@Target(ElementType.METHOD) +@Retention(RUNTIME) +@Documented +public @interface ApiLevel { + int level() default ApiLevelContent.LEVEL_DEFAULT_4; + + int rateLimit() default Integer.MAX_VALUE; +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/AccountRoleEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/AccountRoleEnum.java new file mode 100644 index 00000000..9c3cc06c --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/AccountRoleEnum.java @@ -0,0 +1,50 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 用户角色 + * @author zengqiao_cn@163.com + * @date 19/4/15 + */ +public enum AccountRoleEnum { + UNKNOWN(-1, "unknown"), + + NORMAL(0, "normal"), + + RD(1, "rd"), + + OP(2, "op"); + + private Integer role; + + private String message; + + AccountRoleEnum(Integer role, String message) { + this.role = role; + this.message = message; + } + + public Integer getRole() { + return role; + } + + public String getMessage() { + return message; + } + + @Override + public String toString() { + return "AccountRoleEnum{" + + "role=" + role + + ", message='" + message + '\'' + + '}'; + } + + public static AccountRoleEnum getUserRoleEnum(Integer role) { + for (AccountRoleEnum elem: AccountRoleEnum.values()) { + if (elem.role.equals(role)) { + return elem; + } + } + return AccountRoleEnum.UNKNOWN; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ApiLevelEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ApiLevelEnum.java new file mode 100644 index 00000000..73be0d16 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ApiLevelEnum.java @@ -0,0 +1,19 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/7/27 + */ +public enum ApiLevelEnum { + LEVEL_0(0), + LEVEL_1(1), + LEVEL_2(2), + LEVEL_3(3) + ; + + private int level; + + ApiLevelEnum(int level) { + this.level = level; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterComboEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterComboEnum.java new file mode 100644 index 00000000..06f6b91b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterComboEnum.java @@ -0,0 +1,37 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/4/21 + */ +public enum ClusterComboEnum { + BYTES_IN_200(200*1024*1024, "200MB/s"), + BYTES_IN_400(400*1024*1024, "400MB/s"), + BYTES_IN_600(600*1024*1024, "600MB/s"), + ; + + private Integer code; + + private String message; + + ClusterComboEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } + + @Override + public String toString() { + return "ClusterComboEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterModeEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterModeEnum.java new file mode 100644 index 00000000..199cc7cd --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ClusterModeEnum.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 集群模式 + * @author zengqiao + * @date 20/4/1 + */ +public enum ClusterModeEnum { + /** + * 共享模式 + */ + SHARED_MODE(0, "共享集群"), + + /** + * 独享模式 + */ + EXCLUSIVE_MODE(1, "独享集群"), + + /** + * 独立模式 + */ + INDEPENDENT_MODE(2, "独立集群"); + + private Integer code; + + private String message; + + ClusterModeEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } + + @Override + public String toString() { + return "ClusterModeEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/DBStatusEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/DBStatusEnum.java new file mode 100644 index 00000000..4f6fb1cf --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/DBStatusEnum.java @@ -0,0 +1,25 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/6/4 + */ +public enum DBStatusEnum { + DEAD(-1), + ALIVE(0) + ; + + private int status; + + DBStatusEnum(int status) { + this.status = status; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/IDCEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/IDCEnum.java new file mode 100644 index 00000000..0c4c877a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/IDCEnum.java @@ -0,0 +1,45 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/5/26 + */ +public enum IDCEnum { + CN("cn", "国内"), + US("us", "美东"), + RU("ru", "俄罗斯"), + ; + + private String idc; + + private String name; + + IDCEnum(String idc, String name) { + this.idc = idc; + this.name = name; + } + + public String getIdc() { + return idc; + } + + public void setIdc(String idc) { + this.idc = idc; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + return "IDCEnum{" + + "idc='" + idc + '\'' + + ", name='" + name + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaBrokerRoleEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaBrokerRoleEnum.java new file mode 100644 index 00000000..befd5257 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaBrokerRoleEnum.java @@ -0,0 +1,34 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/5/20 + */ +public enum KafkaBrokerRoleEnum { + NORMAL("NormalBroker"), + + COORDINATOR("Coordinator"), + + CONTROLLER("Controller"), + ; + private String role; + + KafkaBrokerRoleEnum(String role) { + this.role = role; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + @Override + public String toString() { + return "KafkaBrokerRoleEnum{" + + "role='" + role + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaClientEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaClientEnum.java new file mode 100644 index 00000000..6e5bea6f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaClientEnum.java @@ -0,0 +1,46 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/5/29 + */ +public enum KafkaClientEnum { + PRODUCE_CLIENT(0, "Produce"), + + FETCH_CLIENT(1, "Fetch"), + + ; + + private Integer code; + + private String name; + + KafkaClientEnum(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + return "KafkaClientEnum{" + + "code=" + code + + ", name='" + name + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaFileEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaFileEnum.java new file mode 100644 index 00000000..f1196f91 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/KafkaFileEnum.java @@ -0,0 +1,54 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/4/26 + */ +public enum KafkaFileEnum { + PACKAGE(0, "Kafka压缩包", ".tgz"), + + SERVER_CONFIG(1, "KafkaServer配置", ".properties"), + ; + + private Integer code; + + private String message; + + private String suffix; + + KafkaFileEnum(Integer code, String message, String suffix) { + this.code = code; + this.message = message; + this.suffix = suffix; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } + + public String getSuffix() { + return suffix; + } + + @Override + public String toString() { + return "KafkaFileEnum{" + + "code=" + code + + ", message='" + message + '\'' + + ", suffix=" + suffix + + '}'; + } + + public static KafkaFileEnum getByCode(Integer code) { + for (KafkaFileEnum elem: KafkaFileEnum.values()) { + if (elem.getCode().equals(code)) { + return elem; + } + } + return null; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ModuleEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ModuleEnum.java new file mode 100644 index 00000000..ac2a8947 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/ModuleEnum.java @@ -0,0 +1,76 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +import com.google.common.collect.Maps; + +import java.util.Map; + +/** + * @author zhongyuankai_i + * @date 20/09/03 + */ +public enum ModuleEnum { + TOPIC(0, "Topic"), + + APP(1, "应用"), + + QUOTA(2, "配额"), + + AUTHORITY(3, "权限"), + + CLUSTER(4, "集群"), + + PARTITION(5, "分区"), + + UNKNOWN(-1, "未知") + ; + ModuleEnum(int code, String message) { + this.code = code; + this.message = message; + } + + private int code; + + private String message; + + public int getCode() { + return code; + } + + public String getMessage() { + return message; + } + + public Map toMap() { + Map map = Maps.newHashMap(); + map.put("code", code); + map.put("message", message); + return map; + } + + public static ModuleEnum valueOf(Integer code) { + if (code == null) { + return ModuleEnum.UNKNOWN; + } + for (ModuleEnum state : ModuleEnum.values()) { + if (state.getCode() == code) { + return state; + } + } + + return ModuleEnum.UNKNOWN; + } + + public static boolean validate(Integer code) { + if (code == null) { + return false; + } + for (ModuleEnum state : ModuleEnum.values()) { + if (state.getCode() == code) { + return true; + } + } + + return false; + } + +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetLocationEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetLocationEnum.java new file mode 100644 index 00000000..aeeff95d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetLocationEnum.java @@ -0,0 +1,36 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author limeng + * @date 2017/11/21 + */ +public enum OffsetLocationEnum { + /** + * 存储于zk + */ + ZOOKEEPER("zookeeper"), + + /** + * 存储于broker + */ + BROKER("broker"); + + public final String location; + + OffsetLocationEnum(String location) { + this.location = location; + } + + public static OffsetLocationEnum getOffsetStoreLocation(String location) { + if (location == null) { + return null; + } + + for (OffsetLocationEnum offsetStoreLocation: OffsetLocationEnum.values()) { + if (offsetStoreLocation.location.equals(location)) { + return offsetStoreLocation; + } + } + return null; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetPosEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetPosEnum.java new file mode 100644 index 00000000..7f5deea2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OffsetPosEnum.java @@ -0,0 +1,42 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * offset获取的位置 + * @author zengqiao + * @date 19/5/29 + */ +public enum OffsetPosEnum { + NONE(0), + + BEGINNING(1), + + END(2), + + BOTH(3); + + public final Integer code; + + OffsetPosEnum(Integer code) { + this.code = code; + } + + public Integer getCode() { + return code; + } + + public static OffsetPosEnum getOffsetPosEnum(Integer code) { + for (OffsetPosEnum offsetPosEnum : values()) { + if (offsetPosEnum.getCode().equals(code)) { + return offsetPosEnum; + } + } + return NONE; + } + + @Override + public String toString() { + return "OffsetPosEnum{" + + "code=" + code + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperateEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperateEnum.java new file mode 100644 index 00000000..2bc874ec --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperateEnum.java @@ -0,0 +1,59 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zhongyuankai + * @date 20/09/03 + */ +public enum OperateEnum { + ADD(0, "新增"), + + DELETE(1, "删除"), + + EDIT(2, "修改"), + + UNKNOWN(-1, "unknown"), + ; + + OperateEnum(int code, String message) { + this.code = code; + this.message = message; + } + + private int code; + + private String message; + + public int getCode() { + return code; + } + + public String getMessage() { + return message; + } + + public static OperateEnum valueOf(Integer code) { + if (code == null) { + return OperateEnum.UNKNOWN; + } + for (OperateEnum state : OperateEnum.values()) { + if (state.getCode() == code) { + return state; + } + } + + return OperateEnum.UNKNOWN; + } + + public static boolean validate(Integer code) { + if (code == null) { + return false; + } + for (OperateEnum state : OperateEnum.values()) { + if (state.getCode() == code) { + return true; + } + } + + return false; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperationStatusEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperationStatusEnum.java new file mode 100644 index 00000000..cf8f53d2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/OperationStatusEnum.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 操作状态类型 + * @author zengqiao + * @date 19/11/21 + */ +public enum OperationStatusEnum { + CREATE(0, "创建"), + UPDATE(1, "更新"), + DELETE(2, "删除"), + ; + + private Integer code; + + private String message; + + OperationStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/PeakFlowStatusEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/PeakFlowStatusEnum.java new file mode 100644 index 00000000..9b71f038 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/PeakFlowStatusEnum.java @@ -0,0 +1,50 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 峰值状态枚举 + * @author zengqiao + * @date 20/5/11 + */ +public enum PeakFlowStatusEnum { + BETWEEN_ALL(0, "全部"), + BETWEEN_00_60(1, "使用率0%-60%"), + BETWEEN_60_80(2, "使用率60%-80%"), + BETWEEN_80_100(3, "使用率80%-100%"), + BETWEEN_100_PLUS(4, "使用率大于100%"), + BETWEEN_EXCEPTION(5, "数据获取失败"), + + ; + + public Integer code; + + public String message; + + PeakFlowStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "PeakFlowStatusEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/RebalanceDimensionEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/RebalanceDimensionEnum.java new file mode 100644 index 00000000..6659f904 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/RebalanceDimensionEnum.java @@ -0,0 +1,31 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 优先副本选举维度 + * @author zengqiao + * @date 20/4/23 + */ +public enum RebalanceDimensionEnum { + CLUSTER(0, "Cluster维度"), + REGION(1, "Region维度"), + BROKER(2, "Broker维度"), + TOPIC(3, "Topic维度"), + ; + + private Integer code; + + private String message; + + RebalanceDimensionEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/SinkMonitorSystemEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/SinkMonitorSystemEnum.java new file mode 100644 index 00000000..b843a90c --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/SinkMonitorSystemEnum.java @@ -0,0 +1,45 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 是否上报监控系统 + * @author zengqiao + * @date 20/9/25 + */ +public enum SinkMonitorSystemEnum { + SINK_MONITOR_SYSTEM(0, "上报监控系统"), + NOT_SINK_MONITOR_SYSTEM(1, "不上报监控系统"), + ; + + private Integer code; + + private String message; + + SinkMonitorSystemEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "SinkMonitorSystemEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusEnum.java new file mode 100644 index 00000000..ebf3dc82 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusEnum.java @@ -0,0 +1,72 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * 任务状态 + * @author zengqiao + * @date 2017/6/29. + */ +public enum TaskStatusEnum { + UNKNOWN( -1, "未知"), + + NEW( 0, "新建"), + + RUNNABLE( 20, "就绪"), + WAITING( 21, "等待"), + + RUNNING( 30, "运行中"), + KILLING( 31, "杀死中"), + + BLOCKED( 40, "暂停"), + + UNFINISHED( 99, "未完成"), + FINISHED( 100, "完成"), + + SUCCEED( 101, "成功"), + FAILED( 102, "失败"), + CANCELED( 103, "取消"), + IGNORED( 104, "忽略"), + TIMEOUT( 105, "超时"), + KILL_FAILED(106, "杀死失败"), + + ; + + private Integer code; + + private String message; + + TaskStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "TaskStatusEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } + + public static Boolean isFinished(Integer code) { + if (code >= FINISHED.getCode()) { + return true; + } + return false; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusReassignEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusReassignEnum.java new file mode 100644 index 00000000..7fd6ef8f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TaskStatusReassignEnum.java @@ -0,0 +1,55 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/6/11 + */ +public enum TaskStatusReassignEnum { + UNKNOWN(TaskStatusEnum.UNKNOWN), + + NEW(TaskStatusEnum.NEW), + + RUNNABLE(TaskStatusEnum.RUNNABLE), + + RUNNING(TaskStatusEnum.RUNNING), + +// FINISHED(TaskStatusEnum.FINISHED), + SUCCEED(TaskStatusEnum.SUCCEED), + FAILED(TaskStatusEnum.FAILED), + CANCELED(TaskStatusEnum.CANCELED), + ; + + private Integer code; + + private String message; + + TaskStatusReassignEnum(TaskStatusEnum taskStatusEnum) { + this.code = taskStatusEnum.getCode(); + this.message = taskStatusEnum.getMessage(); + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } + + @Override + public String toString() { + return "TaskStatusReassignEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } + + public static Boolean isFinished(Integer code) { + if (SUCCEED.getCode().equals(code) + || FAILED.getCode().equals(code) + || CANCELED.getCode().equals(code)) { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicAuthorityEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicAuthorityEnum.java new file mode 100644 index 00000000..2cfba027 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicAuthorityEnum.java @@ -0,0 +1,36 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * topic权限 + * @author zhongyuankai + * @date 20/4/29 + */ +public enum TopicAuthorityEnum { + DENY(0, "无"), + + READ(1, "只读"), + + WRITE(2, "只写"), + + READ_WRITE(3, "可读可写"), + + OWNER(4, "可管理"), + ; + + private Integer code; + + private String message; + + TopicAuthorityEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicOffsetChangedEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicOffsetChangedEnum.java new file mode 100644 index 00000000..ecb6b2f1 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicOffsetChangedEnum.java @@ -0,0 +1,45 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * @author zengqiao + * @date 20/8/24 + */ +public enum TopicOffsetChangedEnum { + UNKNOWN(-1, "unknown"), + NO(0, "no"), + YES(1, "yes"), + ; + + private Integer code; + + private String message; + + TopicOffsetChangedEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "TopicOffsetChangedEnum{" + + "code=" + code + + ", message='" + message + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicReassignActionEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicReassignActionEnum.java new file mode 100644 index 00000000..2c4361c6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/TopicReassignActionEnum.java @@ -0,0 +1,39 @@ +package com.xiaojukeji.kafka.manager.common.bizenum; + +/** + * Topic迁移动作 + * @author zengqiao + * @date 20/4/16 + */ +public enum TopicReassignActionEnum { + START("start"), + MODIFY("modify"), + CANCEL("cancel"), + ; + + private String action; + + TopicReassignActionEnum(String action) { + this.action = action; + } + + public String getAction() { + return action; + } + + @Override + public String toString() { + return "TopicReassignActionEnum{" + + "action='" + action + '\'' + + '}'; + } + + public static TopicReassignActionEnum getByAction(String action) { + for (TopicReassignActionEnum elem: TopicReassignActionEnum.values()) { + if (elem.action.equals(action)) { + return elem; + } + } + return null; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/gateway/GatewayConfigKeyEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/gateway/GatewayConfigKeyEnum.java new file mode 100644 index 00000000..667be791 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/bizenum/gateway/GatewayConfigKeyEnum.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.bizenum.gateway; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public enum GatewayConfigKeyEnum { + SD_CLUSTER_ID("SERVICE_DISCOVERY_CLUSTER_ID", "SERVICE_DISCOVERY_CLUSTER_ID"), + SD_QUEUE_SIZE("SERVICE_DISCOVERY_QUEUE_SIZE", "SERVICE_DISCOVERY_QUEUE_SIZE"), + SD_APP_ID_RATE("SERVICE_DISCOVERY_APPID_RATE", "SERVICE_DISCOVERY_APPID_RATE"), + SD_IP_RATE("SERVICE_DISCOVERY_IP_RATE", "SERVICE_DISCOVERY_IP_RATE"), + SD_SP_RATE("SERVICE_DISCOVERY_SP_RATE", "SERVICE_DISCOVERY_SP_RATE"), + + ; + + private String configType; + + private String configName; + + GatewayConfigKeyEnum(String configType, String configName) { + this.configType = configType; + this.configName = configName; + } + + public String getConfigType() { + return configType; + } + + public void setConfigType(String configType) { + this.configType = configType; + } + + public String getConfigName() { + return configName; + } + + public void setConfigName(String configName) { + this.configName = configName; + } + + @Override + public String toString() { + return "GatewayConfigKeyEnum{" + + "configType='" + configType + '\'' + + ", configName='" + configName + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiLevelContent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiLevelContent.java new file mode 100644 index 00000000..2447564f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiLevelContent.java @@ -0,0 +1,15 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public class ApiLevelContent { + public static final int LEVEL_VIP_1 = 1; + + public static final int LEVEL_IMPORTANT_2 = 2; + + public static final int LEVEL_NORMAL_3 = 3; + + public static final int LEVEL_DEFAULT_4 = 4; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiPrefix.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiPrefix.java new file mode 100644 index 00000000..5cd1ab5b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ApiPrefix.java @@ -0,0 +1,26 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * Api前缀 + * @author zengqiao + * @date 20/4/16 + */ +public class ApiPrefix { + public static final String API_V1_SSO_PREFIX = "/api/v1/sso/"; + + public static final String API_V1_NORMAL_PREFIX = "/api/v1/normal/"; + + public static final String API_V1_RD_PREFIX = "/api/v1/rd/"; + + public static final String API_V1_OP_PREFIX = "/api/v1/op/"; + + public static final String API_V1_THIRD_PART_PREFIX = "/api/v1/third-part/"; + + public static final String API_V2_THIRD_PART_PREFIX = "/api/v2/third-part/"; + + public static final String API_V1_OBSOLETE_PREFIX = "/api/v1/"; + + public static final String API_V2_OBSOLETE_PREFIX = "/api/v2/"; + + public static final String GATEWAY_API_V1_PREFIX = "/gateway/api/v1/"; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ConfigConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ConfigConstant.java new file mode 100644 index 00000000..faca17b0 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/ConfigConstant.java @@ -0,0 +1,33 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * 配置的常量KEY + * @author zengqiao + * @date 20/7/1 + */ +public class ConfigConstant { + /** + * 专家服务 + */ + public static final String REGION_HOT_TOPIC_CONFIG_KEY = "REGION_HOT_TOPIC_CONFIG"; + public static final String TOPIC_INSUFFICIENT_PARTITION_CONFIG_KEY = "TOPIC_INSUFFICIENT_PARTITION_CONFIG"; + public static final String EXPIRED_TOPIC_CONFIG_KEY = "EXPIRED_TOPIC_CONFIG"; + + /** + * + */ + public static final String PRODUCE_CONSUMER_METRICS_CONFIG_KEY = "PRODUCE_CONSUMER_METRICS_CONFIG_KEY"; + + public static final String PRODUCE_TOPIC_METRICS_CONFIG_KEY = "PRODUCE_TOPIC_METRICS_CONFIG_KEY"; + + public static final long MAX_LIMIT_NUM = 200L; + + /** + * broker 默认最大峰值流量 100M + */ + public static final Long DEFAULT_BROKER_CAPACITY_LIMIT = 100 * 1024 * 1024L; + + public static final String BROKER_CAPACITY_LIMIT_CONFIG_KEY = "BROKER_CAPACITY_LIMIT_CONFIG"; + + public static final String KAFKA_CLUSTER_DO_CONFIG_KEY = "KAFKA_CLUSTER_DO_CONFIG"; +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java new file mode 100644 index 00000000..81c1dc89 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/Constant.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * @author zengqiao + * @date 20/2/28 + */ +public class Constant { + public static final Integer SUCCESS = 0; + + public static final Integer MAX_AVG_BYTES_DURATION = 10; + + public static final Integer BATCH_INSERT_SIZE = 50; + + public static final Integer DEFAULT_SESSION_TIMEOUT_UNIT_MS = 30000; + + public static final Integer MAX_TOPIC_OPERATION_SIZE_PER_REQUEST = 10; + + /** + * 不进行过滤的BrokerId + */ + public static final Integer NOT_FILTER_BROKER_ID = -1; + + /** + * 默认最近20分钟的连接信息 + */ + public static final Long TOPIC_CONNECTION_LATEST_TIME_MS = 20 * 60 * 1000L; + + /** + * 工单相关 + */ + public static final String HANDLE_APP_APPLY_MAX_NUM = "handle_app_apply_order_num"; + + public static final Integer HANDLE_APP_APPLY_MAX_NUM_DEFAULT = 10; + + public static final String AUTO_HANDLE_USER_NAME = "auto_handle"; + + public static final String AUTO_HANDLE_CHINESE_NAME = "自动审批"; + + public static final String UNKNOWN_VERSION = "unknownVersion"; + + public static final String UNKNOWN_USER = "UNKNOWN_USER"; + + public static final String DEFAULT_USER_NAME = "kafka-admin"; + + public static final Integer DEFAULT_MAX_CAL_TOPIC_EXPIRED_DAY = 90; + + public static final Integer INVALID_CODE = -1; +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaConstant.java new file mode 100644 index 00000000..b8c5ef19 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaConstant.java @@ -0,0 +1,17 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * @author zengqiao + * @date 20/5/20 + */ +public class KafkaConstant { + public static final String COORDINATOR_TOPIC_NAME = "__consumer_offsets"; + + public static final String BROKER_HOST_NAME_SUFFIX = ".diditaxi.com"; + + public static final String CLIENT_VERSION_CODE_UNKNOWN = "-1"; + + public static final String CLIENT_VERSION_NAME_UNKNOWN = "unknown"; + + public static final String RETENTION_MS_KEY = "retention.ms"; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaMetricsCollections.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaMetricsCollections.java new file mode 100644 index 00000000..9c7f59e3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/KafkaMetricsCollections.java @@ -0,0 +1,42 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * + * @author zengqiao + * @date 20/4/22 + */ +public class KafkaMetricsCollections { + public static final int COMMON_DETAIL_METRICS = 0; + + /** + * Broker流量详情 + */ + public static final int BROKER_TO_DB_METRICS = 101; // Broker入DB的Metrics指标 + public static final int BROKER_OVERVIEW_PAGE_METRICS = 103; // Broker状态概览的指标 + public static final int BROKER_ANALYSIS_METRICS = 105; // Broker分析的指标 + public static final int BROKER_TOPIC_ANALYSIS_METRICS = 106; // Broker分析的指标 + public static final int BROKER_BASIC_PAGE_METRICS = 107; // Broker基本信息页面的指标 + public static final int BROKER_STATUS_PAGE_METRICS = 108; // Broker状态 + public static final int BROKER_HEALTH_SCORE_METRICS = 109; // Broker健康分 + + /** + * Topic流量详情 + */ + public static final int TOPIC_FLOW_OVERVIEW = 201; + public static final int TOPIC_METRICS_TO_DB = 202; + public static final int TOPIC_REQUEST_TIME_METRICS_TO_DB = 203; + public static final int TOPIC_BASIC_PAGE_METRICS = 204; + public static final int TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS = 205; + public static final int TOPIC_THROTTLED_METRICS_TO_DB = 206; + + + /** + * App+Topic流量详情 + */ + public static final int APP_TOPIC_METRICS_TO_DB = 300; + + /** + * Broker信息 + */ + public static final int BROKER_VERSION = 400; +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LogConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LogConstant.java new file mode 100644 index 00000000..55fa756f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LogConstant.java @@ -0,0 +1,13 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * @author zengqiao + * @date 20/8/10 + */ +public class LogConstant { + public static final String COLLECTOR_METRICS_LOGGER = "COLLECTOR_METRICS_LOGGER"; + + public static final String API_METRICS_LOGGER = "API_METRICS_LOGGER"; + + public static final String SCHEDULED_TASK_LOGGER = "SCHEDULED_TASK_LOGGER"; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LoginConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LoginConstant.java new file mode 100644 index 00000000..bc95dbc2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/LoginConstant.java @@ -0,0 +1,14 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * 登录常量 + * @author zengqiao + * @date 20/5/8 + */ +public class LoginConstant { + public static final String SESSION_USERNAME_KEY = "username"; + + public static final String COOKIE_CHINESE_USERNAME_KEY = "chineseName"; + + public static final Integer COOKIE_OR_SESSION_MAX_AGE_UNIT_MS = 24 * 60 * 60 * 1000; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/SystemCodeConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/SystemCodeConstant.java new file mode 100644 index 00000000..5fc76f03 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/SystemCodeConstant.java @@ -0,0 +1,17 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public class SystemCodeConstant { + public static final String LOG_X = "LogX"; + + public static final String LEO = "leo"; + + public static final String DATA_DREAM = "datadream"; + + public static final String KAFKA_MANAGER = "kafka-manager"; + + public static final String CHORUS = "chorus"; // 治理平台-服务治理 +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicCreationConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicCreationConstant.java new file mode 100644 index 00000000..423c6d1d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicCreationConstant.java @@ -0,0 +1,49 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +import java.util.Properties; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public class TopicCreationConstant { + /** + * LogX创建Topic配置KEY + */ + public static final String LOG_X_CREATE_TOPIC_CONFIG_KEY_NAME = "LOG_X_CREATE_TOPIC_CONFIG"; + + /** + * 治理平台创建Topic配置KEY + */ + public static final String CHORUS_CREATE_TOPIC_CONFIG_KEY_NAME = "CHORUS_CREATE_TOPIC_CONFIG"; + + /** + * 内部创建Topic配置KEY + */ + public static final String INNER_CREATE_TOPIC_CONFIG_KEY = "INNER_CREATE_TOPIC_CONFIG_KEY"; + + public static final Integer DEFAULT_REPLICA = 3; + + public static final Integer DEFAULT_PARTITION_NUM = 1; + + public static final Integer DEFAULT_RETENTION_TIME_UNIT_HOUR = 24; + + public static final String TOPIC_RETENTION_TIME_KEY_NAME = "retention.ms"; + + public static Properties createNewProperties(Long retentionTime) { + Properties properties = new Properties(); + properties.put(TOPIC_RETENTION_TIME_KEY_NAME, String.valueOf(retentionTime)); + return properties; + } + + public static final Long AUTO_EXEC_MAX_BYTES_IN_UNIT_B = 30 * 1024 * 1024L; + + /** + * Topic 前缀 + */ + public static final String TOPIC_NAME_PREFIX_US = "us01_"; + + public static final String TOPIC_NAME_PREFIX_RU = "ru01_"; + + public static final Integer TOPIC_NAME_MAX_LENGTH = 255; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicSampleConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicSampleConstant.java new file mode 100644 index 00000000..5ee15331 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/constant/TopicSampleConstant.java @@ -0,0 +1,19 @@ +package com.xiaojukeji.kafka.manager.common.constant; + +/** + * 采样相关配置 + * @author zengqiao + * @date 20/5/8 + */ +public class TopicSampleConstant { + /** + * TOPIC_SAMPLE_MAX_MSG_NUM: 最大采样条数 + * TOPIC_SAMPLE_MAX_TIMEOUT_MS:采样超时时间 + * TOPIC_SAMPLE_POLL_TIME_OUT_MS:采样单次poll超时时间 + * TOPIC_SAMPLE_MAX_DATA_LENGTH:截断情况下, 采样的数据最大长度 + */ + public static final Integer MAX_MSG_NUM = 100; + public static final Integer MAX_TIMEOUT_UNIT_MS = 10000; + public static final Integer POLL_TIME_OUT_UNIT_MS = 2000; + public static final Integer MAX_DATA_LENGTH_UNIT_BYTE = 2048; +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java similarity index 73% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java index ae943c7c..eb384c47 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ConsumerMetadata.java @@ -3,6 +3,7 @@ package com.xiaojukeji.kafka.manager.common.entity; import kafka.admin.AdminClient; import java.util.*; +import java.util.concurrent.ConcurrentHashMap; /** * @author zengqiao @@ -15,12 +16,17 @@ public class ConsumerMetadata { private Map consumerGroupSummaryMap = new HashMap<>(); + private Map> consumerGroupAppMap = new ConcurrentHashMap<>(); + + public ConsumerMetadata(Set consumerGroupSet, Map> topicNameConsumerGroupMap, - Map consumerGroupSummaryMap) { + Map consumerGroupSummaryMap, + Map> consumerGroupAppMap) { this.consumerGroupSet = consumerGroupSet; this.topicNameConsumerGroupMap = topicNameConsumerGroupMap; this.consumerGroupSummaryMap = consumerGroupSummaryMap; + this.consumerGroupAppMap = consumerGroupAppMap; } public Set getConsumerGroupSet() { @@ -34,4 +40,8 @@ public class ConsumerMetadata { public Map getConsumerGroupSummaryMap() { return consumerGroupSummaryMap; } + + public Map> getConsumerGroupAppMap() { + return consumerGroupAppMap; + } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/DeprecatedResponseResult.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/DeprecatedResponseResult.java new file mode 100644 index 00000000..08b12721 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/DeprecatedResponseResult.java @@ -0,0 +1,83 @@ +package com.xiaojukeji.kafka.manager.common.entity; + +/** + * @author zengqiao + * @date 20/7/27 + */ +public class DeprecatedResponseResult { + public static final String SUCCESS_STATUS = "success"; + + public static final String FAILED_STATUS = "failure"; + + public static final String SUCCESS_MESSAGE = "process succeeded!"; + + public static final String FAILED_MESSAGE = "process failed!"; + + private String status; + + private String message; + + private T data; + + public static DeprecatedResponseResult success(T data) { + DeprecatedResponseResult responseCommonResult = new DeprecatedResponseResult(); + responseCommonResult.setMessage(SUCCESS_MESSAGE); + responseCommonResult.setStatus(SUCCESS_STATUS); + responseCommonResult.setData(data); + return responseCommonResult; + } + + public static DeprecatedResponseResult success() { + DeprecatedResponseResult responseCommonResult = new DeprecatedResponseResult(); + responseCommonResult.setStatus(SUCCESS_STATUS); + responseCommonResult.setMessage(SUCCESS_MESSAGE); + return responseCommonResult; + } + + public static DeprecatedResponseResult failure() { + DeprecatedResponseResult responseCommonResult = new DeprecatedResponseResult(); + responseCommonResult.setMessage(FAILED_MESSAGE); + responseCommonResult.setStatus(FAILED_STATUS); + return responseCommonResult; + } + + public static DeprecatedResponseResult failure(String message) { + DeprecatedResponseResult responseCommonResult = new DeprecatedResponseResult(); + responseCommonResult.setMessage(message); + responseCommonResult.setStatus(FAILED_STATUS); + return responseCommonResult; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + @Override + public String toString() { + return "DeprecatedResponseResult{" + + "status='" + status + '\'' + + ", message='" + message + '\'' + + ", data=" + data + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/KafkaVersion.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/KafkaVersion.java new file mode 100644 index 00000000..ba71d612 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/KafkaVersion.java @@ -0,0 +1,82 @@ +package com.xiaojukeji.kafka.manager.common.entity; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; + +/** + * @author zengqiao + * @date 20/6/15 + */ +public class KafkaVersion { + private static final String DIDI_VERSION_EXTEND = "d"; + + public static final Long VERSION_0_10_3 = 10030000L; // 0.10.2+ + public static final Long VERSION_MAX = Long.MAX_VALUE; + + private volatile String version = null; + + private volatile long versionNum = Long.MAX_VALUE; + + public boolean initialized() { + if (ValidateUtils.isNull(version)) { + return false; + } + return true; + } + + public String getVersion() { + return version; + } + + public long getVersionNum() { + return versionNum; + } + + @Override + public String toString() { + return "KafkaVersion{" + + "version='" + version + '\'' + + ", versionNum=" + versionNum + + '}'; + } + + public long init(String version) { + version = version.toLowerCase(); + String[] splitElems = version.split("-"); + int splitElemLength = splitElems.length; + if (splitElemLength <= 0) { + versionNum = Long.MAX_VALUE; + return versionNum; + } + + try { + // kafka的version + String[] kafkaVersion = splitElems[0].split("\\."); + int kafkaVersionLength = kafkaVersion.length; + + versionNum = kafkaVersionLength > 0? Integer.valueOf(kafkaVersion[0]): 0; + versionNum = versionNum * 100 + (kafkaVersionLength > 1? Integer.valueOf(kafkaVersion[1]): 0); + versionNum = versionNum * 100 + (kafkaVersionLength > 2? Integer.valueOf(kafkaVersion[2]): 0); + } catch (Exception e) { + // Kafka版本信息获取不到时, 直接返回空 + this.versionNum = Long.MAX_VALUE; + return versionNum; + } + + // 成功获取版本信息 + versionNum = versionNum * 10000; + this.version = version; + + // 补充扩展信息 + try { + for (int idx = 0; idx < splitElemLength; ++idx) { + if (splitElems[idx].equals(DIDI_VERSION_EXTEND) && idx < splitElemLength - 1) { + versionNum = versionNum + (Integer.valueOf(splitElems[idx + 1])); + return versionNum; + } + } + } catch (Exception e) { + // 扩展版本信息获取不到时, 忽略 + } + return versionNum; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java similarity index 52% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java index 27561377..7fc3343f 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/Result.java @@ -1,7 +1,6 @@ package com.xiaojukeji.kafka.manager.common.entity; import com.alibaba.fastjson.JSON; -import com.xiaojukeji.kafka.manager.common.constant.StatusCode; import java.io.Serializable; @@ -14,12 +13,13 @@ public class Result implements Serializable { private T data; private String message; - private Integer code; + private String tips; + private int code; public Result(T data) { this.data = data; - this.code = StatusCode.SUCCESS; - this.message = "成功"; + this.code = ResultStatus.SUCCESS.getCode(); + this.message = ResultStatus.SUCCESS.getMessage(); } public Result() { @@ -37,7 +37,6 @@ public class Result implements Serializable { this.code = code; } - public T getData() { return (T)this.data; @@ -58,12 +57,20 @@ public class Result implements Serializable { this.message = message; } - public Integer getCode() + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public int getCode() { return this.code; } - public void setCode(Integer code) + public void setCode(int code) { this.code = code; } @@ -73,4 +80,26 @@ public class Result implements Serializable { { return JSON.toJSONString(this); } + + public static Result buildSuc() { + Result result = new Result(); + result.setCode(ResultStatus.SUCCESS.getCode()); + result.setMessage(ResultStatus.SUCCESS.getMessage()); + return result; + } + + public static Result buildFrom(ResultStatus resultStatus) { + Result result = new Result(); + result.setCode(resultStatus.getCode()); + result.setMessage(resultStatus.getMessage()); + return result; + } + + public static Result buildFrom(ResultStatus resultStatus, Object data) { + Result result = new Result(); + result.setCode(resultStatus.getCode()); + result.setMessage(resultStatus.getMessage()); + result.setData(data); + return result; + } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ResultStatus.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ResultStatus.java new file mode 100644 index 00000000..b63151ac --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ResultStatus.java @@ -0,0 +1,154 @@ +package com.xiaojukeji.kafka.manager.common.entity; + +import com.xiaojukeji.kafka.manager.common.constant.Constant; + +/** + * 返回状态 + * @author zengqiao + * @date 20/4/16 + */ +public enum ResultStatus { + SUCCESS(Constant.SUCCESS, "success"), + LOGIN_FAILED(1, "login failed, please check username and password"), + + + /** + * 内部依赖错误, [1000, 1200) + * ------------------------------------------------------------------------------------------ + */ + MYSQL_ERROR(1000, "operate database failed"), + + CONNECT_ZOOKEEPER_FAILED(1000, "connect zookeeper failed"), + READ_ZOOKEEPER_FAILED(1000, "read zookeeper failed"), + READ_JMX_FAILED(1000, "read jmx failed"), + + + // 内部依赖错误 —— Kafka特定错误, [1000, 1100) + BROKER_NUM_NOT_ENOUGH(1000, "broker not enough"), + CONTROLLER_NOT_ALIVE(1000, "controller not alive"), + CLUSTER_METADATA_ERROR(1000, "cluster metadata error"), + TOPIC_CONFIG_ERROR(1000, "topic config error"), + + + /** + * 外部依赖错误, [1200, 1400) + * ------------------------------------------------------------------------------------------ + */ + CALL_CLUSTER_TASK_AGENT_FAILED(1000, " call cluster task agent failed"), + CALL_MONITOR_SYSTEM_ERROR(1000, " call monitor-system failed"), + + + + /** + * 外部用户操作错误, [1400, 1600) + * ------------------------------------------------------------------------------------------ + */ + PARAM_ILLEGAL(1400, "param illegal"), + OPERATION_FAILED(1401, "operation failed"), + OPERATION_FORBIDDEN(1402, "operation forbidden"), + API_CALL_EXCEED_LIMIT(1403, "api call exceed limit"), + + // 资源不存在 + CLUSTER_NOT_EXIST(10000, "cluster not exist"), + BROKER_NOT_EXIST(10000, "broker not exist"), + TOPIC_NOT_EXIST(10000, "topic not exist"), + PARTITION_NOT_EXIST(10000, "partition not exist"), + + ACCOUNT_NOT_EXIST(10000, "account not exist"), + APP_NOT_EXIST(1000, "app not exist"), + ORDER_NOT_EXIST(1000, "order not exist"), + CONFIG_NOT_EXIST(1000, "config not exist"), + IDC_NOT_EXIST(1000, "idc not exist"), + TASK_NOT_EXIST(1110, "task not exist"), + + AUTHORITY_NOT_EXIST(1000, "authority not exist"), + + MONITOR_NOT_EXIST(1110, "monitor not exist"), + + QUOTA_NOT_EXIST(1000, "quota not exist, please check clusterId, topicName and appId"), + + // 资源不存在, 已存在, 已被使用 + RESOURCE_NOT_EXIST(1200, "资源不存在"), + RESOURCE_ALREADY_EXISTED(1200, "资源已经存在"), + RESOURCE_NAME_DUPLICATED(1200, "资源名称重复"), + RESOURCE_ALREADY_USED(1000, "资源早已被使用"), + + + /** + * 资源参数错误 + */ + CG_LOCATION_ILLEGAL(10000, "consumer group location illegal"), + ORDER_ALREADY_HANDLED(1000, "order already handled"), + + APP_ID_OR_PASSWORD_ILLEGAL(1000, "app or password illegal"), + SYSTEM_CODE_ILLEGAL(1000, "system code illegal"), + + + + + + + + + + /////////////////////////////////////////////////////////////// + + USER_WITHOUT_AUTHORITY(1000, "user without authority"), + + + + JSON_PARSER_ERROR(1000, "json parser error"), + + + TOPIC_OPERATION_PARAM_NULL_POINTER(2, "参数错误"), + TOPIC_OPERATION_PARTITION_NUM_ILLEGAL(3, "分区数错误"), + TOPIC_OPERATION_BROKER_NUM_NOT_ENOUGH(4, "Broker数不足错误"), + TOPIC_OPERATION_TOPIC_NAME_ILLEGAL(5, "Topic名称非法"), + TOPIC_OPERATION_TOPIC_EXISTED(6, "Topic已存在"), + TOPIC_OPERATION_UNKNOWN_TOPIC_PARTITION(7, "Topic未知"), + TOPIC_OPERATION_TOPIC_CONFIG_ILLEGAL(8, "Topic配置错误"), + TOPIC_OPERATION_TOPIC_IN_DELETING(9, "Topic正在删除"), + TOPIC_OPERATION_UNKNOWN_ERROR(10, "未知错误"), + TOPIC_EXIST_CONNECT_CANNOT_DELETE(10, "topic exist connect cannot delete"), + EXIST_TOPIC_CANNOT_DELETE(10, "exist topic cannot delete"), + + + /** + * 工单 + */ + CHANGE_ZOOKEEPER_FORBIDEN(100, "change zookeeper forbiden"), +// APP_EXIST_TOPIC_AUTHORITY_CANNOT_DELETE(1000, "app exist topic authority cannot delete"), + + UPLOAD_FILE_FAIL(1000, "upload file fail"), + FILE_TYPE_NOT_SUPPORT(1000, "File type not support"), + DOWNLOAD_FILE_FAIL(1000, "download file fail"), + + + TOPIC_ALREADY_EXIST(17400, "topic already existed"), + CONSUMER_GROUP_NOT_EXIST(17411, "consumerGroup not exist"), + ; + + private int code; + private String message; + + ResultStatus(int code, String message) { + this.code = code; + this.message = message; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/TopicOperationResult.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/TopicOperationResult.java new file mode 100644 index 00000000..3c979d8d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/TopicOperationResult.java @@ -0,0 +1,83 @@ +package com.xiaojukeji.kafka.manager.common.entity; + +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/2 + */ +public class TopicOperationResult { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "状态码, 0:成功, 其他失败") + private Integer code; + + @ApiModelProperty(value = "信息") + private String message; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "TopicOperationResult{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", code=" + code + + ", message='" + message + '\'' + + '}'; + } + + public static TopicOperationResult buildFrom(Long clusterId, String topicName, Result rs) { + return buildFrom(clusterId, topicName, rs.getCode(), rs.getMessage()); + } + + public static TopicOperationResult buildFrom(Long clusterId, String topicName, ResultStatus rs) { + return buildFrom(clusterId, topicName, rs.getCode(), rs.getMessage()); + } + + private static TopicOperationResult buildFrom(Long clusterId, + String topicName, + Integer code, + String message) { + TopicOperationResult result = new TopicOperationResult(); + result.setClusterId(clusterId); + result.setTopicName(topicName); + result.setCode(code); + result.setMessage(message); + return result; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/AppTopicDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/AppTopicDTO.java new file mode 100644 index 00000000..ac202605 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/AppTopicDTO.java @@ -0,0 +1,91 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao; + +/** + * AppTopic信息 + * @author zengqiao + * @date 20/5/11 + */ +public class AppTopicDTO { + private Long logicalClusterId; + + private String logicalClusterName; + + private Long physicalClusterId; + + private String topicName; + + private Integer access; + + private String operator; + + private Long gmtCreate; + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "AppTopicDTO{" + + "logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", physicalClusterId=" + physicalClusterId + + ", topicName='" + topicName + '\'' + + ", access=" + access + + ", operator='" + operator + '\'' + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerBasicDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerBasicDTO.java similarity index 97% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerBasicDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerBasicDTO.java index 384cdf33..eb8e01d2 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/BrokerBasicDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerBasicDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; +package com.xiaojukeji.kafka.manager.common.entity.ao; /** * Broker基本信息 diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerOverviewDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerOverviewDTO.java new file mode 100644 index 00000000..7ce643b6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/BrokerOverviewDTO.java @@ -0,0 +1,189 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao; + +import com.xiaojukeji.kafka.manager.common.entity.metrics.BrokerMetrics; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import com.xiaojukeji.kafka.manager.common.zookeeper.znode.brokers.BrokerMetadata; + +/** + * @author zengqiao_cn@163.com + * @date 19/4/21 + */ +public class BrokerOverviewDTO { + private Integer brokerId; + + private String host; + + private Integer port; + + private Integer jmxPort; + + private Long startTime; + + private Object byteIn; + + private Object byteOut; + + private Integer partitionCount; + + private Integer underReplicatedPartitions; + + private Boolean underReplicated; + + private Integer status; + + private Integer peakFlowStatus; + + private String kafkaVersion; + + private Integer leaderCount; + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public Integer getJmxPort() { + return jmxPort; + } + + public void setJmxPort(Integer jmxPort) { + this.jmxPort = jmxPort; + } + + public Long getStartTime() { + return startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Object getByteIn() { + return byteIn; + } + + public void setByteIn(Object byteIn) { + this.byteIn = byteIn; + } + + public Object getByteOut() { + return byteOut; + } + + public void setByteOut(Object byteOut) { + this.byteOut = byteOut; + } + + public Integer getPartitionCount() { + return partitionCount; + } + + public void setPartitionCount(Integer partitionCount) { + this.partitionCount = partitionCount; + } + + public Integer getUnderReplicatedPartitions() { + return underReplicatedPartitions; + } + + public void setUnderReplicatedPartitions(Integer underReplicatedPartitions) { + this.underReplicatedPartitions = underReplicatedPartitions; + } + + public Boolean getUnderReplicated() { + return underReplicated; + } + + public void setUnderReplicated(Boolean underReplicated) { + this.underReplicated = underReplicated; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getPeakFlowStatus() { + return peakFlowStatus; + } + + public void setPeakFlowStatus(Integer peakFlowStatus) { + this.peakFlowStatus = peakFlowStatus; + } + + public String getKafkaVersion() { + return kafkaVersion; + } + + public void setKafkaVersion(String kafkaVersion) { + this.kafkaVersion = kafkaVersion; + } + + public Integer getLeaderCount() { + return leaderCount; + } + + public void setLeaderCount(Integer leaderCount) { + this.leaderCount = leaderCount; + } + + public static BrokerOverviewDTO newInstance(BrokerMetadata brokerMetadata, + BrokerMetrics brokerMetrics, + String kafkaVersion) { + BrokerOverviewDTO brokerOverviewDTO = new BrokerOverviewDTO(); + brokerOverviewDTO.setBrokerId(brokerMetadata.getBrokerId()); + brokerOverviewDTO.setHost(brokerMetadata.getHost()); + brokerOverviewDTO.setPort(brokerMetadata.getPort()); + brokerOverviewDTO.setJmxPort(brokerMetadata.getJmxPort()); + brokerOverviewDTO.setStartTime(brokerMetadata.getTimestamp()); + brokerOverviewDTO.setStatus(0); + if (brokerMetrics == null) { + return brokerOverviewDTO; + } + brokerOverviewDTO.setByteIn( + brokerMetrics.getSpecifiedMetrics("BytesInPerSecOneMinuteRate") + ); + brokerOverviewDTO.setByteOut( + brokerMetrics.getSpecifiedMetrics("BytesOutPerSecOneMinuteRate") + ); + brokerOverviewDTO.setPartitionCount( + brokerMetrics.getSpecifiedMetrics("PartitionCountValue", Integer.class) + ); + brokerOverviewDTO.setUnderReplicatedPartitions( + brokerMetrics.getSpecifiedMetrics("UnderReplicatedPartitionsValue", Integer.class) + ); + + if (!ValidateUtils.isNull(brokerOverviewDTO.getUnderReplicatedPartitions())) { + brokerOverviewDTO.setUnderReplicated(brokerOverviewDTO.getUnderReplicatedPartitions() > 0); + } + brokerOverviewDTO.setLeaderCount( + brokerMetrics.getSpecifiedMetrics("LeaderCountValue", Integer.class) + ); + brokerOverviewDTO.setKafkaVersion(kafkaVersion); + return brokerOverviewDTO; + } + + +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/ClusterDetailDTO.java similarity index 56% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterDetailVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/ClusterDetailDTO.java index e5d2bf7c..937d9cf8 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterDetailVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/ClusterDetailDTO.java @@ -1,65 +1,43 @@ -package com.xiaojukeji.kafka.manager.web.vo.cluster; +package com.xiaojukeji.kafka.manager.common.entity.ao; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import java.util.Date; /** - * ClusterDetailVO - * @author huangyiminghappy@163.com - * @date 2019/3/15 + * @author zengqiao + * @date 20/4/23 */ -@ApiModel(value="ClusterDetailVO", description="集群详细信息") -public class ClusterDetailVO { - @ApiModelProperty(value="集群Id") +public class ClusterDetailDTO { private Long clusterId; - @ApiModelProperty(value="集群名称") private String clusterName; - @ApiModelProperty(value="集群ZK地址") private String zookeeper; - @ApiModelProperty(value="bootstrap地址") private String bootstrapServers; - @ApiModelProperty(value="kafka版本") private String kafkaVersion; - @ApiModelProperty(value="broker数量") - private Integer brokerNum; + private String idc; - @ApiModelProperty(value="topic数量") - private Integer topicNum; + private Integer mode; - @ApiModelProperty(value="consumerGroup数量") - private Integer consumerGroupNum; + private String securityProperties; - @ApiModelProperty(value="controllerId") - private Integer controllerId; - - @ApiModelProperty(value="安全协议") - private String securityProtocol; - - @ApiModelProperty(value="SASL机制") - private String saslMechanism; - - @ApiModelProperty(value="SASL的JSSA配置") - private String saslJaasConfig; - - @ApiModelProperty(value="regionNum数") - private Integer regionNum; - - @ApiModelProperty(value = "开启告警[0:不开启, 1:开启]") - private Integer alarmFlag; - - @ApiModelProperty(value="是否已经删除,0不删除,1删除") private Integer status; - @ApiModelProperty(value="集群创建时间") - private Long gmtCreate; + private Date gmtCreate; - @ApiModelProperty(value="集群修改时间") - private Long gmtModify; + private Date gmtModify; + + private Integer brokerNum; + + private Integer topicNum; + + private Integer consumerGroupNum; + + private Integer controllerId; + + private Integer regionNum; public Long getClusterId() { return clusterId; @@ -101,6 +79,54 @@ public class ClusterDetailVO { this.kafkaVersion = kafkaVersion; } + public String getIdc() { + return idc; + } + + public void setIdc(String idc) { + this.idc = idc; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getSecurityProperties() { + return securityProperties; + } + + public void setSecurityProperties(String securityProperties) { + this.securityProperties = securityProperties; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + public Integer getBrokerNum() { return brokerNum; } @@ -133,30 +159,6 @@ public class ClusterDetailVO { this.controllerId = controllerId; } - public String getSecurityProtocol() { - return securityProtocol; - } - - public void setSecurityProtocol(String securityProtocol) { - this.securityProtocol = securityProtocol; - } - - public String getSaslMechanism() { - return saslMechanism; - } - - public void setSaslMechanism(String saslMechanism) { - this.saslMechanism = saslMechanism; - } - - public String getSaslJaasConfig() { - return saslJaasConfig; - } - - public void setSaslJaasConfig(String saslJaasConfig) { - this.saslJaasConfig = saslJaasConfig; - } - public Integer getRegionNum() { return regionNum; } @@ -165,58 +167,25 @@ public class ClusterDetailVO { this.regionNum = regionNum; } - public Integer getAlarmFlag() { - return alarmFlag; - } - - public void setAlarmFlag(Integer alarmFlag) { - this.alarmFlag = alarmFlag; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public Long getGmtCreate() { - return gmtCreate; - } - - public void setGmtCreate(Long gmtCreate) { - this.gmtCreate = gmtCreate; - } - - public Long getGmtModify() { - return gmtModify; - } - - public void setGmtModify(Long gmtModify) { - this.gmtModify = gmtModify; - } - @Override public String toString() { - return "ClusterDetailVO{" + + return "ClusterDetailDTO{" + "clusterId=" + clusterId + ", clusterName='" + clusterName + '\'' + ", zookeeper='" + zookeeper + '\'' + ", bootstrapServers='" + bootstrapServers + '\'' + ", kafkaVersion='" + kafkaVersion + '\'' + + ", idc='" + idc + '\'' + + ", mode='" + mode + '\'' + + ", securityProperties='" + securityProperties + '\'' + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + ", brokerNum=" + brokerNum + ", topicNum=" + topicNum + ", consumerGroupNum=" + consumerGroupNum + ", controllerId=" + controllerId + - ", securityProtocol='" + securityProtocol + '\'' + - ", saslMechanism='" + saslMechanism + '\'' + - ", saslJaasConfig='" + saslJaasConfig + '\'' + ", regionNum=" + regionNum + - ", alarmFlag=" + alarmFlag + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + '}'; } -} +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionAttributeDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionAttributeDTO.java new file mode 100644 index 00000000..e9e648ff --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionAttributeDTO.java @@ -0,0 +1,24 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao; + +/** + * @author zhongyuankai + * @date 2020/5/26 + */ +public class PartitionAttributeDTO { + private Long logSize; + + public Long getLogSize() { + return logSize; + } + + public void setLogSize(Long logSize) { + this.logSize = logSize; + } + + @Override + public String toString() { + return "PartitionAttributeDTO{" + + "logSize=" + logSize + + '}'; + } +} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/PartitionOffsetDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionOffsetDTO.java similarity index 95% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/PartitionOffsetDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionOffsetDTO.java index 3ce2059f..bfe80a6b 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/PartitionOffsetDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/PartitionOffsetDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto; +package com.xiaojukeji.kafka.manager.common.entity.ao; /** * Topic Offset diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/RdTopicBasic.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/RdTopicBasic.java new file mode 100644 index 00000000..3cecd3cf --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/RdTopicBasic.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao; + +import java.util.Properties; + +/** + * @author zengqiao + * @date 20/6/10 + */ +public class RdTopicBasic { + private Long clusterId; + + private String clusterName; + + private String topicName; + + private Long retentionTime; + + private String appId; + + private String appName; + + private Properties properties; + + private String description; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "RdTopicBasic{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", retentionTime=" + retentionTime + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", properties=" + properties + + ", description='" + description + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/TopicDiskLocation.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/TopicDiskLocation.java new file mode 100644 index 00000000..dde7deb8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/TopicDiskLocation.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/7/8 + */ +public class TopicDiskLocation { + private Long clusterId; + + private String topicName; + + private Integer brokerId; + + private String diskName; + + private List leaderPartitions; + + private List followerPartitions; + + private Boolean isUnderReplicated; + + private List underReplicatedPartitions; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getDiskName() { + return diskName; + } + + public void setDiskName(String diskName) { + this.diskName = diskName; + } + + public List getLeaderPartitions() { + return leaderPartitions; + } + + public void setLeaderPartitions(List leaderPartitions) { + this.leaderPartitions = leaderPartitions; + } + + public List getFollowerPartitions() { + return followerPartitions; + } + + public void setFollowerPartitions(List followerPartitions) { + this.followerPartitions = followerPartitions; + } + + public Boolean getUnderReplicated() { + return isUnderReplicated; + } + + public void setUnderReplicated(Boolean underReplicated) { + isUnderReplicated = underReplicated; + } + + public List getUnderReplicatedPartitions() { + return underReplicatedPartitions; + } + + public void setUnderReplicatedPartitions(List underReplicatedPartitions) { + this.underReplicatedPartitions = underReplicatedPartitions; + } + + @Override + public String toString() { + return "TopicDiskLocation{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", brokerId=" + brokerId + + ", diskName='" + diskName + '\'' + + ", leaderPartitions=" + leaderPartitions + + ", followerPartitions=" + followerPartitions + + ", isUnderReplicated=" + isUnderReplicated + + ", underReplicatedPartitions=" + underReplicatedPartitions + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/account/Account.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/account/Account.java new file mode 100644 index 00000000..b387e6d5 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/account/Account.java @@ -0,0 +1,71 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.account; + +import com.xiaojukeji.kafka.manager.common.bizenum.AccountRoleEnum; + +/** + * 用户信息 + * @author zengqiao + * @date 20/6/10 + */ +public class Account { + private String username; + + private String chineseName; + + private String department; + + private AccountRoleEnum accountRoleEnum; + + public Account(String username, String chineseName, String department, AccountRoleEnum accountRoleEnum) { + this.username = username; + this.chineseName = chineseName; + this.department = department; + this.accountRoleEnum = accountRoleEnum; + } + + public Account() { + super(); + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getChineseName() { + return chineseName; + } + + public void setChineseName(String chineseName) { + this.chineseName = chineseName; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public AccountRoleEnum getAccountRoleEnum() { + return accountRoleEnum; + } + + public void setAccountRoleEnum(AccountRoleEnum accountRoleEnum) { + this.accountRoleEnum = accountRoleEnum; + } + + @Override + public String toString() { + return "Account{" + + "username='" + username + '\'' + + ", chineseName='" + chineseName + '\'' + + ", department='" + department + '\'' + + ", accountRoleEnum=" + accountRoleEnum + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisBrokerDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisBrokerDTO.java similarity index 97% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisBrokerDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisBrokerDTO.java index b47e071b..a5441f86 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisBrokerDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisBrokerDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.analysis; +package com.xiaojukeji.kafka.manager.common.entity.ao.analysis; import java.util.List; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisTopicDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisTopicDTO.java similarity index 98% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisTopicDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisTopicDTO.java index 6428f3a4..cf78e887 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/analysis/AnalysisTopicDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/analysis/AnalysisTopicDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.analysis; +package com.xiaojukeji.kafka.manager.common.entity.ao.analysis; /** * @author zengqiao diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/api/ApiCount.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/api/ApiCount.java new file mode 100644 index 00000000..aefe940a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/api/ApiCount.java @@ -0,0 +1,50 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.api; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author zengqiao + * @date 20/7/27 + */ +public class ApiCount { + private int apiLevel; + + private Integer maxNum; + + private AtomicInteger currentNum; + + public ApiCount(int apiLevel, Integer maxNum, AtomicInteger currentNum) { + this.apiLevel = apiLevel; + this.maxNum = maxNum; + this.currentNum = currentNum; + } + + public int getApiLevel() { + return apiLevel; + } + + public Integer getMaxNum() { + return maxNum; + } + + public AtomicInteger getCurrentNum() { + return currentNum; + } + + public Boolean incAndCheckIsOverFlow() { + return maxNum < currentNum.incrementAndGet(); + } + + public int decPresentNum() { + return currentNum.decrementAndGet(); + } + + @Override + public String toString() { + return "ApiCount{" + + "apiLevel=" + apiLevel + + ", maxNum=" + maxNum + + ", currentNum=" + currentNum + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/ClusterBrokerStatus.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/ClusterBrokerStatus.java new file mode 100644 index 00000000..33f1e74e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/ClusterBrokerStatus.java @@ -0,0 +1,37 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.cluster; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/7/14 + */ +public class ClusterBrokerStatus { + private List brokerReplicaStatusList; + + private List brokerBytesInStatusList; + + public List getBrokerReplicaStatusList() { + return brokerReplicaStatusList; + } + + public void setBrokerReplicaStatusList(List brokerReplicaStatusList) { + this.brokerReplicaStatusList = brokerReplicaStatusList; + } + + public List getBrokerBytesInStatusList() { + return brokerBytesInStatusList; + } + + public void setBrokerBytesInStatusList(List brokerBytesInStatusList) { + this.brokerBytesInStatusList = brokerBytesInStatusList; + } + + @Override + public String toString() { + return "ClusterBrokerStatus{" + + "brokerReplicaStatusList=" + brokerReplicaStatusList + + ", brokerBytesInStatusList=" + brokerBytesInStatusList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalCluster.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalCluster.java new file mode 100644 index 00000000..86941d0e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalCluster.java @@ -0,0 +1,123 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.cluster; + +/** + * @author zengqiao + * @date 20/4/1 + */ +public class LogicalCluster { + private Long logicalClusterId; + + private String logicalClusterName; + + private Integer mode; + + private Integer topicNum; + + private String clusterVersion; + + private Long physicalClusterId; + + private String bootstrapServers; + + private String description; + + private Long gmtCreate; + + private Long gmtModify; + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public Integer getTopicNum() { + return topicNum; + } + + public void setTopicNum(Integer topicNum) { + this.topicNum = topicNum; + } + + public String getClusterVersion() { + return clusterVersion; + } + + public void setClusterVersion(String clusterVersion) { + this.clusterVersion = clusterVersion; + } + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Long gmtModify) { + this.gmtModify = gmtModify; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "LogicalCluster{" + + "logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", mode=" + mode + + ", topicNum=" + topicNum + + ", clusterVersion='" + clusterVersion + '\'' + + ", physicalClusterId=" + physicalClusterId + + ", bootstrapServers='" + bootstrapServers + '\'' + + ", description='" + description + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicMetricsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalClusterMetrics.java similarity index 70% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicMetricsVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalClusterMetrics.java index 7ca5000c..a3cb9c34 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicMetricsVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/cluster/LogicalClusterMetrics.java @@ -1,40 +1,23 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +package com.xiaojukeji.kafka.manager.common.entity.ao.cluster; /** - * @author huangyiminghappy@163.com - * @date 2019-03-20 + * @author zengqiao + * @date 20/6/29 */ -@ApiModel(value = "Topic流量信息") -public class TopicMetricsVO { - @ApiModelProperty(value = "每秒流入消息数") - private Double messagesInPerSec = 0.0; +public class LogicalClusterMetrics { - @ApiModelProperty(value = "每秒流入字节数") - private Double bytesInPerSec = 0.0; - - @ApiModelProperty(value = "每秒流出字节数") - private Double bytesOutPerSec = 0.0; - - @ApiModelProperty(value = "每秒拒绝字节数") - private Double bytesRejectedPerSec = 0.0; - - @ApiModelProperty(value = "每秒请求数") private Double totalProduceRequestsPerSec = 0.0; - @ApiModelProperty(value = "创建时间") + private Double bytesInPerSec = 0.0; + + private Double bytesOutPerSec = 0.0; + + private Double bytesRejectedPerSec = 0.0; + + private Double messagesInPerSec = 0.0; + private Long gmtCreate; - public Double getMessagesInPerSec() { - return messagesInPerSec; - } - - public void setMessagesInPerSec(Double messagesInPerSec) { - this.messagesInPerSec = messagesInPerSec; - } - public Double getBytesInPerSec() { return bytesInPerSec; } @@ -59,12 +42,12 @@ public class TopicMetricsVO { this.bytesRejectedPerSec = bytesRejectedPerSec; } - public Double getTotalProduceRequestsPerSec() { - return totalProduceRequestsPerSec; + public Double getMessagesInPerSec() { + return messagesInPerSec; } - public void setTotalProduceRequestsPerSec(Double totalProduceRequestsPerSec) { - this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; + public void setMessagesInPerSec(Double messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; } public Long getGmtCreate() { @@ -75,15 +58,23 @@ public class TopicMetricsVO { this.gmtCreate = gmtCreate; } + public Double getTotalProduceRequestsPerSec() { + return totalProduceRequestsPerSec; + } + + public void setTotalProduceRequestsPerSec(Double totalProduceRequestsPerSec) { + this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; + } + @Override public String toString() { - return "TopicMetricsVO{" + - "messagesInPerSec=" + messagesInPerSec + + return "LogicalClusterMetrics{" + + "totalProduceRequestsPerSec=" + totalProduceRequestsPerSec + ", bytesInPerSec=" + bytesInPerSec + ", bytesOutPerSec=" + bytesOutPerSec + ", bytesRejectedPerSec=" + bytesRejectedPerSec + - ", totalProduceRequestsPerSec=" + totalProduceRequestsPerSec + + ", messagesInPerSec=" + messagesInPerSec + ", gmtCreate=" + gmtCreate + '}'; } -} +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicConfig.java new file mode 100644 index 00000000..35f694f8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicConfig.java @@ -0,0 +1,26 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/7/24 + */ +public class CreateTopicConfig { + private List configList; + + public List getConfigList() { + return configList; + } + + public void setConfigList(List configList) { + this.configList = configList; + } + + @Override + public String toString() { + return "CreateTopicConfig{" + + "configList=" + configList + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/AdminExpandTopicModel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicElemConfig.java similarity index 50% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/AdminExpandTopicModel.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicElemConfig.java index 057b7951..0f74b1e4 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/AdminExpandTopicModel.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/CreateTopicElemConfig.java @@ -1,32 +1,26 @@ -package com.xiaojukeji.kafka.manager.web.model.topic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.springframework.util.StringUtils; +package com.xiaojukeji.kafka.manager.common.entity.ao.config; import java.util.List; /** * @author zengqiao - * @date 20/1/2 + * @date 20/7/24 */ -@ApiModel(value = "AdminExpandTopicModel") -public class AdminExpandTopicModel { - @ApiModelProperty(value = "集群ID") +public class CreateTopicElemConfig { private Long clusterId; - @ApiModelProperty(value = "topicName名称") - private String topicName; - - @ApiModelProperty(value = "分区数") - private Integer partitionNum; - - @ApiModelProperty(value = "brokerId列表") private List brokerIdList; - @ApiModelProperty(value = "regionId列表") private List regionIdList; + private Integer partitionNum; + + private Integer replicaNum; + + private Integer retentionTimeUnitHour; + + private Long autoExecMaxPeakBytesInUnitB; + public Long getClusterId() { return clusterId; } @@ -35,22 +29,6 @@ public class AdminExpandTopicModel { this.clusterId = clusterId; } - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public Integer getPartitionNum() { - return partitionNum; - } - - public void setPartitionNum(Integer partitionNum) { - this.partitionNum = partitionNum; - } - public List getBrokerIdList() { return brokerIdList; } @@ -67,26 +45,48 @@ public class AdminExpandTopicModel { this.regionIdList = regionIdList; } - @Override - public String toString() { - return "AdminExpandTopicModel{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + - ", partitionNum=" + partitionNum + - ", brokerIdList=" + brokerIdList + - ", regionIdList=" + regionIdList + - '}'; + public Integer getReplicaNum() { + return replicaNum; } - public Boolean legal() { - if (clusterId == null - || StringUtils.isEmpty(topicName) - || partitionNum == null || partitionNum <= 0) { - return false; - } - if ((brokerIdList == null || brokerIdList.isEmpty()) && (regionIdList == null || regionIdList.isEmpty())) { - return false; - } - return true; + public void setReplicaNum(Integer replicaNum) { + this.replicaNum = replicaNum; + } + + public Integer getRetentionTimeUnitHour() { + return retentionTimeUnitHour; + } + + public void setRetentionTimeUnitHour(Integer retentionTimeUnitHour) { + this.retentionTimeUnitHour = retentionTimeUnitHour; + } + + public Long getAutoExecMaxPeakBytesInUnitB() { + return autoExecMaxPeakBytesInUnitB; + } + + public void setAutoExecMaxPeakBytesInUnitB(Long autoExecMaxPeakBytesInUnitB) { + this.autoExecMaxPeakBytesInUnitB = autoExecMaxPeakBytesInUnitB; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + @Override + public String toString() { + return "CreateTopicElemConfig{" + + "clusterId=" + clusterId + + ", brokerIdList=" + brokerIdList + + ", regionIdList=" + regionIdList + + ", partitionNum=" + partitionNum + + ", replicaNum=" + replicaNum + + ", retentionTimeUnitHour=" + retentionTimeUnitHour + + ", autoExecMaxPeakBytesInUnitB=" + autoExecMaxPeakBytesInUnitB + + '}'; } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/MaxAvgBytesInConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/MaxAvgBytesInConfig.java new file mode 100644 index 00000000..6a26f955 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/MaxAvgBytesInConfig.java @@ -0,0 +1,25 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config; + +/** + * 峰值均值流入流量配置 + * @author zengqiao + * @date 20/6/9 + */ +public class MaxAvgBytesInConfig { + private Integer duration; + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + @Override + public String toString() { + return "MaxAvgBytesInConfig{" + + "duration=" + duration + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/SinkTopicRequestTimeMetricsConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/SinkTopicRequestTimeMetricsConfig.java new file mode 100644 index 00000000..91faaba1 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/SinkTopicRequestTimeMetricsConfig.java @@ -0,0 +1,57 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config; + +/** + * @author zengqiao + * @date 20/9/7 + */ +public class SinkTopicRequestTimeMetricsConfig { + private Long clusterId; + + private String topicName; + + private Long startId; + + private Long step; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getStartId() { + return startId; + } + + public void setStartId(Long startId) { + this.startId = startId; + } + + public Long getStep() { + return step; + } + + public void setStep(Long step) { + this.step = step; + } + + @Override + public String toString() { + return "SinkTopicRequestTimeMetricsConfig{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", startId=" + startId + + ", step=" + step + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicAnomalyFlowConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicAnomalyFlowConfig.java new file mode 100644 index 00000000..1797eb6e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicAnomalyFlowConfig.java @@ -0,0 +1,57 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config; + +/** + * @author zengqiao + * @date 20/8/23 + */ +public class TopicAnomalyFlowConfig { + private Long minTopicBytesInUnitB; + + private Double bytesInIncUnitB; + + private Long minTopicProduceQps; + + private Double produceQpsInc; + + public Long getMinTopicBytesInUnitB() { + return minTopicBytesInUnitB; + } + + public void setMinTopicBytesInUnitB(Long minTopicBytesInUnitB) { + this.minTopicBytesInUnitB = minTopicBytesInUnitB; + } + + public Double getBytesInIncUnitB() { + return bytesInIncUnitB; + } + + public void setBytesInIncUnitB(Double bytesInIncUnitB) { + this.bytesInIncUnitB = bytesInIncUnitB; + } + + public Long getMinTopicProduceQps() { + return minTopicProduceQps; + } + + public void setMinTopicProduceQps(Long minTopicProduceQps) { + this.minTopicProduceQps = minTopicProduceQps; + } + + public Double getProduceQpsInc() { + return produceQpsInc; + } + + public void setProduceQpsInc(Double produceQpsInc) { + this.produceQpsInc = produceQpsInc; + } + + @Override + public String toString() { + return "TopicAnomalyFlowConfig{" + + "minTopicBytesInUnitB=" + minTopicBytesInUnitB + + ", bytesInIncUnitB=" + bytesInIncUnitB + + ", minTopicProduceQps=" + minTopicProduceQps + + ", produceQpsInc=" + produceQpsInc + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicNameConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicNameConfig.java new file mode 100644 index 00000000..787bd238 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/TopicNameConfig.java @@ -0,0 +1,44 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; + +/** + * @author zengqiao + * @date 20/8/31 + */ +public class TopicNameConfig { + private Long clusterId; + + private String topicName; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + @Override + public String toString() { + return "TopicNameConfig{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + public boolean legal() { + if (ValidateUtils.isNull(clusterId) || ValidateUtils.isBlank(topicName)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/RegionTopicHotConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/RegionTopicHotConfig.java new file mode 100644 index 00000000..030a3621 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/RegionTopicHotConfig.java @@ -0,0 +1,58 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config.expert; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author zengqiao + * @date 20/8/23 + */ +public class RegionTopicHotConfig { + private Long minTopicBytesInUnitB; + + private Integer maxDisPartitionNum; + + private List ignoreClusterIdList; + + public Long getMinTopicBytesInUnitB() { + if (minTopicBytesInUnitB == null) { + return 3 * 1024 * 1024L; + } + return minTopicBytesInUnitB; + } + + public void setMinTopicBytesInUnitB(Long minTopicBytesInUnitB) { + this.minTopicBytesInUnitB = minTopicBytesInUnitB; + } + + public Integer getMaxDisPartitionNum() { + if (maxDisPartitionNum == null) { + return 3; + } + return maxDisPartitionNum; + } + + public void setMaxDisPartitionNum(Integer maxDisPartitionNum) { + this.maxDisPartitionNum = maxDisPartitionNum; + } + + public List getIgnoreClusterIdList() { + if (ignoreClusterIdList == null) { + return new ArrayList<>(); + } + return ignoreClusterIdList; + } + + public void setIgnoreClusterIdList(List ignoreClusterIdList) { + this.ignoreClusterIdList = ignoreClusterIdList; + } + + @Override + public String toString() { + return "RegionTopicHotConfig{" + + "minTopicBytesInUnitB=" + minTopicBytesInUnitB + + ", maxDisPartitionNum=" + maxDisPartitionNum + + ", ignoreClusterIdList=" + ignoreClusterIdList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicExpiredConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicExpiredConfig.java new file mode 100644 index 00000000..d68dc2ba --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicExpiredConfig.java @@ -0,0 +1,38 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config.expert; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author zengqiao + * @date 20/9/17 + */ +public class TopicExpiredConfig { + private Integer minExpiredDay = 30; + + private List ignoreClusterIdList = new ArrayList<>(); + + public Integer getMinExpiredDay() { + return minExpiredDay; + } + + public void setMinExpiredDay(Integer minExpiredDay) { + this.minExpiredDay = minExpiredDay; + } + + public List getIgnoreClusterIdList() { + return ignoreClusterIdList; + } + + public void setIgnoreClusterIdList(List ignoreClusterIdList) { + this.ignoreClusterIdList = ignoreClusterIdList; + } + + @Override + public String toString() { + return "TopicExpiredConfig{" + + "minExpiredDay=" + minExpiredDay + + ", ignoreClusterIdList=" + ignoreClusterIdList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicInsufficientPartitionConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicInsufficientPartitionConfig.java new file mode 100644 index 00000000..d954c6d3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/config/expert/TopicInsufficientPartitionConfig.java @@ -0,0 +1,50 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.config.expert; + +import java.util.ArrayList; +import java.util.List; + +/** + * 专家服务-Topic分区不足配置 + * @author zengqiao + * @date 20/8/23 + */ +public class TopicInsufficientPartitionConfig { + private Long maxBytesInPerPartitionUnitB = 3 * 1024 * 1024L; + + private Long minTopicBytesInUnitB = 3 * 1024 * 1024L; + + private List ignoreClusterIdList = new ArrayList<>(); + + public Long getMaxBytesInPerPartitionUnitB() { + return maxBytesInPerPartitionUnitB; + } + + public void setMaxBytesInPerPartitionUnitB(Long maxBytesInPerPartitionUnitB) { + this.maxBytesInPerPartitionUnitB = maxBytesInPerPartitionUnitB; + } + + public Long getMinTopicBytesInUnitB() { + return minTopicBytesInUnitB; + } + + public void setMinTopicBytesInUnitB(Long minTopicBytesInUnitB) { + this.minTopicBytesInUnitB = minTopicBytesInUnitB; + } + + public List getIgnoreClusterIdList() { + return ignoreClusterIdList; + } + + public void setIgnoreClusterIdList(List ignoreClusterIdList) { + this.ignoreClusterIdList = ignoreClusterIdList; + } + + @Override + public String toString() { + return "TopicInsufficientPartitionConfig{" + + "maxBytesInPerPartitionUnitB=" + maxBytesInPerPartitionUnitB + + ", minTopicBytesInUnitB=" + minTopicBytesInUnitB + + ", ignoreClusterIdList=" + ignoreClusterIdList + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumeDetailDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumeDetailDTO.java similarity index 94% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumeDetailDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumeDetailDTO.java index 66546d84..a40484e4 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumeDetailDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumeDetailDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.consumer; +package com.xiaojukeji.kafka.manager.common.entity.ao.consumer; /** * @author zengqiao diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerGroupDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumerGroupDTO.java similarity index 65% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerGroupDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumerGroupDTO.java index 072672f6..e09f93e8 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerGroupDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/consumer/ConsumerGroupDTO.java @@ -1,7 +1,8 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.consumer; +package com.xiaojukeji.kafka.manager.common.entity.ao.consumer; -import com.xiaojukeji.kafka.manager.common.constant.OffsetStoreLocation; +import com.xiaojukeji.kafka.manager.common.bizenum.OffsetLocationEnum; +import java.util.List; import java.util.Objects; /** @@ -14,11 +15,17 @@ public class ConsumerGroupDTO { private String consumerGroup; - private OffsetStoreLocation offsetStoreLocation; + private List appIdList; - public ConsumerGroupDTO(Long clusterId, String consumerGroup, OffsetStoreLocation offsetStoreLocation) { + private OffsetLocationEnum offsetStoreLocation; + + public ConsumerGroupDTO(Long clusterId, + String consumerGroup, + List appIdList, + OffsetLocationEnum offsetStoreLocation) { this.clusterId = clusterId; this.consumerGroup = consumerGroup; + this.appIdList = appIdList; this.offsetStoreLocation = offsetStoreLocation; } @@ -38,14 +45,32 @@ public class ConsumerGroupDTO { this.consumerGroup = consumerGroup; } - public OffsetStoreLocation getOffsetStoreLocation() { + public List getAppIdList() { + return appIdList; + } + + public void setAppIdList(List appIdList) { + this.appIdList = appIdList; + } + + public OffsetLocationEnum getOffsetStoreLocation() { return offsetStoreLocation; } - public void setOffsetStoreLocation(OffsetStoreLocation offsetStoreLocation) { + public void setOffsetStoreLocation(OffsetLocationEnum offsetStoreLocation) { this.offsetStoreLocation = offsetStoreLocation; } + @Override + public String toString() { + return "ConsumerGroupDTO{" + + "clusterId=" + clusterId + + ", consumerGroup='" + consumerGroup + '\'' + + ", appIdList=" + appIdList + + ", offsetStoreLocation=" + offsetStoreLocation + + '}'; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -64,13 +89,4 @@ public class ConsumerGroupDTO { public int hashCode() { return Objects.hash(clusterId, consumerGroup, offsetStoreLocation); } - - @Override - public String toString() { - return "ConsumerGroupDTO{" + - "clusterId=" + clusterId + - ", consumerGroup='" + consumerGroup + '\'' + - ", offsetStoreLocation=" + offsetStoreLocation + - '}'; - } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicAnomalyFlow.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicAnomalyFlow.java new file mode 100644 index 00000000..558636d9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicAnomalyFlow.java @@ -0,0 +1,90 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.expert; + +/** + * @author zengqiao + * @date 20/3/30 + */ +public class TopicAnomalyFlow { + private Long clusterId; + + private String clusterName; + + private String topicName; + + private Double bytesIn; + + private Double bytesInIncr; + + private Double iops; + + private Double iopsIncr; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Double getBytesIn() { + return bytesIn; + } + + public void setBytesIn(Double bytesIn) { + this.bytesIn = bytesIn; + } + + public Double getBytesInIncr() { + return bytesInIncr; + } + + public void setBytesInIncr(Double bytesInIncr) { + this.bytesInIncr = bytesInIncr; + } + + public Double getIops() { + return iops; + } + + public void setIops(Double iops) { + this.iops = iops; + } + + public Double getIopsIncr() { + return iopsIncr; + } + + public void setIopsIncr(Double iopsIncr) { + this.iopsIncr = iopsIncr; + } + + @Override + public String toString() { + return "AnomalyFlowTopicDTO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", bytesIn=" + bytesIn + + ", bytesInIncr=" + bytesInIncr + + ", iops=" + iops + + ", iopsIncr=" + iopsIncr + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicInsufficientPartition.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicInsufficientPartition.java new file mode 100644 index 00000000..1199d9c2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicInsufficientPartition.java @@ -0,0 +1,111 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.expert; + +import com.xiaojukeji.kafka.manager.common.entity.pojo.ClusterDO; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/3/30 + */ +public class TopicInsufficientPartition { + private ClusterDO clusterDO; + + private String topicName; + + private Integer presentPartitionNum; + + private Integer suggestedPartitionNum; + + private List maxAvgBytesInList; + + private Double bytesInPerPartition; + + private List brokerIdList; + + public TopicInsufficientPartition( + ClusterDO clusterDO, + String topicName, + Integer presentPartitionNum, + Integer suggestedPartitionNum, + List maxAvgBytesInList, + Double bytesInPerPartition, + List brokerIdList) { + this.clusterDO = clusterDO; + this.topicName = topicName; + this.presentPartitionNum = presentPartitionNum; + this.suggestedPartitionNum = suggestedPartitionNum; + this.maxAvgBytesInList = maxAvgBytesInList; + this.bytesInPerPartition = bytesInPerPartition; + this.brokerIdList = brokerIdList; + } + + public ClusterDO getClusterDO() { + return clusterDO; + } + + public void setClusterDO(ClusterDO clusterDO) { + this.clusterDO = clusterDO; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getPresentPartitionNum() { + return presentPartitionNum; + } + + public void setPresentPartitionNum(Integer presentPartitionNum) { + this.presentPartitionNum = presentPartitionNum; + } + + public Integer getSuggestedPartitionNum() { + return suggestedPartitionNum; + } + + public void setSuggestedPartitionNum(Integer suggestedPartitionNum) { + this.suggestedPartitionNum = suggestedPartitionNum; + } + + public List getMaxAvgBytesInList() { + return maxAvgBytesInList; + } + + public void setMaxAvgBytesInList(List maxAvgBytesInList) { + this.maxAvgBytesInList = maxAvgBytesInList; + } + + public Double getBytesInPerPartition() { + return bytesInPerPartition; + } + + public void setBytesInPerPartition(Double bytesInPerPartition) { + this.bytesInPerPartition = bytesInPerPartition; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + @Override + public String toString() { + return "TopicInsufficientPartition{" + + "clusterDO=" + clusterDO + + ", topicName='" + topicName + '\'' + + ", presentPartitionNum=" + presentPartitionNum + + ", suggestedPartitionNum=" + suggestedPartitionNum + + ", maxAvgBytesInList=" + maxAvgBytesInList + + ", bytesInPerPartition=" + bytesInPerPartition + + ", brokerIdList=" + brokerIdList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicRegionHot.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicRegionHot.java new file mode 100644 index 00000000..17f2f392 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/expert/TopicRegionHot.java @@ -0,0 +1,70 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.expert; + +import com.xiaojukeji.kafka.manager.common.entity.pojo.ClusterDO; + +import java.util.Map; + +/** + * Region内热点Topic + * @author zengqiao + * @date 20/3/27 + */ +public class TopicRegionHot { + private ClusterDO clusterDO; + + private String topicName; + + private Long retentionTime; + + private Map brokerIdPartitionNumMap; + + public TopicRegionHot(ClusterDO clusterDO, String topicName, Long retentionTime, Map + brokerIdPartitionNumMap) { + this.clusterDO = clusterDO; + this.topicName = topicName; + this.retentionTime = retentionTime; + this.brokerIdPartitionNumMap = brokerIdPartitionNumMap; + } + + public ClusterDO getClusterDO() { + return clusterDO; + } + + public void setClusterDO(ClusterDO clusterDO) { + this.clusterDO = clusterDO; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public Map getBrokerIdPartitionNumMap() { + return brokerIdPartitionNumMap; + } + + public void setBrokerIdPartitionNumMap(Map brokerIdPartitionNumMap) { + this.brokerIdPartitionNumMap = brokerIdPartitionNumMap; + } + + @Override + public String toString() { + return "ExpertRegionTopicHot{" + + "clusterDO=" + clusterDO + + ", topicName='" + topicName + '\'' + + ", retentionTime=" + retentionTime + + ", brokerIdPartitionNumMap=" + brokerIdPartitionNumMap + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/AppRateConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/AppRateConfig.java new file mode 100644 index 00000000..1ed045e4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/AppRateConfig.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class AppRateConfig extends BaseGatewayConfig { + private Long appRateLimit; + + public AppRateConfig(Long version, Long appRateLimit) { + this.version = version; + this.appRateLimit = appRateLimit; + } + + public Long getAppRateLimit() { + return appRateLimit; + } + + public void setAppRateLimit(Long appRateLimit) { + this.appRateLimit = appRateLimit; + } + + @Override + public String toString() { + return "AppRateConfig{" + + "appRateLimit=" + appRateLimit + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/BaseGatewayConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/BaseGatewayConfig.java new file mode 100644 index 00000000..528eb214 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/BaseGatewayConfig.java @@ -0,0 +1,24 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class BaseGatewayConfig { + protected Long version; + + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + @Override + public String toString() { + return "GatewayConfig{" + + "version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/IpRateConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/IpRateConfig.java new file mode 100644 index 00000000..06c6cfbb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/IpRateConfig.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class IpRateConfig extends BaseGatewayConfig { + private Long ipRateLimit; + + public IpRateConfig(Long version, Long ipRateLimit) { + this.version = version; + this.ipRateLimit = ipRateLimit; + } + + public Long getIpRateLimit() { + return ipRateLimit; + } + + public void setIpRateLimit(Long ipRateLimit) { + this.ipRateLimit = ipRateLimit; + } + + @Override + public String toString() { + return "IpRateConfig{" + + "ipRateLimit=" + ipRateLimit + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/KafkaBootstrapServerConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/KafkaBootstrapServerConfig.java new file mode 100644 index 00000000..4b00c893 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/KafkaBootstrapServerConfig.java @@ -0,0 +1,33 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +import java.util.List; +import java.util.Map; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class KafkaBootstrapServerConfig extends BaseGatewayConfig { + private Map> clusterIdBootstrapServersMap; + + public KafkaBootstrapServerConfig(Long version, Map> clusterIdBootstrapServersMap) { + this.version = version; + this.clusterIdBootstrapServersMap = clusterIdBootstrapServersMap; + } + + public Map> getClusterIdBootstrapServersMap() { + return clusterIdBootstrapServersMap; + } + + public void setClusterIdBootstrapServersMap(Map> clusterIdBootstrapServersMap) { + this.clusterIdBootstrapServersMap = clusterIdBootstrapServersMap; + } + + @Override + public String toString() { + return "KafkaBootstrapServerConfig{" + + "clusterIdBootstrapServersMap=" + clusterIdBootstrapServersMap + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/RequestQueueConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/RequestQueueConfig.java new file mode 100644 index 00000000..ff2f2184 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/RequestQueueConfig.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class RequestQueueConfig extends BaseGatewayConfig { + private Long maxRequestQueueSize; + + public RequestQueueConfig(Long version, Long maxRequestQueueSize) { + this.version = version; + this.maxRequestQueueSize = maxRequestQueueSize; + } + + public Long getMaxRequestQueueSize() { + return maxRequestQueueSize; + } + + public void setMaxRequestQueueSize(Long maxRequestQueueSize) { + this.maxRequestQueueSize = maxRequestQueueSize; + } + + @Override + public String toString() { + return "RequestQueueConfig{" + + "maxRequestQueueSize=" + maxRequestQueueSize + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/SpRateConfig.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/SpRateConfig.java new file mode 100644 index 00000000..15f21cf9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/SpRateConfig.java @@ -0,0 +1,32 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +import java.util.Map; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class SpRateConfig extends BaseGatewayConfig { + private Map spRateMap; + + public SpRateConfig(Long version, Map spRateMap) { + this.version = version; + this.spRateMap = spRateMap; + } + + public Map getSpRateMap() { + return spRateMap; + } + + public void setSpRateMap(Map spRateMap) { + this.spRateMap = spRateMap; + } + + @Override + public String toString() { + return "SpRateConfig{" + + "spRateMap=" + spRateMap + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/TopicQuota.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/TopicQuota.java new file mode 100644 index 00000000..7b3bc979 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/gateway/TopicQuota.java @@ -0,0 +1,68 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.gateway; + +/** + * @author zhongyuankai + * @date 2020/4/27 + */ +public class TopicQuota { + private String appId; + + private Long clusterId; + + private String topicName; + + private Long produceQuota; + + private Long consumeQuota; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getProduceQuota() { + return produceQuota; + } + + public void setProduceQuota(Long produceQuota) { + this.produceQuota = produceQuota; + } + + public Long getConsumeQuota() { + return consumeQuota; + } + + public void setConsumeQuota(Long consumeQuota) { + this.consumeQuota = consumeQuota; + } + + @Override + public String toString() { + return "TopicQuota{" + + "appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", produceQuota=" + produceQuota + + ", consumeQuota=" + consumeQuota + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/reassign/ReassignStatus.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/reassign/ReassignStatus.java new file mode 100644 index 00000000..3e9ec3cb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/reassign/ReassignStatus.java @@ -0,0 +1,130 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.reassign; + +import com.xiaojukeji.kafka.manager.common.bizenum.TaskStatusReassignEnum; +import com.xiaojukeji.kafka.manager.common.zookeeper.znode.ReassignmentElemData; +import kafka.common.TopicAndPartition; + +import java.util.List; +import java.util.Map; + +/** + * @author zengqiao + * @date 20/5/14 + */ +public class ReassignStatus { + private Long subTaskId; + + private Long clusterId; + + private String clusterName; + + private String topicName; + + private Integer status; + + private Long realThrottle; + + private Long maxThrottle; + + private Long minThrottle; + + private List reassignList; + + private Map reassignStatusMap; + + public Long getSubTaskId() { + return subTaskId; + } + + public void setSubTaskId(Long subTaskId) { + this.subTaskId = subTaskId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getRealThrottle() { + return realThrottle; + } + + public void setRealThrottle(Long realThrottle) { + this.realThrottle = realThrottle; + } + + public Long getMaxThrottle() { + return maxThrottle; + } + + public void setMaxThrottle(Long maxThrottle) { + this.maxThrottle = maxThrottle; + } + + public Long getMinThrottle() { + return minThrottle; + } + + public void setMinThrottle(Long minThrottle) { + this.minThrottle = minThrottle; + } + + public List getReassignList() { + return reassignList; + } + + public void setReassignList(List reassignList) { + this.reassignList = reassignList; + } + + public Map getReassignStatusMap() { + return reassignStatusMap; + } + + public void setReassignStatusMap(Map reassignStatusMap) { + this.reassignStatusMap = reassignStatusMap; + } + + @Override + public String toString() { + return "ReassignStatus{" + + "subTaskId=" + subTaskId + + ", clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", status=" + status + + ", realThrottle=" + realThrottle + + ", maxThrottle=" + maxThrottle + + ", minThrottle=" + minThrottle + + ", reassignList=" + reassignList + + ", reassignStatusMap=" + reassignStatusMap + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetrics.java similarity index 51% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetrics.java index c96c6496..932cd2a1 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/consumer/ConsumerDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetrics.java @@ -1,13 +1,12 @@ -package com.xiaojukeji.kafka.manager.common.entity.dto.consumer; +package com.xiaojukeji.kafka.manager.common.entity.ao.remote; -import java.util.Map; +import java.util.List; /** - * Consumer实体类 - * @author tukun - * @date 2015/11/12 + * @author zengqiao + * @date 20/8/25 */ -public class ConsumerDTO { +public class KafkaConsumerMetrics { private Long clusterId; private String topicName; @@ -16,9 +15,11 @@ public class ConsumerDTO { private String location; - private Map partitionOffsetMap; + private Integer partitionNum; - private Map consumerOffsetMap; + private List consumeDetailList; + + private Long createTime; public Long getClusterId() { return clusterId; @@ -52,31 +53,40 @@ public class ConsumerDTO { this.location = location; } - public Map getPartitionOffsetMap() { - return partitionOffsetMap; + public Integer getPartitionNum() { + return partitionNum; } - public void setPartitionOffsetMap(Map partitionOffsetMap) { - this.partitionOffsetMap = partitionOffsetMap; + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; } - public Map getConsumerOffsetMap() { - return consumerOffsetMap; + public List getConsumeDetailList() { + return consumeDetailList; } - public void setConsumerOffsetMap(Map consumerOffsetMap) { - this.consumerOffsetMap = consumerOffsetMap; + public void setConsumeDetailList(List consumeDetailList) { + this.consumeDetailList = consumeDetailList; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; } @Override public String toString() { - return "ConsumerDTO{" + + return "KafkaConsumerMetrics{" + "clusterId=" + clusterId + ", topicName='" + topicName + '\'' + ", consumerGroup='" + consumerGroup + '\'' + ", location='" + location + '\'' + - ", partitionOffsetMap=" + partitionOffsetMap + - ", consumerOffsetMap=" + consumerOffsetMap + + ", partitionNum=" + partitionNum + + ", consumeDetailList=" + consumeDetailList + + ", createTime=" + createTime + '}'; } -} +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetricsElem.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetricsElem.java new file mode 100644 index 00000000..678f995f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaConsumerMetricsElem.java @@ -0,0 +1,46 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.remote; + +/** + * @author zengqiao + * @date 20/8/31 + */ +public class KafkaConsumerMetricsElem { + private Integer partitionId; + + private Long partitionOffset; + + private Long consumeOffset; + + public Integer getPartitionId() { + return partitionId; + } + + public void setPartitionId(Integer partitionId) { + this.partitionId = partitionId; + } + + public Long getPartitionOffset() { + return partitionOffset; + } + + public void setPartitionOffset(Long partitionOffset) { + this.partitionOffset = partitionOffset; + } + + public Long getConsumeOffset() { + return consumeOffset; + } + + public void setConsumeOffset(Long consumeOffset) { + this.consumeOffset = consumeOffset; + } + + @Override + public String toString() { + return "KafkaConsumerMetricsElem{" + + "partitionId=" + partitionId + + ", partitionOffset=" + partitionOffset + + ", consumeOffset=" + consumeOffset + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaTopicMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaTopicMetrics.java new file mode 100644 index 00000000..599384a4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/remote/KafkaTopicMetrics.java @@ -0,0 +1,79 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.remote; + +/** + * @author zengqiao + * @date 20/8/31 + */ +public class KafkaTopicMetrics { + private Long clusterId; + + private String topic; + + private Integer partitionNum; + + private Double messagesInPerSec; + + private Double bytesInPerSec; + + private Long timestamp; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public Double getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Double messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + + public Double getBytesInPerSec() { + return bytesInPerSec; + } + + public void setBytesInPerSec(Double bytesInPerSec) { + this.bytesInPerSec = bytesInPerSec; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public String toString() { + return "KafkaTopicMetrics{" + + "clusterId=" + clusterId + + ", topic='" + topic + '\'' + + ", partitionNum=" + partitionNum + + ", messagesInPerSec=" + messagesInPerSec + + ", bytesInPerSec=" + bytesInPerSec + + ", timestamp=" + timestamp + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/MineTopicSummary.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/MineTopicSummary.java new file mode 100644 index 00000000..45fffebd --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/MineTopicSummary.java @@ -0,0 +1,123 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class MineTopicSummary { + private Long logicalClusterId; + + private String logicalClusterName; + + private Long physicalClusterId; + + private String topicName; + + private Object bytesIn; + + private Object bytesOut; + + private String appId; + + private String appName; + + private String appPrincipals; + + private Integer access; + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Object getBytesIn() { + return bytesIn; + } + + public void setBytesIn(Object bytesIn) { + this.bytesIn = bytesIn; + } + + public Object getBytesOut() { + return bytesOut; + } + + public void setBytesOut(Object bytesOut) { + this.bytesOut = bytesOut; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "MineTopicSummary{" + + "logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", physicalClusterId=" + physicalClusterId + + ", topicName='" + topicName + '\'' + + ", bytesIn=" + bytesIn + + ", bytesOut=" + bytesOut + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", access=" + access + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicAppData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicAppData.java new file mode 100644 index 00000000..a06e9736 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicAppData.java @@ -0,0 +1,123 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * @author zhongyuankai + * @date 2020/6/8 + */ +public class TopicAppData { + private Long clusterId; + + private String topicName; + + private String appId; + + private String appName; + + private String appPrincipals; + + private Long produceQuota; + + private Long consumerQuota; + + private Boolean produceThrottled; + + private Boolean fetchThrottled; + + private Integer access; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Long getProduceQuota() { + return produceQuota; + } + + public void setProduceQuota(Long produceQuota) { + this.produceQuota = produceQuota; + } + + public Long getConsumerQuota() { + return consumerQuota; + } + + public void setConsumerQuota(Long consumerQuota) { + this.consumerQuota = consumerQuota; + } + + public Boolean getProduceThrottled() { + return produceThrottled; + } + + public void setProduceThrottled(Boolean produceThrottled) { + this.produceThrottled = produceThrottled; + } + + public Boolean getFetchThrottled() { + return fetchThrottled; + } + + public void setFetchThrottled(Boolean fetchThrottled) { + this.fetchThrottled = fetchThrottled; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "TopicAppDTO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", produceQuota=" + produceQuota + + ", consumerQuota=" + consumerQuota + + ", produceThrottled=" + produceThrottled + + ", fetchThrottled=" + fetchThrottled + + ", access=" + access + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBasicDTO.java similarity index 60% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBasicVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBasicDTO.java index 7fd567d8..9522feee 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBasicVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBasicDTO.java @@ -1,44 +1,71 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; /** - * Topic的基本信息 - * @author zengqiao - * @date 19/4/1 + * @author arthur + * @date 2018/09/03 */ -@ApiModel(value = "Topic基本信息") -public class TopicBasicVO { - @ApiModelProperty(value = "Topic名称") - private String topicName; +public class TopicBasicDTO { + private Long clusterId; - @ApiModelProperty(value = "分区数") - private Integer partitionNum; + private String appId; - @ApiModelProperty(value = "副本数") - private Integer replicaNum; + private String appName; - @ApiModelProperty(value = "占用Broker数") - private Integer brokerNum; - - @ApiModelProperty(value = "保留时间(ms)") - private Long retentionTime; - - @ApiModelProperty(value = "修改时间") - private Long modifyTime; - - @ApiModelProperty(value = "创建时间") - private Long createTime; - - @ApiModelProperty(value = "负责人") private String principals; - @ApiModelProperty(value = "备注") + private String topicName; + private String description; - @ApiModelProperty(value = "regionNames") - private String regionNames; + private String region; + + private Integer score; + + private String topicCodeC; + + private Integer partitionNum; + + private Integer replicaNum; + + private Integer brokerNum; + + private Long modifyTime; + + private Long createTime; + + private Long retentionTime; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } public String getTopicName() { return topicName; @@ -48,6 +75,38 @@ public class TopicBasicVO { this.topicName = topicName; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public String getTopicCodeC() { + return topicCodeC; + } + + public void setTopicCodeC(String topicCodeC) { + this.topicCodeC = topicCodeC; + } + public Integer getPartitionNum() { return partitionNum; } @@ -72,14 +131,6 @@ public class TopicBasicVO { this.brokerNum = brokerNum; } - public Long getRetentionTime() { - return retentionTime; - } - - public void setRetentionTime(Long retentionTime) { - this.retentionTime = retentionTime; - } - public Long getModifyTime() { return modifyTime; } @@ -96,43 +147,32 @@ public class TopicBasicVO { this.createTime = createTime; } - public String getPrincipals() { - return principals; + public Long getRetentionTime() { + return retentionTime; } - public void setPrincipals(String principals) { - this.principals = principals; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getRegionNames() { - return regionNames; - } - - public void setRegionNames(String regionNames) { - this.regionNames = regionNames; + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; } @Override public String toString() { - return "TopicBasicVO{" + - "topicName='" + topicName + '\'' + + return "TopicBasicDTO{" + + "clusterId=" + clusterId + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", principals='" + principals + '\'' + + ", topicName='" + topicName + '\'' + + ", description='" + description + '\'' + + ", region='" + region + '\'' + + ", score=" + score + + ", topicCodeC='" + topicCodeC + '\'' + ", partitionNum=" + partitionNum + ", replicaNum=" + replicaNum + ", brokerNum=" + brokerNum + - ", retentionTime=" + retentionTime + ", modifyTime=" + modifyTime + ", createTime=" + createTime + - ", principals='" + principals + '\'' + - ", description='" + description + '\'' + - ", regionNames='" + regionNames + '\'' + + ", retentionTime=" + retentionTime + '}'; } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBrokerDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBrokerDTO.java new file mode 100644 index 00000000..75c4638d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBrokerDTO.java @@ -0,0 +1,81 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +import java.util.List; + +/** + * @author zhongyuankai + * @date 20/4/17 + */ +public class TopicBrokerDTO { + private Integer brokerId; + + private String host; + + private Integer partitionNum; + + private List partitionIdList; + + private List leaderPartitionIdList; + + private boolean alive; + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public List getPartitionIdList() { + return partitionIdList; + } + + public void setPartitionIdList(List partitionIdList) { + this.partitionIdList = partitionIdList; + } + + public List getLeaderPartitionIdList() { + return leaderPartitionIdList; + } + + public void setLeaderPartitionIdList(List leaderPartitionIdList) { + this.leaderPartitionIdList = leaderPartitionIdList; + } + + public boolean isAlive() { + return alive; + } + + public void setAlive(boolean alive) { + this.alive = alive; + } + + @Override + public String toString() { + return "TopicBrokerDTO{" + + "brokerId=" + brokerId + + ", host='" + host + '\'' + + ", partitionNum=" + partitionNum + + ", partitionIdList=" + partitionIdList + + ", leaderPartitionIdList=" + leaderPartitionIdList + + ", alive=" + alive + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBusinessInfo.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBusinessInfo.java new file mode 100644 index 00000000..978550c8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicBusinessInfo.java @@ -0,0 +1,68 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * @author zhongyuankai + * @date 20/09/08 + */ +public class TopicBusinessInfo { + private String appId; + + private String appName; + + private String principals; + + private Long clusterId; + + private String topicName; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + @Override + public String toString() { + return "TopicBusinessInfoVO{" + + "appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", principals='" + principals + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicConnection.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicConnection.java new file mode 100644 index 00000000..abb40327 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicConnection.java @@ -0,0 +1,90 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * @author zengqiao + * @date 20/4/20 + */ +public class TopicConnection { + private Long clusterId; + + private String topicName; + + private String appId; + + private String ip; + + private String hostname; + + private String clientType; + + private String clientVersion; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public String getClientType() { + return clientType; + } + + public void setClientType(String clientType) { + this.clientType = clientType; + } + + public String getClientVersion() { + return clientVersion; + } + + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + @Override + public String toString() { + return "TopicConnectionDTO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", ip='" + ip + '\'' + + ", hostname='" + hostname + '\'' + + ", clientType='" + clientType + '\'' + + ", clientVersion='" + clientVersion + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicDTO.java new file mode 100644 index 00000000..f64fd49c --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicDTO.java @@ -0,0 +1,101 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class TopicDTO { + private Long logicalClusterId; + + private String logicalClusterName; + + private String topicName; + + private String description; + + private String appId; + + private String appName; + + private String appPrincipals; + + private Boolean needAuth; + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Boolean getNeedAuth() { + return needAuth; + } + + public void setNeedAuth(Boolean needAuth) { + this.needAuth = needAuth; + } + + @Override + public String toString() { + return "TopicDTO{" + + "logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", description='" + description + '\'' + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", needAuth=" + needAuth + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicExpiredData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicExpiredData.java new file mode 100644 index 00000000..efa4eac6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicExpiredData.java @@ -0,0 +1,71 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +import com.xiaojukeji.kafka.manager.common.entity.pojo.LogicalClusterDO; +import com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.AppDO; + +/** + * @author zengqiao + * @date 20/9/2 + */ +public class TopicExpiredData { + private Long clusterId; + + private String topicName; + + private LogicalClusterDO logicalClusterDO; + + private AppDO appDO; + + private Integer fetchConnectionNum; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public LogicalClusterDO getLogicalClusterDO() { + return logicalClusterDO; + } + + public void setLogicalClusterDO(LogicalClusterDO logicalClusterDO) { + this.logicalClusterDO = logicalClusterDO; + } + + public AppDO getAppDO() { + return appDO; + } + + public void setAppDO(AppDO appDO) { + this.appDO = appDO; + } + + public Integer getFetchConnectionNum() { + return fetchConnectionNum; + } + + public void setFetchConnectionNum(Integer fetchConnectionNum) { + this.fetchConnectionNum = fetchConnectionNum; + } + + @Override + public String toString() { + return "TopicExpiredData{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", logicalClusterDO=" + logicalClusterDO + + ", appDO=" + appDO + + ", fetchConnectionNum=" + fetchConnectionNum + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicMetricsDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicMetricsDTO.java new file mode 100644 index 00000000..c722b4a9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicMetricsDTO.java @@ -0,0 +1,147 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/5/11 + */ +public class TopicMetricsDTO { + @ApiModelProperty(value = "每秒流入消息数") + private Object messagesInPerSec; + + @ApiModelProperty(value = "每秒流入字节数") + private Object bytesInPerSec; + + @ApiModelProperty(value = "每秒流出字节数") + private Object bytesOutPerSec; + + @ApiModelProperty(value = "每秒拒绝字节数") + private Object bytesRejectedPerSec; + + @ApiModelProperty(value = "每秒请求数") + private Object totalProduceRequestsPerSec; + + @ApiModelProperty(value = "appId维度每秒流入消息数") + private Object appIdMessagesInPerSec; + + @ApiModelProperty(value = "appId维度每秒流入字节数") + private Object appIdBytesInPerSec; + + @ApiModelProperty(value = "appId维度每秒流出字节数") + private Object appIdBytesOutPerSec; + + @ApiModelProperty(value = "produce限流") + private Boolean produceThrottled; + + @ApiModelProperty(value = "consume限流") + private Boolean consumeThrottled; + + @ApiModelProperty(value = "创建时间") + private Long gmtCreate; + + public Object getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Object messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + + public Object getBytesInPerSec() { + return bytesInPerSec; + } + + public void setBytesInPerSec(Object bytesInPerSec) { + this.bytesInPerSec = bytesInPerSec; + } + + public Object getBytesOutPerSec() { + return bytesOutPerSec; + } + + public void setBytesOutPerSec(Object bytesOutPerSec) { + this.bytesOutPerSec = bytesOutPerSec; + } + + public Object getBytesRejectedPerSec() { + return bytesRejectedPerSec; + } + + public void setBytesRejectedPerSec(Object bytesRejectedPerSec) { + this.bytesRejectedPerSec = bytesRejectedPerSec; + } + + public Object getTotalProduceRequestsPerSec() { + return totalProduceRequestsPerSec; + } + + public void setTotalProduceRequestsPerSec(Object totalProduceRequestsPerSec) { + this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; + } + + public Object getAppIdMessagesInPerSec() { + return appIdMessagesInPerSec; + } + + public void setAppIdMessagesInPerSec(Object appIdMessagesInPerSec) { + this.appIdMessagesInPerSec = appIdMessagesInPerSec; + } + + public Object getAppIdBytesInPerSec() { + return appIdBytesInPerSec; + } + + public void setAppIdBytesInPerSec(Object appIdBytesInPerSec) { + this.appIdBytesInPerSec = appIdBytesInPerSec; + } + + public Object getAppIdBytesOutPerSec() { + return appIdBytesOutPerSec; + } + + public void setAppIdBytesOutPerSec(Object appIdBytesOutPerSec) { + this.appIdBytesOutPerSec = appIdBytesOutPerSec; + } + + public Boolean getProduceThrottled() { + return produceThrottled; + } + + public void setProduceThrottled(Boolean produceThrottled) { + this.produceThrottled = produceThrottled; + } + + public Boolean getConsumeThrottled() { + return consumeThrottled; + } + + public void setConsumeThrottled(Boolean consumeThrottled) { + this.consumeThrottled = consumeThrottled; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "TopicMetricsDTO{" + + "messagesInPerSec=" + messagesInPerSec + + ", bytesInPerSec=" + bytesInPerSec + + ", bytesOutPerSec=" + bytesOutPerSec + + ", bytesRejectedPerSec=" + bytesRejectedPerSec + + ", totalProduceRequestsPerSec=" + totalProduceRequestsPerSec + + ", appIdMessagesInPerSec=" + appIdMessagesInPerSec + + ", appIdBytesInPerSec=" + appIdBytesInPerSec + + ", appIdBytesOutPerSec=" + appIdBytesOutPerSec + + ", produceThrottled=" + produceThrottled + + ", consumeThrottled=" + consumeThrottled + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicOverview.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicOverview.java new file mode 100644 index 00000000..03dd9e37 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicOverview.java @@ -0,0 +1,146 @@ +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; + +/** + * Topic概览信息 + * @author zengqiao + * @date 20/5/14 + */ +public class TopicOverview { + private Long clusterId; + + private String topicName; + + private Integer replicaNum; + + private Integer partitionNum; + + private Long retentionTime; + + private Object byteIn; + + private Object produceRequest; + + private String appName; + + private String appId; + + private String description; + + private Long updateTime; + + private Long logicalClusterId; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getReplicaNum() { + return replicaNum; + } + + public void setReplicaNum(Integer replicaNum) { + this.replicaNum = replicaNum; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public Object getByteIn() { + return byteIn; + } + + public void setByteIn(Object byteIn) { + this.byteIn = byteIn; + } + + public Object getProduceRequest() { + return produceRequest; + } + + public void setProduceRequest(Object produceRequest) { + this.produceRequest = produceRequest; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + } + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + @Override + public String toString() { + return "TopicOverview{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", replicaNum=" + replicaNum + + ", partitionNum=" + partitionNum + + ", retentionTime=" + retentionTime + + ", byteIn=" + byteIn + + ", produceRequest=" + produceRequest + + ", appName='" + appName + '\'' + + ", appId='" + appId + '\'' + + ", description='" + description + '\'' + + ", updateTime=" + updateTime + + ", logicalClusterId=" + logicalClusterId + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicPartitionVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicPartitionDTO.java similarity index 60% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicPartitionVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicPartitionDTO.java index ec33d36f..96e96e50 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicPartitionVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/ao/topic/TopicPartitionDTO.java @@ -1,7 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +package com.xiaojukeji.kafka.manager.common.entity.ao.topic; import java.util.List; @@ -9,32 +6,31 @@ import java.util.List; * @author arthur * @date 2017/6/6. */ -@ApiModel(value = "分区信息") -public class TopicPartitionVO { - @ApiModelProperty(value = "分区Id") +public class TopicPartitionDTO { private Integer partitionId; - @ApiModelProperty(value = "offset偏移") - private Long offset; + private Long beginningOffset; + + private Long endOffset; + + private Long msgNum; - @ApiModelProperty(value = "分区leader所在Broker") private Integer leaderBrokerId; - @ApiModelProperty(value = "首选leader的Broker") private Integer preferredBrokerId; - @ApiModelProperty(value = "leaderEpoch") private Integer leaderEpoch; - @ApiModelProperty(value = "replica") private List replicaBrokerIdList; - @ApiModelProperty(value = "ISR") private List isrBrokerIdList; - @ApiModelProperty(value = "True:未同步, False:已同步") private Boolean underReplicated; + private Long logSize; + + private String location; + public Integer getPartitionId() { return partitionId; } @@ -43,12 +39,28 @@ public class TopicPartitionVO { this.partitionId = partitionId; } - public Long getOffset() { - return offset; + public Long getBeginningOffset() { + return beginningOffset; } - public void setOffset(Long offset) { - this.offset = offset; + public void setBeginningOffset(Long beginningOffset) { + this.beginningOffset = beginningOffset; + } + + public Long getEndOffset() { + return endOffset; + } + + public void setEndOffset(Long endOffset) { + this.endOffset = endOffset; + } + + public Long getMsgNum() { + return msgNum; + } + + public void setMsgNum(Long msgNum) { + this.msgNum = msgNum; } public Integer getLeaderBrokerId() { @@ -91,25 +103,45 @@ public class TopicPartitionVO { this.isrBrokerIdList = isrBrokerIdList; } - public boolean isUnderReplicated() { + public Boolean getUnderReplicated() { return underReplicated; } - public void setUnderReplicated(boolean underReplicated) { + public void setUnderReplicated(Boolean underReplicated) { this.underReplicated = underReplicated; } + public Long getLogSize() { + return logSize; + } + + public void setLogSize(Long logSize) { + this.logSize = logSize; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + @Override public String toString() { - return "TopicPartitionVO{" + + return "TopicPartitionDTO{" + "partitionId=" + partitionId + - ", offset=" + offset + + ", beginningOffset=" + beginningOffset + + ", endOffset=" + endOffset + + ", msgNum=" + msgNum + ", leaderBrokerId=" + leaderBrokerId + ", preferredBrokerId=" + preferredBrokerId + ", leaderEpoch=" + leaderEpoch + ", replicaBrokerIdList=" + replicaBrokerIdList + ", isrBrokerIdList=" + isrBrokerIdList + ", underReplicated=" + underReplicated + + ", logSize=" + logSize + + ", location='" + location + '\'' + '}'; } } diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/TopicFavorite.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ClusterTopicDTO.java similarity index 58% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/TopicFavorite.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ClusterTopicDTO.java index 066080b0..7a23191d 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/topic/TopicFavorite.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/ClusterTopicDTO.java @@ -1,21 +1,20 @@ -package com.xiaojukeji.kafka.manager.web.model.topic; +package com.xiaojukeji.kafka.manager.common.entity.dto; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * @author zengqiao - * @date 19/7/11 + * @date 20/4/23 */ -@JsonIgnoreProperties(ignoreUnknown = true) -@ApiModel(value = "TopicFavorite", description = "Topic收藏,取消收藏") -public class TopicFavorite { +@ApiModel(description="Topic信息") +public class ClusterTopicDTO { @ApiModelProperty(value = "集群ID") - private Long clusterId; + protected Long clusterId; @ApiModelProperty(value = "Topic名称") - private String topicName; + protected String topicName; public Long getClusterId() { return clusterId; @@ -35,9 +34,17 @@ public class TopicFavorite { @Override public String toString() { - return "TopicFavorite{" + + return "ClusterTopicDTO{" + "clusterId=" + clusterId + ", topicName='" + topicName + '\'' + '}'; } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName)) { + return false; + } + return true; + } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/config/ConfigDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/config/ConfigDTO.java new file mode 100644 index 00000000..397a8b9a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/config/ConfigDTO.java @@ -0,0 +1,65 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.config; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/20 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "配置") +public class ConfigDTO { + @ApiModelProperty(value = "配置key") + private String configKey; + + @ApiModelProperty(value = "配置value") + private String configValue; + + @ApiModelProperty(value = "备注") + private String configDescription; + + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } + + public String getConfigDescription() { + return configDescription; + } + + public void setConfigDescription(String configDescription) { + this.configDescription = configDescription; + } + + @Override + public String toString() { + return "ConfigDTO{" + + "configKey='" + configKey + '\'' + + ", configValue='" + configValue + '\'' + + ", configDescription='" + configDescription + '\'' + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isExistBlank(configKey) + || ValidateUtils.isBlank(configValue) + || ValidateUtils.isBlank(configDescription)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaAclSearchDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaAclSearchDTO.java new file mode 100644 index 00000000..8285cb46 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaAclSearchDTO.java @@ -0,0 +1,61 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.gateway; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/7/7 + */ +public class KafkaAclSearchDTO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "开始时间(ms)") + private Long start; + + @ApiModelProperty(value = "结束时间(ms)") + private Long end; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public Long getStart() { + return start; + } + + public void setStart(Long start) { + this.start = start; + } + + public Long getEnd() { + return end; + } + + public void setEnd(Long end) { + this.end = end; + } + + @Override + public String toString() { + return "KafkaAclSearchDTO{" + + "clusterId=" + clusterId + + ", start=" + start + + ", end=" + end + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(start) + || ValidateUtils.isNull(end)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaUserSearchDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaUserSearchDTO.java new file mode 100644 index 00000000..40b9ebb7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/KafkaUserSearchDTO.java @@ -0,0 +1,51 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.gateway; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/7/7 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "Kafka用户查询") +public class KafkaUserSearchDTO { + @ApiModelProperty(value = "开始时间(ms)") + private Long start; + + @ApiModelProperty(value = "结束时间(ms)") + private Long end; + + public Long getStart() { + return start; + } + + public void setStart(Long start) { + this.start = start; + } + + public Long getEnd() { + return end; + } + + public void setEnd(Long end) { + this.end = end; + } + + @Override + public String toString() { + return "KafkaUserSearchDTO{" + + "start=" + start + + ", end=" + end + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNullOrLessThanZero(start) || ValidateUtils.isNullOrLessThanZero(end)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/TopicConnectionDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/TopicConnectionDTO.java new file mode 100644 index 00000000..8e270338 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/gateway/TopicConnectionDTO.java @@ -0,0 +1,127 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/6 + */ +public class TopicConnectionDTO { + private Long id; + + private Long clusterId; + + private String topicName; + + // producer or consumer + private String type; + + // appId#ip#clientVersion + private String clientInfo; + + private String appId; + + private String ip; + + private String clientVersion; + + private Date gmtCreate; + + private Date gmtModify; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getClientInfo() { + return clientInfo; + } + + public void setClientInfo(String clientInfo) { + this.clientInfo = clientInfo; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getClientVersion() { + return clientVersion; + } + + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "TopicConnectionDTO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", type='" + type + '\'' + + ", clientInfo='" + clientInfo + '\'' + + ", appId='" + appId + '\'' + + ", ip='" + ip + '\'' + + ", clientVersion='" + clientVersion + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/AppDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/AppDTO.java new file mode 100644 index 00000000..b35e42d8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/AppDTO.java @@ -0,0 +1,76 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/5/4 + */ +@ApiModel(description="App信息") +public class AppDTO { + @ApiModelProperty(value="AppId, 不可修改") + private String appId; + + @ApiModelProperty(value="App名称") + private String name; + + @ApiModelProperty(value="App描述") + private String description; + + @ApiModelProperty(value="App负责人") + private String principals; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + @Override + public String toString() { + return "AppDTO{" + + "appId='" + appId + '\'' + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + ", principals='" + principals + '\'' + + '}'; + } + + public boolean legal() { + if (ValidateUtils.isBlank(appId) + || ValidateUtils.isBlank(name) + || ValidateUtils.isBlank(principals) + || ValidateUtils.isBlank(description)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/JmxSwitchDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/JmxSwitchDTO.java new file mode 100644 index 00000000..ee6986cb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/JmxSwitchDTO.java @@ -0,0 +1,126 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/8/21 + */ +@ApiModel(description = "JmxSwitch开关") +@JsonIgnoreProperties(ignoreUnknown = true) +public class JmxSwitchDTO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "是否是物理集群ID, True:是, False:否") + private Boolean isPhysicalClusterId; + + @ApiModelProperty(value = "Topic请求你JMX") + private String topicName; + + @ApiModelProperty(value = "Topic请求你JMX") + private Boolean openTopicRequestMetrics; + + @ApiModelProperty(value = "AppTopicJMX") + private Boolean openAppIdTopicMetrics; + + @ApiModelProperty(value = "客户端请求JMX") + private Boolean openClientRequestMetrics; + + @ApiModelProperty(value = "磁盘JMX") + private Boolean openDiskMetrics; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public Boolean getPhysicalClusterId() { + return isPhysicalClusterId; + } + + public void setPhysicalClusterId(Boolean physicalClusterId) { + isPhysicalClusterId = physicalClusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Boolean getOpenTopicRequestMetrics() { + return openTopicRequestMetrics; + } + + public void setOpenTopicRequestMetrics(Boolean openTopicRequestMetrics) { + this.openTopicRequestMetrics = openTopicRequestMetrics; + } + + public Boolean getOpenAppIdTopicMetrics() { + return openAppIdTopicMetrics; + } + + public void setOpenAppIdTopicMetrics(Boolean openAppIdTopicMetrics) { + this.openAppIdTopicMetrics = openAppIdTopicMetrics; + } + + public Boolean getOpenClientRequestMetrics() { + return openClientRequestMetrics; + } + + public void setOpenClientRequestMetrics(Boolean openClientRequestMetrics) { + this.openClientRequestMetrics = openClientRequestMetrics; + } + + public Boolean getOpenDiskMetrics() { + return openDiskMetrics; + } + + public void setOpenDiskMetrics(Boolean openDiskMetrics) { + this.openDiskMetrics = openDiskMetrics; + } + + @Override + public String toString() { + return "JmxSwitchDTO{" + + "clusterId=" + clusterId + + ", isPhysicalClusterId=" + isPhysicalClusterId + + ", topicName='" + topicName + '\'' + + ", openTopicRequestMetrics=" + openTopicRequestMetrics + + ", openAppIdTopicMetrics=" + openAppIdTopicMetrics + + ", openClientRequestMetrics=" + openClientRequestMetrics + + ", openDiskMetrics=" + openDiskMetrics + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(isPhysicalClusterId) + || ValidateUtils.isNull(topicName)) { + return false; + } + + if (ValidateUtils.isNull(openTopicRequestMetrics)) { + openTopicRequestMetrics = Boolean.FALSE; + } + if (ValidateUtils.isNull(openAppIdTopicMetrics)) { + openAppIdTopicMetrics = Boolean.FALSE; + } + if (ValidateUtils.isNull(openClientRequestMetrics)) { + openClientRequestMetrics = Boolean.FALSE; + } + if (ValidateUtils.isNull(openDiskMetrics)) { + openDiskMetrics = Boolean.FALSE; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/KafkaFileDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/KafkaFileDTO.java new file mode 100644 index 00000000..b9337661 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/KafkaFileDTO.java @@ -0,0 +1,143 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.xiaojukeji.kafka.manager.common.bizenum.KafkaFileEnum; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.web.multipart.MultipartFile; + +/** + * @author zengqiao + * @date 20/4/29 + */ +@ApiModel(description = "Kafka文件") +public class KafkaFileDTO { + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "集群ID, 创建的时候需要, 修改不需要, 如果是包,则传-1") + private Long clusterId; + + @ApiModelProperty(value = "文件名, 创建时需要, 修改不需要") + private String fileName; + + @ApiModelProperty(value = "文件MD5") + private String fileMd5; + + @ApiModelProperty(value = "文件类型, 创建时需要, 修改不需要") + private Integer fileType; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "上传的文件") + private MultipartFile uploadFile; + + @ApiModelProperty(value = "是更新操作") + private Boolean modify; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFileMd5() { + return fileMd5; + } + + public void setFileMd5(String fileMd5) { + this.fileMd5 = fileMd5; + } + + public Integer getFileType() { + return fileType; + } + + public void setFileType(Integer fileType) { + this.fileType = fileType; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public MultipartFile getUploadFile() { + return uploadFile; + } + + public void setUploadFile(MultipartFile uploadFile) { + this.uploadFile = uploadFile; + } + + public Boolean getModify() { + return modify; + } + + public void setModify(Boolean modify) { + this.modify = modify; + } + + @Override + public String toString() { + return "KafkaFileDTO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", fileName='" + fileName + '\'' + + ", fileMd5='" + fileMd5 + '\'' + + ", fileType=" + fileType + + ", description='" + description + '\'' + + '}'; + } + + public boolean createParamLegal() { + if (ValidateUtils.isNull(clusterId) || + ValidateUtils.isBlank(fileName) || + ValidateUtils.isNull(fileType) || + ValidateUtils.isNull(fileMd5) || + ValidateUtils.isNull(uploadFile)) { + return false; + } + if (!(fileName.endsWith(KafkaFileEnum.PACKAGE.getSuffix()) + || fileName.endsWith(KafkaFileEnum.SERVER_CONFIG.getSuffix()))) { + // 后缀不对 + return false; + } + if (KafkaFileEnum.PACKAGE.getCode().equals(fileType) && clusterId != -1) { + // 包不属于任何集群 + return false; + } + return true; + } + + public boolean modifyParamLegal() { + if (ValidateUtils.isBlank(fileName) || + ValidateUtils.isNull(fileMd5) || + ValidateUtils.isNull(uploadFile)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/LoginModel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/LoginDTO.java similarity index 66% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/LoginModel.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/LoginDTO.java index 4e4f70ee..0fa5c77c 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/LoginModel.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/LoginDTO.java @@ -1,20 +1,21 @@ -package com.xiaojukeji.kafka.manager.web.model; +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.swagger.annotations.ApiModel; -import org.springframework.util.StringUtils; /** * @author zengqiao * @date 19/5/3 */ @JsonIgnoreProperties(ignoreUnknown = true) -@ApiModel(value = "LoginModel", description = "登陆") -public class LoginModel { +@ApiModel(description = "登陆") +public class LoginDTO { private String username; private String password; + private String code; + public String getUsername() { return username; } @@ -31,18 +32,20 @@ public class LoginModel { this.password = password; } - @Override - public String toString() { - return "LoginModel{" + - "username='" + username + '\'' + - ", password='" + password + '\'' + - '}'; + public String getCode() { + return code; } - public boolean legal() { - if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { - return false; - } - return true; + public void setCode(String code) { + this.code = code; + } + + @Override + public String toString() { + return "LoginDTO{" + + "username='" + username + '\'' + + ", password='" + password + '\'' + + ", code='" + code + '\'' + + '}'; } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicDataSampleDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicDataSampleDTO.java new file mode 100644 index 00000000..82876522 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicDataSampleDTO.java @@ -0,0 +1,100 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.constant.TopicSampleConstant; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModelProperty; + +/** + * Topic采样 + * @author zengqiao + * @date 19/4/8 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class TopicDataSampleDTO { + @ApiModelProperty(value = "分区Id") + private Integer partitionId; + + @ApiModelProperty(value = "最大采样条数[必须小于100]") + private Integer maxMsgNum; + + @ApiModelProperty(value = "采样超时时间[必须小于10000]") + private Integer timeout; + + @ApiModelProperty(value = "采样offset") + private Long offset; + + @ApiModelProperty(value = "截断") + private Boolean truncate; + + @ApiModelProperty(value = "是否是集群ID, 默认不是") + private Boolean isPhysicalClusterId; + + public Integer getPartitionId() { + return partitionId; + } + + public void setPartitionId(Integer partitionId) { + this.partitionId = partitionId; + } + + public Integer getMaxMsgNum() { + return maxMsgNum; + } + + public void setMaxMsgNum(Integer maxMsgNum) { + this.maxMsgNum = maxMsgNum; + } + + public Integer getTimeout() { + return timeout; + } + + public void setTimeout(Integer timeout) { + this.timeout = timeout; + } + + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Boolean getTruncate() { + return truncate; + } + + public void setTruncate(Boolean truncate) { + this.truncate = truncate; + } + + public Boolean getIsPhysicalClusterId() { + return isPhysicalClusterId; + } + + public void setIsPhysicalClusterId(Boolean isPhysicalClusterId) { + this.isPhysicalClusterId = isPhysicalClusterId; + } + + @Override + public String toString() { + return "TopicDataSampleDTO{" + + "partitionId=" + partitionId + + ", maxMsgNum=" + maxMsgNum + + ", timeout=" + timeout + + ", offset=" + offset + + ", truncate=" + truncate + + ", isPhysicalClusterId=" + isPhysicalClusterId + + '}'; + } + + public void adjustConfig() { + timeout = Math.min(timeout, TopicSampleConstant.MAX_TIMEOUT_UNIT_MS); + maxMsgNum = Math.min(maxMsgNum, TopicSampleConstant.MAX_MSG_NUM); + if (ValidateUtils.isNull(isPhysicalClusterId)) { + isPhysicalClusterId = false; + } + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicModifyDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicModifyDTO.java new file mode 100644 index 00000000..d59b5471 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicModifyDTO.java @@ -0,0 +1,41 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/8 + */ +public class TopicModifyDTO extends ClusterTopicDTO { + @ApiModelProperty(value = "描述") + private String description; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "TopicModifyDTO{" + + "description='" + description + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + @Override + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isExistBlank(topicName) + || ValidateUtils.isNull(description)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicOffsetResetDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicOffsetResetDTO.java new file mode 100644 index 00000000..0e2aadb0 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicOffsetResetDTO.java @@ -0,0 +1,139 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.xiaojukeji.kafka.manager.common.bizenum.OffsetLocationEnum; +import com.xiaojukeji.kafka.manager.common.entity.ao.PartitionOffsetDTO; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * 重置offset + * @author zengqiao + * @date 19/4/8 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class TopicOffsetResetDTO { + @ApiModelProperty(value = "集群Id") + private Long clusterId; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "消费组") + private String consumerGroup; + + @ApiModelProperty(value = "存储位置") + private String location; + + @ApiModelProperty(value = "重置到指定offset") + private List offsetList; + + @ApiModelProperty(value = "重置到指定时间") + private Long timestamp; + + @ApiModelProperty(value = "是否是物理集群ID") + private Boolean isPhysicalClusterId; + + @ApiModelProperty(value = "指定offset的位置(0 不指定,1 最旧的offset,2 最新的offset)") + private Integer offsetPos; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getConsumerGroup() { + return consumerGroup; + } + + public void setConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public List getOffsetList() { + return offsetList; + } + + public void setOffsetList(List offsetList) { + this.offsetList = offsetList; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + public Boolean getIsPhysicalClusterId() { + return isPhysicalClusterId; + } + + public void setIsPhysicalClusterId(Boolean isPhysicalClusterId) { + this.isPhysicalClusterId = isPhysicalClusterId; + } + + public Integer getOffsetPos() { + return offsetPos; + } + + public void setOffsetPos(Integer offsetPos) { + this.offsetPos = offsetPos; + } + + @Override + public String toString() { + return "TopicOffsetResetDTO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", consumerGroup='" + consumerGroup + '\'' + + ", location='" + location + '\'' + + ", offsetList=" + offsetList + + ", timestamp=" + timestamp + + ", isPhysicalClusterId=" + isPhysicalClusterId + + ", offsetPos=" + offsetPos + + '}'; + } + + public boolean legal() { + if (clusterId == null + || ValidateUtils.isExistBlank(topicName) + || ValidateUtils.isExistBlank(consumerGroup) + || OffsetLocationEnum.getOffsetStoreLocation(location) == null) { + return false; + } + + if (isPhysicalClusterId == null) { + isPhysicalClusterId = false; + } + if (timestamp == null && offsetList == null && ValidateUtils.isNullOrLessThanZero(offsetPos)) { + return false; + } + if (ValidateUtils.isNull(offsetPos)) { + offsetPos = 0; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicRetainDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicRetainDTO.java new file mode 100644 index 00000000..0472a7c0 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/normal/TopicRetainDTO.java @@ -0,0 +1,44 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.normal; + +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/8 + */ +@ApiModel(description = "Topic延长保留") +public class TopicRetainDTO extends ClusterTopicDTO{ + + @ApiModelProperty(value = "延期天数") + private Integer retainDays; + + public Integer getRetainDays() { + return retainDays; + } + + public void setRetainDays(Integer retainDays) { + this.retainDays = retainDays; + } + + @Override + public String toString() { + return "TopicRetainDTO{" + + "retainDays=" + retainDays + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + @Override + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName) + || ValidateUtils.isNull(retainDays)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/KafkaPackageDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/KafkaPackageDTO.java new file mode 100644 index 00000000..86314d8d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/KafkaPackageDTO.java @@ -0,0 +1,25 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/26 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description="集群任务") +public class KafkaPackageDTO { + @ApiModelProperty(value="名称") + private String name; + + @ApiModelProperty(value="文件类型") + private Integer fileType; + + @ApiModelProperty(value="md5") + private String md5; + + @ApiModelProperty(value="描述备注") + private String description; +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RebalanceModel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/RebalanceDTO.java similarity index 51% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RebalanceModel.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/RebalanceDTO.java index c988d3e1..29db6bdc 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RebalanceModel.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/RebalanceDTO.java @@ -1,27 +1,31 @@ -package com.xiaojukeji.kafka.manager.web.model; +package com.xiaojukeji.kafka.manager.common.entity.dto.op; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.bizenum.RebalanceDimensionEnum; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** - * rebalance请求参数 * @author zengqiao * @date 19/7/8 */ @JsonIgnoreProperties(ignoreUnknown = true) -@ApiModel(value = "RebalanceModel", description = "rebalance模型") -public class RebalanceModel { - @ApiModelProperty(value = "集群Id") +@ApiModel(description = "优先副本选举") +public class RebalanceDTO { + @ApiModelProperty(value = "clusterId") private Long clusterId; + @ApiModelProperty(value = "RegionId") + private Long regionId; + @ApiModelProperty(value = "brokerId") private Integer brokerId; - @ApiModelProperty(value = "Topic名称") + @ApiModelProperty(value = "TopicName") private String topicName; - @ApiModelProperty(value = "维度[0: 集群维度, 1: broker维度]") + @ApiModelProperty(value = "维度[0: Cluster维度, 1: Region维度, 2:Broker维度, 3:Topic维度]") private Integer dimension; public Long getClusterId() { @@ -32,6 +36,14 @@ public class RebalanceModel { this.clusterId = clusterId; } + public Long getRegionId() { + return regionId; + } + + public void setRegionId(Long regionId) { + this.regionId = regionId; + } + public Integer getBrokerId() { return brokerId; } @@ -58,19 +70,20 @@ public class RebalanceModel { @Override public String toString() { - return "RebalanceModel{" + + return "RebalanceDTO{" + "clusterId=" + clusterId + + ", regionId=" + regionId + ", brokerId=" + brokerId + - ", topicName=" + topicName + + ", topicName='" + topicName + '\'' + ", dimension=" + dimension + '}'; } - public boolean legal() { - if (dimension == null || clusterId == null) { - return false; - } - if (dimension.equals(1) && brokerId == null) { + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || RebalanceDimensionEnum.REGION.getCode().equals(dimension) && ValidateUtils.isNull(regionId) + || RebalanceDimensionEnum.BROKER.getCode().equals(dimension) && ValidateUtils.isNull(brokerId) + || RebalanceDimensionEnum.TOPIC.getCode().equals(dimension) && ValidateUtils.isNull(topicName) ) { return false; } return true; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecDTO.java new file mode 100644 index 00000000..74189544 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecDTO.java @@ -0,0 +1,70 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.reassign; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.bizenum.TopicReassignActionEnum; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao_cn@163.com + * @date 19/4/17 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "操作迁移任务") +public class ReassignExecDTO { + @ApiModelProperty(value = "任务ID") + private Long taskId; + + @ApiModelProperty(value = "动作[start|modify|cancel]") + private String action; + + @ApiModelProperty(value = "开始时间(开始之后不可修改)") + private Long beginTime; + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public Long getBeginTime() { + return beginTime; + } + + public void setBeginTime(Long beginTime) { + this.beginTime = beginTime; + } + + @Override + public String toString() { + return "ReassignExecDTO{" + + "taskId=" + taskId + + ", action='" + action + '\'' + + ", beginTime=" + beginTime + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(taskId) + || ValidateUtils.isBlank(action)) { + return false; + } + + if (TopicReassignActionEnum.MODIFY.getAction().equals(action) + && ValidateUtils.isNullOrLessThanZero(beginTime)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecSubDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecSubDTO.java new file mode 100644 index 00000000..52a1d8c9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignExecSubDTO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.reassign; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/6/11 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "操作迁移子任务") +public class ReassignExecSubDTO { + @ApiModelProperty(value = "子任务ID") + private Long subTaskId; + + @ApiModelProperty(value = "动作[modify]") + private String action; + + @ApiModelProperty(value = "当前限流值(B/s), 完成之前可修改") + private Long throttle; + + @ApiModelProperty(value = "限流值上限(B/s), 完成之前可修改") + private Long maxThrottle; + + @ApiModelProperty(value = "限流值下限(B/s), 完成之前可修改") + private Long minThrottle; + + public Long getSubTaskId() { + return subTaskId; + } + + public void setSubTaskId(Long subTaskId) { + this.subTaskId = subTaskId; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public Long getThrottle() { + return throttle; + } + + public void setThrottle(Long throttle) { + this.throttle = throttle; + } + + public Long getMaxThrottle() { + return maxThrottle; + } + + public void setMaxThrottle(Long maxThrottle) { + this.maxThrottle = maxThrottle; + } + + public Long getMinThrottle() { + return minThrottle; + } + + public void setMinThrottle(Long minThrottle) { + this.minThrottle = minThrottle; + } + + @Override + public String toString() { + return "ReassignExecSubDTO{" + + "subTaskId=" + subTaskId + + ", action='" + action + '\'' + + ", throttle=" + throttle + + ", maxThrottle=" + maxThrottle + + ", minThrottle=" + minThrottle + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(subTaskId) + || ValidateUtils.isBlank(action) + || ValidateUtils.isNullOrLessThanZero(throttle) + || ValidateUtils.isNullOrLessThanZero(maxThrottle) + || ValidateUtils.isNullOrLessThanZero(minThrottle) + || maxThrottle < throttle || throttle < minThrottle) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignTopicDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignTopicDTO.java new file mode 100644 index 00000000..59aa0ae6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/reassign/ReassignTopicDTO.java @@ -0,0 +1,172 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.reassign; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * 迁移(Topic迁移/Partition迁移) + * @author zengqiao_cn@163.com + * @date 19/4/9 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "Topic迁移") +public class ReassignTopicDTO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "目标BrokerID列表") + private List brokerIdList; + + @ApiModelProperty(value = "目标RegionID") + private Long regionId; + + @ApiModelProperty(value = "分区ID") + private List partitionIdList; + + @ApiModelProperty(value = "限流值(B/s)") + private Long throttle; + + @ApiModelProperty(value = "限流上限(B/s)") + private Long maxThrottle; + + @ApiModelProperty(value = "限流下限(B/s)") + private Long minThrottle; + + @ApiModelProperty(value = "原本的保存时间(ms)") + private Long originalRetentionTime; + + @ApiModelProperty(value = "迁移时的保存时间(ms)") + private Long reassignRetentionTime; + + @ApiModelProperty(value = "开始时间(ms, 时间戳)") + private Long beginTime; + + @ApiModelProperty(value = "备注") + private String description; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + public Long getRegionId() { + return regionId; + } + + public void setRegionId(Long regionId) { + this.regionId = regionId; + } + + public List getPartitionIdList() { + return partitionIdList; + } + + public void setPartitionIdList(List partitionIdList) { + this.partitionIdList = partitionIdList; + } + + public Long getThrottle() { + return throttle; + } + + public void setThrottle(Long throttle) { + this.throttle = throttle; + } + + public Long getMaxThrottle() { + return maxThrottle; + } + + public void setMaxThrottle(Long maxThrottle) { + this.maxThrottle = maxThrottle; + } + + public Long getMinThrottle() { + return minThrottle; + } + + public void setMinThrottle(Long minThrottle) { + this.minThrottle = minThrottle; + } + + public Long getOriginalRetentionTime() { + return originalRetentionTime; + } + + public void setOriginalRetentionTime(Long originalRetentionTime) { + this.originalRetentionTime = originalRetentionTime; + } + + public Long getReassignRetentionTime() { + return reassignRetentionTime; + } + + public void setReassignRetentionTime(Long reassignRetentionTime) { + this.reassignRetentionTime = reassignRetentionTime; + } + + public Long getBeginTime() { + return beginTime; + } + + public void setBeginTime(Long beginTime) { + this.beginTime = beginTime; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isExistBlank(topicName) + || ValidateUtils.isNullOrLessThanZero(throttle) + || ValidateUtils.isNullOrLessThanZero(maxThrottle) + || ValidateUtils.isNullOrLessThanZero(minThrottle) + || maxThrottle < throttle || throttle < minThrottle + || ValidateUtils.isNullOrLessThanZero(originalRetentionTime) + || ValidateUtils.isNullOrLessThanZero(reassignRetentionTime) + || originalRetentionTime < reassignRetentionTime + || ValidateUtils.isNullOrLessThanZero(beginTime)) { + return false; + } + if (ValidateUtils.isNull(description)) { + description = ""; + } + + if (ValidateUtils.isEmptyList(brokerIdList) && ValidateUtils.isNull(regionId)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicCreationDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicCreationDTO.java new file mode 100644 index 00000000..66c26c5b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicCreationDTO.java @@ -0,0 +1,138 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.topic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; +import java.util.Properties; + +/** + * @author huangyiminghappy@163.com, zengqiao + * @date 2019-04-21 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "Topic创建") +public class TopicCreationDTO extends ClusterTopicDTO { + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "分区数") + private Integer partitionNum; + + @ApiModelProperty(value = "副本数") + private Integer replicaNum; + + @ApiModelProperty(value = "消息保存时间(ms)") + private Long retentionTime; + + @ApiModelProperty(value = "brokerId列表") + private List brokerIdList; + + @ApiModelProperty(value = "RegionId") + private Long regionId; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "Topic属性列表") + private Properties properties; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public Integer getReplicaNum() { + return replicaNum; + } + + public void setReplicaNum(Integer replicaNum) { + this.replicaNum = replicaNum; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + public Long getRegionId() { + return regionId; + } + + public void setRegionId(Long regionId) { + this.regionId = regionId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + @Override + public String toString() { + return "TopicCreationDTO{" + + "appId='" + appId + '\'' + + ", partitionNum=" + partitionNum + + ", replicaNum=" + replicaNum + + ", retentionTime=" + retentionTime + + ", brokerIdList=" + brokerIdList + + ", regionId=" + regionId + + ", description='" + description + '\'' + + ", properties='" + properties + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + @Override + public boolean paramLegal() { + if (ValidateUtils.isNull(appId) + || ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName) + || ValidateUtils.isNull(partitionNum) || partitionNum <= 0 + || ValidateUtils.isNull(replicaNum) || replicaNum <= 0 + || ValidateUtils.isNull(retentionTime) || retentionTime <= 0) { + return false; + } + if ((ValidateUtils.isNull(brokerIdList) || brokerIdList.isEmpty()) && ValidateUtils.isNull(regionId)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicDeletionDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicDeletionDTO.java new file mode 100644 index 00000000..735ee857 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicDeletionDTO.java @@ -0,0 +1,44 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.topic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/2 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(value = "Topic删除") +public class TopicDeletionDTO extends ClusterTopicDTO { + @ApiModelProperty(value = "不强制") + private Boolean unForce; + + public Boolean getUnForce() { + return unForce; + } + + public void setUnForce(Boolean unForce) { + this.unForce = unForce; + } + + @Override + public String toString() { + return "TopicDeletionDTO{" + + "unForce=" + unForce + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName) + || ValidateUtils.isNull(unForce)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicExpansionDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicExpansionDTO.java new file mode 100644 index 00000000..bb8a5eb8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicExpansionDTO.java @@ -0,0 +1,71 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.topic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/1/2 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(value = "Topic扩分区") +public class TopicExpansionDTO extends ClusterTopicDTO { + @ApiModelProperty(value = "新增分区数") + private Integer partitionNum; + + @ApiModelProperty(value = "brokerId列表") + private List brokerIdList; + + @ApiModelProperty(value = "regionId") + private Long regionId; + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + public Long getRegionId() { + return regionId; + } + + public void setRegionId(Long regionId) { + this.regionId = regionId; + } + + @Override + public String toString() { + return "TopicExpandDTO{" + + ", partitionNum=" + partitionNum + + ", brokerIdList=" + brokerIdList + + ", regionId=" + regionId + + '}'; + } + + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName) + || ValidateUtils.isNull(partitionNum) || partitionNum <= 0) { + return false; + } + if (ValidateUtils.isEmptyList(brokerIdList) && ValidateUtils.isNull(regionId)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicModificationDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicModificationDTO.java new file mode 100644 index 00000000..5d03264e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/op/topic/TopicModificationDTO.java @@ -0,0 +1,85 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.op.topic; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Properties; + +/** + * @author zengqiao + * @date 20/4/24 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(value = "Topic修改") +public class TopicModificationDTO extends ClusterTopicDTO { + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "消息保存时间(ms)") + private Long retentionTime; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "Topic属性列表") + private Properties properties; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + @Override + public String toString() { + return "TopicModificationDTO{" + + "appId='" + appId + '\'' + + ", retentionTime=" + retentionTime + + ", description='" + description + '\'' + + ", properties='" + properties + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } + + @Override + public boolean paramLegal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(topicName) + || ValidateUtils.isNull(appId) + || ValidateUtils.isNull(retentionTime) + || ValidateUtils.isNull(description)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/AccountModel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/AccountDTO.java similarity index 51% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/AccountModel.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/AccountDTO.java index a3ac3bf2..db2b0aff 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/AccountModel.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/AccountDTO.java @@ -1,25 +1,24 @@ -package com.xiaojukeji.kafka.manager.web.model; +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.springframework.util.StringUtils; /** * @author zengqiao * @date 19/5/3 */ -@ApiModel(value = "AccountModel", description = "用户") -public class AccountModel { +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "用户") +public class AccountDTO { @ApiModelProperty(value = "用户名") private String username; - @ApiModelProperty(value = "新密码, 1.创建账号时, 可不传") + @ApiModelProperty(value = "密码") private String password; - @ApiModelProperty(value = "旧密码") - private String oldPassword; - - @ApiModelProperty(value = "角色[0:普通, 1:运维, 2:管理员]") + @ApiModelProperty(value = "角色") private Integer role; public String getUsername() { @@ -30,14 +29,6 @@ public class AccountModel { this.username = username; } - public String getOldPassword() { - return oldPassword; - } - - public void setOldPassword(String oldPassword) { - this.oldPassword = oldPassword; - } - public String getPassword() { return password; } @@ -56,27 +47,20 @@ public class AccountModel { @Override public String toString() { - return "AccountModel{" + + return "AccountDTO{" + "username='" + username + '\'' + - ", oldPassword='" + oldPassword + '\'' + ", password='" + password + '\'' + ", role=" + role + '}'; } - public boolean insertLegal() { - if (StringUtils.isEmpty(username) - || StringUtils.isEmpty(password) + public boolean legal() { + if (ValidateUtils.isNull(username) || !(role == 0 || role == 1 || role == 2)) { return false; } - return true; - } - - public boolean modifyLegal() { - if (StringUtils.isEmpty(username) - || !(role == 0 || role == 1 || role == 2)) { - return false; + if (ValidateUtils.isNull(password)) { + password = ""; } return true; } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/ClusterDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/ClusterDTO.java new file mode 100644 index 00000000..666ef6f7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/ClusterDTO.java @@ -0,0 +1,128 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/23 + */ +@ApiModel(description = "集群接入&修改") +@JsonIgnoreProperties(ignoreUnknown = true) +public class ClusterDTO { + @ApiModelProperty(value="集群Id, 修改时传") + private Long clusterId; + + @ApiModelProperty(value="集群名称") + private String clusterName; + + @ApiModelProperty(value="ZK地址, 不允许修改") + private String zookeeper; + + @ApiModelProperty(value="bootstrap地址") + private String bootstrapServers; + + @ApiModelProperty(value="kafka版本") + private String kafkaVersion; + + @ApiModelProperty(value="集群类型") + private Integer mode; + + @ApiModelProperty(value="数据中心") + private String idc; + + @ApiModelProperty(value="安全配置参数") + private String securityProperties; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getZookeeper() { + return zookeeper; + } + + public void setZookeeper(String zookeeper) { + this.zookeeper = zookeeper; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public String getKafkaVersion() { + return kafkaVersion; + } + + public void setKafkaVersion(String kafkaVersion) { + this.kafkaVersion = kafkaVersion; + } + + public String getIdc() { + return idc; + } + + public void setIdc(String idc) { + this.idc = idc; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getSecurityProperties() { + return securityProperties; + } + + public void setSecurityProperties(String securityProperties) { + this.securityProperties = securityProperties; + } + + @Override + public String toString() { + return "ClusterDTO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", zookeeper='" + zookeeper + '\'' + + ", bootstrapServers='" + bootstrapServers + '\'' + + ", kafkaVersion='" + kafkaVersion + '\'' + + ", idc='" + idc + '\'' + + ", mode='" + mode + '\'' + + ", securityProperties='" + securityProperties + '\'' + + '}'; + } + + public Boolean legal() { + if (ValidateUtils.isNull(clusterName) + || ValidateUtils.isNull(zookeeper) + || ValidateUtils.isNull(idc) + || ValidateUtils.isNull(mode) + || ValidateUtils.isNull(bootstrapServers) + ) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/CustomScheduledTaskDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/CustomScheduledTaskDTO.java new file mode 100644 index 00000000..d7fa2d72 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/CustomScheduledTaskDTO.java @@ -0,0 +1,35 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; + +/** + * @author zengqiao + * @date 20/8/11 + */ +public class CustomScheduledTaskDTO { + private String name; + + private String cron; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCron() { + return cron; + } + + public void setCron(String cron) { + this.cron = cron; + } + + @Override + public String toString() { + return "CustomScheduledTaskDTO{" + + "name='" + name + '\'' + + ", cron='" + cron + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/LogicalClusterDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/LogicalClusterDTO.java new file mode 100644 index 00000000..c3569774 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/LogicalClusterDTO.java @@ -0,0 +1,118 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/6/29 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@ApiModel(description = "LogicalClusterDTO") +public class LogicalClusterDTO { + @ApiModelProperty(value = "ID, 更新时必须传") + private Long id; + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "集群模式") + private Integer mode; + + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "regionId列表") + private List regionIdList; + + @ApiModelProperty(value = "所属应用ID") + private String appId; + + @ApiModelProperty(value = "备注") + private String description; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public List getRegionIdList() { + return regionIdList; + } + + public void setRegionIdList(List regionIdList) { + this.regionIdList = regionIdList; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "LogicalClusterDTO{" + + "id=" + id + + ", name='" + name + '\'' + + ", mode=" + mode + + ", clusterId=" + clusterId + + ", regionIdList=" + regionIdList + + ", appId='" + appId + '\'' + + ", description='" + description + '\'' + + '}'; + } + + public boolean legal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(clusterId) + || ValidateUtils.isEmptyList(regionIdList) + || ValidateUtils.isNull(appId) + || ValidateUtils.isNull(mode)) { + return false; + } + description = ValidateUtils.isNull(description)? "": description; + return true; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/OperateRecordDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/OperateRecordDTO.java new file mode 100644 index 00000000..1837ecfc --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/OperateRecordDTO.java @@ -0,0 +1,91 @@ +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.bizenum.ModuleEnum; +import com.xiaojukeji.kafka.manager.common.bizenum.OperateEnum; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * @author zhongyuankai_i + * @date 20/09/03 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class OperateRecordDTO { + @ApiModelProperty("模块ID") + private Integer moduleId; + + @ApiModelProperty("操作ID") + private Integer operateId; + + @ApiModelProperty("操作人") + private String operator; + + @ApiModelProperty("开始时间") + private Long startTime; + + @ApiModelProperty("结束时间") + private Long endTime; + + public Integer getModuleId() { + return moduleId; + } + + public void setModuleId(Integer moduleId) { + this.moduleId = moduleId; + } + + public Integer getOperateId() { + return operateId; + } + + public void setOperateId(Integer operateId) { + this.operateId = operateId; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Long getStartTime() { + return startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + @Override + public String toString() { + return "OperateRecordDTO{" + + "moduleId=" + moduleId + + ", operateId=" + operateId + + ", operator='" + operator + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + '}'; + } + + public boolean legal() { + if (!ModuleEnum.validate(moduleId) || + (!ValidateUtils.isNull(operateId) && OperateEnum.validate(operateId)) + ) { + return false; + } + return true; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RegionModel.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/RegionDTO.java similarity index 53% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RegionModel.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/RegionDTO.java index eddaeba3..708aa3ce 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/model/RegionModel.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/dto/rd/RegionDTO.java @@ -1,9 +1,9 @@ -package com.xiaojukeji.kafka.manager.web.model; +package com.xiaojukeji.kafka.manager.common.entity.dto.rd; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.apache.commons.lang.StringUtils; import java.util.List; @@ -13,59 +13,40 @@ import java.util.List; * @date 19/4/3 */ @JsonIgnoreProperties(ignoreUnknown = true) -@ApiModel(value = "RegionModel", description = "创建Region") -public class RegionModel { - @ApiModelProperty(value = "RegionId, 更新时必须传") - private Long regionId; +@ApiModel(description = "RegionDTO") +public class RegionDTO { + @ApiModelProperty(value = "ID, 更新时必须传") + private Long id; + + @ApiModelProperty(value = "名称") + private String name; @ApiModelProperty(value = "集群ID") private Long clusterId; - @ApiModelProperty(value = "regionName名称") - private String regionName; - - @ApiModelProperty(value = "重要级别, 0:普通, 1:重要,2:重要") - private Integer level; - - @ApiModelProperty(value = "状态, -1:废弃 0:正常 1:容量已满") - private Integer status; - @ApiModelProperty(value = "brokerId列表") private List brokerIdList; @ApiModelProperty(value = "备注") private String description; - public Long getRegionId() { - return regionId; + @ApiModelProperty(value = "状态, 0:正常 1:已满") + private Integer status; + + public Long getId() { + return id; } - public void setRegionId(Long regionId) { - this.regionId = regionId; + public void setId(Long id) { + this.id = id; } - public Long getClusterId() { - return clusterId; + public String getName() { + return name; } - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - public String getRegionName() { - return regionName; - } - - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; + public void setName(String name) { + this.name = name; } public Integer getStatus() { @@ -76,6 +57,14 @@ public class RegionModel { this.status = status; } + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + public List getBrokerIdList() { return brokerIdList; } @@ -92,29 +81,26 @@ public class RegionModel { this.description = description; } - public boolean legal() { - if (clusterId == null - || StringUtils.isEmpty(regionName) - || level == null - || brokerIdList == null || brokerIdList.isEmpty()) { - return false; - } - if (description == null) { - description = ""; - } - return true; - } - @Override public String toString() { - return "RegionModel{" + - "regionId=" + regionId + + return "RegionDTO{" + + "id=" + id + + ", name='" + name + '\'' + ", clusterId=" + clusterId + - ", regionName='" + regionName + '\'' + - ", level=" + level + - ", status=" + status + ", brokerIdList=" + brokerIdList + ", description='" + description + '\'' + + ", status=" + status + '}'; } + + public boolean legal() { + if (ValidateUtils.isNull(clusterId) + || ValidateUtils.isNull(clusterId) + || ValidateUtils.isEmptyList(brokerIdList) + || ValidateUtils.isNull(status)) { + return false; + } + description = ValidateUtils.isNull(description)? "": description; + return true; + } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java new file mode 100644 index 00000000..7752e384 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BaseMetrics.java @@ -0,0 +1,159 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import com.xiaojukeji.kafka.manager.common.utils.jmx.JmxConstant; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zengqiao + * @date 20/6/16 + */ +public class BaseMetrics { + protected Map metricsMap = new HashMap<>(); + + public Map getMetricsMap() { + return metricsMap; + } + + public void setMetricsMap(Map metricsMap) { + this.metricsMap = metricsMap; + } + + @Override + public String toString() { + return "BaseMetrics{" + + "metricsMap=" + metricsMap + + '}'; + } + + public Object getSpecifiedMetrics(String metricsName) { + return metricsMap.get(metricsName); + } + + public T getSpecifiedMetrics(String metricsName, Class cls) { + Object data = metricsMap.get(metricsName); + if (ValidateUtils.isNull(data)) { + return null; + } + return cls.cast(data); + } + + public Double getTotalProduceRequestsPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("TotalProduceRequestsPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public Double getTotalFetchRequestsPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("TotalFetchRequestsPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public Double getBytesInPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("BytesInPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public Double getBytesOutPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("BytesOutPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public Double getBytesRejectedPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("BytesRejectedPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public Double getMessagesInPerSecOneMinuteRate(Double defaultValue) { + Object data = metricsMap.get("MessagesInPerSecOneMinuteRate"); + if (data == null) { + return defaultValue; + } + return Double.valueOf(data.toString()); + } + + public void updateCreateTime(Long timestamp) { + metricsMap.put(JmxConstant.CREATE_TIME, timestamp); + } + + public BaseMetrics mergeByAdd(BaseMetrics metrics) { + if (metrics == null) { + return this; + } + for (Map.Entry entry: metrics.metricsMap.entrySet()) { + mergeByAdd(entry.getKey(), entry.getValue()); + } + return this; + } + + public BaseMetrics mergeByAdd(String objectKey, Object objectValue) { + if (objectKey == null || objectValue == null) { + return this; + } + if (!this.metricsMap.containsKey(objectKey)) { + this.metricsMap.put(objectKey, objectValue); + return this; + } + Object object = this.metricsMap.get(objectKey); + if (object instanceof Integer) { + this.metricsMap.put(objectKey, (Integer) objectValue + (Integer) object); + } else if (object instanceof Long) { + this.metricsMap.put(objectKey, (Long) objectValue + (Long) object); + } else if (object instanceof Float) { + this.metricsMap.put(objectKey, (Float) objectValue + (Float) object); + } else if (object instanceof String) { + this.metricsMap.put(objectKey, (String) objectValue + "," + (String) object); + } else { + this.metricsMap.put(objectKey, (Double) objectValue + (Double) object); + } + return this; + } + + public BaseMetrics mergeByMax(BaseMetrics metrics) { + if (metrics == null) { + return this; + } + for (Map.Entry entry: metrics.metricsMap.entrySet()) { + mergeByMax(entry.getKey(), entry.getValue()); + } + return this; + } + + public BaseMetrics mergeByMax(String objectKey, Object objectValue) { + if (objectKey == null || objectValue == null) { + return this; + } + if (!this.metricsMap.containsKey(objectKey)) { + this.metricsMap.put(objectKey, objectValue); + return this; + } + + Object object = this.metricsMap.get(objectKey); + if (object instanceof Integer) { + this.metricsMap.put(objectKey, Math.max((Integer) objectValue, (Integer) object)); + } else if (object instanceof Long) { + this.metricsMap.put(objectKey, Math.max((Long) objectValue, (Long) object)); + } else if (object instanceof Float) { + this.metricsMap.put(objectKey, Math.max((Float) objectValue, (Float) object)); + } else { + this.metricsMap.put(objectKey, Math.max((Double) objectValue, (Double) object)); + } + return this; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java new file mode 100644 index 00000000..18153544 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/BrokerMetrics.java @@ -0,0 +1,42 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +/** + * @author zengqiao + * @date 20/6/17 + */ +public class BrokerMetrics extends BaseMetrics { + private Long clusterId; + + private Integer brokerId; + + public BrokerMetrics(Long clusterId, Integer brokerId) { + super(); + this.clusterId = clusterId; + this.brokerId = brokerId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + @Override + public String toString() { + return "BrokerMetrics{" + + "clusterId=" + clusterId + + ", brokerId=" + brokerId + + ", metricsMap=" + metricsMap + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ClusterMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ClusterMetrics.java new file mode 100644 index 00000000..4a977dcd --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ClusterMetrics.java @@ -0,0 +1,29 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +/** + * @author zengqiao + * @date 20/6/18 + */ +public class ClusterMetrics extends BaseMetrics { + private Long clusterId; + + public ClusterMetrics(Long clusterId) { + this.clusterId = clusterId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + @Override + public String toString() { + return "ClusterMetrics{" + + "clusterId=" + clusterId + + ", metricsMap=" + metricsMap + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ConsumerMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ConsumerMetrics.java new file mode 100644 index 00000000..60fcc54f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/ConsumerMetrics.java @@ -0,0 +1,106 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +import java.util.HashMap; +import java.util.Map; + +/** + * Consumer实体类 + * @author tukun + * @date 2015/11/12 + */ +public class ConsumerMetrics { + private Long clusterId; + + private String topicName; + + private String consumerGroup; + + private String location; + + private Map partitionOffsetMap = new HashMap<>(); + + private Map consumeOffsetMap = new HashMap<>(); + + private long timestampUnitMs; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getConsumerGroup() { + return consumerGroup; + } + + public void setConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public Map getPartitionOffsetMap() { + return partitionOffsetMap; + } + + public void setPartitionOffsetMap(Map partitionOffsetMap) { + this.partitionOffsetMap = partitionOffsetMap; + } + + public Map getConsumeOffsetMap() { + return consumeOffsetMap; + } + + public void setConsumeOffsetMap(Map consumeOffsetMap) { + this.consumeOffsetMap = consumeOffsetMap; + } + + public long getTimestampUnitMs() { + return timestampUnitMs; + } + + public void setTimestampUnitMs(long timestampUnitMs) { + this.timestampUnitMs = timestampUnitMs; + } + + public ConsumerMetrics newConsumerMetrics(String consumerGroup) { + ConsumerMetrics consumerMetrics = new ConsumerMetrics(); + consumerMetrics.setConsumerGroup(consumerGroup); + consumerMetrics.setClusterId(this.getClusterId()); + consumerMetrics.setLocation(this.getLocation()); + consumerMetrics.setTopicName(this.getTopicName()); + consumerMetrics.setConsumeOffsetMap(this.getConsumeOffsetMap()); + consumerMetrics.setPartitionOffsetMap(this.getPartitionOffsetMap()); + consumerMetrics.setTimestampUnitMs(this.getTimestampUnitMs()); + return consumerMetrics; + } + + @Override + public String toString() { + return "ConsumerMetrics{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", consumerGroup='" + consumerGroup + '\'' + + ", location='" + location + '\'' + + ", partitionOffsetMap=" + partitionOffsetMap + + ", consumeOffsetMap=" + consumeOffsetMap + + ", timestampUnitMs=" + timestampUnitMs + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java new file mode 100644 index 00000000..768d7d84 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicMetrics.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +/** + * @author zengqiao + * @date 20/6/17 + */ +public class TopicMetrics extends BaseMetrics { + private String appId; + + private Long clusterId; + + private String topicName; + + public TopicMetrics(Long clusterId, String topicName) { + super(); + this.clusterId = clusterId; + this.topicName = topicName; + } + + public TopicMetrics(String appId, Long clusterId, String topicName) { + super(); + this.appId = appId; + this.clusterId = clusterId; + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public Long getClusterId() { + return clusterId; + } + + public String getTopicName() { + return topicName; + } + + @Override + public String toString() { + return "TopicMetrics{" + + "appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", metricsMap=" + metricsMap + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicThrottledMetrics.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicThrottledMetrics.java new file mode 100644 index 00000000..0b2afa5e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/metrics/TopicThrottledMetrics.java @@ -0,0 +1,72 @@ +package com.xiaojukeji.kafka.manager.common.entity.metrics; + +import com.xiaojukeji.kafka.manager.common.bizenum.KafkaClientEnum; + +import java.util.Set; + +/** + * @author zengqiao + * @date 20/5/13 + */ +public class TopicThrottledMetrics { + private String appId; + + private Long clusterId; + + private String topicName; + + private KafkaClientEnum clientType; + + private Set brokerIdSet; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public KafkaClientEnum getClientType() { + return clientType; + } + + public void setClientType(KafkaClientEnum clientType) { + this.clientType = clientType; + } + + public Set getBrokerIdSet() { + return brokerIdSet; + } + + public void setBrokerIdSet(Set brokerIdSet) { + this.brokerIdSet = brokerIdSet; + } + + @Override + public String toString() { + return "TopicThrottledMetrics{" + + "appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", clientType=" + clientType + + ", brokerIdSet=" + brokerIdSet + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AccountDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/AccountDO.java similarity index 81% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AccountDO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/AccountDO.java index 387687be..13623941 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/AccountDO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/AccountDO.java @@ -1,10 +1,20 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; /** * @author zengqiao * @date 19/5/3 */ -public class AccountDO extends BaseDO { +public class AccountDO { + protected Long id; + + protected Integer status; + + protected Date gmtCreate; + + protected Date gmtModify; + private String username; private String password; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BrokerDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerDO.java similarity index 53% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BrokerDO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerDO.java index 9d2fd1a9..0eb0ff81 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/BrokerDO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerDO.java @@ -1,10 +1,20 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; /** * @author zengqiao * @date 19/4/3 */ -public class BrokerDO extends BaseDO { +public class BrokerDO { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + private Long clusterId; private Integer brokerId; @@ -15,6 +25,40 @@ public class BrokerDO extends BaseDO { private Long timestamp; + private Double maxAvgBytesIn; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + public Long getClusterId() { return clusterId; } @@ -55,18 +99,27 @@ public class BrokerDO extends BaseDO { this.timestamp = timestamp; } + public Double getMaxAvgBytesIn() { + return maxAvgBytesIn; + } + + public void setMaxAvgBytesIn(Double maxAvgBytesIn) { + this.maxAvgBytesIn = maxAvgBytesIn; + } + @Override public String toString() { return "BrokerDO{" + - "clusterId=" + clusterId + + "id=" + id + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", clusterId=" + clusterId + ", brokerId=" + brokerId + ", host='" + host + '\'' + ", port=" + port + ", timestamp=" + timestamp + - ", id=" + id + - ", status=" + status + - ", gmtCreate=" + gmtCreate + - ", gmtModify=" + gmtModify + + ", maxAvgBytesIn=" + maxAvgBytesIn + '}'; } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerMetricsDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerMetricsDO.java new file mode 100644 index 00000000..9ebc4514 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/BrokerMetricsDO.java @@ -0,0 +1,70 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/6/17 + */ +public class BrokerMetricsDO { + private Long id; + + private Long clusterId; + + private Integer brokerId; + + private String metrics; + + private Date gmtCreate; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getMetrics() { + return metrics; + } + + public void setMetrics(String metrics) { + this.metrics = metrics; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "BrokerMetricsDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", brokerId=" + brokerId + + ", metrics='" + metrics + '\'' + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterDO.java similarity index 59% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterDO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterDO.java index 277fd15a..a594af33 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ClusterDO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterDO.java @@ -1,86 +1,38 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; +package com.xiaojukeji.kafka.manager.common.entity.pojo; import java.util.Date; -public class ClusterDO extends BaseDO{ +/** + * @author zengqiao + * @date 20/4/23 + */ +public class ClusterDO implements Comparable { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + private String clusterName; private String zookeeper; private String bootstrapServers; + private Integer mode; + + private String securityProperties; + private String kafkaVersion; - private Integer alarmFlag; - - private String securityProtocol; - - private String saslMechanism; - - private String saslJaasConfig; - - public String getClusterName() { - return clusterName; + public Long getId() { + return id; } - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public String getZookeeper() { - return zookeeper; - } - - public void setZookeeper(String zookeeper) { - this.zookeeper = zookeeper; - } - - public String getBootstrapServers() { - return bootstrapServers; - } - - public void setBootstrapServers(String bootstrapServers) { - this.bootstrapServers = bootstrapServers; - } - - public String getKafkaVersion() { - return kafkaVersion; - } - - public void setKafkaVersion(String kafkaVersion) { - this.kafkaVersion = kafkaVersion; - } - - public Integer getAlarmFlag() { - return alarmFlag; - } - - public void setAlarmFlag(Integer alarmFlag) { - this.alarmFlag = alarmFlag; - } - - public String getSecurityProtocol() { - return securityProtocol; - } - - public void setSecurityProtocol(String securityProtocol) { - this.securityProtocol = securityProtocol; - } - - public String getSaslMechanism() { - return saslMechanism; - } - - public void setSaslMechanism(String saslMechanism) { - this.saslMechanism = saslMechanism; - } - - public String getSaslJaasConfig() { - return saslJaasConfig; - } - - public void setSaslJaasConfig(String saslJaasConfig) { - this.saslJaasConfig = saslJaasConfig; + public void setId(Long id) { + this.id = id; } public Integer getStatus() { @@ -107,21 +59,72 @@ public class ClusterDO extends BaseDO{ this.gmtModify = gmtModify; } + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getZookeeper() { + return zookeeper; + } + + public void setZookeeper(String zookeeper) { + this.zookeeper = zookeeper; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getSecurityProperties() { + return securityProperties; + } + + public void setSecurityProperties(String securityProperties) { + this.securityProperties = securityProperties; + } + + public String getKafkaVersion() { + return kafkaVersion; + } + + public void setKafkaVersion(String kafkaVersion) { + this.kafkaVersion = kafkaVersion; + } + @Override public String toString() { return "ClusterDO{" + - "clusterName='" + clusterName + '\'' + - ", zookeeper='" + zookeeper + '\'' + - ", bootstrapServers='" + bootstrapServers + '\'' + - ", kafkaVersion='" + kafkaVersion + '\'' + - ", alarmFlag=" + alarmFlag + - ", securityProtocol='" + securityProtocol + '\'' + - ", saslMechanism='" + saslMechanism + '\'' + - ", saslJaasConfig='" + saslJaasConfig + '\'' + - ", id=" + id + + "id=" + id + ", status=" + status + ", gmtCreate=" + gmtCreate + ", gmtModify=" + gmtModify + + ", clusterName='" + clusterName + '\'' + + ", zookeeper='" + zookeeper + '\'' + + ", bootstrapServers='" + bootstrapServers + '\'' + + ", mode=" + mode + + ", securityProperties='" + securityProperties + '\'' + + ", kafkaVersion='" + kafkaVersion + '\'' + '}'; } + + @Override + public int compareTo(ClusterDO clusterDO) { + return this.id.compareTo(clusterDO.id); + } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterMetricsDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterMetricsDO.java new file mode 100644 index 00000000..c5c6bcfa --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterMetricsDO.java @@ -0,0 +1,59 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/29 + */ +public class ClusterMetricsDO { + private Long id; + + private Date gmtCreate; + + private Long clusterId; + + private String metrics; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getMetrics() { + return metrics; + } + + public void setMetrics(String metrics) { + this.metrics = metrics; + } + + @Override + public String toString() { + return "ClusterMetricsDO{" + + "id=" + id + + ", gmtCreate=" + gmtCreate + + ", clusterId=" + clusterId + + ", metrics='" + metrics + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDO.java new file mode 100644 index 00000000..5387dd29 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDO.java @@ -0,0 +1,213 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/21 + */ +public class ClusterTaskDO { + private Long id; + + private String uuid; + + private Long clusterId; + + private String taskType; + + private String kafkaPackage; + + private String kafkaPackageMd5; + + private String serverProperties; + + private String serverPropertiesMd5; + + private Long agentTaskId; + + private Long agentRollbackTaskId; + + private String hostList; + + private String pauseHostList; + + private String rollbackHostList; + + private String rollbackPauseHostList; + + private String operator; + + private Integer taskStatus; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTaskType() { + return taskType; + } + + public void setTaskType(String taskType) { + this.taskType = taskType; + } + + public String getKafkaPackage() { + return kafkaPackage; + } + + public void setKafkaPackage(String kafkaPackage) { + this.kafkaPackage = kafkaPackage; + } + + public String getKafkaPackageMd5() { + return kafkaPackageMd5; + } + + public void setKafkaPackageMd5(String kafkaPackageMd5) { + this.kafkaPackageMd5 = kafkaPackageMd5; + } + + public String getServerProperties() { + return serverProperties; + } + + public void setServerProperties(String serverProperties) { + this.serverProperties = serverProperties; + } + + public String getServerPropertiesMd5() { + return serverPropertiesMd5; + } + + public void setServerPropertiesMd5(String serverPropertiesMd5) { + this.serverPropertiesMd5 = serverPropertiesMd5; + } + + public Long getAgentTaskId() { + return agentTaskId; + } + + public void setAgentTaskId(Long agentTaskId) { + this.agentTaskId = agentTaskId; + } + + public Long getAgentRollbackTaskId() { + return agentRollbackTaskId; + } + + public void setAgentRollbackTaskId(Long agentRollbackTaskId) { + this.agentRollbackTaskId = agentRollbackTaskId; + } + + public String getHostList() { + return hostList; + } + + public void setHostList(String hostList) { + this.hostList = hostList; + } + + public String getPauseHostList() { + return pauseHostList; + } + + public void setPauseHostList(String pauseHostList) { + this.pauseHostList = pauseHostList; + } + + public String getRollbackHostList() { + return rollbackHostList; + } + + public void setRollbackHostList(String rollbackHostList) { + this.rollbackHostList = rollbackHostList; + } + + public String getRollbackPauseHostList() { + return rollbackPauseHostList; + } + + public void setRollbackPauseHostList(String rollbackPauseHostList) { + this.rollbackPauseHostList = rollbackPauseHostList; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "ClusterTaskDO{" + + "id=" + id + + ", uuid='" + uuid + '\'' + + ", clusterId=" + clusterId + + ", taskType='" + taskType + '\'' + + ", kafkaPackage='" + kafkaPackage + '\'' + + ", kafkaPackageMd5='" + kafkaPackageMd5 + '\'' + + ", serverProperties='" + serverProperties + '\'' + + ", serverPropertiesMd5='" + serverPropertiesMd5 + '\'' + + ", agentTaskId=" + agentTaskId + + ", agentRollbackTaskId=" + agentRollbackTaskId + + ", hostList='" + hostList + '\'' + + ", pauseHostList='" + pauseHostList + '\'' + + ", rollbackHostList='" + rollbackHostList + '\'' + + ", rollbackPauseHostList='" + rollbackPauseHostList + '\'' + + ", operator='" + operator + '\'' + + ", taskStatus=" + taskStatus + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDetailDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDetailDO.java new file mode 100644 index 00000000..561ba043 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ClusterTaskDetailDO.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/8/28 + */ +public class ClusterTaskDetailDO { + private Long id; + + private Long taskId; + + private String hostname; + + private Integer groupNum; + + private Date execTime; + + private Date rollbackTime; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public Integer getGroupNum() { + return groupNum; + } + + public void setGroupNum(Integer groupNum) { + this.groupNum = groupNum; + } + + public Date getExecTime() { + return execTime; + } + + public void setExecTime(Date execTime) { + this.execTime = execTime; + } + + public Date getRollbackTime() { + return rollbackTime; + } + + public void setRollbackTime(Date rollbackTime) { + this.rollbackTime = rollbackTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "ClusterTaskDetailDO{" + + "id=" + id + + ", taskId=" + taskId + + ", hostname='" + hostname + '\'' + + ", groupNum=" + groupNum + + ", execTime=" + execTime + + ", rollbackTime=" + rollbackTime + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ConfigDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ConfigDO.java new file mode 100644 index 00000000..85da93da --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ConfigDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/3/19 + */ +public class ConfigDO { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + + private String configKey; + + private String configValue; + + private String configDescription; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } + + public String getConfigDescription() { + return configDescription; + } + + public void setConfigDescription(String configDescription) { + this.configDescription = configDescription; + } + + @Override + public String toString() { + return "ConfigDO{" + + "id=" + id + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", configKey='" + configKey + '\'' + + ", configValue='" + configValue + '\'' + + ", configDescription='" + configDescription + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ControllerDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ControllerDO.java similarity index 81% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ControllerDO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ControllerDO.java index 824e7a85..3b42d4f0 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/ControllerDO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ControllerDO.java @@ -1,10 +1,16 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; /** * @author zengqiao * @date 20/2/28 */ -public class ControllerDO extends BaseEntryDO { +public class ControllerDO { + private Long id; + + private Date gmtCreate; + private Long clusterId; private Integer brokerId; @@ -15,6 +21,22 @@ public class ControllerDO extends BaseEntryDO { private Integer version; + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + public Long getClusterId() { return clusterId; } @@ -59,12 +81,12 @@ public class ControllerDO extends BaseEntryDO { public String toString() { return "ControllerDO{" + "id=" + id + + ", gmtCreate=" + gmtCreate + ", clusterId=" + clusterId + ", brokerId=" + brokerId + ", host='" + host + '\'' + ", timestamp=" + timestamp + ", version=" + version + - ", gmtCreate=" + gmtCreate + '}'; } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/HeartbeatDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/HeartbeatDO.java new file mode 100644 index 00000000..f7968f73 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/HeartbeatDO.java @@ -0,0 +1,76 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * 心跳 + * @author zengqiao + * @date 20/8/10 + */ +public class HeartbeatDO implements Comparable { + private Long id; + + private String ip; + + private String hostname; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "HeartbeatDO{" + + "id=" + id + + ", ip='" + ip + '\'' + + ", hostname='" + hostname + '\'' + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } + + @Override + public int compareTo(HeartbeatDO heartbeatDO) { + return this.id.compareTo(heartbeatDO.id); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaBillDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaBillDO.java new file mode 100644 index 00000000..109ecfee --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaBillDO.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class KafkaBillDO { + private Long id; + + private Long clusterId; + + private String topicName; + + private String principal; + + private Double quota; + + private Double cost; + + private String gmtDay; + + private Date gmtCreate; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public Double getQuota() { + return quota; + } + + public void setQuota(Double quota) { + this.quota = quota; + } + + public Double getCost() { + return cost; + } + + public void setCost(Double cost) { + this.cost = cost; + } + + public String getGmtDay() { + return gmtDay; + } + + public void setGmtDay(String gmtDay) { + this.gmtDay = gmtDay; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "KafkaBillDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", principal='" + principal + '\'' + + ", quota=" + quota + + ", cost=" + cost + + ", gmtDay='" + gmtDay + '\'' + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaFileDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaFileDO.java new file mode 100644 index 00000000..3a99da65 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/KafkaFileDO.java @@ -0,0 +1,114 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zhongyuankai + * @date 2020/5/7 + */ +public class KafkaFileDO { + private Long id; + + private Date gmtCreate; + + private Date gmtModify; + + private Long clusterId; + + private String fileName; + + private String fileMd5; + + private Integer fileType; + + private String description; + + private String operator; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFileMd5() { + return fileMd5; + } + + public void setFileMd5(String fileMd5) { + this.fileMd5 = fileMd5; + } + + public Integer getFileType() { + return fileType; + } + + public void setFileType(Integer fileType) { + this.fileType = fileType; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + @Override + public String toString() { + return "KafkaFileDO{" + + "id=" + id + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", clusterId=" + clusterId + + ", fileName='" + fileName + '\'' + + ", fileMd5='" + fileMd5 + '\'' + + ", fileType=" + fileType + + ", description='" + description + '\'' + + ", operator='" + operator + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/LogicalClusterDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/LogicalClusterDO.java new file mode 100644 index 00000000..d5cb3497 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/LogicalClusterDO.java @@ -0,0 +1,114 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/6/29 + */ +public class LogicalClusterDO { + private Long id; + + private String name; + + private Integer mode; + + private String appId; + + private Long clusterId; + + private String regionList; + + private String description; + + private Date gmtCreate; + + private Date gmtModify; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getRegionList() { + return regionList; + } + + public void setRegionList(String regionList) { + this.regionList = regionList; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "LogicalClusterDO{" + + "id=" + id + + ", name='" + name + '\'' + + ", mode=" + mode + + ", appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", regionList='" + regionList + '\'' + + ", description='" + description + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/MonitorRuleDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/MonitorRuleDO.java new file mode 100644 index 00000000..4650dbd7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/MonitorRuleDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/5/21 + */ +public class MonitorRuleDO { + private Long id; + + private String name; + + private Long strategyId; + + private String appId; + + private String operator; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getStrategyId() { + return strategyId; + } + + public void setStrategyId(Long strategyId) { + this.strategyId = strategyId; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "MonitorRuleDO{" + + "id=" + id + + ", name='" + name + '\'' + + ", strategyId=" + strategyId + + ", appId='" + appId + '\'' + + ", operator='" + operator + '\'' + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperateRecordDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperateRecordDO.java new file mode 100644 index 00000000..50b412b8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperateRecordDO.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zhongyuankai + * @date 20/09/03 + */ +public class OperateRecordDO { + private Long id; + + private Integer moduleId; + + private Integer operateId; + + private String resource; + + private String content; + + private String operator; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getModuleId() { + return moduleId; + } + + public void setModuleId(Integer moduleId) { + this.moduleId = moduleId; + } + + public Integer getOperateId() { + return operateId; + } + + public void setOperateId(Integer operateId) { + this.operateId = operateId; + } + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "OperateRecordDO{" + + "id=" + id + + ", moduleId=" + moduleId + + ", operateId=" + operateId + + ", resource='" + resource + '\'' + + ", content='" + content + '\'' + + ", operator='" + operator + '\'' + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OperationHistoryDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperationHistoryDO.java similarity index 73% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OperationHistoryDO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperationHistoryDO.java index 35edffb8..e513b371 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/po/OperationHistoryDO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OperationHistoryDO.java @@ -1,6 +1,16 @@ -package com.xiaojukeji.kafka.manager.common.entity.po; +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/29 + */ +public class OperationHistoryDO { + private Long id; + + private Date gmtCreate; -public class OperationHistoryDO extends BaseEntryDO { private Long clusterId; private String topicName; @@ -9,6 +19,22 @@ public class OperationHistoryDO extends BaseEntryDO { private String operation; + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + public Long getClusterId() { return clusterId; } @@ -44,12 +70,12 @@ public class OperationHistoryDO extends BaseEntryDO { @Override public String toString() { return "OperationHistoryDO{" + - "clusterId=" + clusterId + + "id=" + id + + ", gmtCreate=" + gmtCreate + + ", clusterId=" + clusterId + ", topicName='" + topicName + '\'' + ", operator='" + operator + '\'' + ", operation='" + operation + '\'' + - ", id=" + id + - ", gmtCreate=" + gmtCreate + '}'; } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OrderDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OrderDO.java new file mode 100644 index 00000000..1fa820fc --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/OrderDO.java @@ -0,0 +1,147 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zhongyuankai + * @date 20/4/23 + */ +public class OrderDO { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + + private Integer type; + + private String title; + + private String applicant; + + private String description; + + private String approver; + + private Date gmtHandle; + + private String opinion; + + private String extensions; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getApplicant() { + return applicant; + } + + public void setApplicant(String applicant) { + this.applicant = applicant; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getApprover() { + return approver; + } + + public void setApprover(String approver) { + this.approver = approver; + } + + public Date getGmtHandle() { + return gmtHandle; + } + + public void setGmtHandle(Date gmtHandle) { + this.gmtHandle = gmtHandle; + } + + public String getOpinion() { + return opinion; + } + + public void setOpinion(String opinion) { + this.opinion = opinion; + } + + public String getExtensions() { + return extensions; + } + + public void setExtensions(String extensions) { + this.extensions = extensions; + } + + @Override + public String toString() { + return "OrderDO{" + + "id=" + id + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", type=" + type + + ", title='" + title + '\'' + + ", applicant='" + applicant + '\'' + + ", description='" + description + '\'' + + ", approver='" + approver + '\'' + + ", gmtHandle=" + gmtHandle + + ", opinion='" + opinion + '\'' + + ", extensions='" + extensions + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ReassignTaskDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ReassignTaskDO.java new file mode 100644 index 00000000..0eb311a5 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/ReassignTaskDO.java @@ -0,0 +1,225 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * migrate topic task do + * @author zengqiao + * @date 19/4/16 + */ +public class ReassignTaskDO { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + + private Long taskId; + + private Long clusterId; + + private String topicName; + + private String partitions; + + private String reassignmentJson; + + private Long realThrottle; + + private Long maxThrottle; + + private Long minThrottle; + + private Date beginTime; + + private Long originalRetentionTime; + + private Long reassignRetentionTime; + + private String srcBrokers; + + private String destBrokers; + + private String description; + + private String operator; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getPartitions() { + return partitions; + } + + public void setPartitions(String partitions) { + this.partitions = partitions; + } + + public String getReassignmentJson() { + return reassignmentJson; + } + + public void setReassignmentJson(String reassignmentJson) { + this.reassignmentJson = reassignmentJson; + } + + public Long getRealThrottle() { + return realThrottle; + } + + public void setRealThrottle(Long realThrottle) { + this.realThrottle = realThrottle; + } + + public Long getMaxThrottle() { + return maxThrottle; + } + + public void setMaxThrottle(Long maxThrottle) { + this.maxThrottle = maxThrottle; + } + + public Long getMinThrottle() { + return minThrottle; + } + + public void setMinThrottle(Long minThrottle) { + this.minThrottle = minThrottle; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Long getOriginalRetentionTime() { + return originalRetentionTime; + } + + public void setOriginalRetentionTime(Long originalRetentionTime) { + this.originalRetentionTime = originalRetentionTime; + } + + public Long getReassignRetentionTime() { + return reassignRetentionTime; + } + + public void setReassignRetentionTime(Long reassignRetentionTime) { + this.reassignRetentionTime = reassignRetentionTime; + } + + public String getSrcBrokers() { + return srcBrokers; + } + + public void setSrcBrokers(String srcBrokers) { + this.srcBrokers = srcBrokers; + } + + public String getDestBrokers() { + return destBrokers; + } + + public void setDestBrokers(String destBrokers) { + this.destBrokers = destBrokers; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + @Override + public String toString() { + return "ReassignTaskDO{" + + "id=" + id + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", taskId=" + taskId + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", partitions='" + partitions + '\'' + + ", reassignmentJson='" + reassignmentJson + '\'' + + ", realThrottle=" + realThrottle + + ", maxThrottle=" + maxThrottle + + ", minThrottle=" + minThrottle + + ", beginTime=" + beginTime + + ", originalRetentionTime=" + originalRetentionTime + + ", reassignRetentionTime=" + reassignRetentionTime + + ", srcBrokers='" + srcBrokers + '\'' + + ", destBrokers='" + destBrokers + '\'' + + ", description='" + description + '\'' + + ", operator='" + operator + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/RegionDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/RegionDO.java new file mode 100644 index 00000000..1f948510 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/RegionDO.java @@ -0,0 +1,137 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +public class RegionDO implements Comparable { + private Long id; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + + private String name; + + private Long clusterId; + + private String brokerList; + + private Long capacity; + + private Long realUsed; + + private Long estimateUsed; + + private String description; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getBrokerList() { + return brokerList; + } + + public void setBrokerList(String brokerList) { + this.brokerList = brokerList; + } + + public Long getCapacity() { + return capacity; + } + + public void setCapacity(Long capacity) { + this.capacity = capacity; + } + + public Long getRealUsed() { + return realUsed; + } + + public void setRealUsed(Long realUsed) { + this.realUsed = realUsed; + } + + public Long getEstimateUsed() { + return estimateUsed; + } + + public void setEstimateUsed(Long estimateUsed) { + this.estimateUsed = estimateUsed; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "RegionDO{" + + "id=" + id + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", name='" + name + '\'' + + ", clusterId=" + clusterId + + ", brokerList='" + brokerList + '\'' + + ", capacity=" + capacity + + ", realUsed=" + realUsed + + ", estimateUsed=" + estimateUsed + + ", description='" + description + '\'' + + '}'; + } + + @Override + public int compareTo(RegionDO regionDO) { + return this.id.compareTo(regionDO.id); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicDO.java new file mode 100644 index 00000000..b4b56712 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicDO.java @@ -0,0 +1,100 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import com.xiaojukeji.kafka.manager.common.entity.dto.op.topic.TopicCreationDTO; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/24 + */ +public class TopicDO { + private Long id; + + private Date gmtCreate; + + private Date gmtModify; + + private String appId; + + private Long clusterId; + + private String topicName; + + private String description; + + private Long peakBytesIn; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Long getPeakBytesIn() { + return peakBytesIn; + } + + public void setPeakBytesIn(Long peakBytesIn) { + this.peakBytesIn = peakBytesIn; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public static TopicDO buildFrom(TopicCreationDTO dto) { + TopicDO topicDO = new TopicDO(); + topicDO.setAppId(dto.getAppId()); + topicDO.setClusterId(dto.getClusterId()); + topicDO.setTopicName(dto.getTopicName()); + topicDO.setDescription(dto.getDescription()); + return topicDO; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicExpiredDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicExpiredDO.java new file mode 100644 index 00000000..f90cadd0 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicExpiredDO.java @@ -0,0 +1,103 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/3/30 + */ +public class TopicExpiredDO { + private Long id; + + private Long clusterId; + + private String topicName; + + private Integer expiredDay; + + private Date gmtRetain; + + private Integer status; + + private Date gmtCreate; + + private Date gmtModify; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getExpiredDay() { + return expiredDay; + } + + public void setExpiredDay(Integer expiredDay) { + this.expiredDay = expiredDay; + } + + public Date getGmtRetain() { + return gmtRetain; + } + + public void setGmtRetain(Date gmtRetain) { + this.gmtRetain = gmtRetain; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "TopicExpiredDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", expiredDay=" + expiredDay + + ", gmtRetain=" + gmtRetain + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicMetricsDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicMetricsDO.java new file mode 100644 index 00000000..2bc2a25b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicMetricsDO.java @@ -0,0 +1,81 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/6/17 + */ +public class TopicMetricsDO { + private Long id; + + private String appId; + + private Long clusterId; + + private String topicName; + + private String metrics; + + private Date gmtCreate; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getMetrics() { + return metrics; + } + + public void setMetrics(String metrics) { + this.metrics = metrics; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "TopicMetricsDO{" + + "id=" + id + + ", appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", metrics='" + metrics + '\'' + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicStatisticsDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicStatisticsDO.java new file mode 100644 index 00000000..b52c84f9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicStatisticsDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/3/29 + */ +public class TopicStatisticsDO { + private Long id; + + private Date gmtCreate; + + private Long clusterId; + + private String topicName; + + private Long offsetSum; + + private Double maxAvgBytesIn; + + private String gmtDay; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getOffsetSum() { + return offsetSum; + } + + public void setOffsetSum(Long offsetSum) { + this.offsetSum = offsetSum; + } + + public Double getMaxAvgBytesIn() { + return maxAvgBytesIn; + } + + public void setMaxAvgBytesIn(Double maxAvgBytesIn) { + this.maxAvgBytesIn = maxAvgBytesIn; + } + + public String getGmtDay() { + return gmtDay; + } + + public void setGmtDay(String gmtDay) { + this.gmtDay = gmtDay; + } + + @Override + public String toString() { + return "TopicStatisticsDO{" + + "id=" + id + + ", gmtCreate=" + gmtCreate + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", offsetSum=" + offsetSum + + ", maxAvgBytesIn=" + maxAvgBytesIn + + ", gmtDay='" + gmtDay + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicThrottledMetricsDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicThrottledMetricsDO.java new file mode 100644 index 00000000..481ae9f8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/TopicThrottledMetricsDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo; + +import java.util.Date; + +/** + * @author zhongyuankai + * @date 20/4/3 + */ +public class TopicThrottledMetricsDO { + private Long id; + + private Long clusterId; + + private String topicName; + + private String appId; + + private Integer produceThrottled; + + private Integer fetchThrottled; + + private Date gmtCreate; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Integer getProduceThrottled() { + return produceThrottled; + } + + public void setProduceThrottled(Integer produceThrottled) { + this.produceThrottled = produceThrottled; + } + + public Integer getFetchThrottled() { + return fetchThrottled; + } + + public void setFetchThrottled(Integer fetchThrottled) { + this.fetchThrottled = fetchThrottled; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "TopicThrottleDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", produceThrottled=" + produceThrottled + + ", fetchThrottled=" + fetchThrottled + + ", gmtCreate=" + gmtCreate + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AppDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AppDO.java new file mode 100644 index 00000000..600c0ac4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AppDO.java @@ -0,0 +1,148 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; +import java.util.Random; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class AppDO { + private static final String ALPHA_NUM = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"; + + private Long id; + + private String appId; + + private String name; + + private String password; + + private Integer type; + + private String applicant; + + private String principals; + + private String description; + + private Date createTime; + + private Date modifyTime; + + public static String getAlphaNum() { + return ALPHA_NUM; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getApplicant() { + return applicant; + } + + public void setApplicant(String applicant) { + this.applicant = applicant; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "AppDO{" + + "id=" + id + + ", appId='" + appId + '\'' + + ", name='" + name + '\'' + + ", password='" + password + '\'' + + ", type=" + type + + ", applicant='" + applicant + '\'' + + ", principals='" + principals + '\'' + + ", description='" + description + '\'' + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } + + public void generateAppIdAndPassword(Long orderId, String idc) { + this.appId = AppDO.generateAppId(orderId, idc); + + StringBuffer stringBuffer = new StringBuffer(15); + Random random = new Random(); + for(int i = 0; i < 12; i++) { + int index = random.nextInt(ALPHA_NUM.length()); + stringBuffer.append(ALPHA_NUM.charAt(index)); + } + this.password = stringBuffer.toString(); + } + + public static String generateAppId(Long orderId, String idc) { + return String.format("appId_%06d_%s", orderId, idc); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AuthorityDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AuthorityDO.java new file mode 100644 index 00000000..cd999509 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/AuthorityDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/21 + */ +public class AuthorityDO { + private Long id; + + private String appId; + + private Long clusterId; + + private String topicName; + + private Integer access; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "AuthorityDO{" + + "id=" + id + + ", appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", access=" + access + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/GatewayConfigDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/GatewayConfigDO.java new file mode 100644 index 00000000..c0e96000 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/GatewayConfigDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public class GatewayConfigDO { + private Long id; + + private String type; + + private String name; + + private String value; + + private Long version; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "GatewayConfigDO{" + + "id=" + id + + ", type='" + type + '\'' + + ", name='" + name + '\'' + + ", value='" + value + '\'' + + ", version=" + version + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaAclDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaAclDO.java new file mode 100644 index 00000000..79ca398e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaAclDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/21 + */ +public class KafkaAclDO { + private Long id; + + private String appId; + + private Long clusterId; + + private String topicName; + + private Integer access; + + private Integer operation; + + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + public Integer getOperation() { + return operation; + } + + public void setOperation(Integer operation) { + this.operation = operation; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + return "KafkaAclDO{" + + "id=" + id + + ", appId='" + appId + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", access=" + access + + ", operation=" + operation + + ", createTime=" + createTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaUserDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaUserDO.java new file mode 100644 index 00000000..e858e142 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/KafkaUserDO.java @@ -0,0 +1,81 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/21 + */ +public class KafkaUserDO { + private Long id; + + private String appId; + + private String password; + + private Integer userType; + + private Integer operation; + + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getUserType() { + return userType; + } + + public void setUserType(Integer userType) { + this.userType = userType; + } + + public Integer getOperation() { + return operation; + } + + public void setOperation(Integer operation) { + this.operation = operation; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + return "KafkaUserDO{" + + "id=" + id + + ", appId='" + appId + '\'' + + ", password='" + password + '\'' + + ", userType=" + userType + + ", operation=" + operation + + ", createTime=" + createTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicConnectionDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicConnectionDO.java new file mode 100644 index 00000000..4707d271 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicConnectionDO.java @@ -0,0 +1,108 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * Topic连接信息 + * @author zengqiao + * @date 20/7/6 + */ +public class TopicConnectionDO { + private Long id; + + private String appId; + + private Long clusterId; + + private String topicName; + + private String type; + + private String ip; + + private String clientVersion; + + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getClientVersion() { + return clientVersion; + } + + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + return "TopicConnectionDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", type='" + type + '\'' + + ", appId='" + appId + '\'' + + ", ip='" + ip + '\'' + + ", clientVersion='" + clientVersion + '\'' + + ", createTime=" + createTime + + '}'; + } + + public String uniqueKey() { + return appId + clusterId + topicName + type + ip; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicReportDO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicReportDO.java new file mode 100644 index 00000000..e495cdc6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/pojo/gateway/TopicReportDO.java @@ -0,0 +1,92 @@ +package com.xiaojukeji.kafka.manager.common.entity.pojo.gateway; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/7/29 + */ +public class TopicReportDO { + private Long id; + + private Long clusterId; + + private String topicName; + + private Date startTime; + + private Date endTime; + + private Date createTime; + + private Date modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "TopicReportDO{" + + "id=" + id + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountRoleVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountRoleVO.java new file mode 100644 index 00000000..aca8087a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountRoleVO.java @@ -0,0 +1,46 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.common; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/8/26 + */ +@ApiModel(description = "账号角色信息") +public class AccountRoleVO { + @ApiModelProperty(value = "账号") + private String username; + + @ApiModelProperty(value = "角色, 0:Normal, 1:RD, 2:OP") + private Integer role; + + public AccountRoleVO(String username, Integer role) { + this.username = username; + this.role = role; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public Integer getRole() { + return role; + } + + public void setRole(Integer role) { + this.role = role; + } + + @Override + public String toString() { + return "AccountRoleVO{" + + "username='" + username + '\'' + + ", role=" + role + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountSummaryVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountSummaryVO.java new file mode 100644 index 00000000..08ad1817 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountSummaryVO.java @@ -0,0 +1,53 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.common; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/8/26 + */ +@ApiModel(description = "账号概要信息") +public class AccountSummaryVO { + @ApiModelProperty(value = "账号") + private String username; + + @ApiModelProperty(value = "中文名") + private String chineseName; + + @ApiModelProperty(value = "部门") + private String department; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getChineseName() { + return chineseName; + } + + public void setChineseName(String chineseName) { + this.chineseName = chineseName; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + @Override + public String toString() { + return "AccountSummaryVO{" + + "username='" + username + '\'' + + ", chineseName='" + chineseName + '\'' + + ", department='" + department + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountVO.java new file mode 100644 index 00000000..33a2eba8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/AccountVO.java @@ -0,0 +1,65 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.common; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/21 + */ +@ApiModel(description = "账号信息") +public class AccountVO { + @ApiModelProperty(value = "账号") + private String username; + + @ApiModelProperty(value = "中文名") + private String chineseName; + + @ApiModelProperty(value = "部门") + private String department; + + @ApiModelProperty(value = "角色, 0:Normal, 1:RD, 2:OP") + private Integer role; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getChineseName() { + return chineseName; + } + + public void setChineseName(String chineseName) { + this.chineseName = chineseName; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public Integer getRole() { + return role; + } + + public void setRole(Integer role) { + this.role = role; + } + + @Override + public String toString() { + return "AccountVO{" + + "username='" + username + '\'' + + ", chineseName='" + chineseName + '\'' + + ", department='" + department + '\'' + + ", role=" + role + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/BrokerOverviewVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/BrokerOverviewVO.java new file mode 100644 index 00000000..bf853853 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/BrokerOverviewVO.java @@ -0,0 +1,197 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.common; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 19/4/3 + */ +@ApiModel(description = "Broker信息概览") +public class BrokerOverviewVO { + @ApiModelProperty(value = "brokerId") + private Integer brokerId; + + @ApiModelProperty(value = "主机名") + private String host; + + @ApiModelProperty(value = "端口") + private Integer port; + + @ApiModelProperty(value = "jmx端口") + private Integer jmxPort; + + @ApiModelProperty(value = "启动时间") + private Long startTime; + + @ApiModelProperty(value = "流入流量") + private Object byteIn; + + @ApiModelProperty(value = "流出流量") + private Object byteOut; + + @ApiModelProperty(value = "分区数") + private Integer partitionCount; + + @ApiModelProperty(value = "已同步副本数") + private Integer underReplicatedPartitions; + + @ApiModelProperty(value = "未同步") + private Boolean underReplicated; + + @ApiModelProperty(value = "broker状态[0:在线, -1:不在线]") + private Integer status; + + @ApiModelProperty(value = "Region名称") + private String regionName; + + @ApiModelProperty(value = "峰值状态") + private Integer peakFlowStatus; + + @ApiModelProperty(value = "Kafka版本") + private String kafkaVersion; + + @ApiModelProperty(value = "Leader数") + private Integer leaderCount; + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public Integer getJmxPort() { + return jmxPort; + } + + public void setJmxPort(Integer jmxPort) { + this.jmxPort = jmxPort; + } + + public Long getStartTime() { + return startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Object getByteIn() { + return byteIn; + } + + public void setByteIn(Object byteIn) { + this.byteIn = byteIn; + } + + public Object getByteOut() { + return byteOut; + } + + public void setByteOut(Object byteOut) { + this.byteOut = byteOut; + } + + public Integer getPartitionCount() { + return partitionCount; + } + + public void setPartitionCount(Integer partitionCount) { + this.partitionCount = partitionCount; + } + + public Integer getUnderReplicatedPartitions() { + return underReplicatedPartitions; + } + + public void setUnderReplicatedPartitions(Integer underReplicatedPartitions) { + this.underReplicatedPartitions = underReplicatedPartitions; + } + + public Boolean getUnderReplicated() { + return underReplicated; + } + + public void setUnderReplicated(Boolean underReplicated) { + this.underReplicated = underReplicated; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getRegionName() { + return regionName; + } + + public void setRegionName(String regionName) { + this.regionName = regionName; + } + + public Integer getPeakFlowStatus() { + return peakFlowStatus; + } + + public void setPeakFlowStatus(Integer peakFlowStatus) { + this.peakFlowStatus = peakFlowStatus; + } + + public String getKafkaVersion() { + return kafkaVersion; + } + + public void setKafkaVersion(String kafkaVersion) { + this.kafkaVersion = kafkaVersion; + } + + public Integer getLeaderCount() { + return leaderCount; + } + + public void setLeaderCount(Integer leaderCount) { + this.leaderCount = leaderCount; + } + + @Override + public String toString() { + return "BrokerOverviewVO{" + + "brokerId=" + brokerId + + ", host='" + host + '\'' + + ", port=" + port + + ", jmxPort=" + jmxPort + + ", startTime=" + startTime + + ", byteIn=" + byteIn + + ", byteOut=" + byteOut + + ", partitionCount=" + partitionCount + + ", underReplicatedPartitions=" + underReplicatedPartitions + + ", underReplicated=" + underReplicated + + ", status=" + status + + ", regionName='" + regionName + '\'' + + ", peakFlowStatus=" + peakFlowStatus + + ", kafkaVersion='" + kafkaVersion + '\'' + + ", leaderCount=" + leaderCount + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderPartitionVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderPartitionVO.java similarity index 98% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderPartitionVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderPartitionVO.java index d39ca1e5..2e03f9a5 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderPartitionVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderPartitionVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.order; +package com.xiaojukeji.kafka.manager.common.entity.vo.common; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderTopicVO.java similarity index 98% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderTopicVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderTopicVO.java index 76817a9f..b5f95492 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/order/OrderTopicVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/OrderTopicVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.order; +package com.xiaojukeji.kafka.manager.common.entity.vo.common; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicRealTimeMetricsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/RealTimeMetricsVO.java similarity index 78% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicRealTimeMetricsVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/RealTimeMetricsVO.java index 1843fbe3..3dbd8272 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicRealTimeMetricsVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/RealTimeMetricsVO.java @@ -1,30 +1,39 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.common; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.List; /** - * Topic实时流量信息 + * 实时流量信息 * @author zengqiao * @date 19/4/1 */ -@ApiModel(value = "Topic实时流量信息") -public class TopicRealTimeMetricsVO { +@ApiModel(value = "实时流量信息(Cluster/broker/Topic)") +public class RealTimeMetricsVO { + @ApiModelProperty(value = "每秒进入消息条") private List messageIn; + @ApiModelProperty(value = "每秒字节流入") private List byteIn; + @ApiModelProperty(value = "每秒字节流出") private List byteOut; + @ApiModelProperty(value = "每秒拒绝字节") private List byteRejected; + @ApiModelProperty(value = "失败fetch的请求") private List failedFetchRequest; + @ApiModelProperty(value = "失败produce的请求") private List failedProduceRequest; + @ApiModelProperty(value = "总的produce请求") private List totalProduceRequest; + @ApiModelProperty(value = "总的fetch请求") private List totalFetchRequest; public List getMessageIn() { @@ -93,7 +102,7 @@ public class TopicRealTimeMetricsVO { @Override public String toString() { - return "TopicRealTimeMetricsVO{" + + return "RealTimeMetricsVO{" + "messageIn=" + messageIn + ", byteIn=" + byteIn + ", byteOut=" + byteOut + diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOverviewVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicOverviewVO.java similarity index 54% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOverviewVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicOverviewVO.java index 1a5d6449..bf462ffc 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOverviewVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicOverviewVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.common; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,14 +8,11 @@ import io.swagger.annotations.ApiModelProperty; * @author zengqiao * @date 19/4/1 */ -@ApiModel(value = "TopicOverviewVO", description = "Topic信息") +@ApiModel(description = "Topic信息概览") public class TopicOverviewVO { @ApiModelProperty(value = "集群ID") private Long clusterId; - @ApiModelProperty(value = "集群名称") - private String clusterName; - @ApiModelProperty(value = "Topic名称") private String topicName; @@ -25,20 +22,29 @@ public class TopicOverviewVO { @ApiModelProperty(value = "分区数") private Integer partitionNum; + @ApiModelProperty(value = "保存时间(ms)") + private Long retentionTime; + @ApiModelProperty(value = "每秒流入流量(B)") - private Double byteIn; + private Object byteIn; @ApiModelProperty(value = "发送请求数(个/秒)") - private Double produceRequest; + private Object produceRequest; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "应用ID") + private String appId; + + @ApiModelProperty(value = "说明") + private String description; @ApiModelProperty(value = "Topic更新时间") private Long updateTime; - @ApiModelProperty(value = "负责人") - private String principals; - - @ApiModelProperty(value = "TRUE:已收藏的, FALSE:未收藏") - private Boolean favorite; + @ApiModelProperty(value = "逻辑集群id") + private Long logicalClusterId; public Long getClusterId() { return clusterId; @@ -48,14 +54,6 @@ public class TopicOverviewVO { this.clusterId = clusterId; } - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - public String getTopicName() { return topicName; } @@ -80,22 +78,54 @@ public class TopicOverviewVO { this.partitionNum = partitionNum; } - public Double getByteIn() { + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public Object getByteIn() { return byteIn; } - public void setByteIn(Double byteIn) { + public void setByteIn(Object byteIn) { this.byteIn = byteIn; } - public Double getProduceRequest() { + public Object getProduceRequest() { return produceRequest; } - public void setProduceRequest(Double produceRequest) { + public void setProduceRequest(Object produceRequest) { this.produceRequest = produceRequest; } + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + public Long getUpdateTime() { return updateTime; } @@ -104,35 +134,29 @@ public class TopicOverviewVO { this.updateTime = updateTime; } - public String getPrincipals() { - return principals; + public Long getLogicalClusterId() { + return logicalClusterId; } - public void setPrincipals(String principals) { - this.principals = principals; - } - - public Boolean getFavorite() { - return favorite; - } - - public void setFavorite(Boolean favorite) { - this.favorite = favorite; + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; } @Override public String toString() { return "TopicOverviewVO{" + "clusterId=" + clusterId + - ", clusterName='" + clusterName + '\'' + ", topicName='" + topicName + '\'' + ", replicaNum=" + replicaNum + ", partitionNum=" + partitionNum + + ", retentionTime=" + retentionTime + ", byteIn=" + byteIn + ", produceRequest=" + produceRequest + + ", appName='" + appName + '\'' + + ", appId='" + appId + '\'' + + ", description='" + description + '\'' + ", updateTime=" + updateTime + - ", principals='" + principals + '\'' + - ", favorite=" + favorite + + ", logicalClusterId=" + logicalClusterId + '}'; } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicThrottleVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicThrottleVO.java new file mode 100644 index 00000000..ca1c2d7a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/common/TopicThrottleVO.java @@ -0,0 +1,67 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.common; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/28 + */ +@ApiModel(description="集群限流信息") +public class TopicThrottleVO { + @ApiModelProperty(value="Topic名称") + private String topicName; + + @ApiModelProperty(value="AppId") + private String appId; + + @ApiModelProperty(value="BrokerId列表") + private List brokerIdList; + + @ApiModelProperty(value = "客户端类型[Produce|Fetch]") + private String throttleClientType; + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + public String getThrottleClientType() { + return throttleClientType; + } + + public void setThrottleClientType(String throttleClientType) { + this.throttleClientType = throttleClientType; + } + + @Override + public String toString() { + return "TopicThrottleVO{" + + "topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", brokerIdList=" + brokerIdList + + ", throttleClientType='" + throttleClientType + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/GatewayConfigVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/GatewayConfigVO.java new file mode 100644 index 00000000..95707080 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/GatewayConfigVO.java @@ -0,0 +1,40 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.gateway; + +/** + * @author zengqiao + * @date 20/7/28 + */ +public class GatewayConfigVO { + private String version; + + private String data; + + public GatewayConfigVO(String version, String data) { + this.version = version; + this.data = data; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + @Override + public String toString() { + return "GatewayConfigVO{" + + "version='" + version + '\'' + + ", data='" + data + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaAclVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaAclVO.java new file mode 100644 index 00000000..5f0ac42c --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaAclVO.java @@ -0,0 +1,68 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.gateway; + +/** + * @author zengqiao + * @date 20/7/27 + */ +public class KafkaAclVO { + private String topicName; + + private Long timestamp; + + private Integer access; + + private Integer operation; + + private String username; + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + public Integer getOperation() { + return operation; + } + + public void setOperation(Integer operation) { + this.operation = operation; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + @Override + public String toString() { + return "KafkaAclVO{" + + "topicName='" + topicName + '\'' + + ", timestamp=" + timestamp + + ", access=" + access + + ", operation=" + operation + + ", username='" + username + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaSecurityVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaSecurityVO.java new file mode 100644 index 00000000..14192f35 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaSecurityVO.java @@ -0,0 +1,26 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.gateway; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/8/3 + */ +public class KafkaSecurityVO { + List rows; + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + @Override + public String toString() { + return "KafkaSecurityVO{" + + "rows=" + rows + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaUserVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaUserVO.java new file mode 100644 index 00000000..bae66f85 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/gateway/KafkaUserVO.java @@ -0,0 +1,68 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.gateway; + +/** + * @author zengqiao + * @date 20/7/27 + */ +public class KafkaUserVO { + private String username; + + private String password; + + private Integer operation; + + private Long timestamp; + + private Integer userType; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getOperation() { + return operation; + } + + public void setOperation(Integer operation) { + this.operation = operation; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + public Integer getUserType() { + return userType; + } + + public void setUserType(Integer userType) { + this.userType = userType; + } + + @Override + public String toString() { + return "KafkaUserVO{" + + "username='" + username + '\'' + + ", password='" + password + '\'' + + ", operation=" + operation + + ", timestamp=" + timestamp + + ", userType=" + userType + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffDetailVO.java new file mode 100644 index 00000000..9746aa3a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffDetailVO.java @@ -0,0 +1,55 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/26 + */ +@ApiModel(value = "用户月度账单详情") +public class BillStaffDetailVO { + @ApiModelProperty(value = "用户名") + private String username; + + @ApiModelProperty(value = "总金额") + private Double costSum; + + @ApiModelProperty(value = "账单详情") + private List billList; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public Double getCostSum() { + return costSum; + } + + public void setCostSum(Double costSum) { + this.costSum = costSum; + } + + public List getBillList() { + return billList; + } + + public void setBillList(List billList) { + this.billList = billList; + } + + @Override + public String toString() { + return "BillStaffDetailVO{" + + "username='" + username + '\'' + + ", costSum=" + costSum + + ", billList=" + billList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffSummaryVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffSummaryVO.java new file mode 100644 index 00000000..9e7d74e1 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillStaffSummaryVO.java @@ -0,0 +1,89 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/26 + */ +@ApiModel(value = "用户月度账单概览") +public class BillStaffSummaryVO { + @ApiModelProperty(value = "用户名") + private String username; + + @ApiModelProperty(value = "Topic数量") + private Integer topicNum; + + @ApiModelProperty(value = "配额") + private Double quota; + + @ApiModelProperty(value = "金额") + private Double cost; + + @ApiModelProperty(value = "月份") + private String gmtMonth; + + @ApiModelProperty(value = "时间戳") + private Long timestamp; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public Integer getTopicNum() { + return topicNum; + } + + public void setTopicNum(Integer topicNum) { + this.topicNum = topicNum; + } + + public Double getQuota() { + return quota; + } + + public void setQuota(Double quota) { + this.quota = quota; + } + + public Double getCost() { + return cost; + } + + public void setCost(Double cost) { + this.cost = cost; + } + + public String getGmtMonth() { + return gmtMonth; + } + + public void setGmtMonth(String gmtMonth) { + this.gmtMonth = gmtMonth; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public String toString() { + return "BillStaffSummaryVO{" + + "username='" + username + '\'' + + ", topicNum=" + topicNum + + ", quota=" + quota + + ", cost=" + cost + + ", gmtMonth='" + gmtMonth + '\'' + + ", timestamp=" + timestamp + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillTopicVO.java new file mode 100644 index 00000000..33142c51 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/BillTopicVO.java @@ -0,0 +1,77 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/26 + */ +@ApiModel(value = "Topic账单") +public class BillTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "配额") + private Double quota; + + @ApiModelProperty(value = "金额") + private Double cost; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Double getQuota() { + return quota; + } + + public void setQuota(Double quota) { + this.quota = quota; + } + + public Double getCost() { + return cost; + } + + public void setCost(Double cost) { + this.cost = cost; + } + + @Override + public String toString() { + return "BillTopicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", quota=" + quota + + ", cost=" + cost + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/QuotaVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/QuotaVO.java new file mode 100644 index 00000000..c741b677 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/QuotaVO.java @@ -0,0 +1,68 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class QuotaVO { + private Long clusterId; + + private String topicName; + + private String appId; + + private Long produceQuota; + + private Long consumeQuota; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Long getProduceQuota() { + return produceQuota; + } + + public void setProduceQuota(Long produceQuota) { + this.produceQuota = produceQuota; + } + + public Long getConsumeQuota() { + return consumeQuota; + } + + public void setConsumeQuota(Long consumeQuota) { + this.consumeQuota = consumeQuota; + } + + @Override + public String toString() { + return "QuotaVO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", produceQuota=" + produceQuota + + ", consumeQuota=" + consumeQuota + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/TopicBusinessInfoVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/TopicBusinessInfoVO.java new file mode 100644 index 00000000..61440a41 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/TopicBusinessInfoVO.java @@ -0,0 +1,77 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai + * @date 20/09/08 + */ +@ApiModel(value = "Topic业务信息") +public class TopicBusinessInfoVO { + @ApiModelProperty(value = "应用id") + private String appId; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "负责人") + private String principals; + + @ApiModelProperty(value = "集群Id") + private Long clusterId; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + @Override + public String toString() { + return "TopicBusinessInfoVO{" + + "appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", principals='" + principals + '\'' + + ", clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppSummaryVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppSummaryVO.java new file mode 100644 index 00000000..9cb486bf --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppSummaryVO.java @@ -0,0 +1,53 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.app; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/5/22 + */ +@ApiModel(description="App概览信息") +public class AppSummaryVO { + @ApiModelProperty(value="AppId") + private String appId; + + @ApiModelProperty(value="App名称") + private String name; + + @ApiModelProperty(value="App负责人") + private String principals; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + @Override + public String toString() { + return "AppSummaryVO{" + + "appId='" + appId + '\'' + + ", name='" + name + '\'' + + ", principals='" + principals + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicAuthorityVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicAuthorityVO.java new file mode 100644 index 00000000..d5a3fae4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicAuthorityVO.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.app; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +@ApiModel(value = "AppTopicAuthority") +public class AppTopicAuthorityVO { + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "appId") + private String appId; + + @ApiModelProperty(value = "权限: 0:无权限, 1:可消费 2:可发送 3:可发送消费 4:可管理") + private Integer access; + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "AppTopicAuthorityVO{" + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", access=" + access + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/MigrationTaskVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicVO.java similarity index 56% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/MigrationTaskVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicVO.java index 4a48fc15..228bcd85 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/MigrationTaskVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppTopicVO.java @@ -1,44 +1,31 @@ -package com.xiaojukeji.kafka.manager.web.vo; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.app; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** - * 迁移任务 * @author zengqiao - * @date 19/7/13 + * @date 20/4/7 */ -public class MigrationTaskVO { - @ApiModelProperty(value = "任务ID") - private Long taskId; - - @ApiModelProperty(value = "集群ID") +@ApiModel(description="AppTopic") +public class AppTopicVO { + @ApiModelProperty(value = "逻辑集群ID") private Long clusterId; - @ApiModelProperty(value = "集群名称") + @ApiModelProperty(value = "逻辑集群名称") private String clusterName; @ApiModelProperty(value = "Topic名称") private String topicName; - @ApiModelProperty(value = "任务状态") - private Integer status; - - @ApiModelProperty(value = "限流值") - private Long throttle; - - @ApiModelProperty(value = "任务创建时间") - private Long gmtCreate; + @ApiModelProperty(value = "权限: 0:无权限, 1:可消费 2:可发送 3:可发送消费 4:可管理") + private Integer access; @ApiModelProperty(value = "操作人") private String operator; - public Long getTaskId() { - return taskId; - } - - public void setTaskId(Long taskId) { - this.taskId = taskId; - } + @ApiModelProperty(value = "权限授予时间") + private Long gmtCreate; public Long getClusterId() { return clusterId; @@ -64,28 +51,12 @@ public class MigrationTaskVO { this.topicName = topicName; } - public Integer getStatus() { - return status; + public Integer getAccess() { + return access; } - public void setStatus(Integer status) { - this.status = status; - } - - public Long getThrottle() { - return throttle; - } - - public void setThrottle(Long throttle) { - this.throttle = throttle; - } - - public Long getGmtCreate() { - return gmtCreate; - } - - public void setGmtCreate(Long gmtCreate) { - this.gmtCreate = gmtCreate; + public void setAccess(Integer access) { + this.access = access; } public String getOperator() { @@ -96,17 +67,23 @@ public class MigrationTaskVO { this.operator = operator; } + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + @Override public String toString() { - return "MigrationTaskVO{" + - "taskId=" + taskId + - ", clusterId=" + clusterId + + return "AppTopicVO{" + + "clusterId=" + clusterId + ", clusterName='" + clusterName + '\'' + ", topicName='" + topicName + '\'' + - ", status=" + status + - ", throttle=" + throttle + - ", gmtCreate=" + gmtCreate + + ", access=" + access + ", operator='" + operator + '\'' + + ", gmtCreate=" + gmtCreate + '}'; } } \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppVO.java new file mode 100644 index 00000000..41ca8d92 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/AppVO.java @@ -0,0 +1,77 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.app; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/7 + */ +@ApiModel(description="App信息") +public class AppVO { + @ApiModelProperty(value="AppId") + private String appId; + + @ApiModelProperty(value="App名称") + private String name; + + @ApiModelProperty(value="App密码") + private String password; + + @ApiModelProperty(value="App描述") + private String description; + + @ApiModelProperty(value="App负责人") + private String principals; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + @Override + public String toString() { + return "AppVO{" + + "appId='" + appId + '\'' + + ", name='" + name + '\'' + + ", password='" + password + '\'' + + ", description='" + description + '\'' + + ", principals='" + principals + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/DeprecatedAppVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/DeprecatedAppVO.java new file mode 100644 index 00000000..034cbc4f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/app/DeprecatedAppVO.java @@ -0,0 +1,214 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.app; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/8/13 + */ +@Deprecated +public class DeprecatedAppVO { + private Long id; + + private Date gmtCreate; + + private Date gmtModify; + + private String appId; + + private String name; + + private String password; + + private String type = "离线应用"; + + private String applicant; + + private String principal; + + private String department = ""; + + private Long department_id = null; + + private String description; + + private String approveUser = ""; + + private String approveTime = ""; + + private String approveInfo = ""; + + private Integer status = 1; + + private String bpmInstanceId = ""; + + private Boolean lastUsed = false; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getApplicant() { + return applicant; + } + + public void setApplicant(String applicant) { + this.applicant = applicant; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public Long getDepartment_id() { + return department_id; + } + + public void setDepartment_id(Long department_id) { + this.department_id = department_id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getApproveUser() { + return approveUser; + } + + public void setApproveUser(String approveUser) { + this.approveUser = approveUser; + } + + public String getApproveTime() { + return approveTime; + } + + public void setApproveTime(String approveTime) { + this.approveTime = approveTime; + } + + public String getApproveInfo() { + return approveInfo; + } + + public void setApproveInfo(String approveInfo) { + this.approveInfo = approveInfo; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getBpmInstanceId() { + return bpmInstanceId; + } + + public void setBpmInstanceId(String bpmInstanceId) { + this.bpmInstanceId = bpmInstanceId; + } + + public Boolean getLastUsed() { + return lastUsed; + } + + public void setLastUsed(Boolean lastUsed) { + this.lastUsed = lastUsed; + } + + @Override + public String toString() { + return "DeprecatedAppVO{" + + "id=" + id + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + ", appId='" + appId + '\'' + + ", name='" + name + '\'' + + ", password='" + password + '\'' + + ", type='" + type + '\'' + + ", applicant='" + applicant + '\'' + + ", principal='" + principal + '\'' + + ", department='" + department + '\'' + + ", department_id=" + department_id + + ", description='" + description + '\'' + + ", approveUser='" + approveUser + '\'' + + ", approveTime='" + approveTime + '\'' + + ", approveInfo='" + approveInfo + '\'' + + ", status=" + status + + ", bpmInstanceId='" + bpmInstanceId + '\'' + + ", lastUsed=" + lastUsed + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterBasicVO.java similarity index 97% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterBasicVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterBasicVO.java index 185a4bf0..53410e05 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/cluster/ClusterBasicVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterBasicVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.cluster; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.cluster; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterNameDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterNameDTO.java new file mode 100644 index 00000000..e99005d5 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/ClusterNameDTO.java @@ -0,0 +1,70 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.cluster; + +import java.util.List; + +/** + * @author zhongyuankai + * @date 2020/5/18 + */ +public class ClusterNameDTO { + private Long physicalClusterId; + + private String physicalClusterName; + + private Long logicalClusterId; + + private String logicalClusterName; + + private List regionIdList; + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public String getPhysicalClusterName() { + return physicalClusterName; + } + + public void setPhysicalClusterName(String physicalClusterName) { + this.physicalClusterName = physicalClusterName; + } + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public List getRegionIdList() { + return regionIdList; + } + + public void setRegionIdList(List regionIdList) { + this.regionIdList = regionIdList; + } + + @Override + public String toString() { + return "ClusterNameDTO{" + + "physicalClusterId=" + physicalClusterId + + ", physicalClusterName='" + physicalClusterName + '\'' + + ", logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", regionIdList=" + regionIdList + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/LogicClusterVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/LogicClusterVO.java new file mode 100644 index 00000000..c3c5f9c3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/LogicClusterVO.java @@ -0,0 +1,138 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/31 + */ +@ApiModel(description="逻辑集群信息") +public class LogicClusterVO { + @ApiModelProperty(value="逻辑集群ID") + private Long clusterId; + + @ApiModelProperty(value="逻辑集群名称") + private String clusterName; + + @ApiModelProperty(value="逻辑集群类型, 0:共享集群, 1:独享集群, 2:独立集群") + private Integer mode; + + @ApiModelProperty(value="逻辑Topic数量") + private Integer topicNum; + + @ApiModelProperty(value="集群版本") + private String clusterVersion; + + @ApiModelProperty(value="物理集群ID") + private Long physicalClusterId; + + @ApiModelProperty(value="集群服务地址") + private String bootstrapServers; + + @ApiModelProperty(value="描述") + private String description; + + @ApiModelProperty(value="接入时间") + private Long gmtCreate; + + @ApiModelProperty(value="修改时间") + private Long gmtModify; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public Integer getTopicNum() { + return topicNum; + } + + public void setTopicNum(Integer topicNum) { + this.topicNum = topicNum; + } + + public String getClusterVersion() { + return clusterVersion; + } + + public void setClusterVersion(String clusterVersion) { + this.clusterVersion = clusterVersion; + } + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Long gmtModify) { + this.gmtModify = gmtModify; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "LogicClusterVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", mode=" + mode + + ", topicNum=" + topicNum + + ", clusterVersion='" + clusterVersion + '\'' + + ", physicalClusterId=" + physicalClusterId + + ", bootstrapServers='" + bootstrapServers + '\'' + + ", description='" + description + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetricsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/NormalClusterMetricsVO.java similarity index 61% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetricsVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/NormalClusterMetricsVO.java index 18d7e585..1d3c6601 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetricsVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/NormalClusterMetricsVO.java @@ -1,38 +1,31 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.cluster; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** - * BROKER metrics * @author zengqiao - * @date 19/3/18 + * @date 20/5/13 */ -@ApiModel(value = "BrokerMetricsVO", description = "Broker流量信息") -public class BrokerMetricsVO { - @ApiModelProperty(value = "消息数") - private Double messagesInPerSec; +public class NormalClusterMetricsVO { - @ApiModelProperty(value = "流入流量(B)") + @ApiModelProperty(value="每秒总共发送的请求") + private Double totalProduceRequestsPerSec; + + @ApiModelProperty(value="每秒流入的字节数") private Double bytesInPerSec; - @ApiModelProperty(value = "流出流量(B)") + @ApiModelProperty(value="每秒流出的字节数") private Double bytesOutPerSec; - @ApiModelProperty(value = "被拒绝流量(B)") + @ApiModelProperty(value="每秒拒绝的字节数") private Double bytesRejectedPerSec; - @ApiModelProperty(value = "创建时间") + @ApiModelProperty(value="每秒流入的消息数") + private Double messagesInPerSec; + + @ApiModelProperty(value="创建时间") private Long gmtCreate; - public Double getMessagesInPerSec() { - return messagesInPerSec; - } - - public void setMessagesInPerSec(Double messagesInPerSec) { - this.messagesInPerSec = messagesInPerSec; - } - public Double getBytesInPerSec() { return bytesInPerSec; } @@ -57,6 +50,14 @@ public class BrokerMetricsVO { this.bytesRejectedPerSec = bytesRejectedPerSec; } + public Double getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Double messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + public Long getGmtCreate() { return gmtCreate; } @@ -65,14 +66,23 @@ public class BrokerMetricsVO { this.gmtCreate = gmtCreate; } + public Double getTotalProduceRequestsPerSec() { + return totalProduceRequestsPerSec; + } + + public void setTotalProduceRequestsPerSec(Double totalProduceRequestsPerSec) { + this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; + } + @Override public String toString() { - return "BrokerMetricsVO{" + - "messagesInPerSec=" + messagesInPerSec + + return "NormalClusterMetricsVO{" + + "totalProduceRequestsPerSec=" + totalProduceRequestsPerSec + ", bytesInPerSec=" + bytesInPerSec + ", bytesOutPerSec=" + bytesOutPerSec + ", bytesRejectedPerSec=" + bytesRejectedPerSec + + ", messagesInPerSec=" + messagesInPerSec + ", gmtCreate=" + gmtCreate + '}'; } -} +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/TopicMetadataVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/TopicMetadataVO.java new file mode 100644 index 00000000..26965ae3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/cluster/TopicMetadataVO.java @@ -0,0 +1,55 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/29 + */ +@ApiModel(description="Topic元信息") +public class TopicMetadataVO { + @ApiModelProperty(value="Topic名称") + private String topicName; + + @ApiModelProperty(value="Topic分区列表") + private List partitionIdList; + + @ApiModelProperty(value="Topic分区数") + private Integer partitionNum; + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public List getPartitionIdList() { + return partitionIdList; + } + + public void setPartitionIdList(List partitionIdList) { + this.partitionIdList = partitionIdList; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + @Override + public String toString() { + return "TopicMetadataVO{" + + "topicName='" + topicName + '\'' + + ", partitionIdList=" + partitionIdList + + ", partitionNum=" + partitionNum + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupDetailVO.java similarity index 77% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupDetailVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupDetailVO.java index 054e98e0..d70557e2 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupDetailVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupDetailVO.java @@ -1,36 +1,38 @@ -package com.xiaojukeji.kafka.manager.web.vo.consumer; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.consumer; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; /** * @author zengqiao * @date 19/4/3 */ +@ApiModel(value = "消费组的消费详情") public class ConsumerGroupDetailVO { - private Long clusterId; - + @ApiModelProperty(value = "topic名称") private String topicName; + @ApiModelProperty(value = "消费组名称") private String consumerGroup; + @ApiModelProperty(value = "location") private String location; + @ApiModelProperty(value = "分区Id") private Integer partitionId; + @ApiModelProperty(value = "clientId") private String clientId; + @ApiModelProperty(value = "消费偏移量") private Long consumeOffset; + @ApiModelProperty(value = "partitionOffset") private Long partitionOffset; + @ApiModelProperty(value = "lag") private Long lag; - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - public String getTopicName() { return topicName; } @@ -98,8 +100,7 @@ public class ConsumerGroupDetailVO { @Override public String toString() { return "ConsumerGroupDetailVO{" + - "clusterId=" + clusterId + - ", topicName='" + topicName + '\'' + + "topicName='" + topicName + '\'' + ", consumerGroup='" + consumerGroup + '\'' + ", location='" + location + '\'' + ", partitionId=" + partitionId + diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupVO.java similarity index 56% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupVO.java index de654ccd..9c09eb6f 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/consumer/ConsumerGroupVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/consumer/ConsumerGroupVO.java @@ -1,27 +1,23 @@ -package com.xiaojukeji.kafka.manager.web.vo.consumer; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.consumer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; /** - * 消费组信息 - * @author zengqiao - * @date 19/4/3 + * @author zhongyuankai + * @date 20/4/8 */ -@ApiModel(value = "ConsumerGroupVO", description = "消费组信息") -public class ConsumerGroupVO implements Serializable { +@ApiModel(value = "消费组消费Topic信息") +public class ConsumerGroupVO { @ApiModelProperty(value = "消费组名称") private String consumerGroup; - @ApiModelProperty(value = "存储位置") - private String location; + @ApiModelProperty(value = "使用的AppID") + private String appIds; - public ConsumerGroupVO(String consumerGroup, String location) { - this.consumerGroup = consumerGroup; - this.location = location; - } + @ApiModelProperty(value = "offset存储位置") + private String location; public String getConsumerGroup() { return consumerGroup; @@ -31,6 +27,14 @@ public class ConsumerGroupVO implements Serializable { this.consumerGroup = consumerGroup; } + public String getAppIds() { + return appIds; + } + + public void setAppIds(String appIds) { + this.appIds = appIds; + } + public String getLocation() { return location; } @@ -42,7 +46,8 @@ public class ConsumerGroupVO implements Serializable { @Override public String toString() { return "ConsumerGroupVO{" + - "consumerGroup='" + consumerGroup + '\'' + + ", consumerGroup='" + consumerGroup + '\'' + + ", appIds='" + appIds + '\'' + ", location='" + location + '\'' + '}'; } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderResultVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderResultVO.java new file mode 100644 index 00000000..67686acd --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderResultVO.java @@ -0,0 +1,38 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.order; + +import com.xiaojukeji.kafka.manager.common.entity.Result; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "工单审批结果") +public class OrderResultVO { + @ApiModelProperty(value = "工单ID") + private Long id; + + @ApiModelProperty(value = "审批结果") + private Result result; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Result getResult() { + return result; + } + + public void setResult(Result result) { + this.result = result; + } + + @Override + public String toString() { + return "OrderResultVO{" + + "id=" + id + + ", result=" + result + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderTypeVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderTypeVO.java new file mode 100644 index 00000000..e75f8e8b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderTypeVO.java @@ -0,0 +1,47 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.order; + +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai + * @date 20/4/24 + */ +public class OrderTypeVO { + @ApiModelProperty(value = "工单类型") + private Integer type; + + @ApiModelProperty(value = "描述信息") + private String message; + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public OrderTypeVO(Integer type, String message) { + this.type = type; + this.message = message; + } + + public OrderTypeVO() { + } + + @Override + public String toString() { + return "OrderTypeVO{" + + "type=" + type + + ", message='" + message + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderVO.java new file mode 100644 index 00000000..390d3ef4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/OrderVO.java @@ -0,0 +1,101 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.order; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * @author zhongyuankai + * @date 20/4/21 + */ +public class OrderVO { + @ApiModelProperty(value = "工单ID") + private Long id; + + @ApiModelProperty(value = "工单类型, 0:topics, 1:apps, 2:quotas, 3:authorities, 4:clusters") + private Integer type; + + @ApiModelProperty(value = "工单标题") + private String title; + + @ApiModelProperty(value = "申请人") + private String applicant; + + @ApiModelProperty(value = "描述信息") + private String description; + + @ApiModelProperty(value = "工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消") + private Integer status; + + @ApiModelProperty(value = "申请/审核时间") + private Date gmtTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtTime() { + return gmtTime; + } + + public void setGmtTime(Date gmtTime) { + this.gmtTime = gmtTime; + } + + public String getApplicant() { + return applicant; + } + + public void setApplicant(String applicant) { + this.applicant = applicant; + } + + @Override + public String toString() { + return "OrderVO{" + + "id=" + id + + ", type=" + type + + ", title='" + title + '\'' + + ", applicant='" + applicant + '\'' + + ", description='" + description + '\'' + + ", status=" + status + + ", gmtTime=" + gmtTime + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/detail/OrderDetailBaseVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/detail/OrderDetailBaseVO.java new file mode 100644 index 00000000..9d5e5623 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/order/detail/OrderDetailBaseVO.java @@ -0,0 +1,153 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.order.detail; + +import com.xiaojukeji.kafka.manager.common.entity.vo.common.AccountVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/21 + */ +@ApiModel(description = "工单详情类") +public class OrderDetailBaseVO { + @ApiModelProperty(value = "工单ID") + private Long id; + + @ApiModelProperty(value = "工单类型") + private Integer type; + + @ApiModelProperty(value = "工单标题") + private String title; + + @ApiModelProperty(value = "申请人") + private AccountVO applicant; + + @ApiModelProperty(value = "申请时间") + private Date gmtCreate; + + @ApiModelProperty(value = "审批人列表, 状态为未处理时返回的是审批人, 状态为处理完成时返回的是审批的人") + private List approverList; + + @ApiModelProperty(value = "审批时间") + private Date gmtHandle; + + @ApiModelProperty(value = "审批审批意见") + private String opinion; + + @ApiModelProperty(value = "工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消") + private Integer status; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "工单明细") + private T detail; + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public AccountVO getApplicant() { + return applicant; + } + + public void setApplicant(AccountVO applicant) { + this.applicant = applicant; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public List getApproverList() { + return approverList; + } + + public void setApproverList(List approverList) { + this.approverList = approverList; + } + + public Date getGmtHandle() { + return gmtHandle; + } + + public void setGmtHandle(Date gmtHandle) { + this.gmtHandle = gmtHandle; + } + + public String getOpinion() { + return opinion; + } + + public void setOpinion(String opinion) { + this.opinion = opinion; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public T getDetail() { + return detail; + } + + public void setDetail(T detail) { + this.detail = detail; + } + + @Override + public String toString() { + return "OrderDetailBaseVO{" + + "id=" + id + + ", type=" + type + + ", title='" + title + '\'' + + ", applicant=" + applicant + + ", gmtCreate=" + gmtCreate + + ", approverList=" + approverList + + ", gmtHandle=" + gmtHandle + + ", opinion='" + opinion + '\'' + + ", status=" + status + + ", description='" + description + '\'' + + ", detail=" + detail + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicAuthorizedAppVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicAuthorizedAppVO.java new file mode 100644 index 00000000..4979e338 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicAuthorizedAppVO.java @@ -0,0 +1,125 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai + * @date 20/4/8 + */ +@ApiModel(value = "TopicApp信息") +public class TopicAuthorizedAppVO { + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "应用id") + private String appId; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "负责人") + private String appPrincipals; + + @ApiModelProperty(value = "发送Quota(B/s)") + private Long produceQuota; + + @ApiModelProperty(value = "消费Quota(B/s)") + private Long consumerQuota; + + @ApiModelProperty(value = "生产被限流") + private Boolean produceThrottled; + + @ApiModelProperty(value = "消费被限流") + private Boolean fetchThrottled; + + @ApiModelProperty(value = "权限, 0:无权限, 1:可消费, 2:可发送, 3:可消费发送, 4:可管理") + private Integer access; + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Long getProduceQuota() { + return produceQuota; + } + + public void setProduceQuota(Long produceQuota) { + this.produceQuota = produceQuota; + } + + public Long getConsumerQuota() { + return consumerQuota; + } + + public void setConsumerQuota(Long consumerQuota) { + this.consumerQuota = consumerQuota; + } + + public Boolean getProduceThrottled() { + return produceThrottled; + } + + public void setProduceThrottled(Boolean produceThrottled) { + this.produceThrottled = produceThrottled; + } + + public Boolean getFetchThrottled() { + return fetchThrottled; + } + + public void setFetchThrottled(Boolean fetchThrottled) { + this.fetchThrottled = fetchThrottled; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "TopicAppVO{" + + "topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", produceQuota=" + produceQuota + + ", consumerQuota=" + consumerQuota + + ", produceThrottled=" + produceThrottled + + ", fetchThrottled=" + fetchThrottled + + ", access=" + access + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBasicVO.java new file mode 100644 index 00000000..f3fcb952 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBasicVO.java @@ -0,0 +1,174 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Topic的基本信息 + * @author zengqiao + * @date 19/4/1 + */ +@ApiModel(description = "Topic基本信息") +public class TopicBasicVO { + @ApiModelProperty(value = "集群id") + private Long clusterId; + + @ApiModelProperty(value = "应用id") + private String appId; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "分区数") + private Integer partitionNum; + + @ApiModelProperty(value = "副本数") + private Integer replicaNum; + + @ApiModelProperty(value = "负责人") + private String principals; + + @ApiModelProperty(value = "存储时间(ms)") + private Long retentionTime; + + @ApiModelProperty(value = "创建时间") + private Long createTime; + + @ApiModelProperty(value = "修改时间") + private Long modifyTime; + + @ApiModelProperty(value = "健康分") + private Integer score; + + @ApiModelProperty(value = "压缩格式") + private String topicCodeC; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "集群地址") + private String bootstrapServers; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicCodeC() { + return topicCodeC; + } + + public void setTopicCodeC(String topicCodeC) { + this.topicCodeC = topicCodeC; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + public Integer getReplicaNum() { + return replicaNum; + } + + public void setReplicaNum(Integer replicaNum) { + this.replicaNum = replicaNum; + } + + public Long getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Long modifyTime) { + this.modifyTime = modifyTime; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public String getAppId() { + return appId; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + @Override + public String toString() { + return "TopicBasicVO{" + + "clusterId=" + clusterId + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", partitionNum=" + partitionNum + + ", replicaNum=" + replicaNum + + ", principals='" + principals + '\'' + + ", retentionTime=" + retentionTime + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + ", score=" + score + + ", topicCodeC='" + topicCodeC + '\'' + + ", description='" + description + '\'' + + ", bootstrapServers='" + bootstrapServers + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBillVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBillVO.java new file mode 100644 index 00000000..64e62adb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicBillVO.java @@ -0,0 +1,53 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/5/11 + */ +@ApiModel(value = "Topic账单") +public class TopicBillVO { + @ApiModelProperty(value = "配额") + private Long quota; + + @ApiModelProperty(value = "金额") + private Double cost; + + @ApiModelProperty(value = "月份") + private String gmtMonth; + + public Long getQuota() { + return quota; + } + + public void setQuota(Long quota) { + this.quota = quota; + } + + public Double getCost() { + return cost; + } + + public void setCost(Double cost) { + this.cost = cost; + } + + public String getGmtMonth() { + return gmtMonth; + } + + public void setGmtMonth(String gmtMonth) { + this.gmtMonth = gmtMonth; + } + + @Override + public String toString() { + return "TopicBillVO{" + + "quota=" + quota + + ", cost=" + cost + + ", gmtMonth='" + gmtMonth + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicConnectionVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicConnectionVO.java new file mode 100644 index 00000000..e6d65b91 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicConnectionVO.java @@ -0,0 +1,101 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai,zengqiao + * @date 20/4/8 + */ +@ApiModel(value = "Topic连接信息") +public class TopicConnectionVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "topic名称") + private String topicName; + + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "ip") + private String ip; + + @ApiModelProperty(value = "主机名") + private String hostname; + + @ApiModelProperty(value = "客户端类型[consume|produce]") + private String clientType; + + @ApiModelProperty(value = "客户端版本") + private String clientVersion; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public String getClientType() { + return clientType; + } + + public void setClientType(String clientType) { + this.clientType = clientType; + } + + public String getClientVersion() { + return clientVersion; + } + + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + @Override + public String toString() { + return "TopicConnectionVO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", ip='" + ip + '\'' + + ", hostname='" + hostname + '\'' + + ", clientType='" + clientType + '\'' + + ", clientVersion='" + clientVersion + '\'' + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDataSampleVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDataSampleVO.java similarity index 89% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDataSampleVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDataSampleVO.java index b7f29643..d4d941f8 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDataSampleVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDataSampleVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDeleteVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDeleteVO.java similarity index 96% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDeleteVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDeleteVO.java index 9717b8f4..5f7069ba 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDeleteVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDeleteVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDetailVO.java similarity index 97% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDetailVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDetailVO.java index 308f304f..3708eaf5 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicDetailVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicDetailVO.java @@ -1,8 +1,7 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; import io.swagger.annotations.ApiModel; -import java.util.Date; import java.util.List; /** diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicExpiredVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicExpiredVO.java new file mode 100644 index 00000000..79fdcfd3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicExpiredVO.java @@ -0,0 +1,101 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/31 + */ +@ApiModel(value = "过期Topic") +public class TopicExpiredVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "App名称") + private String appName; + + @ApiModelProperty(value = "App负责人") + private String appPrincipals; + + @ApiModelProperty(value = "消费连接个数") + private Integer fetchConnectionNum; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Integer getFetchConnectionNum() { + return fetchConnectionNum; + } + + public void setFetchConnectionNum(Integer fetchConnectionNum) { + this.fetchConnectionNum = fetchConnectionNum; + } + + @Override + public String toString() { + return "TopicExpiredVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", fetchConnectionNum=" + fetchConnectionNum + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMetricVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMetricVO.java new file mode 100644 index 00000000..1e5b6a46 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMetricVO.java @@ -0,0 +1,149 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author huangyiminghappy@163.com + * @date 20/4/2 + */ +@ApiModel(value = "Topic流量信息") +public class TopicMetricVO { + @ApiModelProperty(value = "每秒流入消息数") + private Object messagesInPerSec; + + @ApiModelProperty(value = "每秒流入字节数") + private Object bytesInPerSec; + + @ApiModelProperty(value = "每秒流出字节数") + private Object bytesOutPerSec; + + @ApiModelProperty(value = "每秒拒绝字节数") + private Object bytesRejectedPerSec; + + @ApiModelProperty(value = "每秒请求数") + private Object totalProduceRequestsPerSec; + + @ApiModelProperty(value = "appId维度每秒流入消息数") + private Object appIdMessagesInPerSec; + + @ApiModelProperty(value = "appId维度每秒流入字节数") + private Object appIdBytesInPerSec; + + @ApiModelProperty(value = "appId维度每秒流出字节数") + private Object appIdBytesOutPerSec; + + @ApiModelProperty(value = "produce限流") + private Boolean produceThrottled; + + @ApiModelProperty(value = "consume限流") + private Boolean consumeThrottled; + + @ApiModelProperty(value = "创建时间") + private Long gmtCreate; + + public Object getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Object messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + + public Object getBytesInPerSec() { + return bytesInPerSec; + } + + public void setBytesInPerSec(Object bytesInPerSec) { + this.bytesInPerSec = bytesInPerSec; + } + + public Object getBytesOutPerSec() { + return bytesOutPerSec; + } + + public void setBytesOutPerSec(Object bytesOutPerSec) { + this.bytesOutPerSec = bytesOutPerSec; + } + + public Object getBytesRejectedPerSec() { + return bytesRejectedPerSec; + } + + public void setBytesRejectedPerSec(Object bytesRejectedPerSec) { + this.bytesRejectedPerSec = bytesRejectedPerSec; + } + + public Object getTotalProduceRequestsPerSec() { + return totalProduceRequestsPerSec; + } + + public void setTotalProduceRequestsPerSec(Object totalProduceRequestsPerSec) { + this.totalProduceRequestsPerSec = totalProduceRequestsPerSec; + } + + public Object getAppIdMessagesInPerSec() { + return appIdMessagesInPerSec; + } + + public void setAppIdMessagesInPerSec(Object appIdMessagesInPerSec) { + this.appIdMessagesInPerSec = appIdMessagesInPerSec; + } + + public Object getAppIdBytesInPerSec() { + return appIdBytesInPerSec; + } + + public void setAppIdBytesInPerSec(Object appIdBytesInPerSec) { + this.appIdBytesInPerSec = appIdBytesInPerSec; + } + + public Object getAppIdBytesOutPerSec() { + return appIdBytesOutPerSec; + } + + public void setAppIdBytesOutPerSec(Object appIdBytesOutPerSec) { + this.appIdBytesOutPerSec = appIdBytesOutPerSec; + } + + public Boolean getProduceThrottled() { + return produceThrottled; + } + + public void setProduceThrottled(Boolean produceThrottled) { + this.produceThrottled = produceThrottled; + } + + public Boolean getConsumeThrottled() { + return consumeThrottled; + } + + public void setConsumeThrottled(Boolean consumeThrottled) { + this.consumeThrottled = consumeThrottled; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "TopicMetricVO{" + + "messagesInPerSec=" + messagesInPerSec + + ", bytesInPerSec=" + bytesInPerSec + + ", bytesOutPerSec=" + bytesOutPerSec + + ", bytesRejectedPerSec=" + bytesRejectedPerSec + + ", totalProduceRequestsPerSec=" + totalProduceRequestsPerSec + + ", appIdMessagesInPerSec=" + appIdMessagesInPerSec + + ", appIdBytesInPerSec=" + appIdBytesInPerSec + + ", appIdBytesOutPerSec=" + appIdBytesOutPerSec + + ", produceThrottled=" + produceThrottled + + ", consumeThrottled=" + consumeThrottled + + ", gmtCreate=" + gmtCreate + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMineVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMineVO.java new file mode 100644 index 00000000..2cda46cb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMineVO.java @@ -0,0 +1,125 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/31 + */ +@ApiModel(description = "Topic信息") +public class TopicMineVO { + @ApiModelProperty(value = "逻辑集群ID") + private Long clusterId; + + @ApiModelProperty(value = "逻辑集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "流入流量(B/s)") + private Object bytesIn; + + @ApiModelProperty(value = "流出流量(B/s)") + private Object bytesOut; + + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "App名称") + private String appName; + + @ApiModelProperty(value = "App负责人") + private String appPrincipals; + + @ApiModelProperty(value = "状态, 0:无权限, 1:可消费 2:可发送 3:可消费发送 4:可管理") + private Integer access; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Object getBytesIn() { + return bytesIn; + } + + public void setBytesIn(Object bytesIn) { + this.bytesIn = bytesIn; + } + + public Object getBytesOut() { + return bytesOut; + } + + public void setBytesOut(Object bytesOut) { + this.bytesOut = bytesOut; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "TopicMineVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", bytesIn=" + bytesIn + + ", bytesOut=" + bytesOut + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", access=" + access + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMyAppVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMyAppVO.java new file mode 100644 index 00000000..c89ba73d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicMyAppVO.java @@ -0,0 +1,89 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/9/16 + */ +@ApiModel(value = "我的应用对Topic的信息") +public class TopicMyAppVO { + @ApiModelProperty(value = "应用id") + private String appId; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "负责人") + private String appPrincipals; + + @ApiModelProperty(value = "发送Quota(B/s)") + private Long produceQuota; + + @ApiModelProperty(value = "消费Quota(B/s)") + private Long consumerQuota; + + @ApiModelProperty(value = "权限, 0:无权限, 1:可消费, 2:可发送, 3:可消费发送") + private Integer access; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Long getProduceQuota() { + return produceQuota; + } + + public void setProduceQuota(Long produceQuota) { + this.produceQuota = produceQuota; + } + + public Long getConsumerQuota() { + return consumerQuota; + } + + public void setConsumerQuota(Long consumerQuota) { + this.consumerQuota = consumerQuota; + } + + public Integer getAccess() { + return access; + } + + public void setAccess(Integer access) { + this.access = access; + } + + @Override + public String toString() { + return "TopicMyAppVO{" + + "appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", produceQuota=" + produceQuota + + ", consumerQuota=" + consumerQuota + + ", access=" + access + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOffsetVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicOffsetVO.java similarity index 96% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOffsetVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicOffsetVO.java index d3270ac6..9313ef30 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicOffsetVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicOffsetVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicPartitionVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicPartitionVO.java new file mode 100644 index 00000000..a66771e5 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicPartitionVO.java @@ -0,0 +1,139 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author arthur + * @date 2017/6/6. + */ +@ApiModel(value = "分区信息") +public class TopicPartitionVO { + @ApiModelProperty(value = "分区ID") + private Integer partitionId; + + @ApiModelProperty(value = "起始偏移") + private Long beginningOffset; + + @ApiModelProperty(value = "结尾偏移") + private Long endOffset; + + @ApiModelProperty(value = "消息条数") + private Long msgNum; + + @ApiModelProperty(value = "Leader副本") + private Integer leaderBrokerId; + + @ApiModelProperty(value = "首选副本") + private Integer preferredBrokerId; + + @ApiModelProperty(value = "replicas") + private List replicaBrokerIdList; + + @ApiModelProperty(value = "ISR") + private List isrBrokerIdList; + + @ApiModelProperty(value = "True:未同步, False:已同步") + private Boolean underReplicated; + + @ApiModelProperty(value = "Leader副本的大小(B)") + private Long logSize; + + public Integer getPartitionId() { + return partitionId; + } + + public void setPartitionId(Integer partitionId) { + this.partitionId = partitionId; + } + + public Long getBeginningOffset() { + return beginningOffset; + } + + public void setBeginningOffset(Long beginningOffset) { + this.beginningOffset = beginningOffset; + } + + public Long getEndOffset() { + return endOffset; + } + + public void setEndOffset(Long endOffset) { + this.endOffset = endOffset; + } + + public Long getMsgNum() { + return msgNum; + } + + public void setMsgNum(Long msgNum) { + this.msgNum = msgNum; + } + + public Integer getLeaderBrokerId() { + return leaderBrokerId; + } + + public void setLeaderBrokerId(Integer leaderBrokerId) { + this.leaderBrokerId = leaderBrokerId; + } + + public Integer getPreferredBrokerId() { + return preferredBrokerId; + } + + public void setPreferredBrokerId(Integer preferredBrokerId) { + this.preferredBrokerId = preferredBrokerId; + } + + public List getReplicaBrokerIdList() { + return replicaBrokerIdList; + } + + public void setReplicaBrokerIdList(List replicaBrokerIdList) { + this.replicaBrokerIdList = replicaBrokerIdList; + } + + public List getIsrBrokerIdList() { + return isrBrokerIdList; + } + + public void setIsrBrokerIdList(List isrBrokerIdList) { + this.isrBrokerIdList = isrBrokerIdList; + } + + public Boolean getUnderReplicated() { + return underReplicated; + } + + public void setUnderReplicated(Boolean underReplicated) { + this.underReplicated = underReplicated; + } + + public Long getLogSize() { + return logSize; + } + + public void setLogSize(Long logSize) { + this.logSize = logSize; + } + + @Override + public String toString() { + return "TopicPartitionVO{" + + "partitionId=" + partitionId + + ", beginningOffset=" + beginningOffset + + ", endOffset=" + endOffset + + ", msgNum=" + msgNum + + ", leaderBrokerId=" + leaderBrokerId + + ", preferredBrokerId=" + preferredBrokerId + + ", replicaBrokerIdList=" + replicaBrokerIdList + + ", isrBrokerIdList=" + isrBrokerIdList + + ", underReplicated=" + underReplicated + + ", logSize=" + logSize + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeDetailVO.java new file mode 100644 index 00000000..c89c7cb2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeDetailVO.java @@ -0,0 +1,113 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/8 + */ +@ApiModel(value = "Topic请求耗时详情") +public class TopicRequestTimeDetailVO { + @ApiModelProperty(value = "请求耗时类型") + private String requestTimeType; + + @ApiModelProperty(value = "responseQueueTimeMs") + private Object responseQueueTimeMs; + + @ApiModelProperty(value = "localTimeMs") + private Object localTimeMs; + + @ApiModelProperty(value = "requestQueueTimeMs") + private Object requestQueueTimeMs; + + @ApiModelProperty(value = "throttleTimeMs") + private Object throttleTimeMs; + + @ApiModelProperty(value = "responseSendTimeMs") + private Object responseSendTimeMs; + + @ApiModelProperty(value = "remoteTimeMs") + private Object remoteTimeMs; + + @ApiModelProperty(value = "totalTimeMs") + private Object totalTimeMs; + + public String getRequestTimeType() { + return requestTimeType; + } + + public void setRequestTimeType(String requestTimeType) { + this.requestTimeType = requestTimeType; + } + + public Object getResponseQueueTimeMs() { + return responseQueueTimeMs; + } + + public void setResponseQueueTimeMs(Object responseQueueTimeMs) { + this.responseQueueTimeMs = responseQueueTimeMs; + } + + public Object getLocalTimeMs() { + return localTimeMs; + } + + public void setLocalTimeMs(Object localTimeMs) { + this.localTimeMs = localTimeMs; + } + + public Object getRequestQueueTimeMs() { + return requestQueueTimeMs; + } + + public void setRequestQueueTimeMs(Object requestQueueTimeMs) { + this.requestQueueTimeMs = requestQueueTimeMs; + } + + public Object getThrottleTimeMs() { + return throttleTimeMs; + } + + public void setThrottleTimeMs(Object throttleTimeMs) { + this.throttleTimeMs = throttleTimeMs; + } + + public Object getResponseSendTimeMs() { + return responseSendTimeMs; + } + + public void setResponseSendTimeMs(Object responseSendTimeMs) { + this.responseSendTimeMs = responseSendTimeMs; + } + + public Object getRemoteTimeMs() { + return remoteTimeMs; + } + + public void setRemoteTimeMs(Object remoteTimeMs) { + this.remoteTimeMs = remoteTimeMs; + } + + public Object getTotalTimeMs() { + return totalTimeMs; + } + + public void setTotalTimeMs(Object totalTimeMs) { + this.totalTimeMs = totalTimeMs; + } + + @Override + public String toString() { + return "TopicRequestTimeDetailVO{" + + "requestTimeType='" + requestTimeType + '\'' + + ", responseQueueTimeMs=" + responseQueueTimeMs + + ", localTimeMs=" + localTimeMs + + ", requestQueueTimeMs=" + requestQueueTimeMs + + ", throttleTimeMs=" + throttleTimeMs + + ", responseSendTimeMs=" + responseSendTimeMs + + ", remoteTimeMs=" + remoteTimeMs + + ", totalTimeMs=" + totalTimeMs + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeVO.java new file mode 100644 index 00000000..dfce225d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicRequestTimeVO.java @@ -0,0 +1,149 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/7 + */ +@ApiModel(value = "Topic请求耗时信息") +public class TopicRequestTimeVO { + @ApiModelProperty(value = "produce请求平均耗时") + private Object produceRequestTimeMean; + + @ApiModelProperty(value = "produce请求50分位耗时") + private Object produceRequestTime50thPercentile; + + @ApiModelProperty(value = "produce请求75分位耗时") + private Object produceRequestTime75thPercentile; + + @ApiModelProperty(value = "produce请求95分位耗时") + private Object produceRequestTime95thPercentile; + + @ApiModelProperty(value = "produce请求99分位耗时") + private Object produceRequestTime99thPercentile; + + @ApiModelProperty(value = "fetch请求平均耗时") + private Object fetchRequestTimeMean; + + @ApiModelProperty(value = "fetch请求50分位耗时") + private Object fetchRequestTime50thPercentile; + + @ApiModelProperty(value = "fetch请求75分位耗时") + private Object fetchRequestTime75thPercentile; + + @ApiModelProperty(value = "fetch请求95分位耗时") + private Object fetchRequestTime95thPercentile; + + @ApiModelProperty(value = "fetch请求99分位耗时") + private Object fetchRequestTime99thPercentile; + + @ApiModelProperty(value = "创建时间") + private Object gmtCreate; + + public Object getProduceRequestTimeMean() { + return produceRequestTimeMean; + } + + public void setProduceRequestTimeMean(Object produceRequestTimeMean) { + this.produceRequestTimeMean = produceRequestTimeMean; + } + + public Object getProduceRequestTime50thPercentile() { + return produceRequestTime50thPercentile; + } + + public void setProduceRequestTime50thPercentile(Object produceRequestTime50thPercentile) { + this.produceRequestTime50thPercentile = produceRequestTime50thPercentile; + } + + public Object getProduceRequestTime75thPercentile() { + return produceRequestTime75thPercentile; + } + + public void setProduceRequestTime75thPercentile(Object produceRequestTime75thPercentile) { + this.produceRequestTime75thPercentile = produceRequestTime75thPercentile; + } + + public Object getProduceRequestTime95thPercentile() { + return produceRequestTime95thPercentile; + } + + public void setProduceRequestTime95thPercentile(Object produceRequestTime95thPercentile) { + this.produceRequestTime95thPercentile = produceRequestTime95thPercentile; + } + + public Object getProduceRequestTime99thPercentile() { + return produceRequestTime99thPercentile; + } + + public void setProduceRequestTime99thPercentile(Object produceRequestTime99thPercentile) { + this.produceRequestTime99thPercentile = produceRequestTime99thPercentile; + } + + public Object getFetchRequestTimeMean() { + return fetchRequestTimeMean; + } + + public void setFetchRequestTimeMean(Object fetchRequestTimeMean) { + this.fetchRequestTimeMean = fetchRequestTimeMean; + } + + public Object getFetchRequestTime50thPercentile() { + return fetchRequestTime50thPercentile; + } + + public void setFetchRequestTime50thPercentile(Object fetchRequestTime50thPercentile) { + this.fetchRequestTime50thPercentile = fetchRequestTime50thPercentile; + } + + public Object getFetchRequestTime75thPercentile() { + return fetchRequestTime75thPercentile; + } + + public void setFetchRequestTime75thPercentile(Object fetchRequestTime75thPercentile) { + this.fetchRequestTime75thPercentile = fetchRequestTime75thPercentile; + } + + public Object getFetchRequestTime95thPercentile() { + return fetchRequestTime95thPercentile; + } + + public void setFetchRequestTime95thPercentile(Object fetchRequestTime95thPercentile) { + this.fetchRequestTime95thPercentile = fetchRequestTime95thPercentile; + } + + public Object getFetchRequestTime99thPercentile() { + return fetchRequestTime99thPercentile; + } + + public void setFetchRequestTime99thPercentile(Object fetchRequestTime99thPercentile) { + this.fetchRequestTime99thPercentile = fetchRequestTime99thPercentile; + } + + public Object getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Object gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "TopicRequestTimeVO{" + + "produceRequestTimeMean=" + produceRequestTimeMean + + ", produceRequestTime50thPercentile=" + produceRequestTime50thPercentile + + ", produceRequestTime75thPercentile=" + produceRequestTime75thPercentile + + ", produceRequestTime95thPercentile=" + produceRequestTime95thPercentile + + ", produceRequestTime99thPercentile=" + produceRequestTime99thPercentile + + ", fetchRequestTimeMean=" + fetchRequestTimeMean + + ", fetchRequestTime50thPercentile=" + fetchRequestTime50thPercentile + + ", fetchRequestTime75thPercentile=" + fetchRequestTime75thPercentile + + ", fetchRequestTime95thPercentile=" + fetchRequestTime95thPercentile + + ", fetchRequestTime99thPercentile=" + fetchRequestTime99thPercentile + + ", gmtCreate=" + gmtCreate + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicVO.java new file mode 100644 index 00000000..afb99025 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/normal/topic/TopicVO.java @@ -0,0 +1,113 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.normal.topic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/8 + */ +@ApiModel(value = "Topic信息") +public class TopicVO { + @ApiModelProperty(value = "逻辑集群ID") + private Long clusterId; + + @ApiModelProperty(value = "逻辑集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "Topic描述") + private String description; + + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "App名称") + private String appName; + + @ApiModelProperty(value = "App负责人") + private String appPrincipals; + + @ApiModelProperty(value = "需要鉴权, true:是 false:否") + private Boolean needAuth; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppPrincipals() { + return appPrincipals; + } + + public void setAppPrincipals(String appPrincipals) { + this.appPrincipals = appPrincipals; + } + + public Boolean getNeedAuth() { + return needAuth; + } + + public void setNeedAuth(Boolean needAuth) { + this.needAuth = needAuth; + } + + @Override + public String toString() { + return "TopicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", description='" + description + '\'' + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", appPrincipals='" + appPrincipals + '\'' + + ", needAuth=" + needAuth + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/AnomalyFlowTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/AnomalyFlowTopicVO.java new file mode 100644 index 00000000..d057c913 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/AnomalyFlowTopicVO.java @@ -0,0 +1,101 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.expert; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/30 + */ +@ApiModel(description = "流量异常Topic") +public class AnomalyFlowTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "bytesIn(B/s)") + private Double bytesIn; + + @ApiModelProperty(value = "bytesIn增加(B/s)") + private Double bytesInIncr; + + @ApiModelProperty(value = "iops(Q/s)") + private Double iops; + + @ApiModelProperty(value = "iops增加(Q/s)") + private Double iopsIncr; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Double getBytesIn() { + return bytesIn; + } + + public void setBytesIn(Double bytesIn) { + this.bytesIn = bytesIn; + } + + public Double getBytesInIncr() { + return bytesInIncr; + } + + public void setBytesInIncr(Double bytesInIncr) { + this.bytesInIncr = bytesInIncr; + } + + public Double getIops() { + return iops; + } + + public void setIops(Double iops) { + this.iops = iops; + } + + public Double getIopsIncr() { + return iopsIncr; + } + + public void setIopsIncr(Double iopsIncr) { + this.iopsIncr = iopsIncr; + } + + @Override + public String toString() { + return "AnomalyFlowTopic{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", bytesIn=" + bytesIn + + ", bytesInIncr=" + bytesInIncr + + ", iops=" + iops + + ", iopsIncr=" + iopsIncr + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/BrokerIdPartitionNumVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/BrokerIdPartitionNumVO.java new file mode 100644 index 00000000..413aa6a4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/BrokerIdPartitionNumVO.java @@ -0,0 +1,41 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.expert; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/5/15 + */ +@ApiModel(description = "Region热点Topic") +public class BrokerIdPartitionNumVO { + @ApiModelProperty(value = "BrokerId") + private Integer brokeId; + + @ApiModelProperty(value = "分区数") + private Integer partitionNum; + + public Integer getBrokeId() { + return brokeId; + } + + public void setBrokeId(Integer brokeId) { + this.brokeId = brokeId; + } + + public Integer getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Integer partitionNum) { + this.partitionNum = partitionNum; + } + + @Override + public String toString() { + return "BrokerIdPartitionNumVO{" + + "brokeId=" + brokeId + + ", partitionNum=" + partitionNum + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/ExpiredTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/ExpiredTopicVO.java new file mode 100644 index 00000000..46c7a3a2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/ExpiredTopicVO.java @@ -0,0 +1,111 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.expert; + +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/30 + */ +public class ExpiredTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "过期天数") + private Integer expiredDay; + + @ApiModelProperty(value = "App名称") + private String appName; + + @ApiModelProperty(value = "AppID") + private String appId; + + @ApiModelProperty(value = "负责人") + private String principals; + + @ApiModelProperty(value = "状态, -1:可下线, 0:过期待通知, 1+:已通知待反馈") + private Integer status; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getExpiredDay() { + return expiredDay; + } + + public void setExpiredDay(Integer expiredDay) { + this.expiredDay = expiredDay; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getPrincipals() { + return principals; + } + + public void setPrincipals(String principals) { + this.principals = principals; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public String toString() { + return "ExpiredTopicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", expiredDay=" + expiredDay + + ", appName='" + appName + '\'' + + ", appId='" + appId + '\'' + + ", principals='" + principals + '\'' + + ", status=" + status + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/PartitionInsufficientTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/PartitionInsufficientTopicVO.java new file mode 100644 index 00000000..fd135052 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/PartitionInsufficientTopicVO.java @@ -0,0 +1,127 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.expert; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/3/30 + */ +@ApiModel(description = "分区不足Topic") +public class PartitionInsufficientTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "Region名称") + private String regionName; + + @ApiModelProperty(value = "Topic所属BrokerId列表") + private List brokerIdList; + + @ApiModelProperty(value = "当前分区数") + private Integer presentPartitionNum; + + @ApiModelProperty(value = "建议分区数") + private Integer suggestedPartitionNum; + + @ApiModelProperty(value = "单分区流量(B/s)") + private Double bytesInPerPartition; + + @ApiModelProperty(value = "今天,昨天,前天的峰值均值流入流量(B/s)") + private List maxAvgBytesInList; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getRegionName() { + return regionName; + } + + public void setRegionName(String regionName) { + this.regionName = regionName; + } + + public List getBrokerIdList() { + return brokerIdList; + } + + public void setBrokerIdList(List brokerIdList) { + this.brokerIdList = brokerIdList; + } + + public Integer getPresentPartitionNum() { + return presentPartitionNum; + } + + public void setPresentPartitionNum(Integer presentPartitionNum) { + this.presentPartitionNum = presentPartitionNum; + } + + public Integer getSuggestedPartitionNum() { + return suggestedPartitionNum; + } + + public void setSuggestedPartitionNum(Integer suggestedPartitionNum) { + this.suggestedPartitionNum = suggestedPartitionNum; + } + + public Double getBytesInPerPartition() { + return bytesInPerPartition; + } + + public void setBytesInPerPartition(Double bytesInPerPartition) { + this.bytesInPerPartition = bytesInPerPartition; + } + + public List getMaxAvgBytesInList() { + return maxAvgBytesInList; + } + + public void setMaxAvgBytesInList(List maxAvgBytesInList) { + this.maxAvgBytesInList = maxAvgBytesInList; + } + + @Override + public String toString() { + return "PartitionInsufficientTopicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", regionName='" + regionName + '\'' + + ", brokerIdList=" + brokerIdList + + ", presentPartitionNum=" + presentPartitionNum + + ", suggestedPartitionNum=" + suggestedPartitionNum + + ", bytesInPerPartition=" + bytesInPerPartition + + ", maxAvgBytesInList=" + maxAvgBytesInList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/RegionHotTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/RegionHotTopicVO.java new file mode 100644 index 00000000..70e44fff --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/expert/RegionHotTopicVO.java @@ -0,0 +1,85 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.expert; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/3/20 + */ +@ApiModel(description = "Region热点Topic") +public class RegionHotTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + +// @ApiModelProperty(value = "RegionID") +// private Long regionId; +// +// @ApiModelProperty(value = "Region名称") +// private String regionName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "失衡详情") + private List detailList; + + @ApiModelProperty(value = "Topic保存时间") + private Long retentionTime; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public List getDetailList() { + return detailList; + } + + public void setDetailList(List detailList) { + this.detailList = detailList; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + @Override + public String toString() { + return "RegionHotTopicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", detailList=" + detailList + + ", retentionTime=" + retentionTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignPartitionStatusVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignPartitionStatusVO.java new file mode 100644 index 00000000..51e1bda6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignPartitionStatusVO.java @@ -0,0 +1,53 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.reassign; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/16 + */ +public class ReassignPartitionStatusVO { + @ApiModelProperty(value = "分区Id") + private Integer partitionId; + + @ApiModelProperty(value = "目标副本ID列表") + private List destReplicaIdList; + + @ApiModelProperty(value = "状态") + private Integer status; + + public Integer getPartitionId() { + return partitionId; + } + + public void setPartitionId(Integer partitionId) { + this.partitionId = partitionId; + } + + public List getDestReplicaIdList() { + return destReplicaIdList; + } + + public void setDestReplicaIdList(List destReplicaIdList) { + this.destReplicaIdList = destReplicaIdList; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public String toString() { + return "ReassignPartitionStatusVO{" + + "partitionId=" + partitionId + + ", destReplicaIdList=" + destReplicaIdList + + ", status=" + status + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTaskVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTaskVO.java new file mode 100644 index 00000000..294ea1ef --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTaskVO.java @@ -0,0 +1,136 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.reassign; + +import io.swagger.annotations.ApiModelProperty; + +/** + * 迁移任务 + * @author zengqiao + * @date 19/7/13 + */ +public class ReassignTaskVO { + @ApiModelProperty(value = "任务ID") + private Long taskId; + + @ApiModelProperty(value = "任务名称") + private String taskName; + + @ApiModelProperty(value = "完成数") + private Integer completedTopicNum; + + @ApiModelProperty(value = "总数") + private Integer totalTopicNum; + + @ApiModelProperty(value = "状态") + private Integer status; + + @ApiModelProperty(value = "计划开始时间") + private Long beginTime; + + @ApiModelProperty(value = "实际结束时间") + private Long endTime; + + @ApiModelProperty(value = "任务创建时间") + private Long gmtCreate; + + @ApiModelProperty(value = "操作人") + private String operator; + + @ApiModelProperty(value = "任务说明") + private String description; + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getTaskName() { + return taskName; + } + + public void setTaskName(String taskName) { + this.taskName = taskName; + } + + public Integer getCompletedTopicNum() { + return completedTopicNum; + } + + public void setCompletedTopicNum(Integer completedTopicNum) { + this.completedTopicNum = completedTopicNum; + } + + public Integer getTotalTopicNum() { + return totalTopicNum; + } + + public void setTotalTopicNum(Integer totalTopicNum) { + this.totalTopicNum = totalTopicNum; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getBeginTime() { + return beginTime; + } + + public void setBeginTime(Long beginTime) { + this.beginTime = beginTime; + } + + public Long getEndTime() { + return endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "ReassignTaskVO{" + + "taskId=" + taskId + + ", taskName='" + taskName + '\'' + + ", completedTopicNum=" + completedTopicNum + + ", totalTopicNum=" + totalTopicNum + + ", status=" + status + + ", beginTime=" + beginTime + + ", endTime=" + endTime + + ", gmtCreate=" + gmtCreate + + ", operator='" + operator + '\'' + + ", description='" + description + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTopicStatusVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTopicStatusVO.java new file mode 100644 index 00000000..836e4108 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/reassign/ReassignTopicStatusVO.java @@ -0,0 +1,151 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.reassign; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/16 + */ +@ApiModel(value = "Topic迁移信息") +public class ReassignTopicStatusVO { + @ApiModelProperty(value = "子任务ID") + private Long subTaskId; + + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "状态") + private Integer status; + + @ApiModelProperty(value = "实际限流(B/s)") + private Long realThrottle; + + @ApiModelProperty(value = "限流上限(B/s)") + private Long maxThrottle; + + @ApiModelProperty(value = "限流下限(B/s)") + private Long minThrottle; + + @ApiModelProperty(value = "完成迁移分区数") + private Integer completedPartitionNum; + + @ApiModelProperty(value = "总的分区数") + private Integer totalPartitionNum; + + @ApiModelProperty(value = "分区迁移列表") + private List reassignList; + + public Long getSubTaskId() { + return subTaskId; + } + + public void setSubTaskId(Long subTaskId) { + this.subTaskId = subTaskId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getRealThrottle() { + return realThrottle; + } + + public void setRealThrottle(Long realThrottle) { + this.realThrottle = realThrottle; + } + + public Long getMaxThrottle() { + return maxThrottle; + } + + public void setMaxThrottle(Long maxThrottle) { + this.maxThrottle = maxThrottle; + } + + public Long getMinThrottle() { + return minThrottle; + } + + public void setMinThrottle(Long minThrottle) { + this.minThrottle = minThrottle; + } + + public Integer getCompletedPartitionNum() { + return completedPartitionNum; + } + + public void setCompletedPartitionNum(Integer completedPartitionNum) { + this.completedPartitionNum = completedPartitionNum; + } + + public Integer getTotalPartitionNum() { + return totalPartitionNum; + } + + public void setTotalPartitionNum(Integer totalPartitionNum) { + this.totalPartitionNum = totalPartitionNum; + } + + public List getReassignList() { + return reassignList; + } + + public void setReassignList(List reassignList) { + this.reassignList = reassignList; + } + + @Override + public String toString() { + return "ReassignTopicStatusVO{" + + "subTaskId=" + subTaskId + + ", clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", status=" + status + + ", realThrottle=" + realThrottle + + ", maxThrottle=" + maxThrottle + + ", minThrottle=" + minThrottle + + ", completedPartitionNum=" + completedPartitionNum + + ", totalPartitionNum=" + totalPartitionNum + + ", reassignList=" + reassignList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskKafkaFilesVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskKafkaFilesVO.java new file mode 100644 index 00000000..0fde414d --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskKafkaFilesVO.java @@ -0,0 +1,49 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.task; + +import io.swagger.annotations.ApiModel; + +/** + * @author zengqiao + * @date 20/5/11 + */ +@ApiModel(value="Kafka相关文件") +public class ClusterTaskKafkaFilesVO { + private String fileName; + + private String fileMd5; + + private Integer fileType; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFileMd5() { + return fileMd5; + } + + public void setFileMd5(String fileMd5) { + this.fileMd5 = fileMd5; + } + + public Integer getFileType() { + return fileType; + } + + public void setFileType(Integer fileType) { + this.fileType = fileType; + } + + @Override + public String toString() { + return "ClusterTaskKafkaFilesVO{" + + "fileName='" + fileName + '\'' + + ", fileMd5='" + fileMd5 + '\'' + + ", fileType=" + fileType + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskMetadataVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskMetadataVO.java new file mode 100644 index 00000000..2788f197 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskMetadataVO.java @@ -0,0 +1,187 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.task; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/27 + */ +@ApiModel(value="任务元信息") +public class ClusterTaskMetadataVO { + @ApiModelProperty(value="任务ID") + private Long taskId; + + @ApiModelProperty(value="集群ID") + private Long clusterId; + + @ApiModelProperty(value="集群名称") + private String clusterName; + + @ApiModelProperty(value="升级的主机列表") + private List hostList; + + @ApiModelProperty(value="升级的主机暂停点") + private List pauseHostList; + + @ApiModelProperty(value="回滚主机列表") + private List rollbackHostList; + + @ApiModelProperty(value="回滚主机暂停点") + private List rollbackPauseHostList; + + @ApiModelProperty(value="kafka包名") + private String kafkaPackageName; + + @ApiModelProperty(value="kafka包 MD5") + private String kafkaPackageMd5; + + @ApiModelProperty(value="server配置文件Id") + private Long serverPropertiesFileId; + + @ApiModelProperty(value="server配置名") + private String serverPropertiesName; + + @ApiModelProperty(value="server配置 MD5") + private String serverPropertiesMd5; + + @ApiModelProperty(value="操作人") + private String operator; + + @ApiModelProperty(value="创建时间") + private Long gmtCreate; + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public List getHostList() { + return hostList; + } + + public void setHostList(List hostList) { + this.hostList = hostList; + } + + public List getPauseHostList() { + return pauseHostList; + } + + public void setPauseHostList(List pauseHostList) { + this.pauseHostList = pauseHostList; + } + + public List getRollbackHostList() { + return rollbackHostList; + } + + public void setRollbackHostList(List rollbackHostList) { + this.rollbackHostList = rollbackHostList; + } + + public List getRollbackPauseHostList() { + return rollbackPauseHostList; + } + + public void setRollbackPauseHostList(List rollbackPauseHostList) { + this.rollbackPauseHostList = rollbackPauseHostList; + } + + public String getKafkaPackageName() { + return kafkaPackageName; + } + + public void setKafkaPackageName(String kafkaPackageName) { + this.kafkaPackageName = kafkaPackageName; + } + + public String getKafkaPackageMd5() { + return kafkaPackageMd5; + } + + public void setKafkaPackageMd5(String kafkaPackageMd5) { + this.kafkaPackageMd5 = kafkaPackageMd5; + } + + public Long getServerPropertiesFileId() { + return serverPropertiesFileId; + } + + public void setServerPropertiesFileId(Long serverPropertiesFileId) { + this.serverPropertiesFileId = serverPropertiesFileId; + } + + public String getServerPropertiesName() { + return serverPropertiesName; + } + + public void setServerPropertiesName(String serverPropertiesName) { + this.serverPropertiesName = serverPropertiesName; + } + + public String getServerPropertiesMd5() { + return serverPropertiesMd5; + } + + public void setServerPropertiesMd5(String serverPropertiesMd5) { + this.serverPropertiesMd5 = serverPropertiesMd5; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "ClusterTaskMetadataVO{" + + "taskId=" + taskId + + ", clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", hostList=" + hostList + + ", pauseHostList=" + pauseHostList + + ", rollbackHostList=" + rollbackHostList + + ", rollbackPauseHostList=" + rollbackPauseHostList + + ", kafkaPackageName='" + kafkaPackageName + '\'' + + ", kafkaPackageMd5='" + kafkaPackageMd5 + '\'' + + ", serverPropertiesFileId=" + serverPropertiesFileId + + ", serverPropertiesName='" + serverPropertiesName + '\'' + + ", serverPropertiesMd5='" + serverPropertiesMd5 + '\'' + + ", operator='" + operator + '\'' + + ", gmtCreate=" + gmtCreate + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskStatusVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskStatusVO.java new file mode 100644 index 00000000..b780737b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskStatusVO.java @@ -0,0 +1,127 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.task; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/27 + */ +@ApiModel(value="任务状态详情") +public class ClusterTaskStatusVO { + @ApiModelProperty(value="任务ID") + private Long taskId; + + @ApiModelProperty(value="任务状态: 30:运行中(展示暂停), 40:暂停(展示开始), 100:完成(都置灰)") + private Integer status; + + @ApiModelProperty(value="正处于回滚的状态") + private Boolean rollback; + + @ApiModelProperty(value="任务总数") + private Integer sumCount; + + @ApiModelProperty(value="成功总数") + private Integer successCount; + + @ApiModelProperty(value="失败总数") + private Integer failedCount; + + @ApiModelProperty(value="执行中总数") + private Integer runningCount; + + @ApiModelProperty(value="等待总数") + private Integer waitingCount; + + @ApiModelProperty(value="子任务状态") + private List subTaskStatusList; + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Boolean getRollback() { + return rollback; + } + + public void setRollback(Boolean rollback) { + this.rollback = rollback; + } + + public Integer getSumCount() { + return sumCount; + } + + public void setSumCount(Integer sumCount) { + this.sumCount = sumCount; + } + + public Integer getSuccessCount() { + return successCount; + } + + public void setSuccessCount(Integer successCount) { + this.successCount = successCount; + } + + public Integer getFailedCount() { + return failedCount; + } + + public void setFailedCount(Integer failedCount) { + this.failedCount = failedCount; + } + + public Integer getRunningCount() { + return runningCount; + } + + public void setRunningCount(Integer runningCount) { + this.runningCount = runningCount; + } + + public Integer getWaitingCount() { + return waitingCount; + } + + public void setWaitingCount(Integer waitingCount) { + this.waitingCount = waitingCount; + } + + public List getSubTaskStatusList() { + return subTaskStatusList; + } + + public void setSubTaskStatusList(List subTaskStatusList) { + this.subTaskStatusList = subTaskStatusList; + } + + @Override + public String toString() { + return "ClusterTaskStatusVO{" + + "taskId=" + taskId + + ", status=" + status + + ", rollback=" + rollback + + ", sumCount=" + sumCount + + ", successCount=" + successCount + + ", failedCount=" + failedCount + + ", runningCount=" + runningCount + + ", waitingCount=" + waitingCount + + ", subTaskStatusList=" + subTaskStatusList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskSubStatusVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskSubStatusVO.java new file mode 100644 index 00000000..3f6e17d3 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskSubStatusVO.java @@ -0,0 +1,65 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.task; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/27 + */ +@ApiModel(value="子任务状态") +public class ClusterTaskSubStatusVO { + @ApiModelProperty(value="主机名") + private String hostname; + + @ApiModelProperty(value="子任务状态") + private Integer status; + + @ApiModelProperty(value="角色") + private String kafkaRoles; + + @ApiModelProperty(value="分组ID") + private Integer groupId; + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getKafkaRoles() { + return kafkaRoles; + } + + public void setKafkaRoles(String kafkaRoles) { + this.kafkaRoles = kafkaRoles; + } + + public Integer getGroupId() { + return groupId; + } + + public void setGroupId(Integer groupId) { + this.groupId = groupId; + } + + @Override + public String toString() { + return "ClusterTaskSubStatusVO{" + + "hostname='" + hostname + '\'' + + ", status=" + status + + ", kafkaRoles='" + kafkaRoles + '\'' + + ", groupId=" + groupId + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskVO.java new file mode 100644 index 00000000..239de98e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/op/task/ClusterTaskVO.java @@ -0,0 +1,99 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.op.task; + +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/21 + */ +public class ClusterTaskVO { + @ApiModelProperty(value="任务Id") + private Long taskId; + + @ApiModelProperty(value="集群ID") + private Long clusterId; + + @ApiModelProperty(value="集群名称") + private String clusterName; + + @ApiModelProperty(value="任务类型") + private String taskType; + + @ApiModelProperty(value="状态") + private Integer status; + + @ApiModelProperty(value="操作人") + private String operator; + + @ApiModelProperty(value="创建时间") + private Long createTime; + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTaskType() { + return taskType; + } + + public void setTaskType(String taskType) { + this.taskType = taskType; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + return "ClusterTaskVO{" + + "taskId=" + taskId + + ", clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", taskType='" + taskType + '\'' + + ", status=" + status + + ", operator='" + operator + '\'' + + ", createTime=" + createTime + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/ConfigVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/ConfigVO.java new file mode 100644 index 00000000..b4bef9a8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/ConfigVO.java @@ -0,0 +1,89 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/3/19 + */ +@ApiModel(value = "ConfigVO", description = "配置信息") +public class ConfigVO { + @ApiModelProperty(value="集群Id") + private Long id; + + @ApiModelProperty(value="配置键") + private String configKey; + + @ApiModelProperty(value="配置值") + private String configValue; + + @ApiModelProperty(value="描述信息") + private String configDescription; + + @ApiModelProperty(value="创建时间") + private Long gmtCreate; + + @ApiModelProperty(value="修改时间") + private Long gmtModify; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } + + public String getConfigDescription() { + return configDescription; + } + + public void setConfigDescription(String configDescription) { + this.configDescription = configDescription; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Long getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Long gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "ConfigVO{" + + "id=" + id + + ", configKey='" + configKey + '\'' + + ", configValue='" + configValue + '\'' + + ", configDescription='" + configDescription + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/CustomScheduledTaskVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/CustomScheduledTaskVO.java new file mode 100644 index 00000000..2132abc2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/CustomScheduledTaskVO.java @@ -0,0 +1,35 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +/** + * @author zengqiao + * @date 20/8/11 + */ +public class CustomScheduledTaskVO { + private String name; + + private Object cron; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Object getCron() { + return cron; + } + + public void setCron(Object cron) { + this.cron = cron; + } + + @Override + public String toString() { + return "CustomScheduledTaskVO{" + + "name='" + name + '\'' + + ", cron=" + cron + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaControllerVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaControllerVO.java new file mode 100644 index 00000000..1c205fcb --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaControllerVO.java @@ -0,0 +1,65 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author huangyiminghappy@163.com + * @date 2019-03-27 + */ +@ApiModel(value = "KafkaController信息") +public class KafkaControllerVO { + @ApiModelProperty(value = "节点ID") + private Integer brokerId; + + @ApiModelProperty(value = "节点地址") + private String host; + + @ApiModelProperty(value = "ZK消息版本") + private Integer version; + + @ApiModelProperty(value = "变更时间") + private Long timestamp; + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public String toString() { + return "KafkaControllerVO{" + + "brokerId=" + brokerId + + ", host='" + host + '\'' + + ", version=" + version + + ", timestamp=" + timestamp + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaFileVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaFileVO.java new file mode 100644 index 00000000..1ca29b73 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/KafkaFileVO.java @@ -0,0 +1,127 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/29 + */ +@ApiModel(description = "Kafka文件信息") +public class KafkaFileVO { + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "文件名称") + private String fileName; + + @ApiModelProperty(value = "文件类型") + private Integer fileType; + + @ApiModelProperty(value = "存储位置") + private String storageName; + + @ApiModelProperty(value = "文件MD5") + private String fileMd5; + + @ApiModelProperty(value = "操作人") + private String operator; + + @ApiModelProperty(value = "备注") + private String description; + + @ApiModelProperty(value = "修改时间") + private Date gmtModify; + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public Integer getFileType() { + return fileType; + } + + public void setFileType(Integer fileType) { + this.fileType = fileType; + } + + public String getStorageName() { + return storageName; + } + + public void setStorageName(String storageName) { + this.storageName = storageName; + } + + public String getFileMd5() { + return fileMd5; + } + + public void setFileMd5(String fileMd5) { + this.fileMd5 = fileMd5; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "KafkaFileVO{" + + "clusterName='" + clusterName + '\'' + + ", id=" + id + + ", fileName='" + fileName + '\'' + + ", fileType=" + fileType + + ", storageName='" + storageName + '\'' + + ", fileMd5='" + fileMd5 + '\'' + + ", operator='" + operator + '\'' + + ", description='" + description + '\'' + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/OperateRecordVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/OperateRecordVO.java new file mode 100644 index 00000000..576c6f53 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/OperateRecordVO.java @@ -0,0 +1,139 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/09/03 + */ +@ApiModel(description = "操作记录") +public class OperateRecordVO { + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("模块ID") + private Integer moduleId; + + @ApiModelProperty("模块") + private String module; + + @ApiModelProperty("操作ID") + private Integer operateId; + + @ApiModelProperty("操作") + private String operate; + + @ApiModelProperty("资源(app、topic)") + private String resource; + + @ApiModelProperty("操作内容") + private String content; + + @ApiModelProperty("操作人") + private String operator; + + @ApiModelProperty("创建时间") + private Long createTime; + + @ApiModelProperty("修改时间") + private Long modifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getModuleId() { + return moduleId; + } + + public void setModuleId(Integer moduleId) { + this.moduleId = moduleId; + } + + public String getModule() { + return module; + } + + public void setModule(String module) { + this.module = module; + } + + public Integer getOperateId() { + return operateId; + } + + public void setOperateId(Integer operateId) { + this.operateId = operateId; + } + + public String getOperate() { + return operate; + } + + public void setOperate(String operate) { + this.operate = operate; + } + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Long modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "OperateRecordVO{" + + "id=" + id + + ", moduleId=" + moduleId + + ", module='" + module + '\'' + + ", operateId=" + operateId + + ", operate='" + operate + '\'' + + ", resource='" + resource + '\'' + + ", content='" + content + '\'' + + ", operator='" + operator + '\'' + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RdTopicBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RdTopicBasicVO.java new file mode 100644 index 00000000..55682938 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RdTopicBasicVO.java @@ -0,0 +1,115 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Properties; + +/** + * @author zengqiao + * @date 20/6/10 + */ +@ApiModel(description = "Topic基本信息(RD视角)") +public class RdTopicBasicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "集群名称") + private String clusterName; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "保留时间(ms)") + private Long retentionTime; + + @ApiModelProperty(value = "应用ID") + private String appId; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "Topic属性") + private Properties properties; + + @ApiModelProperty(value = "备注") + private String description; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Long getRetentionTime() { + return retentionTime; + } + + public void setRetentionTime(Long retentionTime) { + this.retentionTime = retentionTime; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "RdTopicBasicVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", topicName='" + topicName + '\'' + + ", retentionTime=" + retentionTime + + ", appId='" + appId + '\'' + + ", appName='" + appName + '\'' + + ", properties=" + properties + + ", description='" + description + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/RegionVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RegionVO.java similarity index 53% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/RegionVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RegionVO.java index d57567cb..e51b2738 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/RegionVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/RegionVO.java @@ -1,8 +1,9 @@ -package com.xiaojukeji.kafka.manager.web.vo; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.util.Date; import java.util.List; /** @@ -10,19 +11,16 @@ import java.util.List; * @author zengqiao * @date 19/4/1 */ -@ApiModel(value = "RegionVO", description = "Region信息") +@ApiModel(description = "Region信息") public class RegionVO { @ApiModelProperty(value = "RegionID") - protected Long regionId; + protected Long id; @ApiModelProperty(value = "集群ID") private Long clusterId; - @ApiModelProperty(value = "region名称") - private String regionName; - - @ApiModelProperty(value = "重要级别, 0:普通, 1:重要,2:重要") - private Integer level; + @ApiModelProperty(value = "Region名称") + private String name; @ApiModelProperty(value = "brokerId列表") private List brokerIdList; @@ -30,24 +28,30 @@ public class RegionVO { @ApiModelProperty(value = "描述信息") private String description; - @ApiModelProperty(value = "操作人") - private String operator; - - @ApiModelProperty(value = "状态, -1:废弃 0:正常 1:容量已满") + @ApiModelProperty(value = "状态, 0:正常 1:容量已满") private Integer status; + @ApiModelProperty(value = "容量(B/s)") + private Long capacity; + + @ApiModelProperty(value = "实际流量(B/s)") + private Long realUsed; + + @ApiModelProperty(value = "预估流量(B/s)") + private Long estimateUsed; + @ApiModelProperty(value = "创建时间") - private Long gmtCreate; + private Date gmtCreate; @ApiModelProperty(value = "修改时间") - private Long gmtModify; + private Date gmtModify; - public Long getRegionId() { - return regionId; + public Long getId() { + return id; } - public void setRegionId(Long regionId) { - this.regionId = regionId; + public void setId(Long id) { + this.id = id; } public Long getClusterId() { @@ -58,20 +62,12 @@ public class RegionVO { this.clusterId = clusterId; } - public String getRegionName() { - return regionName; + public String getName() { + return name; } - public void setRegionName(String regionName) { - this.regionName = regionName; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; + public void setName(String name) { + this.name = name; } public List getBrokerIdList() { @@ -90,14 +86,6 @@ public class RegionVO { this.description = description; } - public String getOperator() { - return operator; - } - - public void setOperator(String operator) { - this.operator = operator; - } - public Integer getStatus() { return status; } @@ -106,33 +94,58 @@ public class RegionVO { this.status = status; } - public Long getGmtCreate() { + public Long getCapacity() { + return capacity; + } + + public void setCapacity(Long capacity) { + this.capacity = capacity; + } + + public Long getRealUsed() { + return realUsed; + } + + public void setRealUsed(Long realUsed) { + this.realUsed = realUsed; + } + + public Long getEstimateUsed() { + return estimateUsed; + } + + public void setEstimateUsed(Long estimateUsed) { + this.estimateUsed = estimateUsed; + } + + public Date getGmtCreate() { return gmtCreate; } - public void setGmtCreate(Long gmtCreate) { + public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } - public Long getGmtModify() { + public Date getGmtModify() { return gmtModify; } - public void setGmtModify(Long gmtModify) { + public void setGmtModify(Date gmtModify) { this.gmtModify = gmtModify; } @Override public String toString() { return "RegionVO{" + - "regionId=" + regionId + + "id=" + id + ", clusterId=" + clusterId + - ", regionName='" + regionName + '\'' + - ", level=" + level + + ", name='" + name + '\'' + ", brokerIdList=" + brokerIdList + ", description='" + description + '\'' + - ", operator='" + operator + '\'' + ", status=" + status + + ", capacity=" + capacity + + ", realUsed=" + realUsed + + ", estimateUsed=" + estimateUsed + ", gmtCreate=" + gmtCreate + ", gmtModify=" + gmtModify + '}'; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBrokerVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/TopicBrokerVO.java similarity index 74% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBrokerVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/TopicBrokerVO.java index f2641925..ae7ae9ec 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/topic/TopicBrokerVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/TopicBrokerVO.java @@ -1,6 +1,5 @@ -package com.xiaojukeji.kafka.manager.web.vo.topic; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.List; @@ -10,8 +9,10 @@ import java.util.List; * @author zengqiao * @date 19/4/3 */ -@ApiModel(value = "TopicBroker信息") public class TopicBrokerVO { + @ApiModelProperty(value = "物理集群ID") + private Long clusterId; + @ApiModelProperty(value = "brokerId") private Integer brokerId; @@ -27,6 +28,17 @@ public class TopicBrokerVO { @ApiModelProperty(value = "leader分区的Id") private List leaderPartitionIdList; + @ApiModelProperty(value = "是否存活") + private boolean alive; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + public Integer getBrokerId() { return brokerId; } @@ -67,14 +79,24 @@ public class TopicBrokerVO { this.leaderPartitionIdList = leaderPartitionIdList; } + public boolean isAlive() { + return alive; + } + + public void setAlive(boolean alive) { + this.alive = alive; + } + @Override public String toString() { return "TopicBrokerVO{" + - "brokerId=" + brokerId + + "clusterId=" + clusterId + + ", brokerId=" + brokerId + ", host='" + host + '\'' + ", partitionNum=" + partitionNum + ", partitionIdList=" + partitionIdList + ", leaderPartitionIdList=" + leaderPartitionIdList + + ", alive=" + alive + '}'; } } diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisBrokerVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisBrokerVO.java similarity index 97% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisBrokerVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisBrokerVO.java index 4a0837e0..accc60ba 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisBrokerVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisBrokerVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; import java.util.List; diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisTopicVO.java similarity index 98% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisTopicVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisTopicVO.java index 9cae6d8c..d2a20213 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/AnalysisTopicVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/AnalysisTopicVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; /** * @author zengqiao diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerBasicVO.java similarity index 89% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerBasicVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerBasicVO.java index f993e7b7..6754ece7 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerBasicVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerBasicVO.java @@ -1,16 +1,14 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; - /** * @author huangjw * @date 17/6/1. */ -@ApiModel(value = "BrokerBasicInfoVO", description = "账号信息") -public class BrokerBasicVO implements Serializable { +@ApiModel(description = "Broker基本信息") +public class BrokerBasicVO { @ApiModelProperty(value = "主机名") private String host; @@ -90,7 +88,7 @@ public class BrokerBasicVO implements Serializable { @Override public String toString() { - return "BrokerBasicInfoVO{" + + return "BrokerBasicVO{" + "host='" + host + '\'' + ", port=" + port + ", jmxPort=" + jmxPort + diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerDiskTopicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerDiskTopicVO.java new file mode 100644 index 00000000..d75f9f20 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerDiskTopicVO.java @@ -0,0 +1,115 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/30 + */ +@ApiModel(description = "Broker磁盘信息") +public class BrokerDiskTopicVO { + @ApiModelProperty(value = "集群ID") + private Long clusterId; + + @ApiModelProperty(value = "Topic名称") + private String topicName; + + @ApiModelProperty(value = "BrokerID") + private Integer brokerId; + + @ApiModelProperty(value = "磁盘名") + private String diskName; + + @ApiModelProperty(value = "Leader分区") + private List leaderPartitions; + + @ApiModelProperty(value = "Follow分区") + private List followerPartitions; + + @ApiModelProperty(value = "处于同步状态") + private Boolean underReplicated; + + @ApiModelProperty(value = "未处于同步状态的分区") + private List notUnderReplicatedPartitions; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getDiskName() { + return diskName; + } + + public void setDiskName(String diskName) { + this.diskName = diskName; + } + + public List getLeaderPartitions() { + return leaderPartitions; + } + + public void setLeaderPartitions(List leaderPartitions) { + this.leaderPartitions = leaderPartitions; + } + + public List getFollowerPartitions() { + return followerPartitions; + } + + public void setFollowerPartitions(List followerPartitions) { + this.followerPartitions = followerPartitions; + } + + public Boolean getUnderReplicated() { + return underReplicated; + } + + public void setUnderReplicated(Boolean underReplicated) { + this.underReplicated = underReplicated; + } + + public List getNotUnderReplicatedPartitions() { + return notUnderReplicatedPartitions; + } + + public void setNotUnderReplicatedPartitions(List notUnderReplicatedPartitions) { + this.notUnderReplicatedPartitions = notUnderReplicatedPartitions; + } + + @Override + public String toString() { + return "BrokerDiskTopicVO{" + + "clusterId=" + clusterId + + ", topicName='" + topicName + '\'' + + ", brokerId=" + brokerId + + ", diskName='" + diskName + '\'' + + ", leaderPartitions=" + leaderPartitions + + ", followerPartitions=" + followerPartitions + + ", underReplicated=" + underReplicated + + ", notUnderReplicatedPartitions=" + notUnderReplicatedPartitions + + '}'; + } +} \ No newline at end of file diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetadataVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetadataVO.java similarity index 92% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetadataVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetadataVO.java index f1fddfb4..a9d3950b 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerMetadataVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetadataVO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; /** * @author zengqiao diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetricsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetricsVO.java new file mode 100644 index 00000000..a77992cf --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerMetricsVO.java @@ -0,0 +1,221 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 2019-06-03 + */ +@ApiModel(description = "Broker指标") +public class BrokerMetricsVO { + @ApiModelProperty(value = "健康分[0-100]") + private Integer healthScore; + + @ApiModelProperty(value = "流入流量(B/s)") + private Object bytesInPerSec; + + @ApiModelProperty(value = "流出流量(B/s)") + private Object bytesOutPerSec; + + @ApiModelProperty(value = "被拒绝流量(B/s)") + private Object bytesRejectedPerSec; + + @ApiModelProperty(value = "消息数") + private Object messagesInPerSec; + + @ApiModelProperty(value = "发送请求数") + private Object produceRequestPerSec; + + @ApiModelProperty(value = "消费请求数") + private Object fetchConsumerRequestPerSec; + + @ApiModelProperty(value = "请求处理器空闲百分比") + private Object requestHandlerIdlPercent; + + @ApiModelProperty(value = "网络处理器空闲百分比") + private Object networkProcessorIdlPercent; + + @ApiModelProperty(value = "请求队列大小") + private Integer requestQueueSize; + + @ApiModelProperty(value = "响应队列大小") + private Integer responseQueueSize; + + @ApiModelProperty(value = "刷日志事件") + private Object logFlushTime; + + @ApiModelProperty(value = "每秒消费失败数") + private Object failFetchRequestPerSec; + + @ApiModelProperty(value = "每秒发送失败数") + private Object failProduceRequestPerSec; + + @ApiModelProperty(value = "发送耗时99分位") + private Object totalTimeProduce99Th; + + @ApiModelProperty(value = "消费耗时99分位") + private Object totalTimeFetchConsumer99Th; + + @ApiModelProperty(value = "创建时间") + private Long gmtCreate; + + public Integer getHealthScore() { + return healthScore; + } + + public void setHealthScore(Integer healthScore) { + this.healthScore = healthScore; + } + + public Object getBytesInPerSec() { + return bytesInPerSec; + } + + public void setBytesInPerSec(Object bytesInPerSec) { + this.bytesInPerSec = bytesInPerSec; + } + + public Object getBytesOutPerSec() { + return bytesOutPerSec; + } + + public void setBytesOutPerSec(Object bytesOutPerSec) { + this.bytesOutPerSec = bytesOutPerSec; + } + + public Object getBytesRejectedPerSec() { + return bytesRejectedPerSec; + } + + public void setBytesRejectedPerSec(Object bytesRejectedPerSec) { + this.bytesRejectedPerSec = bytesRejectedPerSec; + } + + public Object getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Object messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + + public Object getProduceRequestPerSec() { + return produceRequestPerSec; + } + + public void setProduceRequestPerSec(Object produceRequestPerSec) { + this.produceRequestPerSec = produceRequestPerSec; + } + + public Object getFetchConsumerRequestPerSec() { + return fetchConsumerRequestPerSec; + } + + public void setFetchConsumerRequestPerSec(Object fetchConsumerRequestPerSec) { + this.fetchConsumerRequestPerSec = fetchConsumerRequestPerSec; + } + + public Object getRequestHandlerIdlPercent() { + return requestHandlerIdlPercent; + } + + public void setRequestHandlerIdlPercent(Object requestHandlerIdlPercent) { + this.requestHandlerIdlPercent = requestHandlerIdlPercent; + } + + public Object getNetworkProcessorIdlPercent() { + return networkProcessorIdlPercent; + } + + public void setNetworkProcessorIdlPercent(Object networkProcessorIdlPercent) { + this.networkProcessorIdlPercent = networkProcessorIdlPercent; + } + + public Integer getRequestQueueSize() { + return requestQueueSize; + } + + public void setRequestQueueSize(Integer requestQueueSize) { + this.requestQueueSize = requestQueueSize; + } + + public Integer getResponseQueueSize() { + return responseQueueSize; + } + + public void setResponseQueueSize(Integer responseQueueSize) { + this.responseQueueSize = responseQueueSize; + } + + public Object getLogFlushTime() { + return logFlushTime; + } + + public void setLogFlushTime(Object logFlushTime) { + this.logFlushTime = logFlushTime; + } + + public Object getFailFetchRequestPerSec() { + return failFetchRequestPerSec; + } + + public void setFailFetchRequestPerSec(Object failFetchRequestPerSec) { + this.failFetchRequestPerSec = failFetchRequestPerSec; + } + + public Object getFailProduceRequestPerSec() { + return failProduceRequestPerSec; + } + + public void setFailProduceRequestPerSec(Object failProduceRequestPerSec) { + this.failProduceRequestPerSec = failProduceRequestPerSec; + } + + public Object getTotalTimeProduce99Th() { + return totalTimeProduce99Th; + } + + public void setTotalTimeProduce99Th(Object totalTimeProduce99Th) { + this.totalTimeProduce99Th = totalTimeProduce99Th; + } + + public Object getTotalTimeFetchConsumer99Th() { + return totalTimeFetchConsumer99Th; + } + + public void setTotalTimeFetchConsumer99Th(Object totalTimeFetchConsumer99Th) { + this.totalTimeFetchConsumer99Th = totalTimeFetchConsumer99Th; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } + + @Override + public String toString() { + return "BrokerMetricsVO{" + + "healthScore=" + healthScore + + ", bytesInPerSec=" + bytesInPerSec + + ", bytesOutPerSec=" + bytesOutPerSec + + ", bytesRejectedPerSec=" + bytesRejectedPerSec + + ", messagesInPerSec=" + messagesInPerSec + + ", produceRequestPerSec=" + produceRequestPerSec + + ", fetchConsumerRequestPerSec=" + fetchConsumerRequestPerSec + + ", requestHandlerIdlPercent=" + requestHandlerIdlPercent + + ", networkProcessorIdlPercent=" + networkProcessorIdlPercent + + ", requestQueueSize=" + requestQueueSize + + ", responseQueueSize=" + responseQueueSize + + ", logFlushTime=" + logFlushTime + + ", failFetchRequestPerSec=" + failFetchRequestPerSec + + ", failProduceRequestPerSec=" + failProduceRequestPerSec + + ", totalTimeProduce99Th=" + totalTimeProduce99Th + + ", totalTimeFetchConsumer99Th=" + totalTimeFetchConsumer99Th + + ", gmtCreate=" + gmtCreate + + '}'; + } +} diff --git a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerPartitionsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerPartitionVO.java similarity index 89% rename from web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerPartitionsVO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerPartitionVO.java index ce4c935c..6a35161e 100644 --- a/web/src/main/java/com/xiaojukeji/kafka/manager/web/vo/broker/BrokerPartitionsVO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/BrokerPartitionVO.java @@ -1,17 +1,16 @@ -package com.xiaojukeji.kafka.manager.web.vo.broker; +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; import java.util.List; /** * @author zengqiao * @date 19/4/22 */ -@ApiModel(value = "BrokerPartitionsVO", description = "Broker分区信息") -public class BrokerPartitionsVO implements Serializable { +@ApiModel(description = "Broker分区信息") +public class BrokerPartitionVO { @ApiModelProperty(value = "Topic名称") private String topicName; @@ -69,7 +68,7 @@ public class BrokerPartitionsVO implements Serializable { @Override public String toString() { - return "BrokerPartitionsVO{" + + return "BrokerPartitionVO{" + "topicName='" + topicName + '\'' + ", leaderPartitionList=" + leaderPartitionList + ", followerPartitionIdList=" + followerPartitionIdList + diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/RdBrokerBasicVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/RdBrokerBasicVO.java new file mode 100644 index 00000000..d09a2785 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/broker/RdBrokerBasicVO.java @@ -0,0 +1,53 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.broker; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai + * @date 2020/6/11 + */ +@ApiModel(description = "Broker基本信息") +public class RdBrokerBasicVO { + @ApiModelProperty(value = "brokerId") + private Integer brokerId; + + @ApiModelProperty(value = "主机名") + private String host; + + @ApiModelProperty(value = "逻辑集群") + private Long logicClusterId; + + public Integer getBrokerId() { + return brokerId; + } + + public void setBrokerId(Integer brokerId) { + this.brokerId = brokerId; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Long getLogicClusterId() { + return logicClusterId; + } + + public void setLogicClusterId(Long logicClusterId) { + this.logicClusterId = logicClusterId; + } + + @Override + public String toString() { + return "RdBrokerBasicVO{" + + "brokerId=" + brokerId + + ", host='" + host + '\'' + + ", logicClusterId=" + logicClusterId + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBaseVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBaseVO.java new file mode 100644 index 00000000..ca2b7350 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBaseVO.java @@ -0,0 +1,151 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * @author zengqiao + * @date 20/4/16 + */ +@ApiModel(description="集群信息") +public class ClusterBaseVO { + @ApiModelProperty(value="集群Id") + private Long clusterId; + + @ApiModelProperty(value="集群名称") + private String clusterName; + + @ApiModelProperty(value="ZK地址") + private String zookeeper; + + @ApiModelProperty(value="bootstrap地址") + private String bootstrapServers; + + @ApiModelProperty(value="kafka版本") + private String kafkaVersion; + + @ApiModelProperty(value="数据中心") + private String idc; + + @ApiModelProperty(value="集群类型") + private Integer mode; + + @ApiModelProperty(value="安全配置参数") + private String securityProperties; + + @ApiModelProperty(value="1:监控中, 0:暂停监控") + private Integer status; + + @ApiModelProperty(value="接入时间") + private Date gmtCreate; + + @ApiModelProperty(value="修改时间") + private Date gmtModify; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getZookeeper() { + return zookeeper; + } + + public void setZookeeper(String zookeeper) { + this.zookeeper = zookeeper; + } + + public String getBootstrapServers() { + return bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public String getKafkaVersion() { + return kafkaVersion; + } + + public void setKafkaVersion(String kafkaVersion) { + this.kafkaVersion = kafkaVersion; + } + + public String getIdc() { + return idc; + } + + public void setIdc(String idc) { + this.idc = idc; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getSecurityProperties() { + return securityProperties; + } + + public void setSecurityProperties(String securityProperties) { + this.securityProperties = securityProperties; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "ClusterBaseVO{" + + "clusterId=" + clusterId + + ", clusterName='" + clusterName + '\'' + + ", zookeeper='" + zookeeper + '\'' + + ", bootstrapServers='" + bootstrapServers + '\'' + + ", kafkaVersion='" + kafkaVersion + '\'' + + ", idc='" + idc + '\'' + + ", mode='" + mode + '\'' + + ", securityProperties='" + securityProperties + '\'' + + ", status=" + status + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBrokerStatusVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBrokerStatusVO.java new file mode 100644 index 00000000..a98ab766 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterBrokerStatusVO.java @@ -0,0 +1,43 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/5/11 + */ +@ApiModel(description="集群Broker状态") +public class ClusterBrokerStatusVO { + @ApiModelProperty(value = "Broker副本同步状态: 总数, 已同步数, 未同步数") + private List brokerReplicaStatusList; + + @ApiModelProperty(value = "Broker峰值状态: 总数, 60-%, 60-80%, 80-100%, 100+%, 异常") + private List brokerBytesInStatusList; + + public List getBrokerReplicaStatusList() { + return brokerReplicaStatusList; + } + + public void setBrokerReplicaStatusList(List brokerReplicaStatusList) { + this.brokerReplicaStatusList = brokerReplicaStatusList; + } + + public List getBrokerBytesInStatusList() { + return brokerBytesInStatusList; + } + + public void setBrokerBytesInStatusList(List brokerBytesInStatusList) { + this.brokerBytesInStatusList = brokerBytesInStatusList; + } + + @Override + public String toString() { + return "ClusterBrokerStatusVO{" + + "brokerReplicaStatusList=" + brokerReplicaStatusList + + ", brokerBytesInStatusList=" + brokerBytesInStatusList + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterDetailVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterDetailVO.java new file mode 100644 index 00000000..cdeb7da7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/ClusterDetailVO.java @@ -0,0 +1,77 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zengqiao + * @date 20/4/23 + */ +@ApiModel(description="集群信息") +public class ClusterDetailVO extends ClusterBaseVO { + @ApiModelProperty(value="Broker数") + private Integer brokerNum; + + @ApiModelProperty(value="Topic数") + private Integer topicNum; + + @ApiModelProperty(value="ConsumerGroup数") + private Integer consumerGroupNum; + + @ApiModelProperty(value="ControllerID") + private Integer controllerId; + + @ApiModelProperty(value="Region数") + private Integer regionNum; + + public Integer getBrokerNum() { + return brokerNum; + } + + public void setBrokerNum(Integer brokerNum) { + this.brokerNum = brokerNum; + } + + public Integer getTopicNum() { + return topicNum; + } + + public void setTopicNum(Integer topicNum) { + this.topicNum = topicNum; + } + + public Integer getConsumerGroupNum() { + return consumerGroupNum; + } + + public void setConsumerGroupNum(Integer consumerGroupNum) { + this.consumerGroupNum = consumerGroupNum; + } + + public Integer getControllerId() { + return controllerId; + } + + public void setControllerId(Integer controllerId) { + this.controllerId = controllerId; + } + + public Integer getRegionNum() { + return regionNum; + } + + public void setRegionNum(Integer regionNum) { + this.regionNum = regionNum; + } + + @Override + public String toString() { + return "ClusterDetailVO{" + + "brokerNum=" + brokerNum + + ", topicNum=" + topicNum + + ", consumerGroupNum=" + consumerGroupNum + + ", controllerId=" + controllerId + + ", regionNum=" + regionNum + + "} " + super.toString(); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/LogicalClusterVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/LogicalClusterVO.java new file mode 100644 index 00000000..86ced10f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/LogicalClusterVO.java @@ -0,0 +1,128 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; +import java.util.List; + +/** + * @author zengqiao + * @date 20/6/29 + */ +@ApiModel(description = "逻辑集群") +public class LogicalClusterVO { + @ApiModelProperty(value = "逻辑集群ID") + protected Long logicalClusterId; + + @ApiModelProperty(value = "逻辑集群名称") + private String logicalClusterName; + + @ApiModelProperty(value = "物理集群ID") + private Long physicalClusterId; + + @ApiModelProperty(value = "brokerId列表") + private List regionIdList; + + @ApiModelProperty(value = "逻辑集群类型") + private Integer mode; + + @ApiModelProperty(value = "所属应用") + private String appId; + + @ApiModelProperty(value = "描述信息") + private String description; + + @ApiModelProperty(value = "创建时间") + private Date gmtCreate; + + @ApiModelProperty(value = "修改时间") + private Date gmtModify; + + public Long getLogicalClusterId() { + return logicalClusterId; + } + + public void setLogicalClusterId(Long logicalClusterId) { + this.logicalClusterId = logicalClusterId; + } + + public String getLogicalClusterName() { + return logicalClusterName; + } + + public void setLogicalClusterName(String logicalClusterName) { + this.logicalClusterName = logicalClusterName; + } + + public Long getPhysicalClusterId() { + return physicalClusterId; + } + + public void setPhysicalClusterId(Long physicalClusterId) { + this.physicalClusterId = physicalClusterId; + } + + public List getRegionIdList() { + return regionIdList; + } + + public void setRegionIdList(List regionIdList) { + this.regionIdList = regionIdList; + } + + public Integer getMode() { + return mode; + } + + public void setMode(Integer mode) { + this.mode = mode; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtModify() { + return gmtModify; + } + + public void setGmtModify(Date gmtModify) { + this.gmtModify = gmtModify; + } + + @Override + public String toString() { + return "LogicalClusterVO{" + + "logicalClusterId=" + logicalClusterId + + ", logicalClusterName='" + logicalClusterName + '\'' + + ", physicalClusterId=" + physicalClusterId + + ", regionIdList=" + regionIdList + + ", mode=" + mode + + ", appId='" + appId + '\'' + + ", description='" + description + '\'' + + ", gmtCreate=" + gmtCreate + + ", gmtModify=" + gmtModify + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/RdClusterMetricsVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/RdClusterMetricsVO.java new file mode 100644 index 00000000..df15b96b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/rd/cluster/RdClusterMetricsVO.java @@ -0,0 +1,111 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.rd.cluster; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * ClusterMetricsVO + * @author zengqiao + * @date 19/4/3 + */ +@ApiModel(description="集群流量信息") +public class RdClusterMetricsVO { + @ApiModelProperty(value="集群Id") + private Long clusterId; + + @ApiModelProperty(value="Topic数量") + private Object topicNum; + + @ApiModelProperty(value="Partition数量") + private Object partitionNum; + + @ApiModelProperty(value="Broker数量") + private Object brokerNum; + + @ApiModelProperty(value="每秒流入的字节数") + private Object bytesInPerSec; + + @ApiModelProperty(value="每秒流出的字节数") + private Object bytesOutPerSec; + + @ApiModelProperty(value="每秒拒绝的字节数") + private Object bytesRejectedPerSec; + + @ApiModelProperty(value="每秒流入的消息数") + private Object messagesInPerSec; + + @ApiModelProperty(value="创建时间") + private Long gmtCreate; + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public Object getTopicNum() { + return topicNum; + } + + public void setTopicNum(Object topicNum) { + this.topicNum = topicNum; + } + + public Object getPartitionNum() { + return partitionNum; + } + + public void setPartitionNum(Object partitionNum) { + this.partitionNum = partitionNum; + } + + public Object getBrokerNum() { + return brokerNum; + } + + public void setBrokerNum(Object brokerNum) { + this.brokerNum = brokerNum; + } + + public Object getBytesInPerSec() { + return bytesInPerSec; + } + + public void setBytesInPerSec(Object bytesInPerSec) { + this.bytesInPerSec = bytesInPerSec; + } + + public Object getBytesOutPerSec() { + return bytesOutPerSec; + } + + public void setBytesOutPerSec(Object bytesOutPerSec) { + this.bytesOutPerSec = bytesOutPerSec; + } + + public Object getBytesRejectedPerSec() { + return bytesRejectedPerSec; + } + + public void setBytesRejectedPerSec(Object bytesRejectedPerSec) { + this.bytesRejectedPerSec = bytesRejectedPerSec; + } + + public Object getMessagesInPerSec() { + return messagesInPerSec; + } + + public void setMessagesInPerSec(Object messagesInPerSec) { + this.messagesInPerSec = messagesInPerSec; + } + + public Long getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/thirdpart/AppBasicInfoVO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/thirdpart/AppBasicInfoVO.java new file mode 100644 index 00000000..dd43df2e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/vo/thirdpart/AppBasicInfoVO.java @@ -0,0 +1,90 @@ +package com.xiaojukeji.kafka.manager.common.entity.vo.thirdpart; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @author zhongyuankai + * @date 2020/6/18 + */ +@Deprecated +@ApiModel(description="AppID基本信息") +public class AppBasicInfoVO { + @ApiModelProperty(value="appId") + private String appId; + + @ApiModelProperty(value="app密码") + private String password; + + @ApiModelProperty(value="app名称") + private String name; + + @ApiModelProperty(value="申请人") + private String applicant; + + @ApiModelProperty(value="appId负责人") + private String principal; + + @ApiModelProperty(value="描述信息") + private String description; + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getApplicant() { + return applicant; + } + + public void setApplicant(String applicant) { + this.applicant = applicant; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "AppBasicInfoVO{" + + "appId='" + appId + '\'' + + ", password='" + password + '\'' + + ", name='" + name + '\'' + + ", applicant='" + applicant + '\'' + + ", principal='" + principal + '\'' + + ", description='" + description + '\'' + + '}'; + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/ConsumerMetricsCollectedEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/ConsumerMetricsCollectedEvent.java new file mode 100644 index 00000000..9aa45d8f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/ConsumerMetricsCollectedEvent.java @@ -0,0 +1,23 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.metrics.ConsumerMetrics; +import org.springframework.context.ApplicationEvent; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/8/31 + */ +public class ConsumerMetricsCollectedEvent extends ApplicationEvent { + private List metricsList; + + public ConsumerMetricsCollectedEvent(Object source, List metricsList) { + super(source); + this.metricsList = metricsList; + } + + public List getMetricsList() { + return metricsList; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderApplyEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderApplyEvent.java new file mode 100644 index 00000000..a71fa88f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderApplyEvent.java @@ -0,0 +1,13 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.pojo.OrderDO; + +/** + * @author zengqiao + * @date 20/09/03 + */ +public class OrderApplyEvent extends OrderEvent { + public OrderApplyEvent(Object source, OrderDO orderDO, String idc) { + super(source, orderDO, idc); + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderEvent.java new file mode 100644 index 00000000..ef3311ee --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderEvent.java @@ -0,0 +1,28 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.pojo.OrderDO; +import org.springframework.context.ApplicationEvent; + +/** + * @author zengqiao + * @date 20/8/27 + */ +public abstract class OrderEvent extends ApplicationEvent { + private OrderDO orderDO; + + private String idc; + + public OrderEvent(Object source, OrderDO orderDO, String idc) { + super(source); + this.orderDO = orderDO; + this.idc = idc; + } + + public OrderDO getOrderDO() { + return orderDO; + } + + public String getIdc() { + return idc; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderPassedEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderPassedEvent.java new file mode 100644 index 00000000..21af0821 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderPassedEvent.java @@ -0,0 +1,16 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.ao.account.Account; +import com.xiaojukeji.kafka.manager.common.entity.pojo.OrderDO; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/09/03 + */ +public class OrderPassedEvent extends OrderEvent { + public OrderPassedEvent(Object source, OrderDO orderDO, String idc, List accountList) { + super(source, orderDO, idc); + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderRefusedEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderRefusedEvent.java new file mode 100644 index 00000000..4066915f --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/OrderRefusedEvent.java @@ -0,0 +1,16 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.ao.account.Account; +import com.xiaojukeji.kafka.manager.common.entity.pojo.OrderDO; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/09/03 + */ +public class OrderRefusedEvent extends OrderEvent { + public OrderRefusedEvent(Object source, OrderDO orderDO, String idc, List accountList) { + super(source, orderDO, idc); + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/TopicMetricsCollectedEvent.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/TopicMetricsCollectedEvent.java new file mode 100644 index 00000000..4ed78ee5 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/events/TopicMetricsCollectedEvent.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.events; + +import com.xiaojukeji.kafka.manager.common.entity.metrics.TopicMetrics; +import org.springframework.context.ApplicationEvent; + +import java.util.List; + +/** + * @author zengqiao + * @date 20/8/31 + */ +public class TopicMetricsCollectedEvent extends ApplicationEvent { + private Long clusterId; + + private List metricsList; + + public TopicMetricsCollectedEvent(Object source, Long clusterId, List metricsList) { + super(source); + this.clusterId = clusterId; + this.metricsList = metricsList; + } + + public List getMetricsList() { + return metricsList; + } + + public Long getClusterId() { + return clusterId; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/ConfigException.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/ConfigException.java similarity index 100% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/ConfigException.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/ConfigException.java diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/CopyException.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/CopyException.java similarity index 100% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/CopyException.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/exception/CopyException.java diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java similarity index 99% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java index 946b6272..bef175e4 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/CopyUtils.java @@ -18,7 +18,7 @@ import java.util.concurrent.ConcurrentHashMap; public class CopyUtils { @SuppressWarnings({"unchecked", "rawtypes"}) - public static T deepCopy(T obj) { + private static T deepCopy(T obj) { if (obj == null) { return null; } else if (obj instanceof String) { diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java new file mode 100644 index 00000000..d4fa72a4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DateUtils.java @@ -0,0 +1,91 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * 日期工具 + * @author huangyiminghappy@163.com + * @date 2019-03-20 + */ +public class DateUtils { + public static Date long2Date(Long time){ + return new Date(time); + } + + /** + * 获取nDay的起始时间 + */ + public static Long getDayStarTime(int nDay) { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, nDay); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime().getTime(); + } + + /** + * 任意日期所在月的第一天的起始时间 + * @param date 任意日期 + * @author zengqiao + * @date 19/10/30 + * @return java.util.Date + */ + public static Date getMonthStartTime(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set( + calendar.get(Calendar.YEAR), + calendar.get(Calendar.MONTH), + calendar.get(Calendar.DAY_OF_MONTH), + 0, + 0, + 0 + ); + calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); + return calendar.getTime(); + } + + /** + * 任意日期所在月的最后一天的最后时间 + * @param date 任意日期 + * @author zengqiao + * @date 19/10/30 + * @return java.util.Date + */ + public static Date getMonthEndTime(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set( + calendar.get(Calendar.YEAR), + calendar.get(Calendar.MONTH) + 1, + calendar.get(Calendar.DAY_OF_MONTH), + 0, + 0, + 0 + ); + calendar.set(Calendar.MILLISECOND, calendar.getActualMinimum(Calendar.MILLISECOND)); + calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); + calendar.add(Calendar.MILLISECOND, -1); + return calendar.getTime(); + } + + public static String getFormattedDate(Date date) { + return new SimpleDateFormat("yyyy-MM-dd").format(date.getTime()); + } + + public static String getFormattedDate(Date date, String format) { + return new SimpleDateFormat(format).format(date.getTime()); + } + + public static String getFormattedDate(Long timestamp) { + return new SimpleDateFormat("yyyy-MM-dd").format(timestamp); + } + + public static Integer compare(Date t1, Date t2){ + return Long.compare(t1.getTime(), t2.getTime()); + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EasyApiLimitUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EasyApiLimitUtils.java new file mode 100644 index 00000000..8589c95a --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EasyApiLimitUtils.java @@ -0,0 +1,69 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicLong; + +/** + * 宽松API请求限制工具 + * @author zengqiao + * @date 20/7/23 + */ +public class EasyApiLimitUtils { + private static final Long MAX_LIMIT_NUM = 10000L; + + private static final Long DEFAULT_DURATION_TIME = 24 * 60 * 60 * 1000L; + + private static final Map API_RECORD_MAP = new ConcurrentHashMap<>(); + + public static boolean incIfNotOverFlow(String key, long maxNum) { + AtomicLong atomicLong = API_RECORD_MAP.get(key); + if (atomicLong == null) { + API_RECORD_MAP.putIfAbsent(key, new AtomicLong(System.currentTimeMillis() * MAX_LIMIT_NUM)); + } + + while (true) { + atomicLong = API_RECORD_MAP.get(key); + + long value = atomicLong.longValue(); + long timestamp = value / MAX_LIMIT_NUM; + long presentNum = value % MAX_LIMIT_NUM; + if (System.currentTimeMillis() - timestamp < DEFAULT_DURATION_TIME && presentNum > maxNum) { + // 以及超过限制了 + return false; + } + + long newValue = System.currentTimeMillis() * MAX_LIMIT_NUM + 1; + if (System.currentTimeMillis() - timestamp < DEFAULT_DURATION_TIME && presentNum <= maxNum) { + newValue = timestamp * MAX_LIMIT_NUM + presentNum + 1; + } + + if (atomicLong.compareAndSet(value, newValue)) { + return true; + } + } + } + + public static void decIfNotOverFlow(String key) { + AtomicLong atomicLong = API_RECORD_MAP.get(key); + if (atomicLong == null) { + API_RECORD_MAP.putIfAbsent(key, new AtomicLong(System.currentTimeMillis() * MAX_LIMIT_NUM)); + } + + while (true) { + atomicLong = API_RECORD_MAP.get(key); + + long value = atomicLong.longValue(); + long timestamp = value / MAX_LIMIT_NUM; + long presentNum = value % MAX_LIMIT_NUM; + if (presentNum == 0) { + return; + } + + long newValue = timestamp * MAX_LIMIT_NUM + presentNum - 1; + if (atomicLong.compareAndSet(value, newValue)) { + return; + } + } + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java similarity index 91% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java index adfe6f37..1052eb12 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/EncryptUtil.java @@ -12,8 +12,11 @@ public class EncryptUtil { }; public static String md5(String key) { + return md5(key.getBytes()); + } + + public static String md5(byte[] btInput) { try { - byte[] btInput = key.getBytes(); MessageDigest mdInst = MessageDigest.getInstance("MD5"); // 使用指定的字节更新摘要 diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java new file mode 100644 index 00000000..c15a25b4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java @@ -0,0 +1,242 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import org.apache.http.HttpEntity; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.Charset; +import java.util.Map; + + +/** + * @author zengqiao + * @date 20/5/24 + */ +public class HttpUtils { + private static final Logger LOGGER = LoggerFactory.getLogger(HttpUtils.class); + + // 连接超时时间, 单位: ms + private static int CONNECT_TIME_OUT = 15000; + + // 读取超时时间, 单位: ms + private static int READ_TIME_OUT = 2000; + + private static final String METHOD_GET = "GET"; + private static final String METHOD_POST = "POST"; + private static final String METHOD_PUT = "PUT"; + + private static final String CHARSET_UTF8 = "UTF-8"; + + private static final String FILE_PARAM = "filecontent"; + + private static final HttpClient HTTP_CLIENT = HttpClients.createDefault(); + + public static String get(String url, Map params) { + return sendRequest(url, METHOD_GET, params, null, null); + } + + public static String get(String url, Map params, Map headers) { + return sendRequest(url, METHOD_GET, params, headers, null); + } + + public static String postForString(String url, String content, Map headers) { + InputStream in = null; + try { + if (content != null && !content.isEmpty()) { + in = new ByteArrayInputStream(content.getBytes(CHARSET_UTF8)); + } + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + return sendRequest(url, METHOD_POST, null, headers, in); + } + + public static String uploadFile(String url, + MultipartFile multipartFile, + Map bodies, + Map headers) { + HttpPost post = new HttpPost(url); + String response = ""; + try { + + if (!ValidateUtils.isEmptyMap(headers)) { + for (Map.Entry e : headers.entrySet()) { + post.addHeader(e.getKey(), e.getValue()); + } + } + + MultipartEntityBuilder builder = MultipartEntityBuilder.create(); + builder.setCharset(Charset.forName(CHARSET_UTF8)); + + //加上此行代码解决返回中文乱码问题 + builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); + + // 文件流 + builder.addBinaryBody( + FILE_PARAM, + multipartFile.getInputStream(), + ContentType.MULTIPART_FORM_DATA, + multipartFile.getOriginalFilename() + ); + + if (!ValidateUtils.isNull(bodies)) { + for (Map.Entry e : bodies.entrySet()) { + builder.addTextBody(e.getKey(), e.getValue()); + } + } + HttpEntity postEntity = builder.build(); + post.setEntity(postEntity); + HttpEntity entity = HTTP_CLIENT.execute(post).getEntity(); + response = EntityUtils.toString(entity, CHARSET_UTF8); + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + post.releaseConnection(); + } + return response; + } + + public static String putForString(String url, String content, Map headers) { + InputStream in = null; + try { + if (content != null && !content.isEmpty()) { + in = new ByteArrayInputStream(content.getBytes(CHARSET_UTF8)); + } + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + return sendRequest(url, METHOD_PUT, null, headers, in); + } + + /** + * @param url 请求的链接, 只支持 http 和 https 链接 + * @param method GET or POST + * @param headers 请求头 (将覆盖默认请求), 可以为 null + * @param bodyStream 请求内容, 流将自动关闭, 可以为 null + * @return 返回响应内容的文本 + * @throws Exception http 响应 code 非 200, 或发生其他异常均抛出异常 + */ + private static String sendRequest(String url, + String method, + Map params, + Map headers, + InputStream bodyStream) { + HttpURLConnection conn = null; + try { + String paramUrl = setUrlParams(url, params); + + // 打开链接 + URL urlObj = new URL(paramUrl); + conn = (HttpURLConnection) urlObj.openConnection(); + + // 设置conn属性 + setConnProperties(conn, method, headers); + + // 设置请求内容 + if (bodyStream != null) { + conn.setDoOutput(true); + copyStreamAndClose(bodyStream, conn.getOutputStream()); + } + + return handleResponseBodyToString(conn.getInputStream()); + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + closeConnection(conn); + } + } + + private static String setUrlParams(String url, Map params) { + if (url == null || params == null || params.isEmpty()) { + return url; + } + + StringBuilder sb = new StringBuilder(url).append('?'); + for (Map.Entry entry : params.entrySet()) { + sb.append(entry.getKey()).append('=').append(entry.getValue()).append('&'); + } + return sb.deleteCharAt(sb.length() - 1).toString(); + } + + private static void setConnProperties(HttpURLConnection conn, + String method, + Map headers) throws Exception { + // 设置连接超时时间 + conn.setConnectTimeout(CONNECT_TIME_OUT); + + // 设置读取超时时间 + conn.setReadTimeout(READ_TIME_OUT); + + // 设置请求方法 + if (method != null && !method.isEmpty()) { + conn.setRequestMethod(method); + } + + // 添加请求头 + conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); + if (headers == null || headers.isEmpty()) { + return; + } + for (Map.Entry entry : headers.entrySet()) { + conn.setRequestProperty(entry.getKey(), entry.getValue()); + } + } + + private static String handleResponseBodyToString(InputStream in) throws Exception { + ByteArrayOutputStream bytesOut = null; + try { + bytesOut = new ByteArrayOutputStream(); + copyStreamAndClose(in, bytesOut); + return new String(bytesOut.toByteArray(), CHARSET_UTF8); + } finally { + closeStream(bytesOut); + } + } + + private static void copyStreamAndClose(InputStream in, OutputStream out) { + try { + byte[] buf = new byte[1024]; + int len = -1; + while ((len = in.read(buf)) != -1) { + out.write(buf, 0, len); + } + out.flush(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + closeStream(in); + closeStream(out); + } + } + + private static void closeConnection(HttpURLConnection conn) { + if (conn != null) { + try { + conn.disconnect(); + } catch (Exception e) { + LOGGER.error("close connection failed", e); + } + } + } + + private static void closeStream(Closeable stream) { + if (stream != null) { + try { + stream.close(); + } catch (Exception e) { + LOGGER.error("close stream failed", e); + } + } + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/JsonUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/JsonUtils.java new file mode 100644 index 00000000..5daaece0 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/JsonUtils.java @@ -0,0 +1,51 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +/** + * @author zengqiao + * @date 20/4/23 + */ +public class JsonUtils { + private static final String ENUM_METHOD_VALUES = "values"; + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + public static Object toJson(Class clazz) { + try { + Method method = clazz.getMethod(ENUM_METHOD_VALUES); + Object invoke = method.invoke(null); + + int length = java.lang.reflect.Array.getLength(invoke); + List values = new ArrayList(); + for (int i = 0; i < length; i++) { + values.add(java.lang.reflect.Array.get(invoke, i)); + } + SerializeConfig config = new SerializeConfig(); + config.configEnumAsJavaBean(clazz); + return JSON.parseArray(JSON.toJSONString(values, config)); + } catch (Exception e) { + } + return ""; + } + + public static Object toJson(Enum obj) { + try { + SerializeConfig config = new SerializeConfig(); + config.configEnumAsJavaBean(obj.getClass()); + return JSON.parseObject(JSON.toJSONString(obj, config)); + } catch (Exception e) { + } + return ""; + } + + public static String toJSONString(Object obj) { + return JSON.toJSONString(obj); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/ListUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ListUtils.java similarity index 82% rename from service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/ListUtils.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ListUtils.java index 3215b3c5..f7ab020f 100644 --- a/service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/ListUtils.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ListUtils.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.service.utils; +package com.xiaojukeji.kafka.manager.common.utils; import org.springframework.util.StringUtils; @@ -21,11 +21,25 @@ public class ListUtils { if (!StringUtils.hasText(elem)) { continue; } - intList.add(Integer.parseInt(elem)); + intList.add(Integer.valueOf(elem)); } return intList; } + public static List string2LongList(String str) { + if (!StringUtils.hasText(str)) { + return new ArrayList<>(); + } + List longList = new ArrayList<>(); + for (String elem :str.split(REGEX)) { + if (!StringUtils.hasText(elem)) { + continue; + } + longList.add(Long.valueOf(elem)); + } + return longList; + } + public static List string2StrList(String str) { if (!StringUtils.hasText(str)) { return new ArrayList<>(); diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NetUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NetUtils.java new file mode 100644 index 00000000..696c5cb8 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NetUtils.java @@ -0,0 +1,69 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.util.Enumeration; + +/** + * @author zengqiao + * @date 20/6/8 + */ +public class NetUtils { + private static String ipCache = null; + private static String hostnameCache = null; + + public static String localIp() { + if (!ValidateUtils.isBlank(ipCache)) { + return ipCache; + } + + InetAddress inetAddress = getInetAddress(); + hostnameCache = inetAddress.getHostName(); + ipCache = inetAddress.getHostAddress(); + return ipCache; + } + + public static String localHostname() { + if (!ValidateUtils.isNull(hostnameCache)) { + return hostnameCache; + } + localIp(); + return hostnameCache; + } + + public static Boolean hostnameLegal(String hostname) { + if (ValidateUtils.isExistBlank(hostname)) { + return false; + } + + hostname = hostname.trim(); + try { + InetAddress.getByName(hostname); + } catch (Exception e) { + return false; + } + return true; + } + + private static InetAddress getInetAddress() { + try { + Enumeration allNetInterfaces = NetworkInterface.getNetworkInterfaces(); + while (allNetInterfaces.hasMoreElements()) { + NetworkInterface netInterface = allNetInterfaces.nextElement(); + Enumeration addresses = netInterface.getInetAddresses(); + while (addresses.hasMoreElements()) { + InetAddress ip = addresses.nextElement(); + if (ip != null + && ip instanceof Inet4Address + && !ip.isLoopbackAddress() //loopback地址即本机地址,IPv4的loopback范围是127.0.0.0 ~ 127.255.255.255 + && ip.getHostAddress().indexOf(":") == -1) { + return ip; + } + } + } + } catch (Exception e) { + } + return null; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NumberUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NumberUtils.java new file mode 100644 index 00000000..56e71148 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/NumberUtils.java @@ -0,0 +1,30 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +/** + * @author zhongyuankai + * @date 2020/6/8 + */ +public class NumberUtils { + + public static Long string2Long(String s) { + if (ValidateUtils.isNull(s)) { + return null; + } + try { + return Long.parseLong(s); + } catch (Exception e) { + } + return null; + } + + public static Integer string2Integer(String s) { + if (ValidateUtils.isNull(s)) { + return null; + } + try { + return Integer.parseInt(s); + } catch (Exception e) { + } + return null; + } +} diff --git a/service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/SpringContextHolder.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/SpringTool.java similarity index 52% rename from service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/SpringContextHolder.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/SpringTool.java index bb597322..de0783d2 100644 --- a/service/src/main/java/com/xiaojukeji/kafka/manager/service/utils/SpringContextHolder.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/SpringTool.java @@ -1,34 +1,40 @@ -package com.xiaojukeji.kafka.manager.service.utils; +package com.xiaojukeji.kafka.manager.common.utils; +import com.xiaojukeji.kafka.manager.common.constant.Constant; +import com.xiaojukeji.kafka.manager.common.constant.LoginConstant; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.DisposableBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import org.springframework.context.ApplicationEvent; import org.springframework.context.annotation.Lazy; +import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; +import java.util.Map; /** - * 以静态变量保存Spring ApplicationContext, 可在任何代码任何地方任何时候取出ApplicationContext * @author huangyiminghappy@163.com * @date 2019-05-08 */ @Service @Lazy(false) -public class SpringContextHolder implements ApplicationContextAware, DisposableBean { +@Order(value = 1) +public class SpringTool implements ApplicationContextAware, DisposableBean { private static ApplicationContext applicationContext = null; - private static Logger logger = LoggerFactory.getLogger(SpringContextHolder.class); + + private static Logger logger = LoggerFactory.getLogger(SpringTool.class); /** * 去的存储在静态变量中的ApplicationContext */ - public static ApplicationContext getApplicationContext() { + private static ApplicationContext getApplicationContext() { return applicationContext; } @@ -39,13 +45,21 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB return (T) applicationContext.getBean(name); } - /** - * 从静态变量applicationContext中去的Bean,自动转型为所复制对象的类型 - */ - public static T getBean(Class requiredType) { - return (T) applicationContext.getBean(requiredType); + public static T getBean(String name, Class clazz) { + return applicationContext.getBean(name, clazz); } + public static Map getBeansOfType(Class type) throws BeansException { + return getApplicationContext().getBeansOfType(type); + } + +// /** +// * 从静态变量applicationContext中去的Bean,自动转型为所复制对象的类型 +// */ +// public static T getBean(Class requiredType) { +// return (T) applicationContext.getBean(requiredType); +// } + /** * 清除SpringContextHolder中的ApplicationContext为Null */ @@ -60,8 +74,8 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB * 实现ApplicationContextAware接口,注入Context到静态变量 */ @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - SpringContextHolder.applicationContext = applicationContext; + public void setApplicationContext(ApplicationContext context) throws BeansException { + SpringTool.applicationContext = context; } /** @@ -69,12 +83,24 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB */ @Override public void destroy() throws Exception { - SpringContextHolder.clearHolder(); + SpringTool.clearHolder(); } public static String getUserName(){ - HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + HttpServletRequest request = + ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); HttpSession session = request.getSession(); - return (String) session.getAttribute("username"); + String username = (String) session.getAttribute(LoginConstant.SESSION_USERNAME_KEY); + if (ValidateUtils.isNull(username)) { + return Constant.DEFAULT_USER_NAME; + } + return username; + } + + /** + * 发布一个事件 + */ + public static void publish(ApplicationEvent event) { + getApplicationContext().publishEvent(event); } } diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/UUIDUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/UUIDUtils.java new file mode 100644 index 00000000..5dd61199 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/UUIDUtils.java @@ -0,0 +1,13 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import java.util.UUID; + +/** + * @author zengqiao + * @date 20/9/8 + */ +public class UUIDUtils { + public static String uuid() { + return UUID.randomUUID().toString().replaceAll("-", "_"); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ValidateUtils.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ValidateUtils.java new file mode 100644 index 00000000..9b202ec6 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/ValidateUtils.java @@ -0,0 +1,105 @@ +package com.xiaojukeji.kafka.manager.common.utils; + +import com.xiaojukeji.kafka.manager.common.bizenum.IDCEnum; +import com.xiaojukeji.kafka.manager.common.constant.TopicCreationConstant; +import org.apache.commons.lang.StringUtils; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * @author zengqiao + * @date 20/4/16 + */ +public class ValidateUtils { + /** + * 为空 + */ + public static boolean isNull(Object object) { + return object == null; + } + + /** + * 是空字符串或者空 + */ + public static boolean isBlank(String str) { + return StringUtils.isBlank(str); + } + + /** + * 存在空 + */ + public static boolean isExistBlank(String str) { + int strLen; + if (str == null || (strLen = str.length()) == 0) { + return true; + } + for (int i = 0; i < strLen; i++) { + if ((Character.isWhitespace(str.charAt(i)))) { + return true; + } + } + return false; + } + + /** + * 是空字符串 + */ + public static boolean equalList(List seq1, List seq2) { + if (isNull(seq1) && isNull(seq2)) { + return true; + } else if (isNull(seq1) || isNull(seq2) || seq1.size() != seq2.size()) { + return false; + } + for (Object elem: seq1) { + if (!seq2.contains(elem)) { + return false; + } + } + return true; + } + + public static boolean isEmptyList(List seq) { + return isNull(seq) || seq.isEmpty(); + } + + public static boolean isEmptySet(Set seq) { + return isNull(seq) || seq.isEmpty(); + } + + public static boolean isEmptyMap(Map seq) { + return isNull(seq) || seq.isEmpty(); + } + + public static boolean isNullOrLessThanZero(Long value) { + return value == null || value < 0; + } + + public static boolean isNullOrLessThanZero(Integer value) { + return value == null || value < 0; + } + + public static boolean isNullOrLessThanZero(Double value) { + return value == null || value < 0; + } + + public static boolean topicNameLegal(String idc, String topicName) { + if (ValidateUtils.isNull(idc) || ValidateUtils.isNull(topicName)) { + return false; + } + + // 校验Topic的长度 + if (topicName.length() >= TopicCreationConstant.TOPIC_NAME_MAX_LENGTH) { + return false; + } + + // 校验前缀 + if (IDCEnum.CN.getIdc().equals(idc) || + (IDCEnum.US.getIdc().equals(idc) && topicName.startsWith(TopicCreationConstant.TOPIC_NAME_PREFIX_US)) || + (IDCEnum.RU.getIdc().equals(idc) && topicName.startsWith(TopicCreationConstant.TOPIC_NAME_PREFIX_RU))) { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DefaultThreadFactory.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/DefaultThreadFactory.java similarity index 94% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DefaultThreadFactory.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/DefaultThreadFactory.java index 40299de3..bfcc824f 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/DefaultThreadFactory.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/DefaultThreadFactory.java @@ -1,13 +1,13 @@ -package com.xiaojukeji.kafka.manager.common.utils; +package com.xiaojukeji.kafka.manager.common.utils.factory; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; /** - * Created by limeng on 2017/12/22 + * @author limeng + * @date 2017/12/22 */ public class DefaultThreadFactory implements ThreadFactory { - private static final AtomicInteger POOL_ID = new AtomicInteger(); private final AtomicInteger nextId; private final String prefix; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/KafkaConsumerFactory.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/KafkaConsumerFactory.java new file mode 100644 index 00000000..68109779 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/factory/KafkaConsumerFactory.java @@ -0,0 +1,63 @@ +package com.xiaojukeji.kafka.manager.common.utils.factory; + +import com.alibaba.fastjson.JSONObject; +import com.xiaojukeji.kafka.manager.common.entity.pojo.ClusterDO; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; +import org.apache.commons.pool2.BasePooledObjectFactory; +import org.apache.commons.pool2.PooledObject; +import org.apache.commons.pool2.impl.DefaultPooledObject; +import org.apache.kafka.clients.consumer.ConsumerConfig; +import org.apache.kafka.clients.consumer.KafkaConsumer; + +import java.util.Properties; + +/** + * KafkaConsumer工厂 + * @author zengqiao + * @date 20/8/24 + */ +public class KafkaConsumerFactory extends BasePooledObjectFactory { + private ClusterDO clusterDO; + + public KafkaConsumerFactory(ClusterDO clusterDO) { + this.clusterDO = clusterDO; + } + + @Override + public KafkaConsumer create() { + return new KafkaConsumer(createKafkaConsumerProperties(clusterDO)); + } + + @Override + public PooledObject wrap(KafkaConsumer obj) { + return new DefaultPooledObject(obj); + } + + @Override + public void destroyObject(final PooledObject p) throws Exception { + KafkaConsumer kafkaConsumer = p.getObject(); + if (ValidateUtils.isNull(kafkaConsumer)) { + return; + } + kafkaConsumer.close(); + } + + private static Properties createKafkaConsumerProperties(ClusterDO clusterDO) { + Properties properties = new Properties(); + properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, clusterDO.getBootstrapServers()); + properties.setProperty( + ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, + "org.apache.kafka.common.serialization.StringDeserializer"); + properties.setProperty( + ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, + "org.apache.kafka.common.serialization.StringDeserializer"); + properties.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, 10000); + properties.put(ConsumerConfig.REQUEST_TIMEOUT_MS_CONFIG, 15000); + properties.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false); + if (ValidateUtils.isBlank(clusterDO.getSecurityProperties())) { + return properties; + } + properties.putAll(JSONObject.parseObject(clusterDO.getSecurityProperties(), Properties.class)); + return properties; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxAttributeEnum.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxAttributeEnum.java new file mode 100644 index 00000000..2c71462e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxAttributeEnum.java @@ -0,0 +1,52 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import java.util.Arrays; + +/** + * @author zengqiao + * @date 20/6/18 + */ +public enum JmxAttributeEnum { + RATE_ATTRIBUTE(new String[]{ + "MeanRate", + "OneMinuteRate", + "FiveMinuteRate", + "FifteenMinuteRate" + }), + PERCENTILE_ATTRIBUTE(new String[]{ + "Mean", + "50thPercentile", + "75thPercentile", + "95thPercentile", + "98thPercentile", + "99thPercentile", + "999thPercentile" + }), + VALUE_ATTRIBUTE(new String[]{ + "Value" + }), + VERSION_ATTRIBUTE(new String[]{ + "Version" + }), + ; + private String[] attribute; + + JmxAttributeEnum(String[] attribute) { + this.attribute = attribute; + } + + public String[] getAttribute() { + return attribute; + } + + public void setAttribute(String[] attribute) { + this.attribute = attribute; + } + + @Override + public String toString() { + return "JmxAttributeEnum{" + + "attribute=" + Arrays.toString(attribute) + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java new file mode 100644 index 00000000..83665791 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConnectorWrap.java @@ -0,0 +1,137 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.management.*; +import javax.management.remote.JMXConnector; +import javax.management.remote.JMXConnectorFactory; +import javax.management.remote.JMXServiceURL; +import java.io.IOException; +import java.net.MalformedURLException; +import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * JMXConnector包装类 + * @author tukun + * @date 2015/11/9. + */ +public class JmxConnectorWrap { + private final static Logger LOGGER = LoggerFactory.getLogger(JmxConnectorWrap.class); + + private String host; + + private int port; + + private JMXConnector jmxConnector; + + private AtomicInteger atomicInteger; + + public JmxConnectorWrap(String host, int port) { + this.host = host; + this.port = port; + this.atomicInteger = new AtomicInteger(25); + } + + public boolean checkJmxConnectionAndInitIfNeed() { + if (jmxConnector != null) { + return true; + } + if (port == -1) { + return false; + } + return createJmxConnector(); + } + + public synchronized void close() { + if (jmxConnector == null) { + return; + } + try { + jmxConnector.close(); + } catch (IOException e) { + LOGGER.warn("close JmxConnector exception, host:{} port:{}.", host, port, e); + } + } + + private synchronized boolean createJmxConnector() { + if (jmxConnector != null) { + return true; + } + String jmxUrl = String.format("service:jmx:rmi:///jndi/rmi://%s:%d/jmxrmi", host, port); + try { + JMXServiceURL url = new JMXServiceURL(jmxUrl); + jmxConnector = JMXConnectorFactory.connect(url, null); + LOGGER.info("JMX connect success, host:{} port:{}.", host, port); + return true; + } catch (MalformedURLException e) { + LOGGER.error("JMX url exception, host:{} port:{} jmxUrl:{}", host, port, jmxUrl, e); + } catch (Exception e) { + LOGGER.error("JMX connect exception, host:{} port:{}.", host, port, e); + } + return false; + } + + public Object getAttribute(ObjectName name, String attribute) throws + MBeanException, + AttributeNotFoundException, + InstanceNotFoundException, + ReflectionException, + IOException { + try { + acquire(); + MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection(); + return mBeanServerConnection.getAttribute(name, attribute); + } finally { + atomicInteger.incrementAndGet(); + } + } + + public AttributeList getAttributes(ObjectName name, String[] attributes) throws + MBeanException, + AttributeNotFoundException, + InstanceNotFoundException, + ReflectionException, + IOException { + try { + acquire(); + MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection(); + return mBeanServerConnection.getAttributes(name, attributes); + } finally { + atomicInteger.incrementAndGet(); + } + } + + public Set queryNames(ObjectName name, + QueryExp query) + throws IOException { + try { + acquire(); + MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection(); + return mBeanServerConnection.queryNames(name, query); + } finally { + atomicInteger.incrementAndGet(); + } + } + + private void acquire() { + long now = System.currentTimeMillis(); + while (true) { + try { + if (System.currentTimeMillis() - now > 60000) { + break; + } + int num = atomicInteger.get(); + if (num <= 0) { + Thread.sleep(2); + continue; + } + if (atomicInteger.compareAndSet(num, num - 1)) { + break; + } + } catch (Exception e) { + } + } + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConstant.java new file mode 100644 index 00000000..081bfba4 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/JmxConstant.java @@ -0,0 +1,29 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zhongyuankai + * @date 20/4/13 + */ +public class JmxConstant { + /** + * 健康分 + */ + public static final String HEALTH_SCORE = "HealthScore"; + + public static final String CREATE_TIME = "CreateTime"; + + public static final String TOPIC_NUM = "TopicNum"; + + public static final String PARTITION_NUM = "PartitionNum"; + + public static final String BROKER_NUM = "BrokerNum"; + + public static final String TOPIC = "topic"; + + public static final String APP_ID = "appId"; + + public static final String TOPIC_PARTITION_LOG_SIZE = "TopicPartitionLogSize"; +} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/Mbean.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/Mbean.java similarity index 100% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/Mbean.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/Mbean.java diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java new file mode 100644 index 00000000..b62b390e --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtil.java @@ -0,0 +1,79 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import java.util.HashMap; +import java.util.Map; + +/** + * kafka集群的mbean的object name集合 + * @author tukun, zengqiao + * @date 2015/11/5. + */ +public class MbeanNameUtil { + /** + * 社区Metrics指标 + */ + + /** + * 滴滴Metrics指标 + */ + private static final String PRODUCE_BYTES_IN_PER_SEC = "kafka.server:type=DiskMetrics,name=ProducerBytesInPerSec"; + + /** + * 限流指标 + */ + private static final String PRODUCE_THROTTLE_TIME = "kafka.server:type=Produce,client-id=*"; + private static final String FETCH_THROTTLE_TIME = "kafka.server:type=Fetch,client-id=*"; + + + private static final String TOPIC_PARTITION_LOG_SIZE = "kafka.log:type=Log,name=Size,topic=%s,partition=%d"; + + + /** + * 存储监控的参数name到获取的object_name的映射关系图 + */ + private static Map MBEAN_NAME_MAP = new HashMap<>(); + static { + + MBEAN_NAME_MAP.put("ProduceThrottleTime", new Mbean(MbeanNameUtil.PRODUCE_THROTTLE_TIME, "throttle-time", Double.class)); + MBEAN_NAME_MAP.put("FetchThrottleTime", new Mbean(MbeanNameUtil.FETCH_THROTTLE_TIME, "throttle-time", Double.class)); + + + + /** + * 滴滴Metrics指标 + */ + MBEAN_NAME_MAP.put("ProducerBytesInPerSec", new Mbean(PRODUCE_BYTES_IN_PER_SEC,"OneMinuteRate", Double.class)); + + MBEAN_NAME_MAP.put("TopicPartitionLogSize", new Mbean(TOPIC_PARTITION_LOG_SIZE, "Value", Long.class)); + + } + + /** + * 根据属性名,kafka版本,topic获取相应的Mbean + */ + public static Mbean getMbean(String mbeanName) { + return MBEAN_NAME_MAP.get(mbeanName); + } + + public static Mbean getMbean(String mbeanName, String topicName) { + Mbean mbean = MBEAN_NAME_MAP.get(mbeanName); + if (mbean == null) { + return null; + } + if (topicName == null || topicName.isEmpty()) { + return mbean; + } + return new Mbean(mbean.getObjectName() + ",topic=" + topicName, mbean.getProperty(), mbean.getPropertyClass()); + } + + public static Mbean getMbean(String mbeanName, Integer brokerId) { + Mbean mbean = MBEAN_NAME_MAP.get(mbeanName); + if (mbean == null) { + return null; + } + if (brokerId == null) { + return mbean; + } + return new Mbean(mbean.getObjectName() + ",id=" + brokerId, mbean.getProperty(), mbean.getPropertyClass()); + } +} diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtilV2.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtilV2.java new file mode 100644 index 00000000..d7d4ffe9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanNameUtilV2.java @@ -0,0 +1,445 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import com.xiaojukeji.kafka.manager.common.constant.KafkaMetricsCollections; +import com.xiaojukeji.kafka.manager.common.entity.KafkaVersion; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; + +import java.util.*; + +/** + * kafka集群的mbean的object name集合 + * @author zengqiao + * @date 20/6/15 + */ +public class MbeanNameUtilV2 { + + private static Map> FIELD_NAME_MBEAN_MAP = new HashMap<>(); + + private static void initMbean(MbeanV2 mbeanV2, List interfaceIdList) { + for (Integer interfaceId: interfaceIdList) { + List mbeanV2List = FIELD_NAME_MBEAN_MAP.getOrDefault(interfaceId, new ArrayList<>()); + mbeanV2List.add(mbeanV2); + FIELD_NAME_MBEAN_MAP.put(interfaceId, mbeanV2List); + } + } + + static { + //社区Kafka指标------------------------------------------------------------------------------------------- + + for (String fieldName: Arrays.asList("BytesInPerSec", "BytesOutPerSec")) { + initMbean( + new MbeanV2( + fieldName, + JmxAttributeEnum.RATE_ATTRIBUTE, + "kafka.server:type=BrokerTopicMetrics,name=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.COMMON_DETAIL_METRICS, + KafkaMetricsCollections.BROKER_OVERVIEW_PAGE_METRICS, + KafkaMetricsCollections.TOPIC_METRICS_TO_DB, + KafkaMetricsCollections.BROKER_TO_DB_METRICS, + KafkaMetricsCollections.BROKER_ANALYSIS_METRICS, + KafkaMetricsCollections.BROKER_TOPIC_ANALYSIS_METRICS + ) + ); + } + + for (String fieldName: Arrays.asList( + "MessagesInPerSec", + "BytesRejectedPerSec", + "TotalProduceRequestsPerSec", + "TotalFetchRequestsPerSec" + )) { + initMbean( + new MbeanV2( + fieldName, + JmxAttributeEnum.RATE_ATTRIBUTE, + "kafka.server:type=BrokerTopicMetrics,name=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.COMMON_DETAIL_METRICS, + KafkaMetricsCollections.TOPIC_METRICS_TO_DB, + KafkaMetricsCollections.BROKER_TO_DB_METRICS, + KafkaMetricsCollections.BROKER_ANALYSIS_METRICS, + KafkaMetricsCollections.BROKER_TOPIC_ANALYSIS_METRICS + ) + ); + } + + for (String fieldName: Arrays.asList( + "FailedFetchRequestsPerSec", + "FailedProduceRequestsPerSec" + )) { + initMbean( + new MbeanV2( + fieldName, + JmxAttributeEnum.RATE_ATTRIBUTE, + "kafka.server:type=BrokerTopicMetrics,name=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.COMMON_DETAIL_METRICS, + KafkaMetricsCollections.TOPIC_METRICS_TO_DB, + KafkaMetricsCollections.BROKER_TO_DB_METRICS, + KafkaMetricsCollections.BROKER_ANALYSIS_METRICS, + KafkaMetricsCollections.BROKER_TOPIC_ANALYSIS_METRICS, + KafkaMetricsCollections.BROKER_HEALTH_SCORE_METRICS + + ) + ); + } + + for (String fieldName: Arrays.asList("Produce", "FetchConsumer")) { + initMbean( + new MbeanV2( + fieldName + "RequestsPerSec", + JmxAttributeEnum.RATE_ATTRIBUTE, + "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS + ) + ); + } + + initMbean( + new MbeanV2( + "RequestHandlerAvgIdlePercent", + JmxAttributeEnum.RATE_ATTRIBUTE, + "kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent" + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS, + KafkaMetricsCollections.BROKER_HEALTH_SCORE_METRICS + ) + ); + + initMbean( + new MbeanV2( + "NetworkProcessorAvgIdlePercent", + JmxAttributeEnum.VALUE_ATTRIBUTE, + "kafka.network:type=SocketServer,name=NetworkProcessorAvgIdlePercent" + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS, + KafkaMetricsCollections.BROKER_HEALTH_SCORE_METRICS + ) + ); + + for (String fieldName: Arrays.asList("RequestQueueSize", "ResponseQueueSize")) { + initMbean( + new MbeanV2( + fieldName, + JmxAttributeEnum.VALUE_ATTRIBUTE, + "kafka.network:type=RequestChannel,name=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS, KafkaMetricsCollections.BROKER_HEALTH_SCORE_METRICS + ) + ); + } + + for (String fieldName: Arrays.asList("Produce", "FetchConsumer")) { + initMbean( + new MbeanV2( + fieldName + "TotalTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS + ) + ); + } + + for (String fieldName: Arrays.asList("PartitionCount", "LeaderCount", "UnderReplicatedPartitions")) { + initMbean( + new MbeanV2( + fieldName, + JmxAttributeEnum.VALUE_ATTRIBUTE, + "kafka.server:type=ReplicaManager,name=" + fieldName + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_BASIC_PAGE_METRICS, + KafkaMetricsCollections.BROKER_OVERVIEW_PAGE_METRICS, + KafkaMetricsCollections.BROKER_STATUS_PAGE_METRICS + ) + ); + } + + initMbean( + new MbeanV2( + "TopicCodeC", + JmxAttributeEnum.VALUE_ATTRIBUTE, + "kafka.server:type=ReplicaManager,name=TopicCodeC" + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_BASIC_PAGE_METRICS + ) + ); + + + + + initMbean( + new MbeanV2( + "LogFlushRateAndTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + "kafka.log:type=LogFlushStats,name=LogFlushRateAndTimeMs" + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_TO_DB_METRICS + ) + ); + + initMbean( + new MbeanV2( + "LogEndOffset", + JmxAttributeEnum.VALUE_ATTRIBUTE, + "kafka.log:type=Log,name=LogEndOffset" + ), + Arrays.asList( + ) + ); + + for (String fieldName: Arrays.asList("Produce")) { + initMbean(new MbeanV2( + fieldName + "TotalTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=TotalTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=TotalTimeMs,request=" + fieldName) + ) + + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_METRICS_TO_DB, + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "RequestQueueTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=RequestQueueTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=RequestQueueTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "LocalTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=LocalTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=LocalTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "RemoteTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=RemoteTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=RemoteTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ThrottleTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ThrottleTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ThrottleTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ResponseQueueTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ResponseQueueTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ResponseQueueTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ResponseSendTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ResponseSendTimeMs,request=" + fieldName), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ResponseSendTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + } + + for (String fieldName: Arrays.asList("Fetch")) { + initMbean(new MbeanV2( + fieldName + "ConsumerTotalTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=TotalTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=TotalTimeMs,request=" + fieldName) + ) + + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_METRICS_TO_DB, + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerRequestQueueTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=RequestQueueTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=RequestQueueTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerLocalTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=LocalTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=LocalTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerRemoteTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=RemoteTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=RemoteTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerThrottleTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ThrottleTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ThrottleTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerResponseQueueTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ResponseQueueTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ResponseQueueTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + + initMbean( + new MbeanV2( + fieldName + "ConsumerResponseSendTimeMs", + JmxAttributeEnum.PERCENTILE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.network:type=TopicRequestMetrics,name=ResponseSendTimeMs,request=" + fieldName + "Consumer"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=TopicRequestMetrics,name=ResponseSendTimeMs,request=" + fieldName) + ) + ), + Arrays.asList( + KafkaMetricsCollections.TOPIC_REQUEST_TIME_DETAIL_PAGE_METRICS + ) + ); + } + + initMbean( + new MbeanV2( + "KafkaVersion", + JmxAttributeEnum.VERSION_ATTRIBUTE, + "kafka.server:type=app-info" + ), + Arrays.asList( + KafkaMetricsCollections.BROKER_VERSION + ) + ); + + + //滴滴Kafka指标------------------------------------------------------------------------------------------- + for (String fieldName: Arrays.asList("AppIdBytesInPerSec", "AppIdBytesOutPerSec", "AppIdMessagesInPerSec")) { + initMbean( + new MbeanV2( + "Topic" + fieldName, + JmxAttributeEnum.RATE_ATTRIBUTE, + Arrays.asList( + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_0_10_3, "kafka.server:type=AppIdTopicMetrics,name=" + fieldName + ",topic=*,appId=*"), + new AbstractMap.SimpleEntry<>(KafkaVersion.VERSION_MAX, "kafka.server:type=AppIdTopicMetrics,name=" + fieldName.replace("AppId", "") + ",topic=*,appId=*") + ) + ), + Arrays.asList( + KafkaMetricsCollections.APP_TOPIC_METRICS_TO_DB + ) + ); + } + }; + + /** + * 根据属性名,kafka版本,topic获取相应的Mbean + */ + public static List getMbeanList(Integer interfaceId) { + if (ValidateUtils.isNull(interfaceId)) { + return new ArrayList<>(); + } + return FIELD_NAME_MBEAN_MAP.getOrDefault(interfaceId, new ArrayList<>()); + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanV2.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanV2.java new file mode 100644 index 00000000..e8baaa0b --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/jmx/MbeanV2.java @@ -0,0 +1,69 @@ +package com.xiaojukeji.kafka.manager.common.utils.jmx; + +import com.xiaojukeji.kafka.manager.common.entity.KafkaVersion; +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; + +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +/** + * @author zengqiao + * @date 20/6/15 + */ +public class MbeanV2 { + private String fieldName; + + /** + * mbean对象被监控的属性名称 + */ + private JmxAttributeEnum attributeEnum; + + /** + * mbean的对象名称 + */ + private Map versionObjectNameMap = new TreeMap<>(); + + public MbeanV2(String fieldName, JmxAttributeEnum attributeEnum, String objectName) { + this.fieldName = fieldName; + this.attributeEnum = attributeEnum; + this.versionObjectNameMap.put(KafkaVersion.VERSION_MAX, objectName); + } + + public MbeanV2(String fieldName, JmxAttributeEnum attributeEnum, List> versionObjectNames) { + this.fieldName = fieldName; + this.attributeEnum = attributeEnum; + for (Map.Entry entry: versionObjectNames) { + this.versionObjectNameMap.put(entry.getKey(), entry.getValue()); + } + } + + public String getFieldName() { + return fieldName; + } + + public JmxAttributeEnum getAttributeEnum() { + return attributeEnum; + } + + public String getObjectName(Long versionNum) { + if (ValidateUtils.isNull(versionNum)) { + return versionObjectNameMap.get(KafkaVersion.VERSION_MAX); + } + for (Map.Entry entry: versionObjectNameMap.entrySet()) { + if (entry.getKey() >= versionNum) { + return entry.getValue(); + } + } + return null; + } + + @Override + public String toString() { + return "MbeanV2{" + + "fieldName='" + fieldName + '\'' + + ", attributeEnum=" + attributeEnum + + ", versionObjectNameMap=" + versionObjectNameMap + + '}'; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ConfigClient.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ConfigClient.java similarity index 98% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ConfigClient.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ConfigClient.java index 0986cc75..ca155a79 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ConfigClient.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ConfigClient.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.utils.zk; +package com.xiaojukeji.kafka.manager.common.zookeeper; import com.xiaojukeji.kafka.manager.common.exception.ConfigException; import org.apache.zookeeper.data.Stat; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/StateChangeListener.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/StateChangeListener.java new file mode 100644 index 00000000..f4dea218 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/StateChangeListener.java @@ -0,0 +1,22 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper; + +/** + * @author limeng + * @date 2017/12/22 + */ +public interface StateChangeListener { + enum State { + CONNECTION_RECONNECT, // + CONNECTION_DISCONNECT, + NODE_DATA_CHANGED, + CHILD_UPDATED, + CHILD_ADDED, + CHILD_DELETED, + // + ; + } + + void init(); + + void onChange(State state, String path); +} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkConfigImpl.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkConfigImpl.java similarity index 99% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkConfigImpl.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkConfigImpl.java index 3ca37639..d41bc7d5 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/zk/ZkConfigImpl.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkConfigImpl.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.utils.zk; +package com.xiaojukeji.kafka.manager.common.zookeeper; import com.alibaba.fastjson.JSON; import com.xiaojukeji.kafka.manager.common.exception.ConfigException; @@ -23,7 +23,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkPathUtil.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkPathUtil.java new file mode 100644 index 00000000..b1758205 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkPathUtil.java @@ -0,0 +1,114 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper; + +/** + * @author tukun + * @date 15/11/05 + * @version 1.0.0 + */ +public class ZkPathUtil { + private static final String ZOOKEEPER_SEPARATOR = "/"; + + private static final String BROKER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "brokers"; + + public static final String CONTROLLER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "controller"; + + public static final String BROKER_IDS_ROOT = BROKER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "ids"; + + public static final String BROKER_TOPICS_ROOT = BROKER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "topics"; + + public static final String CONSUMER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "consumers"; + + /** + * config + */ + public static final String CONFIG_ROOT_NODE = ZOOKEEPER_SEPARATOR + "config"; + + public static final String CONFIG_TOPICS_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "topics"; + + public static final String CONFIG_CLIENTS_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "clients"; + + public static final String CONFIG_ENTITY_CHANGES_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "changes/config_change_"; + + public static final String REASSIGN_PARTITIONS_ROOT_NODE = "/admin/reassign_partitions"; + + private static final String D_METRICS_CONFIG_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "KafkaExMetrics"; + + public static String getBrokerIdNodePath(Integer brokerId) { + return BROKER_IDS_ROOT + ZOOKEEPER_SEPARATOR + String.valueOf(brokerId); + } + + public static String getBrokerTopicRoot(String topicName) { + return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topicName; + } + + public static String getBrokerTopicPartitionStatePath(String topicName, Integer partitionId) { + return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topicName + ZOOKEEPER_SEPARATOR + "partitions" + + ZOOKEEPER_SEPARATOR + String.valueOf(partitionId) + ZOOKEEPER_SEPARATOR + "state"; + } + + //for consumer + public static String getConsumerTopicPartitionOffsetNodePath(String consumerGroup, + String topic, int partitionId) { + return String.format(CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "%s" + ZOOKEEPER_SEPARATOR + + "offset" + "%s" + "%d", consumerGroup, topic, partitionId); + } + + public static String getConsumerGroupRoot(String consumerGroup) { + return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup; + } + + public static String getConsumerGroupIdsRoot(String consumerGroup) { + return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + + "ids"; + } + + public static String getConsumerGroupOffsetRoot(String consumerGroup) { + return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + + "offsets"; + } + + public static String getConsumerGroupOwnersRoot(String consumerGroup) { + return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + + "owners"; + } + + public static String getConsumerGroupConsumerIdsNodePath(String consumerGroup, String consumerId) { + return getConsumerGroupIdsRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + consumerId; + } + + public static String getConsumerGroupOffsetTopicNode(String consumerGroup, String topic) { + return getConsumerGroupOffsetRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; + } + + public static String getConsumerGroupOffsetTopicPartitionNode(String consumerGroup, + String topic, int partitionId) { + return getConsumerGroupOffsetTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR + + partitionId; + } + + public static String getConsumerGroupOwnersTopicNode(String consumerGroup, String topic) { + return getConsumerGroupOwnersRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; + } + + public static String getConsumerGroupOwnersTopicPartitionNode(String consumerGroup, + String topic, int partitionId) { + return getConsumerGroupOwnersTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR + + partitionId; + } + + public static String getConfigTopicNode(String topicName) { + return CONFIG_TOPICS_ROOT_NODE + ZOOKEEPER_SEPARATOR + topicName; + } + + public static String getConfigClientNodePath(String appId, String topicName) { + return CONFIG_CLIENTS_ROOT_NODE + ZOOKEEPER_SEPARATOR + appId + "." + topicName; + } + + public static String parseLastPartFromZkPath(String zkPath) { + return zkPath.substring(zkPath.lastIndexOf(ZOOKEEPER_SEPARATOR) + 1); + } + + public static String getKafkaExtraMetricsPath(Integer brokerId) { + return D_METRICS_CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + String.valueOf(brokerId); + } +} diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ControllerData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ControllerData.java similarity index 93% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ControllerData.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ControllerData.java index aed4f1e8..f5ea25ce 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ControllerData.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ControllerData.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode; /** * @author zengqiao diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentDTO.java similarity index 94% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentDTO.java index c58ea9da..0cfc29d4 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentDTO.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode; import java.util.ArrayList; import java.util.HashMap; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentElemDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentElemData.java similarity index 90% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentElemDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentElemData.java index 8c886d58..0480e88a 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentElemDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentElemData.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode; import java.util.List; @@ -6,7 +6,7 @@ import java.util.List; * @author zengqiao * @date 20/1/15 */ -public class ReassignmentElemDTO { +public class ReassignmentElemData { private String topic; private Integer partition; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentJsonDTO.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentJsonData.java similarity index 65% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentJsonDTO.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentJsonData.java index abf5d94b..45c5b9e6 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/ReassignmentJsonDTO.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/ReassignmentJsonData.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode; import java.util.List; @@ -6,10 +6,10 @@ import java.util.List; * @author zengqiao * @date 20/1/15 */ -public class ReassignmentJsonDTO { +public class ReassignmentJsonData { private Integer version; - private List partitions; + private List partitions; public Integer getVersion() { return version; @@ -19,11 +19,11 @@ public class ReassignmentJsonDTO { this.version = version; } - public List getPartitions() { + public List getPartitions() { return partitions; } - public void setPartitions(List partitions) { + public void setPartitions(List partitions) { this.partitions = partitions; } diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/BrokerMetadata.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/BrokerMetadata.java similarity index 94% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/BrokerMetadata.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/BrokerMetadata.java index e6ab28e8..51c4b06b 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/BrokerMetadata.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/BrokerMetadata.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.brokers; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +34,9 @@ public class BrokerMetadata implements Cloneable { private int port; - //zk上字段对应 + /* + * ZK上对应的字段就是这个名字, 不要进行修改 + */ private int jmx_port; private String version; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionMap.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionMap.java similarity index 80% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionMap.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionMap.java index 77fed464..48bf2129 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionMap.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionMap.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.brokers; import java.io.Serializable; import java.util.List; @@ -39,6 +39,9 @@ public class PartitionMap implements Serializable { @Override public String toString() { - return "PartitionMap{" + "version=" + version + ", partitions=" + partitions + '}'; + return "PartitionMap{" + + "version=" + version + + ", partitions=" + partitions + + '}'; } } diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionState.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionState.java similarity index 96% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionState.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionState.java index 95e8c522..ade9680b 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/PartitionState.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/PartitionState.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.brokers; import java.util.ArrayList; import java.util.List; @@ -41,7 +41,7 @@ public class PartitionState implements Cloneable { private List isr; /** - * 是否处于复制同步状态 + * 是否处于复制同步状态, true表示未同步, false表示已经同步 */ private boolean isUnderReplicated; diff --git a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/TopicMetadata.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/TopicMetadata.java similarity index 96% rename from common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/TopicMetadata.java rename to kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/TopicMetadata.java index fc15eada..928276cf 100644 --- a/common/src/main/java/com/xiaojukeji/kafka/manager/common/entity/zookeeper/TopicMetadata.java +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/brokers/TopicMetadata.java @@ -1,4 +1,4 @@ -package com.xiaojukeji.kafka.manager.common.entity.zookeeper; +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.brokers; import java.util.Set; diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ChangeData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ChangeData.java new file mode 100644 index 00000000..20ed2f04 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ChangeData.java @@ -0,0 +1,44 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.config; + +/** + * @author zengqiao + * @date 20/5/14 + */ +public class ChangeData { + private static final Integer CHANGE_DATA_VERSION = 2; + + private String entity_path; + + private Integer version; + + public String getEntity_path() { + return entity_path; + } + + public void setEntity_path(String entity_path) { + this.entity_path = entity_path; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + public static ChangeData getChangeData(String entity_path) { + ChangeData changeData = new ChangeData(); + changeData.setEntity_path(entity_path); + changeData.setVersion(CHANGE_DATA_VERSION); + return changeData; + } + + @Override + public String toString() { + return "ConfigChangesData{" + + "entity_path='" + entity_path + '\'' + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ConfigNodeData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ConfigNodeData.java new file mode 100644 index 00000000..97bf3fa7 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/ConfigNodeData.java @@ -0,0 +1,37 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.config; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class ConfigNodeData { + public static final Integer CONFIGDATA_VERSION = 1; + + private T config; + + private Integer version; + + public T getConfig() { + return config; + } + + public void setConfig(T config) { + this.config = config; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + @Override + public String toString() { + return "CommonDataDTO{" + + "config=" + config + + ", version=" + version + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/TopicQuotaData.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/TopicQuotaData.java new file mode 100644 index 00000000..99eb3051 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/config/TopicQuotaData.java @@ -0,0 +1,48 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.config; + +import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils; + +/** + * @author zengqiao + * @date 20/5/12 + */ +public class TopicQuotaData { + private String consumer_byte_rate; + + private String producer_byte_rate; + + public String getConsumer_byte_rate() { + return consumer_byte_rate; + } + + public void setConsumer_byte_rate(String consumer_byte_rate) { + this.consumer_byte_rate = consumer_byte_rate; + } + + public String getProducer_byte_rate() { + return producer_byte_rate; + } + + public void setProducer_byte_rate(String producer_byte_rate) { + this.producer_byte_rate = producer_byte_rate; + } + + public static TopicQuotaData getClientData(Long producerByteRate, Long consumerByteRate) { + TopicQuotaData clientData = new TopicQuotaData(); + if (!ValidateUtils.isNull(producerByteRate) && consumerByteRate != -1) { + clientData.setConsumer_byte_rate(consumerByteRate.toString()); + } + if (!ValidateUtils.isNull(consumerByteRate) && producerByteRate != -1) { + clientData.setProducer_byte_rate(producerByteRate.toString()); + } + return clientData; + } + + @Override + public String toString() { + return "ClientQuotaData{" + + "consumer_byte_rate='" + consumer_byte_rate + '\'' + + ", producer_byte_rate='" + producer_byte_rate + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/JmxSwitchDataConstant.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/JmxSwitchDataConstant.java new file mode 100644 index 00000000..134979e2 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/JmxSwitchDataConstant.java @@ -0,0 +1,15 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.didi; + +/** + * @author zengqiao + * @date 20/8/21 + */ +public class JmxSwitchDataConstant { + public static final String TOPIC_REQUEST_METRICS = "TopicRequestMetrics."; + + public static final String APP_ID_TOPIC_METRICS = "AppIdTopicMetrics."; + + public static final String CLIENT_REQUEST_METRICS = "ClientRequestMetrics."; + + public static final String DISK_METRICS = "DiskMetrics."; +} \ No newline at end of file diff --git a/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/TopicJmxSwitch.java b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/TopicJmxSwitch.java new file mode 100644 index 00000000..b43904a9 --- /dev/null +++ b/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/znode/didi/TopicJmxSwitch.java @@ -0,0 +1,54 @@ +package com.xiaojukeji.kafka.manager.common.zookeeper.znode.didi; + +/** + * @author zengqiao + * @date 20/8/21 + */ +public class TopicJmxSwitch { + private Boolean openTopicRequestMetrics = Boolean.FALSE; + + private Boolean openAppIdTopicMetrics = Boolean.FALSE; + + private Boolean openClientRequestMetrics = Boolean.FALSE; + + public TopicJmxSwitch(Boolean openTopicRequestMetrics, + Boolean openAppIdTopicMetrics, + Boolean openClientRequestMetrics) { + this.openTopicRequestMetrics = openTopicRequestMetrics; + this.openAppIdTopicMetrics = openAppIdTopicMetrics; + this.openClientRequestMetrics = openClientRequestMetrics; + } + + public Boolean getOpenTopicRequestMetrics() { + return openTopicRequestMetrics; + } + + public void setOpenTopicRequestMetrics(Boolean openTopicRequestMetrics) { + this.openTopicRequestMetrics = openTopicRequestMetrics; + } + + public Boolean getOpenAppIdTopicMetrics() { + return openAppIdTopicMetrics; + } + + public void setOpenAppIdTopicMetrics(Boolean openAppIdTopicMetrics) { + this.openAppIdTopicMetrics = openAppIdTopicMetrics; + } + + public Boolean getOpenClientRequestMetrics() { + return openClientRequestMetrics; + } + + public void setOpenClientRequestMetrics(Boolean openClientRequestMetrics) { + this.openClientRequestMetrics = openClientRequestMetrics; + } + + @Override + public String toString() { + return "TopicJmxSwitch{" + + "openTopicRequestMetrics=" + openTopicRequestMetrics + + ", openAppIdTopicMetrics=" + openAppIdTopicMetrics + + ", openClientRequestMetrics=" + openClientRequestMetrics + + '}'; + } +} \ No newline at end of file diff --git a/console/package.json b/kafka-manager-console/package.json similarity index 80% rename from console/package.json rename to kafka-manager-console/package.json index 121533c0..b823bf3d 100644 --- a/console/package.json +++ b/kafka-manager-console/package.json @@ -12,15 +12,19 @@ "license": "ISC", "devDependencies": { "@hot-loader/react-dom": "^16.8.6", - "@types/echarts": "^4.1.9", + "@types/clipboard": "^2.0.1", + "@types/echarts": "^4.4.1", + "@types/lodash.debounce": "^4.0.6", "@types/react": "^16.8.8", "@types/react-dom": "^16.8.2", "@types/react-router-dom": "^4.3.1", - "antd": "^3.16.1", + "@types/spark-md5": "^3.0.2", + "antd": "^3.26.15", "clean-webpack-plugin": "^3.0.0", + "clipboard": "^2.0.6", "cross-env": "^7.0.2", "css-loader": "^2.1.0", - "echarts": "^4.2.1", + "echarts": "^4.5.0", "file-loader": "^5.0.2", "html-webpack-plugin": "^3.2.0", "less": "^3.9.0", @@ -33,6 +37,7 @@ "react": "^16.8.4", "react-hot-loader": "^4.8.4", "react-router-dom": "^5.0.0", + "spark-md5": "^3.0.1", "style-loader": "^0.23.1", "terser-webpack-plugin": "^1.2.3", "ts-loader": "^5.3.3", @@ -42,6 +47,7 @@ "typescript": "^3.3.3333", "webpack": "^4.29.6", "webpack-cli": "^3.2.3", - "webpack-dev-server": "^3.2.1" + "webpack-dev-server": "^3.2.1", + "xlsx": "^0.16.1" } } diff --git a/console/pom.xml b/kafka-manager-console/pom.xml similarity index 97% rename from console/pom.xml rename to kafka-manager-console/pom.xml index 40a10973..bebd6f93 100644 --- a/console/pom.xml +++ b/kafka-manager-console/pom.xml @@ -5,7 +5,7 @@ kafka-manager com.xiaojukeji.kafka - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 kafka-manager-console @@ -53,4 +53,4 @@ - \ No newline at end of file + diff --git a/console/src/assets/image/admin.png b/kafka-manager-console/src/assets/image/admin.png similarity index 100% rename from console/src/assets/image/admin.png rename to kafka-manager-console/src/assets/image/admin.png diff --git a/console/src/assets/image/devops.png b/kafka-manager-console/src/assets/image/devops.png similarity index 100% rename from console/src/assets/image/devops.png rename to kafka-manager-console/src/assets/image/devops.png diff --git a/console/src/assets/image/images.d.ts b/kafka-manager-console/src/assets/image/images.d.ts similarity index 100% rename from console/src/assets/image/images.d.ts rename to kafka-manager-console/src/assets/image/images.d.ts diff --git a/console/src/assets/image/kafka-logo.png b/kafka-manager-console/src/assets/image/kafka-logo.png similarity index 100% rename from console/src/assets/image/kafka-logo.png rename to kafka-manager-console/src/assets/image/kafka-logo.png diff --git a/console/src/assets/image/kafka-manager.png b/kafka-manager-console/src/assets/image/kafka-manager.png similarity index 100% rename from console/src/assets/image/kafka-manager.png rename to kafka-manager-console/src/assets/image/kafka-manager.png diff --git a/console/src/assets/image/login-bg.png b/kafka-manager-console/src/assets/image/login-bg.png similarity index 100% rename from console/src/assets/image/login-bg.png rename to kafka-manager-console/src/assets/image/login-bg.png diff --git a/console/src/assets/image/logo.ico b/kafka-manager-console/src/assets/image/logo.ico similarity index 100% rename from console/src/assets/image/logo.ico rename to kafka-manager-console/src/assets/image/logo.ico diff --git a/console/src/assets/image/normal.png b/kafka-manager-console/src/assets/image/normal.png similarity index 100% rename from console/src/assets/image/normal.png rename to kafka-manager-console/src/assets/image/normal.png diff --git a/kafka-manager-console/src/assets/image/wechat.jpeg b/kafka-manager-console/src/assets/image/wechat.jpeg new file mode 100644 index 00000000..6333ad89 Binary files /dev/null and b/kafka-manager-console/src/assets/image/wechat.jpeg differ diff --git a/console/src/component/antd/index.tsx b/kafka-manager-console/src/component/antd/index.tsx similarity index 72% rename from console/src/component/antd/index.tsx rename to kafka-manager-console/src/component/antd/index.tsx index 74a76cde..41efdea5 100644 --- a/console/src/component/antd/index.tsx +++ b/kafka-manager-console/src/component/antd/index.tsx @@ -73,6 +73,32 @@ import 'antd/es/checkbox/style'; import Affix from 'antd/es/affix'; import 'antd/es/affix/style'; +import Popconfirm from 'antd/es/popconfirm'; +import 'antd/es/popconfirm/style'; + +import PageHeader from 'antd/es/page-header'; +import 'antd/es/page-header/style'; + +import Descriptions from 'antd/es/descriptions'; +import 'antd/es/descriptions/style'; + +import Steps from 'antd/es/steps'; +import 'antd/es/steps/style'; + +import Divider from 'antd/es/divider'; +import 'antd/es/divider/style'; + +import Upload from 'antd/es/upload'; +import 'antd/es/upload/style'; + +import TimePicker from 'antd/es/time-picker'; +import 'antd/es/time-picker/style'; + +import Badge from 'antd/es/badge'; +import 'antd/es/badge/style'; + +import { RangePickerValue } from 'antd/es/date-picker/interface'; + export { PaginationConfig, notification, @@ -101,4 +127,13 @@ export { Drawer, Checkbox, Affix, + Popconfirm, + PageHeader, + Descriptions, + Steps, + Divider, + Upload, + TimePicker, + RangePickerValue, + Badge, }; diff --git a/kafka-manager-console/src/component/chart/bar-chart.tsx b/kafka-manager-console/src/component/chart/bar-chart.tsx new file mode 100644 index 00000000..c2f67099 --- /dev/null +++ b/kafka-manager-console/src/component/chart/bar-chart.tsx @@ -0,0 +1,90 @@ +import * as React from 'react'; +import { Spin, notification } from 'component/antd'; +import echarts, { EChartOption } from 'echarts/lib/echarts'; + +// 引入柱状图 +import 'echarts/lib/chart/bar'; + +// 引入提示框和标题组件 +import 'echarts/lib/component/tooltip'; +import 'echarts/lib/component/title'; +import 'echarts/lib/component/legend'; + +interface IChartProps { + getChartData: any; + customerNode?: React.ReactNode; +} + +export class BarChartComponet extends React.Component { + public id: HTMLDivElement = null; + public chart: echarts.ECharts; + + public state = { + loading: false, + noData: false, + }; + + public componentDidMount() { + this.chart = echarts.init(this.id); + this.getChartData(); + window.addEventListener('resize', this.resize); + } + + public componentWillUnmount() { + window.removeEventListener('resize', this.resize); + } + + public resize = () => { + this.chart.resize(); + } + + public isHasData = (data: EChartOption) => { + const noData = !(data.series && data.series.length); + this.setState({ noData }); + return !noData; + } + + public getChartData = () => { + const { getChartData } = this.props; + if (!getChartData) { + return notification.error({ message: '图表信息有误' }); + } + + this.setState({ loading: true }); + const chartOptions = getChartData(); + + if ((typeof chartOptions.then) === 'function') { + return chartOptions.then((data: EChartOption) => { + this.setState({ loading: false }); + + if (this.isHasData(data)) { + this.changeChartOptions(data); + } + }); + } + + if (this.isHasData(chartOptions)) { + this.changeChartOptions(chartOptions); + this.setState({ loading: false }); + } + } + + public changeChartOptions(options: any) { + this.chart.setOption(options, true); + } + + public handleRefreshChart() { + this.getChartData(); + } + + public render() { + return ( + <> + + {this.state.noData ?
    暂无数据
    : null} +
    this.id = id} /> + + + ); + } +} diff --git a/kafka-manager-console/src/component/chart/date-picker-chart.tsx b/kafka-manager-console/src/component/chart/date-picker-chart.tsx new file mode 100644 index 00000000..0e0d6d6a --- /dev/null +++ b/kafka-manager-console/src/component/chart/date-picker-chart.tsx @@ -0,0 +1,110 @@ +import * as React from 'react'; +import { DatePicker, notification, Spin } from 'component/antd'; +import moment, { Moment } from 'moment'; +import { timeStampStr } from 'constants/strategy'; +import { disabledDate } from 'lib/utils'; +import echarts from 'echarts'; + +// 引入柱状图和折线图 +import 'echarts/lib/chart/bar'; +import 'echarts/lib/chart/line'; + +// 引入提示框和标题组件 +import 'echarts/lib/component/tooltip'; +import 'echarts/lib/component/title'; +import 'echarts/lib/component/legend'; +import './index.less'; + +const { RangePicker } = DatePicker; + +interface IChartProps { + getChartData: (startTime: moment.Moment, endTime: moment.Moment) => any; + customerNode?: React.ReactNode; +} + +export class ChartWithDatePicker extends React.Component { + public state = { + startTime: moment().subtract(1, 'hour'), + endTime: moment(), + loading: false, + noData: false, + }; + + public id: HTMLDivElement = null; + public chart: echarts.ECharts; + + public getData = () => { + const { startTime, endTime } = this.state; + const { getChartData } = this.props; + this.setState({ loading: true }); + getChartData(startTime, endTime).then((data: any) => { + this.setState({ loading: false }); + this.changeChartOptions(data); + }); + } + + public componentDidMount() { + this.chart = echarts.init(this.id); + this.getData(); + window.addEventListener('resize', this.resize); + } + + public componentWillUnmount() { + window.removeEventListener('resize', this.resize); + } + + public resize = () => { + this.chart.resize(); + } + + public changeChartOptions(options: any) { + const noData = options.series.length ? false : true; + this.setState({ noData }); + this.chart.setOption(options, true); + } + + public handleTimeChange = (dates: Moment[]) => { + this.setState({ + startTime: dates[0], + endTime: dates[1], + }); + const { getChartData } = this.props; + this.setState({ loading: true }); + getChartData(dates[0], dates[1]).then((data: any) => { + this.setState({ loading: false }); + this.changeChartOptions(data); + }); + } + + public render() { + const { customerNode } = this.props; + return ( +
    +
    +
    + {customerNode} +
    +
      +
    • + +
    • +
    +
    + + {this.state.noData ?
    暂无数据
    : null} +
    this.id = id} /> + +
    + ); + } +} diff --git a/kafka-manager-console/src/component/chart/doughnut-chart.tsx b/kafka-manager-console/src/component/chart/doughnut-chart.tsx new file mode 100644 index 00000000..0b2c3ebf --- /dev/null +++ b/kafka-manager-console/src/component/chart/doughnut-chart.tsx @@ -0,0 +1,60 @@ +import * as React from 'react'; +import { Spin } from 'component/antd'; +import echarts from 'echarts/lib/echarts'; +// 引入饼状图 +import 'echarts/lib/chart/pie'; +// 引入提示框和标题组件 +import 'echarts/lib/component/tooltip'; +import 'echarts/lib/component/title'; +import 'echarts/lib/component/legend'; + +interface IPieProps { + getChartData: any; +} + +export class DoughnutChart extends React.Component { + public id: HTMLDivElement = null; + public chart: echarts.ECharts; + + public state = { + loading: true, + isNoData: false, + }; + + public getChartData = () => { + const { getChartData } = this.props; + + this.setState({ loading: true }); + const options = getChartData(); + if (!options || !options.series || !options.series.length) { + this.setState({ + isNoData: true, + loading: false, + }); + return; + } + + this.changeChartOptions(options); + } + + public changeChartOptions(options: any) { + this.chart.setOption(options, true); + this.setState({ loading: false }); + } + + public componentDidMount() { + this.chart = echarts.init(this.id); + this.getChartData(); + } + + public render() { + return ( + <> + + {this.state.isNoData ?
    暂无数据
    : null} +
    this.id = id} /> + + + ); + } +} diff --git a/kafka-manager-console/src/component/chart/index.less b/kafka-manager-console/src/component/chart/index.less new file mode 100644 index 00000000..4c0cb8d9 --- /dev/null +++ b/kafka-manager-console/src/component/chart/index.less @@ -0,0 +1,80 @@ +.status-box{ + float: left; + margin: 0 5px; + width: 100%; + .status-graph { + position: relative; + height: 48px; + width: 100%; + background: rgba(255, 255, 255, 255); + display: flex; + justify-content: space-between; + line-height: 48px; + font-family: PingFangSC-Regular; + color: rgba(0, 0, 0, 0.85); + padding: 0 5px; + margin: -15px 0; + .k-toolbar { + &>span.label { + padding: 10px; + font-size: 12px; + } + + li { + float: left; + vertical-align: middle; + line-height: 48px; + margin-right: 20px; + + &>span.label { + padding-right: 10px; + } + } + + .title-toolbar { + float: right; + right: 30px; + + span:first-child { + margin-right: 10px; + } + } + } + } + .graph-none{ + display: none; + } +} +.nothing-style { + height: 300px; + line-height: 300px; + text-align: center; +} + +.chart { + height: 400px; + padding: 10px 20px; +} +.doughnut-chart { + width: 500px; + height: 350px; +} + +.chart-no-data { + height: 0px; + display: none; +} + +.ant-spin-nested-loading { + margin: 0 auto; +} + +.no-footer { + .ant-modal-confirm-btns { + display: none; + } +} + +.no-data-info { + text-align: center; +} \ No newline at end of file diff --git a/kafka-manager-console/src/component/chart/index.tsx b/kafka-manager-console/src/component/chart/index.tsx new file mode 100644 index 00000000..befb951e --- /dev/null +++ b/kafka-manager-console/src/component/chart/index.tsx @@ -0,0 +1,4 @@ +export * from './bar-chart'; +export * from './date-picker-chart'; +export * from './doughnut-chart'; +export * from './line-chart'; diff --git a/kafka-manager-console/src/component/chart/line-chart.tsx b/kafka-manager-console/src/component/chart/line-chart.tsx new file mode 100644 index 00000000..6b5db5be --- /dev/null +++ b/kafka-manager-console/src/component/chart/line-chart.tsx @@ -0,0 +1,55 @@ +import React from 'react'; +import echarts, { EChartOption } from 'echarts/lib/echarts'; +import 'echarts/lib/chart/pie'; +import 'echarts/lib/chart/line'; +import 'echarts/lib/component/legend'; +import 'echarts/lib/component/tooltip'; +import 'echarts/lib/component/title'; +import 'echarts/lib/component/axis'; +import './index.less'; + +export interface IEchartsProps { + width?: number; + height?: number; + options?: EChartOption; +} + +export const hasData = (options: EChartOption) => { + if (options && options.series && options.series.length) return true; + return false; +}; + +export default class LineChart extends React.Component { + public id = null as HTMLDivElement; + + public myChart = null as echarts.ECharts; + + public componentDidMount() { + const { options } = this.props; + this.myChart = echarts.init(this.id); + this.myChart.setOption(options); + window.addEventListener('resize', this.resize); + } + + public componentWillUnmount() { + window.removeEventListener('resize', this.resize); + } + + public componentDidUpdate() { + this.refresh(); + } + + public refresh = () => { + const { options } = this.props; + this.myChart.setOption(options); + } + + public resize = () => { + this.myChart.resize(); + } + + public render() { + const { height, width } = this.props; + return
    this.id = id} style={{width: `${width}px`, height: `${height}px`}} />; + } +} diff --git a/kafka-manager-console/src/component/clipboard/index.tsx b/kafka-manager-console/src/component/clipboard/index.tsx new file mode 100755 index 00000000..e9fa015a --- /dev/null +++ b/kafka-manager-console/src/component/clipboard/index.tsx @@ -0,0 +1,55 @@ +import * as React from 'react'; +import ClipboardJS from 'clipboard'; +import { + message, +} from 'component/antd'; + +const triggerEvent = (eventName: string, element: Element) => { + let event; + const ele = element || document; + + event = document.createEvent('HTMLEvents'); + event.initEvent(eventName, true, true); + ele.dispatchEvent(event); +}; + +export class Clipboard extends React.Component { + public state = { + text: '', + }; + + private clipboard: any = null; + private dom: Element = null; + + public componentDidMount() { + const clipboard = this.clipboard = new ClipboardJS('.___clipboard', { + text(trigger: Element) { + return trigger.getAttribute('data-text'); + }, + }); + + clipboard.on('success', (e: any) => { + message.success('复制成功!'); + e.clearSelection(); + }); + + clipboard.on('error', (e: any) => { + message.error('复制失败!' + e); + }); + } + + public componentWillUnmount() { + this.clipboard.destroy(); + } + + public copy(text: string) { + this.setState({ text }); + setTimeout(() => triggerEvent('click', this.dom), 0); + } + + public render() { + return ( +
    this.dom = dom} /> + ); + } +} diff --git a/kafka-manager-console/src/component/expand-card/index.less b/kafka-manager-console/src/component/expand-card/index.less new file mode 100644 index 00000000..bd0bbbb8 --- /dev/null +++ b/kafka-manager-console/src/component/expand-card/index.less @@ -0,0 +1,39 @@ +.card-wrapper { + margin: 24px 0 32px; +} +.card-title { + font-family: PingFangSC-Medium; + font-size: 14px; + color: #333333; + height: 22px; + line-height: 22px; + margin: 15px 0; + display: flex; + align-items: center; + cursor: pointer; + i { + font-size: 15px; + margin-right: 8px; + } +} +.card-content { + background-color: #FAFAFA; + padding: 16px; + overflow: auto; + .chart-row { + overflow: hidden; + width: 100%; + } + .chart-row:not(:first-child) { + margin-top: 16px; + } + .chart-wrapper { + background-color: #FFFFFF; + width: calc(50% - 8px); + float: left; + padding: 16px; + } + .chart-wrapper:nth-child(2n) { + margin-left: 16px; + } +} \ No newline at end of file diff --git a/kafka-manager-console/src/component/expand-card/index.tsx b/kafka-manager-console/src/component/expand-card/index.tsx new file mode 100644 index 00000000..b583ada6 --- /dev/null +++ b/kafka-manager-console/src/component/expand-card/index.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import './index.less'; +import { Icon } from 'component/antd'; + +interface ICardProps { + title: string; + expand?: boolean; + charts?: JSX.Element[]; +} + +export class ExpandCard extends React.Component { + public state = { + innerExpand: true, + }; + + public handleClick = () => { + this.setState({ innerExpand: !this.state.innerExpand }); + } + + public render() { + let { expand } = this.props; + if (expand === undefined) expand = this.state.innerExpand; + const { charts } = this.props; + return ( +
    + {/*
    + + {this.props.title} +
    */} + {expand ? +
    + {(charts || []).map((c, index) => { + if (index % 2 !== 0) return null; + return ( +
    +
    {c}
    + {(index + 1 < charts.length) ?
    {charts[index + 1]}
    : null} +
    + ); + })} +
    : null} +
    + ); + } +} diff --git a/console/src/component/flow-table/index.tsx b/kafka-manager-console/src/component/flow-table/index.tsx similarity index 64% rename from console/src/component/flow-table/index.tsx rename to kafka-manager-console/src/component/flow-table/index.tsx index 996286ca..1f7d9be6 100644 --- a/console/src/component/flow-table/index.tsx +++ b/kafka-manager-console/src/component/flow-table/index.tsx @@ -23,25 +23,25 @@ const flowColumns = [{ title: '平均数', dataIndex: 'avr', key: 'partition_num', - sorter: (a: IFlow, b: IFlow) => a.avr - b.avr, + sorter: (a: IFlow, b: IFlow) => b.avr - a.avr, }, { title: '前1分钟', dataIndex: 'pre1', key: 'byte_input', - sorter: (a: IFlow, b: IFlow) => a.pre1 - b.pre1, + sorter: (a: IFlow, b: IFlow) => b.pre1 - a.pre1, }, { title: '前5分钟', dataIndex: 'pre5', key: 'byte_output', - sorter: (a: IFlow, b: IFlow) => a.pre5 - b.pre5, + sorter: (a: IFlow, b: IFlow) => b.pre5 - a.pre5, }, { title: '前15分钟', dataIndex: 'pre15', key: 'message', - sorter: (a: IFlow, b: IFlow) => a.pre15 - b.pre15, + sorter: (a: IFlow, b: IFlow) => b.pre15 - a.pre15, }]; export interface IFlowInfo { @@ -51,6 +51,8 @@ export interface IFlowInfo { failedFetchRequest: number[]; failedProduceRequest: number[]; messageIn: number[]; + totalFetchRequest: number[]; + totalProduceRequest: number[]; [key: string]: number[]; } @@ -59,24 +61,31 @@ export class StatusGraghCom extends React.Component { return null; } + public getLoading(): boolean { + return null; + } + public render() { const statusData = this.getData(); + const loading = this.getLoading(); if (!statusData) return null; const data: any[] = []; Object.keys(statusData).map((key) => { - const v = key === 'byteIn' || key === 'byteOut' ? statusData[key].map(i => (i / 1024).toFixed(2)) : - statusData[key].map(i => i.toFixed(2)); - const obj = { - key, - avr: v[0], - pre1: v[1], - pre5: v[2], - pre15: v[3], - }; - data.push(obj); + if (statusData[key]) { + const v = key === 'byteIn' || key === 'byteOut' ? statusData[key].map(i => i && (i / 1024).toFixed(2)) : + statusData[key].map(i => i && i.toFixed(2)); + const obj = { + key, + avr: v[0], + pre1: v[1], + pre5: v[2], + pre15: v[3], + }; + data.push(obj); + } }); return ( -
    +
    ); } } diff --git a/kafka-manager-console/src/component/virtual-scroll-select.tsx b/kafka-manager-console/src/component/virtual-scroll-select.tsx new file mode 100644 index 00000000..7222856c --- /dev/null +++ b/kafka-manager-console/src/component/virtual-scroll-select.tsx @@ -0,0 +1,136 @@ +import * as React from 'react'; +import debounce from 'lodash.debounce'; +import { Select, Tooltip } from 'component/antd'; +import { ILabelValue } from 'types/base-type'; +import { searchProps } from 'constants/table'; + +interface IAttars { + mode?: 'multiple' | 'tags' | 'default' | 'combobox'; + placeholder?: string; +} + +interface ISelectProps { + onChange: (result: string[] | string) => any; + value?: string[] | string; + isDisabled?: boolean; + attrs?: IAttars; + getData: () => any; + refetchData?: boolean; // 有些页面通过store拿数据需要二次更新 +} +export class VirtualScrollSelect extends React.Component { + public static getDerivedStateFromProps(nextProps: any, prevState: any) { + if (nextProps.refetchData) { + return { + ...prevState, + refetchData: true, + }; + } + return null; + } + public state = { + optionsData: [] as ILabelValue[], + scrollPage: 0, + keyword: '', + total: 0, + refetchData: false, + }; + + public componentDidMount() { + this.getData(); + } + + public getData = async () => { + const { getData } = this.props; + if (!getData) return; + const pageSize = this.state.scrollPage; + let originData = await getData(); + + if (originData) { + originData = this.state.keyword ? + originData.filter((item: any) => item.label.includes(this.state.keyword)) : originData; + let data = [].concat(originData); + // tslint:disable-next-line:no-bitwise + const total = data.length ? data.length / 30 | 1 : 0; + data = data.splice(pageSize * 30, 30); // 每页展示30条数据 + + return this.setState({ + optionsData: data, + total, + refetchData: false, + }); + } + } + + public componentDidUpdate(prevProps: any) { + if (this.state.refetchData && !this.state.optionsData.length) { + // this.getData(); + } + } + + public handleSearch = (e: string) => { + debounce(() => { + this.setState({ + keyword: e.trim(), + scrollPage: 0, + }, () => { + this.getData(); + }); + }, 300)(); + } + + public handleSelectScroll = (e: any) => { + e.persist(); + const { target } = e; + const { scrollPage } = this.state; + debounce(() => { + if (target.scrollTop + target.offsetHeight === target.scrollHeight) { + const nextScrollPage = scrollPage + 1; + if (this.state.total <= nextScrollPage) { // 已全部拉取 + return; + } + this.setState({ + scrollPage: nextScrollPage, + }, () => { + this.getData(); + }); + } + if (target.scrollTop === 0 && scrollPage !== 0) { // 往上滚且不是第一页 + const nextScrollPage = scrollPage - 1; + this.setState({ + scrollPage: nextScrollPage, + }, () => { + this.getData(); + }); + } + }, 200)(); + } + + public render() { + // tslint:disable-next-line:prefer-const + let { value, isDisabled, attrs } = this.props; + if (attrs && (attrs.mode === 'multiple' || attrs.mode === 'tags')) { + value = value || []; + } + return ( + <> + + + ); + } +} diff --git a/kafka-manager-console/src/component/x-form-wrapper/index.tsx b/kafka-manager-console/src/component/x-form-wrapper/index.tsx new file mode 100755 index 00000000..3fbaee5e --- /dev/null +++ b/kafka-manager-console/src/component/x-form-wrapper/index.tsx @@ -0,0 +1,156 @@ +import * as React from 'react'; +import { Drawer, Modal, Button, message } from 'component/antd'; +import { XFormComponent } from 'component/x-form'; +import { IXFormWrapper } from 'types/base-type'; + +export class XFormWrapper extends React.Component { + + public state = { + confirmLoading: false, + formMap: this.props.formMap || [] as any, + formData: this.props.formData || {}, + }; + + private $formRef: any; + + public updateFormMap$(formMap?: any, formData?: any, isResetForm?: boolean, resetFields?: string[]) { + if (isResetForm) { + resetFields ? this.resetForm(resetFields) : this.resetForm(); + } + this.setState({ + formMap, + formData, + }); + } + + public render() { + const { type } = this.props; + switch (type) { + case 'drawer': + return this.renderDrawer(); + default: + return this.renderModal(); + } + } + + public renderDrawer() { + const { + visible, + title, + width, + formData, + formMap, + formLayout, + cancelText, + okText, + customRenderElement, + noform, + nofooter, + } = this.props; + + return ( + + <> + {customRenderElement} + + {!noform && ( + this.$formRef = form} + formData={formData} + formMap={formMap} + formLayout={formLayout} + />)} + {!nofooter && (
    + + +
    )} + <> + +
    + ); + } + + public renderModal() { + const { visible, title, width, formLayout, cancelText, okText, customRenderElement } = this.props; + const { formMap, formData } = this.state; + return ( + + this.$formRef = form} + formData={formData} + formMap={formMap} + formLayout={formLayout} + /> + <>{customRenderElement} + + ); + } + + public handleSubmit = () => { + this.$formRef.validateFields((error: Error, result: any) => { + if (error) { + return; + } + const { onSubmit, isWaitting } = this.props; + + if (typeof onSubmit === 'function') { + if (isWaitting) { + this.setState({ + confirmLoading: true, + }); + onSubmit(result).then(() => { + this.setState({ + confirmLoading: false, + }); + message.success('操作成功'); + this.resetForm(); + this.closeModalWrapper(); + }); + return; + } + + // tslint:disable-next-line:no-unused-expression + onSubmit && onSubmit(result); + + this.resetForm(); + this.closeModalWrapper(); + } + }); + } + + public handleCancel = () => { + const { onCancel } = this.props; + // tslint:disable-next-line:no-unused-expression + onCancel && onCancel(); + this.resetForm(); + this.closeModalWrapper(); + } + + public resetForm = (resetFields?: string[]) => { + // tslint:disable-next-line:no-unused-expression + this.$formRef && this.$formRef.resetFields(resetFields || ''); + } + + public closeModalWrapper = () => { + const { onChangeVisible } = this.props; + // tslint:disable-next-line:no-unused-expression + onChangeVisible && onChangeVisible(false); + } +} diff --git a/kafka-manager-console/src/component/x-form/index.less b/kafka-manager-console/src/component/x-form/index.less new file mode 100644 index 00000000..95152e60 --- /dev/null +++ b/kafka-manager-console/src/component/x-form/index.less @@ -0,0 +1,11 @@ +.ant-input-number { + width: 314px +} + +.footer-btn { + float: right; + + Button:first-child { + margin-right: 16px; + } +} \ No newline at end of file diff --git a/kafka-manager-console/src/component/x-form/index.tsx b/kafka-manager-console/src/component/x-form/index.tsx new file mode 100755 index 00000000..0e4047f4 --- /dev/null +++ b/kafka-manager-console/src/component/x-form/index.tsx @@ -0,0 +1,197 @@ +import * as React from 'react'; +import { Select, Input, InputNumber, Form, Switch, Checkbox, DatePicker, Radio, Upload, Button, Icon, Tooltip } from 'component/antd'; +import { searchProps } from 'constants/table'; +import './index.less'; + +const TextArea = Input.TextArea; +const { RangePicker } = DatePicker; + +export enum FormItemType { + input = 'input', + inputPassword = 'input_password', + inputNumber = 'input_number', + textArea = 'text_area', + select = 'select', + _switch = '_switch', + custom = 'custom', + checkBox = 'check_box', + datePicker = 'date_picker', + rangePicker = 'range_picker', + radioGroup = 'radio_group', + upload = 'upload', +} + +export interface IFormItem { + key: string; + label: string; + type: FormItemType; + value?: string; + // 内部组件属性注入 + attrs?: any; + // form属性注入 + formAttrs?: any; + defaultValue?: string | number | any[]; + rules?: any[]; + invisible?: boolean; + renderExtraElement?: () => JSX.Element; +} + +export interface IFormSelect extends IFormItem { + options: Array<{ key?: string | number, value: string | number, label: string, text?: string }>; +} + +interface IFormCustom extends IFormItem { + customFormItem: React.Component; +} + +interface IXFormProps { + formMap: IFormItem[]; + formData: any; + form: any; + formLayout?: any; + layout?: 'inline' | 'horizontal' | 'vertical'; +} + +class XForm extends React.Component { + + private defaultFormLayout = { + labelCol: { span: 6 }, + wrapperCol: { span: 16 }, + }; + + public onUploadFileChange = (e: any) => { + if (Array.isArray(e)) { + return e; + } + return e && e.fileList; + } + + public handleFormItem(formItem: any, formData: any) { + let initialValue = formData[formItem.key] === 0 ? 0 : (formData[formItem.key] || formItem.defaultValue || ''); + let valuePropName = 'value'; + + if (formItem.type === FormItemType.datePicker) { + initialValue = initialValue || null; + } + + // if (formItem.type === FormItemType.checkBox) { + // initialValue = formItem.defaultValue ? [formItem.defaultValue] : []; + // } + + if (formItem.type === FormItemType._switch) { + initialValue = false; + } + + // if (formItem.type === FormItemType.select && formItem.attrs + // && ['tags'].includes(formItem.attrs.mode)) { + // initialValue = formItem.defaultValue ? [formItem.defaultValue] : []; + // } + + if (formItem.type === FormItemType._switch) { + valuePropName = 'checked'; + } + + if (formItem.type === FormItemType.upload) { + valuePropName = 'fileList'; + } + + return { initialValue, valuePropName }; + } + + public render() { + const { form, formData, formMap, formLayout, layout } = this.props; + const { getFieldDecorator } = form; + return ( +
    ({})}> + {formMap.map(formItem => { + const { initialValue, valuePropName } = this.handleFormItem(formItem, formData); + + const getFieldValue = { + initialValue, + rules: formItem.rules || [{ required: false, message: '' }], + valuePropName, + }; + + if (formItem.type === FormItemType.upload) { + Object.assign(getFieldValue, { + getValueFromEvent: this.onUploadFileChange, + }); + } + return ( + !formItem.invisible && + + {getFieldDecorator(formItem.key, getFieldValue)( + this.renderFormItem(formItem), + )} + {formItem.renderExtraElement ? formItem.renderExtraElement() : null} + + ); + })} + + ); + } + + public renderFormItem(item: IFormItem) { + + switch (item.type) { + default: + case FormItemType.input: + return ; + case FormItemType.inputPassword: + return ; + case FormItemType.inputNumber: + return ; + case FormItemType.textArea: + return