From 1431e63a0eaaa0994cd559fece08c310c928259a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 21 May 2024 11:03:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=85=A8=E5=B1=80=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040012 --user=王孝刚 【项目管理】环境管理-全局请求头-导入/批量添加/更新全局请求体-日志处名称显示空白的 https://www.tapd.cn/55049933/s/1517224 --- .../framework/sdk/src/main/resources/i18n/commons.properties | 3 +++ .../sdk/src/main/resources/i18n/commons_en_US.properties | 3 +++ .../sdk/src/main/resources/i18n/commons_zh_CN.properties | 5 ++++- .../sdk/src/main/resources/i18n/commons_zh_TW.properties | 5 ++++- .../metersphere/project/service/GlobalParamsLogService.java | 5 +++-- .../environmental/components/requestHeader/index.vue | 2 +- .../src/views/project-management/environmental/index.vue | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/backend/framework/sdk/src/main/resources/i18n/commons.properties b/backend/framework/sdk/src/main/resources/i18n/commons.properties index 573ae51271..558b2ba5ab 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons.properties @@ -537,3 +537,6 @@ api_test_environment_datasource_connect_failed=数据源连接失败 ms_url_not_available=资源池无法访问当前站点 api_key_not_exist=ApiKey不存在 current_user_can_not_operation_api_key=当前用户无操作该ApiKey的权限 + +#全局请求头 +global_request_header=全局请求头 diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties index 643bb6b498..46f89fab17 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties @@ -575,3 +575,6 @@ permission.service_integration.reset=Reset ms_url_not_available=The resource pool cannot access the current site api_key_not_exist=API key does not exist current_user_can_not_operation_api_key=The current user cannot operate the API key + +#全局请求头 +global_request_header=Global request header \ No newline at end of file diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties index a53338fd9f..a45b2e2d31 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties @@ -571,4 +571,7 @@ permission.api_definition.delete_and_recover=删除/恢复 permission.service_integration.reset=重置 ms_url_not_available=资源池无法访问当前站点 api_key_not_exist=ApiKey不存在 -current_user_can_not_operation_api_key=当前用户无操作该ApiKey的权限 \ No newline at end of file +current_user_can_not_operation_api_key=当前用户无操作该ApiKey的权限 + +#全局请求头 +global_request_header=全局请求头 \ No newline at end of file diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties index acbaf6abcd..0d8ca83080 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties @@ -571,4 +571,7 @@ permission.api_definition.delete_and_recover=刪除/恢復 permission.service_integration.reset=重置 ms_url_not_available=資源池無法訪問當前站點 api_key_not_exist=ApiKey不存在 -current_user_can_not_operation_api_key=當前用戶無法操作ApiKey \ No newline at end of file +current_user_can_not_operation_api_key=當前用戶無法操作ApiKey + +#全局请求头 +global_request_header=全局請求頭 \ No newline at end of file diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/GlobalParamsLogService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/GlobalParamsLogService.java index 3483aad033..a99bf0afa0 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/GlobalParamsLogService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/GlobalParamsLogService.java @@ -6,6 +6,7 @@ import io.metersphere.project.mapper.ProjectMapper; import io.metersphere.sdk.domain.ProjectParameter; import io.metersphere.sdk.mapper.ProjectParameterMapper; import io.metersphere.sdk.util.JSON; +import io.metersphere.sdk.util.Translator; import io.metersphere.system.log.constants.OperationLogModule; import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.system.log.dto.LogDTO; @@ -32,7 +33,7 @@ public class GlobalParamsLogService { null, OperationLogType.ADD.name(), OperationLogModule.PROJECT_MANAGEMENT_ENVIRONMENT, - null); + Translator.get("global_request_header")); dto.setOriginalValue(JSON.toJSONBytes(request.getGlobalParams())); return dto; @@ -47,7 +48,7 @@ public class GlobalParamsLogService { null, OperationLogType.UPDATE.name(), OperationLogModule.PROJECT_MANAGEMENT_ENVIRONMENT, - null); + Translator.get("global_request_header")); ProjectParameter projectParameters = projectParametersMapper.selectByPrimaryKey(request.getId()); dto.setOriginalValue(projectParameters.getParameters()); dto.setModifiedValue(JSON.toJSONBytes(request.getGlobalParams())); diff --git a/frontend/src/views/project-management/environmental/components/requestHeader/index.vue b/frontend/src/views/project-management/environmental/components/requestHeader/index.vue index a9c549d133..e4ee5f365f 100644 --- a/frontend/src/views/project-management/environmental/components/requestHeader/index.vue +++ b/frontend/src/views/project-management/environmental/components/requestHeader/index.vue @@ -16,7 +16,7 @@ const httpHeader = defineAsyncComponent(() => import('@/views/api-test/components/requestComposition/header.vue')); defineOptions({ - name: 'EnvManangeGloblaRequestHeader', + name: 'EnvManageGlobalRequestHeader', }); const props = defineProps<{ diff --git a/frontend/src/views/project-management/environmental/index.vue b/frontend/src/views/project-management/environmental/index.vue index 56e6063a24..f7befbe428 100644 --- a/frontend/src/views/project-management/environmental/index.vue +++ b/frontend/src/views/project-management/environmental/index.vue @@ -37,7 +37,7 @@ :class="{ 'bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-5))]': activeKey === ALL_PARAM }" @click="handleListItemClick({ id: 'allParam', name: 'allParam', description: '' })" > - {{ t('project.environmental.allParam') }} + {{ t('project.environmental.requestHeader') }}