chore(资源池): 去掉暂不规划功能

This commit is contained in:
guoyuqi 2024-05-10 09:40:10 +08:00 committed by 刘瑞斌
parent 7652bca100
commit 52fe75ef01
6 changed files with 10 additions and 68 deletions

View File

@ -13,18 +13,6 @@ import java.util.List;
@Setter
public class TestResourceDTO {
/**
* type为 node时, 性能测试的镜像
*/
@Schema(description = "type为node时, 性能测试的镜像")
private String loadTestImage;
/**
* type为 node时, 性能测试jvm配置
*/
@Schema(description = "type为node时, 性能测试jvm配置")
private String loadTestHeap;
/**
* type为 node时, 接口测试 性能测试 node 节点配置
*/
@ -58,24 +46,12 @@ public class TestResourceDTO {
@Schema(description = "type为k8s时接口测试性能测试的单pod最大线程数")
private Integer podThreads;
/**
* type为 k8s 性能测试自定义JOB模版 string
*/
@Schema(description = " type为k8s时性能测试自定义JOB模版string")
private String jobDefinition;
/**
* type为 k8s 接口测试deployName
*/
@Schema(description = "type为k8s时接口测试deployName")
private String deployName;
/**
* UI测试的grid配置
*/
@Schema(description = "UI测试的grid配置")
private String uiGrid;
@Schema(description = "grid最大线程数")
private Integer girdConcurrentNumber;

View File

@ -13,17 +13,6 @@ import java.util.List;
@Getter
@Setter
public class TestResourceReturnDTO {
/**
* type为 node时, 性能测试的镜像
*/
@Schema(description = "type为node时, 性能测试的镜像")
private String loadTestImage;
/**
* type为 node时, 性能测试jvm配置
*/
@Schema(description = "type为node时, 性能测试jvm配置")
private String loadTestHeap;
/**
* type为 node时, 接口测试 性能测试 node 节点配置
@ -58,24 +47,12 @@ public class TestResourceReturnDTO {
@Schema(description = "type为k8s时接口测试性能测试的单pod最大线程数")
private Integer podThreads;
/**
* type为 k8s 性能测试自定义JOB模版 string
*/
@Schema(description = " type为k8s时性能测试自定义JOB模版string")
private String jobDefinition;
/**
* type为 k8s 接口测试deployName
*/
@Schema(description = "type为k8s时接口测试deployName")
private String deployName;
/**
* UI测试的grid配置
*/
@Schema(description = "UI测试的grid配置")
private String uiGrid;
@Schema(description = "grid最大线程数")
private Integer girdConcurrentNumber;

View File

@ -160,10 +160,10 @@ public class TestResourcePoolService {
}
}
public TestResourceDTO getTestResourceDTO(String resourcePoolId) {
public void getTestResourceDTO(String resourcePoolId) {
TestResourcePoolBlob testResourcePoolBlob = testResourcePoolBlobMapper.selectByPrimaryKey(resourcePoolId);
String testResourceDTOStr = new String(testResourcePoolBlob.getConfiguration());
return JSON.parseObject(testResourceDTOStr, TestResourceDTO.class);
JSON.parseObject(testResourceDTOStr, TestResourceDTO.class);
}
public TestResourcePoolReturnDTO getTestResourcePoolDetail(String testResourcePoolId) {
@ -233,9 +233,9 @@ public class TestResourcePoolService {
/**
* 校验该组织是否有权限使用该资源池
*
* @param resourcePool
* @param orgId
* @return
* @param resourcePool 资源池对象
* @param orgId 组织id
* @return boolean
*/
public boolean validateOrgResourcePool(TestResourcePool resourcePool, String orgId) {
if (BooleanUtils.isTrue(resourcePool.getAllOrg())) {
@ -245,10 +245,7 @@ public class TestResourcePoolService {
example.createCriteria()
.andTestResourcePoolIdEqualTo(resourcePool.getId())
.andOrgIdEqualTo(orgId);
if (testResourcePoolOrganizationMapper.countByExample(example) < 1) {
return false;
}
return true;
return testResourcePoolOrganizationMapper.countByExample(example) >= 1;
}
}

View File

@ -578,13 +578,6 @@
rules: [{ required: true, message: t('system.resourcePool.portRequired') }],
placeholder: 'system.resourcePool.portPlaceholder',
},
{
filed: 'monitor',
type: 'input',
label: 'system.resourcePool.monitor',
rules: [{ required: true, message: t('system.resourcePool.monitorRequired') }],
placeholder: 'system.resourcePool.monitorPlaceholder',
},
{
filed: 'concurrentNumber',
type: 'inputNumber',
@ -650,12 +643,11 @@
if (e.trim() !== '') {
//
const line = e.split(',');
if (line.every((s) => s.trim() !== '') && !Number.isNaN(Number(line[3]))) {
if (line.every((s) => s.trim() !== '') && !Number.isNaN(Number(line[2]))) {
const item = {
ip: line[0],
port: line[1],
monitor: line[2],
concurrentNumber: Number(line[3]),
concurrentNumber: Number(line[2]),
};
if (i === 0) {
// concurrentNumber

View File

@ -88,7 +88,7 @@ export default {
'system.resourcePool.concurrentNumberPlaceholder': 'Please enter the maximum number of concurrency',
'system.resourcePool.nodeResourceRequired': 'Please fill in the Node resources added in batches correctly',
'system.resourcePool.nodeConfigEditorTip':
'Writing format: IP, Port, Monitor, maximum concurrent number; such as 192.168.1.52,8082,500,1',
'Writing format: IP, Port, maximum concurrent number; such as 192.168.1.52,8082,1',
'system.resourcePool.testResourceDTO.ip': 'IP Address/Domain Name',
'system.resourcePool.testResourceDTO.ipRequired': 'Please fill in IP address / domain name',
'system.resourcePool.testResourceDTO.ipPlaceholder': 'example.com',

View File

@ -85,7 +85,7 @@ export default {
'system.resourcePool.concurrentNumberMin': '最大并发数须大于等于 1',
'system.resourcePool.concurrentNumberPlaceholder': '请输入最大并发数',
'system.resourcePool.nodeResourceRequired': '请正确填写批量添加的 Node 资源',
'system.resourcePool.nodeConfigEditorTip': '书写格式IP,Port,Monitor,最大并发数;如 192.168.1.52,8082,500,1',
'system.resourcePool.nodeConfigEditorTip': '书写格式IP,Port,最大并发数;如 192.168.1.52,8082,1',
'system.resourcePool.testResourceDTO.ip': 'IP 地址/域名',
'system.resourcePool.testResourceDTO.ipRequired': 'IP 地址/域名不能为空',
'system.resourcePool.testResourceDTO.ipPlaceholder': 'example.com',