Merge branch 'dev' of https://github.com/metersphere/server into dev
This commit is contained in:
commit
a646d41ef4
|
@ -5,12 +5,14 @@
|
|||
<resultMap id="BaseResultMap" type="io.metersphere.dto.LoadTestDTO"
|
||||
extends="io.metersphere.base.mapper.LoadTestMapper.BaseResultMap">
|
||||
<result column="project_name" property="projectName"/>
|
||||
<result column="user_name" property="userName"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="list" resultMap="BaseResultMap" parameterType="io.metersphere.track.request.testplan.QueryTestPlanRequest">
|
||||
select load_test.*, project.name as project_name
|
||||
select load_test.*, project.name as project_name, user.name as user_name
|
||||
from load_test
|
||||
left join project on load_test.project_id = project.id
|
||||
left join user on load_test.user_id = user.id
|
||||
<where>
|
||||
<if test="request.name != null">
|
||||
and load_test.name like CONCAT('%', #{request.name},'%')
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
</sql>
|
||||
|
||||
<select id="getReportList" resultType="io.metersphere.dto.ReportDTO">
|
||||
select ltr.id, ltr.name, ltr.test_id as testId, ltr.description,
|
||||
select ltr.id, ltr.name, ltr.test_id as testId, ltr.description, user.name as userName,
|
||||
ltr.create_time as createTime, ltr.update_time as updateTime, ltr.status as status, lt.name as testName
|
||||
from load_test_report ltr join load_test lt on ltr.test_id = lt.id
|
||||
from load_test_report ltr
|
||||
join load_test lt on ltr.test_id = lt.id
|
||||
join user on ltr.user_id = user.id
|
||||
<if test="reportRequest.workspaceId != null">
|
||||
JOIN project on project.id = lt.project_id
|
||||
</if>
|
||||
|
|
|
@ -8,4 +8,5 @@ import lombok.Setter;
|
|||
@Setter
|
||||
public class LoadTestDTO extends LoadTest {
|
||||
private String projectName;
|
||||
private String userName;
|
||||
}
|
||||
|
|
|
@ -18,4 +18,5 @@ public class ReportDTO {
|
|||
private String testName;
|
||||
private String projectId;
|
||||
private String projectName;
|
||||
private String userName;
|
||||
}
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
<el-row type="flex" :gutter="20" justify="space-between" align="middle">
|
||||
<el-col>
|
||||
<el-input v-model="item.name" size="small" maxlength="100" @change="change"
|
||||
:placeholder="$t('api_test.key')"/>
|
||||
:placeholder="$t('api_test.key')" show-word-limit/>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-input v-model="item.value" size="small" maxlength="100" @change="change"
|
||||
:placeholder="$t('api_test.value')"/>
|
||||
:placeholder="$t('api_test.value')" show-word-limit/>
|
||||
</el-col>
|
||||
<el-col class="kv-delete">
|
||||
<el-button size="mini" class="el-icon-delete-solid" circle @click="remove(index)"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-form :model="request" :rules="rules" ref="request" label-width="100px">
|
||||
<el-form-item :label="$t('api_test.request.name')" prop="name">
|
||||
<el-input v-model="request.name" maxlength="100" @input="valid"/>
|
||||
<el-input v-model="request.name" maxlength="100" show-word-limit/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('api_test.request.url')" prop="url">
|
||||
|
@ -108,10 +108,6 @@
|
|||
}
|
||||
}
|
||||
return url;
|
||||
},
|
||||
valid(value) {
|
||||
value = value.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]·!¥…()—\-《》?:“”【】、;‘’,。]/g, '').replace(/\s/g, "");
|
||||
this.request.name = value;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-form :model="scenario" :rules="rules" ref="scenario" label-width="100px">
|
||||
<el-form-item :label="$t('api_test.scenario.name')" prop="name">
|
||||
<el-input v-model="scenario.name" maxlength="100" @input="valid"/>
|
||||
<el-input v-model="scenario.name" maxlength="100" show-word-limit/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item :label="$t('api_test.scenario.base_url')" prop="url">-->
|
||||
|
@ -43,13 +43,6 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
valid(value) {
|
||||
value = value.replace(/[`~!@#$%^&*()\-+=<>?:"{}|,./;'\\[\]·!¥…()—\-《》?:“”【】、;‘’,。]/g, '').replace(/\s/g, "");
|
||||
this.scenario.name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
<el-row type="flex" :gutter="20" justify="space-between" align="middle">
|
||||
<el-col>
|
||||
<ms-api-variable-input v-model="item.name" size="small" maxlength="100" @change="change"
|
||||
:placeholder="$t('api_test.variable_name')"/>
|
||||
:placeholder="$t('api_test.variable_name')" show-word-limit/>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-input v-model="item.value" size="small" maxlength="100" @change="change"
|
||||
:placeholder="$t('api_test.value')"/>
|
||||
:placeholder="$t('api_test.value')" show-word-limit/>
|
||||
</el-col>
|
||||
<el-col class="kv-delete">
|
||||
<el-button size="mini" class="el-icon-delete-solid" circle @click="remove(index)"
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
line-height: 32px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 25px;
|
||||
right: 70px;
|
||||
margin-right: -20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -395,6 +395,8 @@ class JMXGenerator {
|
|||
|
||||
addScenarios(testPlan, scenarios) {
|
||||
scenarios.forEach(scenario => {
|
||||
scenario.name = this.replace(scenario.name);
|
||||
|
||||
let threadGroup = new ThreadGroup(scenario.name || "");
|
||||
|
||||
this.addScenarioVariables(threadGroup, scenario);
|
||||
|
@ -404,6 +406,8 @@ class JMXGenerator {
|
|||
scenario.requests.forEach(request => {
|
||||
if (!request.isValid()) return;
|
||||
|
||||
request.name = this.replace(request.name);
|
||||
|
||||
let httpSamplerProxy = new HTTPSamplerProxy(request.name || "", new JMXRequest(request));
|
||||
|
||||
this.addRequestHeader(httpSamplerProxy, request);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
width="200"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -28,6 +29,12 @@
|
|||
width="150"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="userName"
|
||||
:label="$t('report.user_name')"
|
||||
width="150"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="250"
|
||||
:label="$t('commons.create_time')">
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
width="150"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="userName"
|
||||
:label="$t('load_test.user_name')"
|
||||
width="150"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="250"
|
||||
:label="$t('commons.create_time')">
|
||||
|
|
|
@ -195,6 +195,7 @@ export default {
|
|||
'delete_confirm': 'Confirm delete: ',
|
||||
'start_status': 'The test is starting, please check the report later!',
|
||||
'run_status': 'The test is running, please check the report later!',
|
||||
'user_name': 'Creator'
|
||||
},
|
||||
load_test: {
|
||||
'operating': 'Operating',
|
||||
|
@ -253,6 +254,7 @@ export default {
|
|||
'select_resource_pool': 'Please Select Resource Pool',
|
||||
'resource_pool_is_null': 'Resource Pool is empty',
|
||||
'download_log_file': 'Download',
|
||||
'user_name': 'Creator'
|
||||
},
|
||||
api_test: {
|
||||
creator: "Creator",
|
||||
|
|
|
@ -193,6 +193,7 @@ export default {
|
|||
'delete_confirm': '确认删除报告: ',
|
||||
'start_status': '测试处于开始状态,请稍后查看报告!',
|
||||
'run_status': '测试处于运行状态,请稍后查看报告!',
|
||||
'user_name': '创建人'
|
||||
},
|
||||
load_test: {
|
||||
'operating': '操作',
|
||||
|
@ -251,6 +252,7 @@ export default {
|
|||
'resource_pool_is_null': '资源池为空',
|
||||
'download_log_file': '下载完整日志文件',
|
||||
'pressure_prediction_chart': '压力预估图',
|
||||
'user_name': '创建人'
|
||||
},
|
||||
api_test: {
|
||||
creator: "创建人",
|
||||
|
|
|
@ -194,6 +194,7 @@ export default {
|
|||
'delete_confirm': '確認刪除報告: ',
|
||||
'start_status': '測試處於開始狀態,請稍後查看報告!',
|
||||
'run_status': '測試處於運行狀態,請稍後查看報告!',
|
||||
'user_name': '創建人'
|
||||
},
|
||||
load_test: {
|
||||
'operating': '操作',
|
||||
|
@ -252,6 +253,7 @@ export default {
|
|||
'resource_pool_is_null': '資源池為空',
|
||||
'download_log_file': '下載完整日誌文件',
|
||||
'pressure_prediction_chart': '壓力預估圖',
|
||||
'user_name': '創建人'
|
||||
},
|
||||
api_test: {
|
||||
title: "測試",
|
||||
|
|
Loading…
Reference in New Issue