fix(接口测试): 修改引入数据源搜索框文案

--bug=1037632 --user=王孝刚
【接口测试】定义-接口/用例-前置/后置-SQL操作-引入数据源-搜索框文案应该是「通过名称搜索」
https://www.tapd.cn/55049933/s/1481267
This commit is contained in:
wxg0103 2024-03-26 19:11:55 +08:00 committed by Craftsman
parent 3231dea6d4
commit f385215320
9 changed files with 19 additions and 6 deletions

View File

@ -384,6 +384,7 @@ api_scenario_report_not_exist=场景报告不存在
permission.api_plugin.name=接口插件 permission.api_plugin.name=接口插件
permission.api_step.name=步骤 permission.api_step.name=步骤
api_response_name_code_unique=响应名称 + 响应码需要唯一 api_response_name_code_unique=响应名称 + 响应码需要唯一
api_report_default_env=默认环境
#moduleApiScenarioCsv #moduleApiScenarioCsv
api_scenario_csv.file_id.not_blank=文件ID不能为空 api_scenario_csv.file_id.not_blank=文件ID不能为空

View File

@ -434,3 +434,5 @@ api_scenario.target_module_id.length_range=Target module ID length must be betwe
api_scenario.group_id.length_range=Group ID length must be between 0-50 api_scenario.group_id.length_range=Group ID length must be between 0-50
api_scenario.environment_id.length_range=Environment ID length must be between 0-50 api_scenario.environment_id.length_range=Environment ID length must be between 0-50
api_report_default_env=Default environment

View File

@ -402,3 +402,5 @@ api_scenario.target_module_id.length_range=目标模块ID长度必须在0-50之
api_scenario.group_id.length_range=环境组ID长度必须在0-50之间 api_scenario.group_id.length_range=环境组ID长度必须在0-50之间
api_scenario.environment_id.length_range=环境ID长度必须在0-50之间 api_scenario.environment_id.length_range=环境ID长度必须在0-50之间
api_report_default_env=默认环境

View File

@ -401,3 +401,5 @@ api_test_case.environment_id.length_range=環境ID長度必須在0-50之間
api_scenario.target_module_id.length_range=目標模塊ID長度必須在0-50之間 api_scenario.target_module_id.length_range=目標模塊ID長度必須在0-50之間
api_scenario.group_id.length_range=环境組ID長度必須在0-50之間 api_scenario.group_id.length_range=环境組ID長度必須在0-50之間
api_scenario.environment_id.length_range=環境ID長度必須在0-50之間 api_scenario.environment_id.length_range=環境ID長度必須在0-50之間
api_report_default_env=默认環境

View File

@ -187,12 +187,14 @@ public class ApiReportService {
//查询资源池名称 //查询资源池名称
apiReportDTO.setPoolName(testResourcePoolMapper.selectByPrimaryKey(apiReportDTO.getPoolId()).getName()); apiReportDTO.setPoolName(testResourcePoolMapper.selectByPrimaryKey(apiReportDTO.getPoolId()).getName());
//查询环境名称 //查询环境名称
String environmentName = Translator.get("api_report_default_env");
if (StringUtils.isNoneBlank(apiReportDTO.getEnvironmentId())) { if (StringUtils.isNoneBlank(apiReportDTO.getEnvironmentId())) {
Environment environment = environmentMapper.selectByPrimaryKey(apiReportDTO.getEnvironmentId()); Environment environment = environmentMapper.selectByPrimaryKey(apiReportDTO.getEnvironmentId());
if (environment != null) { if (environment != null) {
apiReportDTO.setEnvironmentName(environment.getName()); environmentName = environment.getName();
} }
} }
apiReportDTO.setEnvironmentName(environmentName);
apiReportDTO.setCreatUserName(userMapper.selectByPrimaryKey(apiReportDTO.getCreateUser()).getName()); apiReportDTO.setCreatUserName(userMapper.selectByPrimaryKey(apiReportDTO.getCreateUser()).getName());
//需要查询出所有的步骤 //需要查询出所有的步骤
if (BooleanUtils.isTrue(apiReport.getIntegrated())) { if (BooleanUtils.isTrue(apiReport.getIntegrated())) {

View File

@ -201,12 +201,14 @@ public class ApiScenarioReportService {
//查询资源池名称 //查询资源池名称
scenarioReportDTO.setPoolName(testResourcePoolMapper.selectByPrimaryKey(scenarioReport.getPoolId()).getName()); scenarioReportDTO.setPoolName(testResourcePoolMapper.selectByPrimaryKey(scenarioReport.getPoolId()).getName());
//查询环境名称 //查询环境名称
String environmentName = Translator.get("api_report_default_env");
if (StringUtils.isNotBlank(scenarioReport.getEnvironmentId())) { if (StringUtils.isNotBlank(scenarioReport.getEnvironmentId())) {
Environment environment = environmentMapper.selectByPrimaryKey(scenarioReport.getEnvironmentId()); Environment environment = environmentMapper.selectByPrimaryKey(scenarioReport.getEnvironmentId());
if (environment != null) { if (environment != null) {
scenarioReportDTO.setEnvironmentName(environment.getName()); environmentName = environment.getName();
} }
} }
scenarioReportDTO.setEnvironmentName(environmentName);
scenarioReportDTO.setCreatUserName(userMapper.selectByPrimaryKey(scenarioReport.getCreateUser()).getName()); scenarioReportDTO.setCreatUserName(userMapper.selectByPrimaryKey(scenarioReport.getCreateUser()).getName());
return scenarioReportDTO; return scenarioReportDTO;
} }

View File

@ -10,7 +10,7 @@
<div class="text-[var(--color-text-1)]">{{ t('apiTestDebug.sourceList') }}</div> <div class="text-[var(--color-text-1)]">{{ t('apiTestDebug.sourceList') }}</div>
<a-input-search <a-input-search
v-model:model-value="keyword" v-model:model-value="keyword"
:placeholder="t('project.projectVersion.searchPlaceholder')" :placeholder="t('apiTestDebug.searchByDataBaseName')"
class="w-[230px]" class="w-[230px]"
allow-clear allow-clear
@search="searchDataSource" @search="searchDataSource"

View File

@ -195,4 +195,5 @@ export default {
'apiTestDebug.noPlugin': 'Plugin has been uninstalled', 'apiTestDebug.noPlugin': 'Plugin has been uninstalled',
'apiTestDebug.unsavedLeave': 'apiTestDebug.unsavedLeave':
'The content of some tabs has not been saved. The unsaved content will be lost after leaving. Are you sure you want to leave?', 'The content of some tabs has not been saved. The unsaved content will be lost after leaving. Are you sure you want to leave?',
'apiTestDebug.searchByDataBaseName': 'Search by data source name',
}; };

View File

@ -182,4 +182,5 @@ export default {
'apiTestDebug.noPluginTip': '该插件已卸载,无法查看插件详情', 'apiTestDebug.noPluginTip': '该插件已卸载,无法查看插件详情',
'apiTestDebug.noPlugin': '插件已卸载', 'apiTestDebug.noPlugin': '插件已卸载',
'apiTestDebug.unsavedLeave': '有标签页的内容未保存,离开后后未保存的内容将丢失,确定要离开吗?', 'apiTestDebug.unsavedLeave': '有标签页的内容未保存,离开后后未保存的内容将丢失,确定要离开吗?',
'apiTestDebug.searchByDataBaseName': '按数据源名称搜索',
}; };