diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java index b62f6ce780..db1310f40c 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDocShareLogService.java @@ -26,7 +26,7 @@ public class ApiDocShareLogService { * @return 日志 */ public LogDTO addLog(ApiDocShareEditRequest request) { - LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, request.getName()); + LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.SHARE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(request)); @@ -40,7 +40,7 @@ public class ApiDocShareLogService { * @return 日志 */ public LogDTO updateLog(ApiDocShareEditRequest request) { - LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + request.getName()); + LogDTO dto = new LogDTO(request.getProjectId(), null, null, null,OperationLogType.UPDATE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, request.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(request)); @@ -55,7 +55,7 @@ public class ApiDocShareLogService { */ public LogDTO deleteLog(String id) { ApiDocShare docShare = apiDocShareMapper.selectByPrimaryKey(id); - LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION, "【分享接口功能】" + docShare.getName()); + LogDTO dto = new LogDTO(docShare.getProjectId(), null, null, null,OperationLogType.DELETE.name(), OperationLogModule.API_TEST_MANAGEMENT_DEFINITION_SHARE, docShare.getName()); dto.setHistory(true); dto.setMethod(HttpMethodConstants.POST.name()); dto.setOriginalValue(JSON.toJSONBytes(docShare)); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java index e9fe9a9b88..443d3b8525 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java @@ -20,6 +20,7 @@ public class OperationLogModule { public static final String API_AUTOMATION_REPORT = "API_AUTOMATION_REPORT"; // 接口管理 public static final String API_TEST_MANAGEMENT_DEFINITION = "API_TEST_MANAGEMENT_DEFINITION"; + public static final String API_TEST_MANAGEMENT_DEFINITION_SHARE = "API_TEST_MANAGEMENT_DEFINITION_SHARE"; public static final String API_TEST_MANAGEMENT_MODULE = "API_TEST_MANAGEMENT_MODULE"; public static final String API_TEST_MANAGEMENT_MOCK = "API_TEST_MANAGEMENT_MOCK"; public static final String API_TEST_MANAGEMENT_CASE = "API_TEST_MANAGEMENT_CASE"; diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 73a91b2c1b..08f2fb9584 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -81,6 +81,15 @@ export const pathMap: PathMapItem[] = [ routeQuery: { tab: 'api', }, + children: [ + { + key: 'API_TEST_MANAGEMENT_DEFINITION_SHARE', // 接口测试-接口定义-模块 + locale: 'common.share', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + ], }, { key: 'API_TEST_MANAGEMENT_MOCK', // 接口测试-接口定义-mock diff --git a/frontend/src/views/setting/system/log/components/logCards.vue b/frontend/src/views/setting/system/log/components/logCards.vue index 413269d479..81425a06e4 100644 --- a/frontend/src/views/setting/system/log/components/logCards.vue +++ b/frontend/src/views/setting/system/log/components/logCards.vue @@ -140,7 +140,8 @@ record.module === 'SYSTEM' || record.type === 'DELETE' || record.module.includes('MODULE') || - record.module.includes('TASK_CENTER') + record.module.includes('TASK_CENTER') || + record.module.includes('API_TEST_MANAGEMENT_DEFINITION_SHARE') " class="one-line-text" >