Skip to content

Commit

Permalink
init ozburst/mimeter-dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
dingpei committed Dec 25, 2023
1 parent 6ebf10c commit 0f09560
Show file tree
Hide file tree
Showing 301 changed files with 47,077 additions and 0 deletions.
1 change: 1 addition & 0 deletions ozburst-all/mimeter-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 概述
43 changes: 43 additions & 0 deletions ozburst-all/mimeter-dashboard/mimeter-dashboard-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>mimeter-dashboard</artifactId>
<groupId>run.mone</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>mimeter-dashboard-api</artifactId>
<dependencies>
<dependency>
<groupId>com.xiaomi.youpin</groupId>
<artifactId>youpin-infra-rpc</artifactId>
<version>1.28-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.xiaomi.mone</groupId>
<artifactId>http-docs-core</artifactId>
<version>2.7.12-mone-v5-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</dependency>

<dependency>
<groupId>com.xiaomi</groupId>
<artifactId>dayu-api</artifactId>
<version>0.3.1-SNAPSHOT</version>
</dependency>
</dependencies>



</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;

import java.io.Serializable;

@Data
public class AgentApplyDTO implements Serializable {
private Integer id;

@HttpApiDocClassDefine(value = "applyUser", required = true, description = "申请人", defaultValue = "dzx")
private String applyUser;

@HttpApiDocClassDefine(value = "applyOrgId", required = true, description = "申请组织id", defaultValue = "DSGKBW")
private String applyOrgId;

@HttpApiDocClassDefine(value = "applyOrgName", required = true, description = "申请组织中文名", defaultValue = "研发效能组")
private String applyOrgName;

@HttpApiDocClassDefine(value = "agentIp", required = true, description = "压测机ip", defaultValue = "127.0.0.1")
private String agentIp;

@HttpApiDocClassDefine(value = "agentHostname", required = true, description = "主机名", defaultValue = "xdwqd")
private String agentHostname;

@HttpApiDocClassDefine(value = "applyStatus", required = true, description = "申请状态", defaultValue = "0:待审核 1:审核完成 2:拒绝")
private Integer applyStatus;

@HttpApiDocClassDefine(value = "ctime", required = true, description = "申请时间", defaultValue = "")
private Long ctime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2020 Xiaomi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;
import run.mone.mimeter.dashboard.bo.common.PageBase;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentApplyList extends PageBase implements Serializable {

/**
* 返回的信息列表
*/
@HttpApiDocClassDefine(value = "list", required = false, description = "申请记录列表")
private List<AgentApplyDTO> list;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentApplyReq implements Serializable {
@HttpApiDocClassDefine(value = "agentIDs", required = true, description = "发压机Id列表", defaultValue = "")
List<Integer> agentIDs;

@HttpApiDocClassDefine(value = "applier", ignore = true)
String applier;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package run.mone.mimeter.dashboard.bo.agent;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentDTO implements Serializable {

private Integer id;

private String serverName;

private String ip;

private Integer port;

private Integer cpu;

private Long mem;

private Integer useCpu;

private Long useMem;

private String hostname;

private String clientDesc;

private Long ctime;

private Long utime;

private Boolean enable;

private String tenant;

private String tenantCn;

private List<DomainConf> domainConfs;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2020 Xiaomi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;
import run.mone.mimeter.dashboard.bo.common.PageBase;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentDTOList extends PageBase implements Serializable {

/**
* 返回的信息列表
*/
@HttpApiDocClassDefine(value = "list", required = false, description = "发压机信息列表")
private List<AgentDTO> list;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package run.mone.mimeter.dashboard.bo.agent;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentHostsConf implements Serializable {
private String agentIp;
private List<DomainConf> domainConfs;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package run.mone.mimeter.dashboard.bo.agent;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class AgentMonitorBo implements Serializable {
private Long fromTime;
private Long toTime;
private List<AgentMonitorInfo> agentMonitorInfos;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package run.mone.mimeter.dashboard.bo.agent;

import lombok.Data;

import java.io.Serializable;

@Data
public class AgentMonitorInfo implements Serializable {
private String podIp;
private String nodeIp;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package run.mone.mimeter.dashboard.bo.agent;

public enum ApplyStatusEnum {

UnAuditing(0, "UnAuditing"),
ApplyPass(1, "ApplyPass"),

ApplyRefuse(2, "ApplyRefuse"),

;



public final int statusCode;
public final String statusName;

ApplyStatusEnum(int statusCode, String statusName) {
this.statusCode = statusCode;
this.statusName = statusName;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class DelHostForAgentsReq implements Serializable {
@HttpApiDocClassDefine(value = "agentIps", required = true, description = "发压机Ip列表", defaultValue = "127.0.0.1")
List<String> agentIps;
@HttpApiDocClassDefine(value = "domain", required = true, description = "域名", defaultValue = "com.test.xxx")
String domain;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class DomainApplyByRateReq implements Serializable {
@HttpApiDocClassDefine(value = "agentIPs", required = true, description = "发压机Ip列表", defaultValue = "")
List<String> agentIPs;

@HttpApiDocClassDefine(value = "applier",ignore = true)
String applier;

@HttpApiDocClassDefine(value = "domain",required = true,description = "要绑定的域名")
String domain;

@HttpApiDocClassDefine(value = "domainIpAndRates",required = true,description = "ip和比例")
List<DomainIpAndRate> domainIpAndRates;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class DomainApplyDTO implements Serializable {
private Integer id;

@HttpApiDocClassDefine(value = "applyUser", required = true, description = "申请人", defaultValue = "dzx")
private String applyUser;

@HttpApiDocClassDefine(value = "ip", required = true, description = "绑定的ip", defaultValue = "127.0.0.1")
private String ip;

@HttpApiDocClassDefine(value = "domain", required = true, description = "域名", defaultValue = "com.xiao.xxx")
private String domain;

@HttpApiDocClassDefine(value = "applyStatus", required = true, description = "申请状态", defaultValue = "0:待审核 1:审核完成 2:拒绝")
private Integer applyStatus;

@HttpApiDocClassDefine(value = "agentIpList", required = true, description = "绑定的机器ip列表", defaultValue = "")
private List<String> agentIpList;

@HttpApiDocClassDefine(value = "ctime", required = true, description = "申请时间", defaultValue = "")
private Long ctime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2020 Xiaomi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package run.mone.mimeter.dashboard.bo.agent;

import com.xiaomi.mone.http.docs.annotations.HttpApiDocClassDefine;
import lombok.Data;
import run.mone.mimeter.dashboard.bo.common.PageBase;

import java.io.Serializable;
import java.util.List;

@Data
public class DomainApplyList extends PageBase implements Serializable {


/**
* 返回的信息列表
*/
@HttpApiDocClassDefine(value = "list", required = false, description = "申请记录列表")
private List<DomainApplyDTO> list;

}
Loading

0 comments on commit 0f09560

Please sign in to comment.