From 291e2f3104861948438f25efbcba65742c138589 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 19 Apr 2024 15:40:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E8=BE=93=E5=85=A5url=EF=BC=8C?= =?UTF-8?q?=E4=BB=8D=E7=84=B6=E5=8F=AF=E4=BB=A5=E6=89=A7=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037938 --user=王孝刚 【接口测试】接口调试-不输入url点执行,提示参数校验失败,建议明确提示信息 https://www.tapd.cn/55049933/s/1502172 --- .../api/mapper/ExtApiDefinitionMapper.xml | 2 +- .../system/service/UserLocalConfigService.java | 2 +- .../api-test/components/requestComposition/index.vue | 1 + .../report/component/step/reportInfoHeaders.vue | 12 ++++++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml index 962d812144..bf9a62a3bd 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml @@ -611,7 +611,7 @@ select a.id as id, max(a.num) as num, - max(a.name) as resourceName, + max(a.name) as resource_name, 'API' as resourceType, ass.ref_type as refType, max(p.id) as projectId , diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLocalConfigService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLocalConfigService.java index 89f679a5a7..23ae5a6123 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLocalConfigService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserLocalConfigService.java @@ -92,7 +92,7 @@ public class UserLocalConfigService { public void update(UserLocalConfigUpdateRequest request) { UserLocalConfig userLocalConfig = checkResourceById(request.getId()); userLocalConfig.setUserUrl(request.getUserUrl()); - userLocalConfigMapper.updateByPrimaryKeySelective(userLocalConfig); + userLocalConfigMapper.updateByPrimaryKey(userLocalConfig); LogDTO dto = LogDTOBuilder.builder() .projectId(OperationLogConstants.SYSTEM) .organizationId(OperationLogConstants.SYSTEM) diff --git a/frontend/src/views/api-test/components/requestComposition/index.vue b/frontend/src/views/api-test/components/requestComposition/index.vue index 3ab13c4f61..456101a43d 100644 --- a/frontend/src/views/api-test/components/requestComposition/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/index.vue @@ -98,6 +98,7 @@ v-else-if="!requestVModel.executeLoading" class="mr-[12px]" type="primary" + :disabled="requestVModel.executeLoading || (isHttpProtocol && !requestVModel.url)" @click="() => execute('serverExec')" > {{ t('apiTestDebug.serverExec') }} diff --git a/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue b/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue index ec3a5a9aac..7640855a65 100644 --- a/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue +++ b/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue @@ -94,10 +94,14 @@ value: `${key}-PENDING`, label: t(`report.detail.pendingCount`), }, - { - value: `${key}-scriptIdentifier`, - label: t(`report.detail.api.scriptError`), - }, + ...(key === ScenarioStepType.API_SCENARIO + ? [] + : [ + { + value: `${key}-scriptIdentifier`, + label: t(`report.detail.api.scriptError`), + }, + ]), ]; const cascaderOptions = ref([ {