Merge branch 'main' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
7e35cf2960
|
@ -4,6 +4,7 @@ import com.alibaba.nacos.common.utils.CollectionUtils;
|
|||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.ApiCaseRelevanceRequest;
|
||||
import io.metersphere.api.dto.ApiReportEnvConfigDTO;
|
||||
import io.metersphere.api.dto.EnvironmentType;
|
||||
import io.metersphere.api.dto.QueryReferenceRequest;
|
||||
import io.metersphere.api.dto.automation.TestPlanDTO;
|
||||
|
@ -413,7 +414,11 @@ public class TestPlanApiCaseService {
|
|||
try {
|
||||
Map content = JSON.parseMap(contentStr);
|
||||
if (StringUtils.isNotEmpty(contentStr)) {
|
||||
content.put("envName", apiDefinitionService.getEnvNameByEnvConfig(result.getProjectId(), result.getEnvConfig()));
|
||||
ApiReportEnvConfigDTO envConfig = apiDefinitionService.getEnvNameByEnvConfig(result.getProjectId(), result.getEnvConfig());
|
||||
if (envConfig != null) {
|
||||
content.put("envName", envConfig.getEnvName());
|
||||
content.put("poolName", envConfig.getResourcePoolName());
|
||||
}
|
||||
}
|
||||
contentStr = JSON.toJSONString(content);
|
||||
apiCase.setResponse(contentStr);
|
||||
|
@ -442,7 +447,11 @@ public class TestPlanApiCaseService {
|
|||
LogUtil.error("转换content失败!", e);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(execResult.getEnvConfig())) {
|
||||
responseObj.put("envName", apiDefinitionService.getEnvNameByEnvConfig(execResult.getProjectId(), execResult.getEnvConfig()));
|
||||
ApiReportEnvConfigDTO envConfig = apiDefinitionService.getEnvNameByEnvConfig(execResult.getProjectId(), execResult.getEnvConfig());
|
||||
if (envConfig != null) {
|
||||
responseObj.put("envName", envConfig.getEnvName());
|
||||
responseObj.put("poolName", envConfig.getResourcePoolName());
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 之前这里的写法是responseObj.toString()。
|
||||
|
|
|
@ -449,6 +449,7 @@ export default {
|
|||
})
|
||||
}
|
||||
environment.config.commonConfig.variables.forEach(variable => {
|
||||
delete variable.showMore;
|
||||
if (variable.type === 'CSV' && variable.files.length === 0) {
|
||||
message = this.$t('api_test.automation.csv_warning');
|
||||
return;
|
||||
|
|
|
@ -3283,7 +3283,7 @@ const message = {
|
|||
api_tip: 'Both the interface definition and the affected interface use cases will enter the to-be-updated list',
|
||||
case_tip: 'If the interface use case meets the conditions, it will enter the to-be-updated list',
|
||||
update_rule_title: 'Enter the to-be-updated list rule settings',
|
||||
no_show_setting: 'No popup settings popup',
|
||||
no_show_setting: 'No more setting pop-ups',
|
||||
api_receiver_tip: "Note: Please confirm that \"API update\" in the API test task notification has been set \"Intra-site message\" message, otherwise, you will not receive message reminders",
|
||||
case_receiver_tip: "Note: Please confirm that \"CASE update\" in the API test task notification has been set \"Intra-site message\" message, otherwise, you will not receive message reminders",
|
||||
no_show_setting_tip: "After checking, the pop-up window will no longer pop up, and the synchronization and change notification will be performed according to the setting content by default: If you need to change the setting, you can open the setting item in the drop-down option next to the save button。",
|
||||
|
|
|
@ -3292,7 +3292,7 @@ const message = {
|
|||
api_tip: '接口定义和受影响的接口用例都会进入待更新列表',
|
||||
case_tip: '接口用例符合条件就会进入待更新列表',
|
||||
update_rule_title: '进入待更新列表规则设置',
|
||||
no_show_setting: '不在弹出设置弹窗',
|
||||
no_show_setting: '不再弹出设置弹窗',
|
||||
api_receiver_tip: "注意:请确认接口测试任务通知中的\"API更新\"已设置\"站内信\"消息,否则,将接收不到消息提醒。",
|
||||
case_receiver_tip: "注意:请确认接口测试任务通知中的\"CASE更新\"已设置\"站内信\"消息,否则,将接收不到消息提醒。",
|
||||
no_show_setting_tip: "勾选后,不再弹出弹窗,会默认按照设置的内容执行同步和变更通知:如果需要更改设置,可以在保存按钮旁的下拉选项中,打开设置项。",
|
||||
|
|
|
@ -3294,7 +3294,7 @@ const message = {
|
|||
api_tip: '接口定義和受影響的接口用例都會進入待更新列表',
|
||||
case_tip: '接口用例符合條件就會進入待更新列表',
|
||||
update_rule_title: '進入待更新列表規則設置',
|
||||
no_show_setting: '不在彈出設置彈窗',
|
||||
no_show_setting: '不再彈出設置彈窗',
|
||||
api_receiver_tip: "注意:請確認接口測試任務通知中的\"API更新\"已設置\"站內信\"消息,否則,將接收不到消息提醒",
|
||||
case_receiver_tip: "注意:請確認接口測試任務通知中的\"CASE更新\"已設置\"站內信\"消息,否則,將接收不到消息提醒。",
|
||||
no_show_setting_tip: "勾選後,不再彈出彈窗,會默認按照設置的內容執行同步和變更通知:如果需要更改設置,可以在保存按鈕旁的下拉選項中,打開設置項。",
|
||||
|
|
|
@ -449,6 +449,7 @@ export default {
|
|||
})
|
||||
}
|
||||
environment.config.commonConfig.variables.forEach(variable => {
|
||||
delete variable.showMore;
|
||||
if (variable.type === 'CSV' && variable.files.length === 0) {
|
||||
message = this.$t('api_test.automation.csv_warning');
|
||||
return;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
:is-template="isTemplate"
|
||||
:debug="debug"
|
||||
:report="report"
|
||||
:pool-name="poolName"
|
||||
:project-env-map="projectEnvMap"
|
||||
@reportExport="handleExport"
|
||||
@reportSave="handleSave"/>
|
||||
|
@ -97,6 +98,7 @@
|
|||
:project-env-map="projectEnvMap"
|
||||
:title="report.name"
|
||||
:content="content"
|
||||
:pool-name="poolName"
|
||||
:report="report"
|
||||
:total-time="totalTime"/>
|
||||
</main>
|
||||
|
@ -119,7 +121,6 @@ import {getUUID, windowPrint} from "metersphere-frontend/src/utils";
|
|||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import {STEP} from "metersphere-frontend/src/model/Setting";
|
||||
import MsCodeEdit from "metersphere-frontend/src/components/MsCodeEdit";
|
||||
|
||||
export default {
|
||||
name: "MsApiReport",
|
||||
components: {
|
||||
|
@ -151,7 +152,8 @@ export default {
|
|||
exportReportIsOk: false,
|
||||
tempResult: [],
|
||||
projectEnvMap: {},
|
||||
showCancel: false
|
||||
showCancel: false,
|
||||
poolName: '',
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
|
@ -412,6 +414,9 @@ export default {
|
|||
if (report.projectEnvMap) {
|
||||
this.projectEnvMap = report.projectEnvMap;
|
||||
}
|
||||
if (report.poolName) {
|
||||
this.poolName = report.poolName;
|
||||
}
|
||||
this.content = report;
|
||||
this.fullTreeNodes = report.steps;
|
||||
this.content.console = report.console;
|
||||
|
|
|
@ -25,7 +25,18 @@
|
|||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showProjectEnv" type="flex">
|
||||
<el-row type="flex" style="margin-top: 5px">
|
||||
<el-col v-if="this.poolName">
|
||||
<div style="float: left">
|
||||
<span> {{ $t('load_test.select_resource_pool') + ':' }} </span>
|
||||
</div>
|
||||
<div style="color: #61c550; margin-left: 10px; float: left">
|
||||
{{ this.poolName }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col></el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showProjectEnv" type="flex" style="margin-top: 5px">
|
||||
<span> {{ $t('commons.environment') + ':' }} </span>
|
||||
<div v-for="(values,key) in projectEnvMap" :key="key" style="margin-right: 10px">
|
||||
{{ key + ":" }}
|
||||
|
@ -62,6 +73,7 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
poolName: String,
|
||||
isPlan: Boolean
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -47,13 +47,24 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" v-if="response && response.envName">
|
||||
<div style="font-size: 14px;color: #AAAAAA;float: left">
|
||||
<span> {{ $t('commons.environment') + ':' }} </span>
|
||||
</div>
|
||||
<div style="font-size: 14px;color:#61C550; margin-left:10px;float: left">
|
||||
{{ response.envName }}
|
||||
</div>
|
||||
<el-row type="flex" style="margin-top: 5px">
|
||||
<el-col v-if="response && response.poolName">
|
||||
<div style="font-size: 14px; color: #aaaaaa; float: left">
|
||||
<span> {{ $t('load_test.select_resource_pool') + ':' }} </span>
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #61c550; margin-left: 10px; float: left">
|
||||
{{ response.poolName }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col type="flex" v-if="response && response.envName">
|
||||
<div style="font-size: 14px; color: #aaaaaa; float: left">
|
||||
<span> {{ $t('commons.environment') + ':' }} </span>
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #61c550; margin-left: 10px; float: left">
|
||||
{{ response.envName }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue