fix(系统设置): 日志操作对象国际化问题
--bug=1009210 --user=lyh 【国际化】系统设置,问题补充 https://www.tapd.cn/55049933/s/1102107
This commit is contained in:
parent
9e371e2bf9
commit
35630a91ad
|
@ -10,6 +10,7 @@ import io.metersphere.api.dto.automation.ExecuteType;
|
|||
import io.metersphere.api.service.ApiScenarioReportService;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
|
@ -44,7 +45,7 @@ public class APIScenarioReportController {
|
|||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "api_automation_report", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = ApiScenarioReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION_REPORT, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = ApiScenarioReportService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_REPORT_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.get(#request.id)", targetClass = ApiScenarioReportService.class,
|
||||
mailTemplate = "api/ReportDelete", subject = "接口报告通知")
|
||||
public void delete(@RequestBody DeleteAPIReportRequest request) {
|
||||
|
@ -52,7 +53,7 @@ public class APIScenarioReportController {
|
|||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@MsAuditLog(module = "api_automation_report", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#reportRequest.ids)", msClass = ApiScenarioReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION_REPORT, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#reportRequest.ids)", msClass = ApiScenarioReportService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_REPORT_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getByIds(#request.ids)", targetClass = ApiScenarioReportService.class,
|
||||
mailTemplate = "api/ReportDelete", subject = "接口报告通知")
|
||||
public void deleteAPIReportBatch(@RequestBody APIReportBatchRequest request) {
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/create")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
@RequiresPermissions(value = {PermissionConstants.PROJECT_API_SCENARIO_READ_CREATE, PermissionConstants.PROJECT_API_SCENARIO_READ_COPY}, logical = Logical.OR)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, event = NoticeConstants.Event.CREATE, mailTemplate = "api/AutomationCreate", subject = "接口自动化通知")
|
||||
public ApiScenario create(@RequestPart("request") SaveApiScenarioRequest request, @RequestPart(value = "bodyFiles", required = false) List<MultipartFile> bodyFiles,
|
||||
|
@ -107,7 +107,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/update")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
@RequiresPermissions(value = {PermissionConstants.PROJECT_API_SCENARIO_READ_EDIT, PermissionConstants.PROJECT_API_SCENARIO_READ_COPY}, logical = Logical.OR)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, event = NoticeConstants.Event.UPDATE, mailTemplate = "api/AutomationUpdate", subject = "接口自动化通知")
|
||||
public ApiScenario update(@RequestPart("request") SaveApiScenarioRequest request, @RequestPart(value = "bodyFiles", required = false) List<MultipartFile> bodyFiles,
|
||||
|
@ -122,14 +122,14 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiAutomationService.class)
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_DELETE)
|
||||
public void delete(@PathVariable String id) {
|
||||
apiAutomationService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBatch")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getScenarioCaseByIds(#ids)", targetClass = ApiAutomationService.class,
|
||||
mailTemplate = "api/AutomationUpdate", subject = "接口自动化通知")
|
||||
public void deleteBatch(@RequestBody List<String> ids) {
|
||||
|
@ -137,13 +137,13 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping("/deleteBatchByCondition")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
public void deleteBatchByCondition(@RequestBody ApiScenarioBatchRequest request) {
|
||||
apiAutomationService.deleteBatchByCondition(request);
|
||||
}
|
||||
|
||||
@PostMapping("/removeToGc")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getApiScenarios(#ids)", targetClass = ApiAutomationService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "api/AutomationDelete", subject = "接口自动化通知")
|
||||
public void removeToGc(@RequestBody List<String> ids) {
|
||||
|
@ -151,7 +151,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping("/removeToGcByBatch")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_GC, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_GC, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getApiScenarios(#request.ids)", targetClass = ApiAutomationService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "api/AutomationDelete", subject = "接口自动化通知")
|
||||
public void removeToGcByBatch(@RequestBody ApiScenarioBatchRequest request) {
|
||||
|
@ -165,7 +165,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping("/reduction")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiAutomationService.class)
|
||||
public void reduction(@RequestBody List<String> ids) {
|
||||
apiAutomationService.reduction(ids);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/run/debug")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.DEBUG, title = "#request.scenarioName", sourceId = "#request.scenarioId", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.DEBUG, title = "#request.scenarioName", sourceId = "#request.scenarioId", project = "#request.projectId")
|
||||
public void runDebug(@RequestPart("request") RunDefinitionRequest request,
|
||||
@RequestPart(value = "bodyFiles", required = false) List<MultipartFile> bodyFiles, @RequestPart(value = "scenarioFiles", required = false) List<MultipartFile> scenarioFiles) {
|
||||
if (StringUtils.isEmpty(request.getExecuteType())) {
|
||||
|
@ -206,7 +206,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/run")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
public List<MsExecResponseDTO> run(@RequestBody RunScenarioRequest request) {
|
||||
if (!StringUtils.equals(request.getExecuteType(), ExecuteType.Saved.name())) {
|
||||
request.setExecuteType(ExecuteType.Completed.name());
|
||||
|
@ -217,7 +217,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/run/jenkins")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.id)", msClass = ApiAutomationService.class)
|
||||
public List<MsExecResponseDTO> runByJenkins(@RequestBody RunScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Saved.name());
|
||||
request.setTriggerMode(TriggerMode.API.name());
|
||||
|
@ -226,7 +226,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/run/batch")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
public List<MsExecResponseDTO> runBatch(@RequestBody RunScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Saved.name());
|
||||
request.setTriggerMode(TriggerMode.BATCH.name());
|
||||
|
@ -236,7 +236,7 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping("/batch/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_EDIT)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, event = NoticeConstants.Event.UPDATE, target = "#targetClass.getScenarioCaseByIds(#request.ids)", targetClass = ApiAutomationService.class,
|
||||
mailTemplate = "api/AutomationUpdate", subject = "接口自动化通知")
|
||||
public void bathEdit(@RequestBody ApiScenarioBatchRequest request) {
|
||||
|
@ -252,7 +252,7 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping("/batch/update/env")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_EDIT)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
|
||||
public void batchUpdateEnv(@RequestBody ApiScenarioBatchRequest request) {
|
||||
apiAutomationService.batchUpdateEnv(request);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ public class ApiAutomationController {
|
|||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = ApiAutomationService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = ApiAutomationService.class)
|
||||
public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) {
|
||||
apiAutomationService.relevance(request);
|
||||
}
|
||||
|
@ -310,14 +310,14 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping(value = "/import", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_IMPORT_SCENARIO)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.IMPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.IMPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public ScenarioImport scenarioImport(@RequestPart(value = "file", required = false) MultipartFile file, @RequestPart("request") ApiTestImportRequest request) {
|
||||
return apiAutomationService.scenarioImport(file, request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/export")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_EXPORT_SCENARIO)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public ApiScenrioExportResult export(@RequestBody ApiScenarioBatchRequest request) {
|
||||
return apiAutomationService.export(request);
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping(value = "/export/zip")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_EXPORT_SCENARIO)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public ResponseEntity<byte[]> downloadBodyFiles(@RequestBody ApiScenarioBatchRequest request) {
|
||||
byte[] bytes = apiAutomationService.exportZip(request);
|
||||
return ResponseEntity.ok()
|
||||
|
@ -357,7 +357,7 @@ public class ApiAutomationController {
|
|||
|
||||
@PostMapping(value = "/export/jmx")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_READ_EXPORT_SCENARIO)
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public List<ApiScenarioExportJmxDTO> exportJmx(@RequestBody ApiScenarioBatchRequest request) {
|
||||
return apiAutomationService.exportJmx(request);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
|
|||
import io.metersphere.base.domain.Schedule;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.json.JSONSchemaGenerator;
|
||||
import io.metersphere.commons.json.JSONToDocumentUtils;
|
||||
|
@ -101,7 +102,7 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping(value = "/create", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CREATE, mailTemplate = "api/DefinitionCreate", subject = "接口定义通知")
|
||||
public ApiDefinitionWithBLOBs create(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
checkPermissionService.checkProjectOwner(request.getProjectId());
|
||||
|
@ -110,7 +111,7 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping(value = "/update", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_EDIT_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.UPDATE, mailTemplate = "api/DefinitionUpdate", subject = "接口定义通知")
|
||||
public ApiDefinitionWithBLOBs update(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
checkPermissionService.checkProjectOwner(request.getProjectId());
|
||||
|
@ -119,14 +120,14 @@ public class ApiDefinitionController {
|
|||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_DELETE_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiDefinitionService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
apiDefinitionService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBatch")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_DELETE_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
public void deleteBatch(@RequestBody List<String> ids) {
|
||||
apiDefinitionService.deleteBatch(ids);
|
||||
}
|
||||
|
@ -141,14 +142,14 @@ public class ApiDefinitionController {
|
|||
}
|
||||
|
||||
@PostMapping("/deleteBatchByParams")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
public void deleteBatchByParams(@RequestBody ApiBatchRequest request) {
|
||||
apiDefinitionService.deleteByParams(request);
|
||||
}
|
||||
|
||||
@PostMapping("/removeToGc")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_DELETE_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, target = "#targetClass.getBLOBs(#ids)", targetClass = ApiDefinitionService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "api/DefinitionDelete", subject = "接口定义通知")
|
||||
public void removeToGc(@RequestBody List<String> ids) {
|
||||
|
@ -157,7 +158,7 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping("/removeToGcByParams")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_DELETE_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.BATCH_GC, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.BATCH_GC, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getBLOBs(#request.ids)", targetClass = ApiDefinitionService.class,
|
||||
mailTemplate = "api/DefinitionUpdate", subject = "接口定义通知")
|
||||
public void removeToGcByParams(@RequestBody ApiBatchRequest request) {
|
||||
|
@ -165,7 +166,7 @@ public class ApiDefinitionController {
|
|||
}
|
||||
|
||||
@PostMapping("/reduction")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class)
|
||||
public void reduction(@RequestBody ApiBatchRequest request) {
|
||||
apiDefinitionService.reduction(request);
|
||||
}
|
||||
|
@ -177,14 +178,14 @@ public class ApiDefinitionController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/run/debug", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.DEBUG, title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.DEBUG, title = "#request.name", project = "#request.projectId")
|
||||
public MsExecResponseDTO runDebug(@RequestPart("request") RunDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
request.setDebug(true);
|
||||
return apiDefinitionService.run(request, bodyFiles);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.EXECUTE, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.EXECUTE, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public MsExecResponseDTO run(@RequestPart("request") RunDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
request.setReportId(null);
|
||||
return apiDefinitionService.run(request, bodyFiles);
|
||||
|
@ -212,21 +213,21 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping(value = "/import", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_IMPORT_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.IMPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.IMPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public ApiDefinitionImport testCaseImport(@RequestPart(value = "file", required = false) MultipartFile file, @RequestPart("request") ApiTestImportRequest request) {
|
||||
return apiDefinitionService.apiTestImport(file, request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/export/{type}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_EXPORT_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public ApiExportResult export(@RequestBody ApiBatchRequest request, @PathVariable String type) {
|
||||
return apiDefinitionService.export(request, type);
|
||||
}
|
||||
|
||||
//定时任务创建
|
||||
@PostMapping(value = "/schedule/create")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.CREATE, title = "#request.scheduleFrom", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.CREATE, title = "#request.scheduleFrom", project = "#request.projectId")
|
||||
public void createSchedule(@RequestBody ScheduleRequest request) {
|
||||
apiDefinitionService.createSchedule(request);
|
||||
}
|
||||
|
@ -273,7 +274,7 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping("/batch/editByParams")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_EDIT_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.UPDATE, target = "#targetClass.getBLOBs(#request.ids)", targetClass = ApiDefinitionService.class,
|
||||
mailTemplate = "api/DefinitionUpdate", subject = "接口定义通知")
|
||||
public void editByParams(@RequestBody ApiBatchRequest request) {
|
||||
|
@ -282,13 +283,13 @@ public class ApiDefinitionController {
|
|||
|
||||
@PostMapping("/batch/copy")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_COPY_API)
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
public void batchCopy(@RequestBody ApiBatchRequest request) {
|
||||
apiDefinitionService.batchCopy(request);
|
||||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = ApiDefinitionService.class)
|
||||
public void testPlanRelevance(@RequestBody ApiCaseRelevanceRequest request) {
|
||||
apiDefinitionService.testPlanRelevance(request);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.metersphere.api.dto.definition.DragModuleRequest;
|
|||
import io.metersphere.api.service.ApiModuleService;
|
||||
import io.metersphere.base.domain.ApiModule;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.ApiDefinitionDefaultApiTypeUtil;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
|
@ -70,26 +71,26 @@ public class ApiModuleController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
public String addNode(@RequestBody ApiModule node) {
|
||||
return apiModuleService.addNode(node);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
public int editNode(@RequestBody DragModuleRequest node) {
|
||||
return apiModuleService.editNode(node);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = ApiModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = ApiModuleService.class)
|
||||
public int deleteNode(@RequestBody List<String> nodeIds) {
|
||||
//nodeIds 包含删除节点ID及其所有子节点ID
|
||||
return apiModuleService.deleteNode(nodeIds);
|
||||
}
|
||||
|
||||
@PostMapping("/drag")
|
||||
@MsAuditLog(module = "api_definition", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiModuleService.class)
|
||||
public void dragNode(@RequestBody DragModuleRequest node) {
|
||||
apiModuleService.dragNode(node);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.metersphere.api.dto.automation.DragApiScenarioModuleRequest;
|
|||
import io.metersphere.api.service.ApiScenarioModuleService;
|
||||
import io.metersphere.base.domain.ApiScenarioModule;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.service.CheckPermissionService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -46,14 +47,14 @@ public class ApiScenarioModuleController {
|
|||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = ApiScenarioModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = ApiScenarioModuleService.class)
|
||||
public int deleteNode(@RequestBody List<String> nodeIds) {
|
||||
//nodeIds 包含删除节点ID及其所有子节点ID
|
||||
return apiScenarioModuleService.deleteNode(nodeIds);
|
||||
}
|
||||
|
||||
@PostMapping("/drag")
|
||||
@MsAuditLog(module = "api_automation", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
|
||||
public void dragNode(@RequestBody DragApiScenarioModuleRequest node) {
|
||||
apiScenarioModuleService.dragNode(node);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
|
|||
import io.metersphere.base.domain.ApiTestEnvironment;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.ReportTriggerMode;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -99,27 +100,27 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/create", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_CREATE, mailTemplate = "api/CaseCreate", subject = "接口用例通知")
|
||||
public ApiTestCase create(@RequestPart("request") SaveApiTestCaseRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
return apiTestCaseService.create(request, bodyFiles);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/update", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", title = "#request.name", content = "#msClass.getLogDetails(#request)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", title = "#request.name", content = "#msClass.getLogDetails(#request)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_UPDATE, mailTemplate = "api/CaseUpdate", subject = "接口用例通知")
|
||||
public ApiTestCase update(@RequestPart("request") SaveApiTestCaseRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
return apiTestCaseService.update(request, bodyFiles);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestCaseService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
apiTestCaseService.delete(id);
|
||||
}
|
||||
|
||||
@GetMapping("/deleteToGc/{id}")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_DELETE, target = "#targetClass.get(#id)", targetClass = ApiTestCaseService.class,
|
||||
mailTemplate = "api/CaseDelete", subject = "接口用例通知")
|
||||
public void deleteToGc(@PathVariable String id) {
|
||||
|
@ -127,7 +128,7 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/removeToGc")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiTestCaseService.class)
|
||||
public void removeToGc(@RequestBody List<String> ids) {
|
||||
apiTestCaseService.removeToGc(ids);
|
||||
}
|
||||
|
@ -143,7 +144,7 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/batch/editByParam")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_UPDATE, target = "#targetClass.getApiCaseByIds(#request.ids)", targetClass = ApiTestCaseService.class,
|
||||
mailTemplate = "api/CaseUpdate", subject = "接口用例通知")
|
||||
public void editApiBathByParam(@RequestBody ApiTestBatchRequest request) {
|
||||
|
@ -156,26 +157,26 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/reduction")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
public List<String> reduction(@RequestBody ApiTestBatchRequest request) {
|
||||
List<String> cannotReductionTestCaseApiName = apiTestCaseService.reduction(request);
|
||||
return cannotReductionTestCaseApiName;
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBatch")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiTestCaseService.class)
|
||||
public void deleteBatch(@RequestBody List<String> ids) {
|
||||
apiTestCaseService.deleteBatch(ids);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBatchByParam")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
public void deleteBatchByParam(@RequestBody ApiTestBatchRequest request) {
|
||||
apiTestCaseService.deleteBatchByParam(request);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteToGcByParam")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_DELETE, target = "#targetClass.getApiCaseByIds(#request.ids)", targetClass = ApiTestCaseService.class,
|
||||
mailTemplate = "api/CaseDelete", subject = "接口用例通知")
|
||||
public void deleteToGcByParam(@RequestBody ApiTestBatchRequest request) {
|
||||
|
@ -198,14 +199,14 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/batch/run")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.caseId)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.caseId)", msClass = ApiTestCaseService.class)
|
||||
public void batchRun(@RequestBody ApiCaseRunRequest request) {
|
||||
request.setTriggerMode(ReportTriggerMode.BATCH.name());
|
||||
apiCaseExecuteService.run(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/jenkins/run")
|
||||
@MsAuditLog(module = "api_definition_case", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.caseId)", msClass = ApiTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.caseId)", msClass = ApiTestCaseService.class)
|
||||
public MsExecResponseDTO jenkinsRun(@RequestBody RunCaseRequest request) {
|
||||
return apiExecuteService.jenkinsRun(request);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.api.service.ApiTestEnvironmentService;
|
|||
import io.metersphere.api.service.CommandService;
|
||||
import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.EnvironmentRequest;
|
||||
|
@ -58,19 +59,19 @@ public class ApiTestEnvironmentController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "project_environment_setting", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#apiTestEnvironmentWithBLOBs.id)", msClass = ApiTestEnvironmentService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#apiTestEnvironmentWithBLOBs.id)", msClass = ApiTestEnvironmentService.class)
|
||||
public String create(@RequestPart("request") ApiTestEnvironmentDTO apiTestEnvironmentWithBLOBs, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles) {
|
||||
return apiTestEnvironmentService.add(apiTestEnvironmentWithBLOBs, sslFiles);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/update")
|
||||
@MsAuditLog(module = "project_environment_setting", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#apiTestEnvironment.id)", content = "#msClass.getLogDetails(#apiTestEnvironment.id)", msClass = ApiTestEnvironmentService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#apiTestEnvironment.id)", content = "#msClass.getLogDetails(#apiTestEnvironment.id)", msClass = ApiTestEnvironmentService.class)
|
||||
public void update(@RequestPart("request") ApiTestEnvironmentDTO apiTestEnvironment, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles) {
|
||||
apiTestEnvironmentService.update(apiTestEnvironment, sslFiles);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "project_environment_setting", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestEnvironmentService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = ApiTestEnvironmentService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
apiTestEnvironmentService.delete(id);
|
||||
}
|
||||
|
|
|
@ -47,15 +47,6 @@ public class MockConfigController {
|
|||
return mockConfigService.updateMockExpectConfigStatus(request);
|
||||
}
|
||||
|
||||
// @PostMapping(value = "/create", consumes = {"multipart/form-data"})
|
||||
// @RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API)
|
||||
// @MsAuditLog(module = "api_definition", type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
// @SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CREATE, mailTemplate = "api/DefinitionCreate", subject = "接口定义通知")
|
||||
// public ApiDefinitionWithBLOBs create(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
// checkPermissionService.checkProjectOwner(request.getProjectId());
|
||||
// return apiDefinitionService.create(request, bodyFiles);
|
||||
// }
|
||||
|
||||
@GetMapping("/mockExpectConfig/{id}")
|
||||
public MockExpectConfigResponse selectMockExpectConfig(@PathVariable String id) {
|
||||
MockExpectConfigWithBLOBs config = mockConfigService.findMockExpectConfigById(id);
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package io.metersphere.commons.constants;
|
||||
|
||||
public class OperLogModule {
|
||||
public static final String SYSTEM_PARAMETER_SETTING = "SYSTEM_PARAMETER_SETTING";
|
||||
public static final String SYSTEM_TEST_RESOURCE = "SYSTEM_TEST_RESOURCE";
|
||||
public static final String SYSTEM_USER = "SYSTEM_USER";
|
||||
public static final String SYSTEM_WORKSPACE = "SYSTEM_WORKSPACE";
|
||||
public static final String WORKSPACE_TEMPLATE_SETTINGS = "WORKSPACE_TEMPLATE_SETTINGS";
|
||||
public static final String WORKSPACE_MESSAGE_SETTINGS = "WORKSPACE_MESSAGE_SETTINGS";
|
||||
public static final String WORKSPACE_TEMPLATE_SETTINGS_FIELD = "WORKSPACE_TEMPLATE_SETTINGS_FIELD";
|
||||
public static final String WORKSPACE_TEMPLATE_SETTINGS_ISSUE = "WORKSPACE_TEMPLATE_SETTINGS_ISSUE";
|
||||
public static final String WORKSPACE_SERVICE_INTEGRATION = "WORKSPACE_SERVICE_INTEGRATION";
|
||||
public static final String WORKSPACE_TEMPLATE_SETTINGS_CASE = "WORKSPACE_TEMPLATE_SETTINGS_CASE";
|
||||
public static final String WORKSPACE_MEMBER = "WORKSPACE_MEMBER";
|
||||
public static final String API_AUTOMATION = "API_AUTOMATION";
|
||||
public static final String API_AUTOMATION_REPORT = "API_AUTOMATION_REPORT";
|
||||
public static final String API_DEFINITION = "API_DEFINITION";
|
||||
public static final String API_DEFINITION_CASE = "API_DEFINITION_CASE";
|
||||
public static final String TRACK_TEST_PLAN = "TRACK_TEST_PLAN";
|
||||
public static final String TRACK_BUG = "TRACK_BUG";
|
||||
public static final String TRACK_TEST_CASE_REVIEW = "TRACK_TEST_CASE_REVIEW";
|
||||
public static final String TRACK_TEST_CASE = "TRACK_TEST_CASE";
|
||||
public static final String TRACK_REPORT = "TRACK_REPORT";
|
||||
public static final String AUTH_TITLE = "AUTH_TITLE";
|
||||
public static final String PROJECT_PROJECT_JAR = "PROJECT_PROJECT_JAR";
|
||||
public static final String PROJECT_ENVIRONMENT_SETTING = "PROJECT_ENVIRONMENT_SETTING";
|
||||
public static final String PROJECT_PROJECT_MANAGER = "PROJECT_PROJECT_MANAGER";
|
||||
public static final String PROJECT_FILE_MANAGEMENT = "PROJECT_FILE_MANAGEMENT";
|
||||
public static final String PROJECT_PROJECT_MEMBER = "PROJECT_PROJECT_MEMBER";
|
||||
public static final String PERSONAL_INFORMATION_PERSONAL_SETTINGS = "PERSONAL_INFORMATION_PERSONAL_SETTINGS";
|
||||
public static final String PERSONAL_INFORMATION_APIKEYS = "PERSONAL_INFORMATION_APIKEYS";
|
||||
public static final String GROUP_PERMISSION = "GROUP_PERMISSION";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.CustomField;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.QueryCustomFieldRequest;
|
||||
|
@ -23,7 +24,7 @@ public class CustomFieldController {
|
|||
private CustomFieldService customFieldService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "workspace_template_settings_field", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#customField.id)", msClass = CustomFieldService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_FIELD, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#customField.id)", msClass = CustomFieldService.class)
|
||||
public String add(@RequestBody CustomField customField) {
|
||||
return customFieldService.add(customField);
|
||||
}
|
||||
|
@ -40,13 +41,13 @@ public class CustomFieldController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "workspace_template_settings_field", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = CustomFieldService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_FIELD, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = CustomFieldService.class)
|
||||
public void delete(@PathVariable(value = "id") String id) {
|
||||
customFieldService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "workspace_template_settings_field", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#customField.id)", content = "#msClass.getLogDetails(#customField.id)", msClass = CustomFieldService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_FIELD, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#customField.id)", content = "#msClass.getLogDetails(#customField.id)", msClass = CustomFieldService.class)
|
||||
public void update(@RequestBody CustomField customField) {
|
||||
customFieldService.update(customField);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.metersphere.base.domain.Group;
|
|||
import io.metersphere.base.domain.User;
|
||||
import io.metersphere.base.domain.Workspace;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -54,7 +55,7 @@ public class GroupController {
|
|||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_CREATE, PermissionConstants.PROJECT_GROUP_READ_CREATE}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
@MsAuditLog(module = OperLogModule.GROUP_PERMISSION, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
public Group addGroup(@RequestBody EditGroupRequest request) {
|
||||
request.setId(UUID.randomUUID().toString());
|
||||
return groupService.addGroup(request);
|
||||
|
@ -62,14 +63,14 @@ public class GroupController {
|
|||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_EDIT, PermissionConstants.PROJECT_GROUP_READ_EDIT}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
@MsAuditLog(module = OperLogModule.GROUP_PERMISSION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
public void editGroup(@RequestBody EditGroupRequest request) {
|
||||
groupService.editGroup(request);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresPermissions(value = {PermissionConstants.SYSTEM_GROUP_READ_DELETE, PermissionConstants.PROJECT_GROUP_READ_DELETE}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = GroupService.class)
|
||||
@MsAuditLog(module = OperLogModule.GROUP_PERMISSION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = GroupService.class)
|
||||
public void deleteGroup(@PathVariable String id) {
|
||||
groupService.deleteGroup(id);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.IssueTemplate;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.BaseQueryRequest;
|
||||
|
@ -24,7 +25,7 @@ public class IssueTemplateController {
|
|||
private IssueTemplateService issueTemplateService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "workspace_template_settings_issue", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_ISSUE, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
public void add(@RequestBody UpdateIssueTemplateRequest request) {
|
||||
issueTemplateService.add(request);
|
||||
}
|
||||
|
@ -36,13 +37,13 @@ public class IssueTemplateController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "workspace_template_settings_issue", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssueTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_ISSUE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssueTemplateService.class)
|
||||
public void delete(@PathVariable(value = "id") String id) {
|
||||
issueTemplateService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "workspace_template_settings_issue", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id,#request.customFields)", content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_ISSUE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id,#request.customFields)", content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
public void update(@RequestBody UpdateIssueTemplateRequest request) {
|
||||
issueTemplateService.update(request);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.JarConfig;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
|
@ -43,19 +44,19 @@ public class JarConfigController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/add", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "project_project_jar", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = JarConfigService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_JAR, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = JarConfigService.class)
|
||||
public String add(@RequestPart("request") JarConfig request, @RequestPart(value = "file", required = false) MultipartFile file) {
|
||||
return JarConfigService.add(request, file);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/update", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "project_project_jar", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = JarConfigService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_JAR, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = JarConfigService.class)
|
||||
public void update(@RequestPart("request") JarConfig request, @RequestPart(value = "file", required = false) MultipartFile file) {
|
||||
JarConfigService.update(request, file);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "project_project_jar", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = JarConfigService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_JAR, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = JarConfigService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
JarConfigService.delete(id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.metersphere.controller;
|
||||
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.UserSource;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.RsaKey;
|
||||
|
@ -50,7 +51,7 @@ public class LoginController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/signin")
|
||||
@MsAuditLog(module = "auth_title", type = OperLogConstants.LOGIN, title = "登录")
|
||||
@MsAuditLog(module = OperLogModule.AUTH_TITLE, type = OperLogConstants.LOGIN, title = "登录")
|
||||
public ResultHolder login(@RequestBody LoginRequest request) {
|
||||
SessionUser sessionUser = SessionUtils.getUser();
|
||||
if (sessionUser != null) {
|
||||
|
@ -68,7 +69,7 @@ public class LoginController {
|
|||
}
|
||||
|
||||
@GetMapping(value = "/signout")
|
||||
@MsAuditLog(module = "auth_title", beforeEvent = "#msClass.getUserId(id)", type = OperLogConstants.LOGIN, title = "登出", msClass = SessionUtils.class)
|
||||
@MsAuditLog(module = OperLogModule.AUTH_TITLE, beforeEvent = "#msClass.getUserId(id)", type = OperLogConstants.LOGIN, title = "登出", msClass = SessionUtils.class)
|
||||
public ResultHolder logout() throws Exception {
|
||||
userService.logout();
|
||||
SecurityUtils.getSubject().logout();
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.metersphere.api.service.ApiTestEnvironmentService;
|
|||
import io.metersphere.base.domain.FileMetadata;
|
||||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
|
@ -70,7 +71,7 @@ public class ProjectController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "project_project_manager", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#project.id)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_MANAGER, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#project.id)", msClass = ProjectService.class)
|
||||
public Project addProject(@RequestBody AddProjectRequest project, HttpServletRequest request) {
|
||||
Project returnModel = projectService.addProject(project);
|
||||
//创建项目的时候默认增加Mock环境
|
||||
|
@ -97,37 +98,37 @@ public class ProjectController {
|
|||
|
||||
|
||||
@GetMapping("/delete/{projectId}")
|
||||
@MsAuditLog(module = "project_project_manager", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#projectId)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_MANAGER, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#projectId)", msClass = ProjectService.class)
|
||||
public void deleteProject(@PathVariable(value = "projectId") String projectId) {
|
||||
projectService.deleteProject(projectId);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "project_project_manager", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#Project.id)", content = "#msClass.getLogDetails(#Project.id)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_MANAGER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#Project.id)", content = "#msClass.getLogDetails(#Project.id)", msClass = ProjectService.class)
|
||||
public void updateProject(@RequestBody Project Project) {
|
||||
projectService.updateProject(Project);
|
||||
}
|
||||
|
||||
@PostMapping(value = "upload/files/{projectId}", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "project_file_management", type = OperLogConstants.IMPORT, content = "#msClass.getLogDetails(#projectId)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_FILE_MANAGEMENT, type = OperLogConstants.IMPORT, content = "#msClass.getLogDetails(#projectId)", msClass = ProjectService.class)
|
||||
public List<FileMetadata> uploadFiles(@PathVariable String projectId, @RequestPart(value = "file", required = false) List<MultipartFile> files) {
|
||||
return projectService.uploadFiles(projectId, files);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/update/file/{fileId}", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "project_file_management", type = OperLogConstants.IMPORT, content = "#msClass.getLogDetails(#fileId)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_FILE_MANAGEMENT, type = OperLogConstants.IMPORT, content = "#msClass.getLogDetails(#fileId)", msClass = ProjectService.class)
|
||||
public FileMetadata updateFile(@PathVariable String fileId, @RequestPart(value = "file", required = false) MultipartFile file) {
|
||||
return projectService.updateFile(fileId, file);
|
||||
}
|
||||
|
||||
@GetMapping(value = "delete/file/{fileId}")
|
||||
@MsAuditLog(module = "project_project_manager", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#fileId)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_MANAGER, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#fileId)", msClass = ProjectService.class)
|
||||
public void deleteFile(@PathVariable String fileId) {
|
||||
projectService.deleteFile(fileId);
|
||||
}
|
||||
|
||||
@PostMapping("/member/update")
|
||||
@MsAuditLog(module = "project_project_member", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#memberDTO)", content = "#msClass.getLogDetails(#memberDTO)", msClass = ProjectService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_PROJECT_MEMBER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#memberDTO)", content = "#msClass.getLogDetails(#memberDTO)", msClass = ProjectService.class)
|
||||
public void updateMember(@RequestBody WorkspaceMemberDTO memberDTO) {
|
||||
projectService.updateMember(memberDTO);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.controller;
|
|||
|
||||
import io.metersphere.base.domain.ServiceIntegration;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.controller.request.IntegrationRequest;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.service.IntegrationService;
|
||||
|
@ -18,7 +19,7 @@ public class ServiceIntegrationController {
|
|||
private IntegrationService integrationService;
|
||||
|
||||
@PostMapping("/save")
|
||||
@MsAuditLog(module = "workspace_service_integration", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#service.id)", msClass = IntegrationService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_SERVICE_INTEGRATION, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#service.id)", msClass = IntegrationService.class)
|
||||
public ServiceIntegration save(@RequestBody ServiceIntegration service) {
|
||||
return integrationService.save(service);
|
||||
}
|
||||
|
@ -29,7 +30,7 @@ public class ServiceIntegrationController {
|
|||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "workspace_service_integration", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = IntegrationService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_SERVICE_INTEGRATION, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = IntegrationService.class)
|
||||
public void delete(@RequestBody IntegrationRequest request) {
|
||||
integrationService.delete(request);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import io.metersphere.base.domain.SystemHeader;
|
|||
import io.metersphere.base.domain.SystemParameter;
|
||||
import io.metersphere.base.domain.UserHeader;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.ParamConstants;
|
||||
import io.metersphere.controller.request.HeaderRequest;
|
||||
import io.metersphere.dto.BaseSystemConfigDTO;
|
||||
|
@ -38,7 +39,7 @@ public class SystemParameterController {
|
|||
private ProjectService projectService;
|
||||
|
||||
@PostMapping("/edit/email")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.UPDATE, title = "邮件设置", beforeEvent = "#msClass.getMailLogDetails()", content = "#msClass.getMailLogDetails()", msClass = SystemParameterService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.UPDATE, title = "邮件设置", beforeEvent = "#msClass.getMailLogDetails()", content = "#msClass.getMailLogDetails()", msClass = SystemParameterService.class)
|
||||
public void editMail(@RequestBody List<SystemParameter> systemParameter) {
|
||||
systemParameterService.editMail(systemParameter);
|
||||
}
|
||||
|
@ -79,7 +80,7 @@ public class SystemParameterController {
|
|||
}
|
||||
|
||||
@PostMapping("/save/base")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getBaseLogDetails()", content = "#msClass.getBaseLogDetails()", msClass = SystemParameterService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getBaseLogDetails()", content = "#msClass.getBaseLogDetails()", msClass = SystemParameterService.class)
|
||||
public void saveBaseInfo(@RequestBody List<SystemParameter> systemParameter) {
|
||||
systemParameterService.saveBaseInfo(systemParameter);
|
||||
}
|
||||
|
@ -90,7 +91,7 @@ public class SystemParameterController {
|
|||
}
|
||||
|
||||
@PostMapping("/save/ldap")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails()", content = "#msClass.getLogDetails()", msClass = SystemParameterService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails()", content = "#msClass.getLogDetails()", msClass = SystemParameterService.class)
|
||||
public void saveLdap(@RequestBody List<SystemParameter> systemParameter) {
|
||||
systemParameterService.saveLdap(systemParameter);
|
||||
}
|
||||
|
@ -101,7 +102,7 @@ public class SystemParameterController {
|
|||
}
|
||||
|
||||
@PostMapping("save/header")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.UPDATE, title = "显示设置")
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.UPDATE, title = "显示设置")
|
||||
public void saveHeader(@RequestBody UserHeader userHeader) {
|
||||
systemParameterService.saveHeader(userHeader);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
|
|||
import io.metersphere.base.domain.TestCaseTemplate;
|
||||
import io.metersphere.base.domain.TestCaseTemplateWithBLOBs;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.BaseQueryRequest;
|
||||
|
@ -26,7 +27,7 @@ public class TestCaseTemplateController {
|
|||
private TestCaseTemplateService testCaseTemplateService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "workspace_template_settings_case", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_CASE, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseTemplateService.class)
|
||||
public void add(@RequestBody UpdateCaseFieldTemplateRequest request) {
|
||||
testCaseTemplateService.add(request);
|
||||
}
|
||||
|
@ -38,13 +39,13 @@ public class TestCaseTemplateController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "workspace_template_settings_case", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_CASE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseTemplateService.class)
|
||||
public void delete(@PathVariable(value = "id") String id) {
|
||||
testCaseTemplateService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "workspace_template_settings_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseTemplateService.class)
|
||||
public void update(@RequestBody UpdateCaseFieldTemplateRequest request) {
|
||||
testCaseTemplateService.update(request);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.controller;
|
|||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.consul.CacheNode;
|
||||
|
@ -25,28 +26,28 @@ public class TestResourcePoolController {
|
|||
private TestResourcePoolService testResourcePoolService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "system_test_resource", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#testResourcePoolDTO.id)", msClass = TestResourcePoolService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_TEST_RESOURCE, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#testResourcePoolDTO.id)", msClass = TestResourcePoolService.class)
|
||||
@CacheNode // 把监控节点缓存起来
|
||||
public TestResourcePoolDTO addTestResourcePool(@RequestBody TestResourcePoolDTO testResourcePoolDTO) {
|
||||
return testResourcePoolService.addTestResourcePool(testResourcePoolDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{testResourcePoolId}")
|
||||
@MsAuditLog(module = "system_test_resource", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testResourcePoolId)", msClass = TestResourcePoolService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_TEST_RESOURCE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testResourcePoolId)", msClass = TestResourcePoolService.class)
|
||||
@CacheNode // 把监控节点缓存起来
|
||||
public void deleteTestResourcePool(@PathVariable(value = "testResourcePoolId") String testResourcePoolId) {
|
||||
testResourcePoolService.deleteTestResourcePool(testResourcePoolId);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "system_test_resource", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testResourcePoolDTO.id)", content = "#msClass.getLogDetails(#testResourcePoolDTO.id)", msClass = TestResourcePoolService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_TEST_RESOURCE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testResourcePoolDTO.id)", content = "#msClass.getLogDetails(#testResourcePoolDTO.id)", msClass = TestResourcePoolService.class)
|
||||
@CacheNode // 把监控节点缓存起来
|
||||
public void updateTestResourcePool(@RequestBody TestResourcePoolDTO testResourcePoolDTO) {
|
||||
testResourcePoolService.updateTestResourcePool(testResourcePoolDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/update/{poolId}/{status}")
|
||||
@MsAuditLog(module = "system_test_resource", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#poolId)", content = "#msClass.getLogDetails(#poolId)", msClass = TestResourcePoolService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_TEST_RESOURCE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#poolId)", content = "#msClass.getLogDetails(#poolId)", msClass = TestResourcePoolService.class)
|
||||
@CacheNode // 把监控节点缓存起来
|
||||
public void updateTestResourcePoolStatus(@PathVariable String poolId, @PathVariable String status) {
|
||||
testResourcePoolService.updateTestResourcePoolStatus(poolId, status);
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.User;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -37,7 +38,7 @@ public class UserController {
|
|||
private UserService userService;
|
||||
|
||||
@PostMapping("/special/add")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#user)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#user)", msClass = UserService.class)
|
||||
public UserDTO insertUser(@RequestBody UserRequest user) {
|
||||
return userService.insert(user);
|
||||
}
|
||||
|
@ -54,7 +55,7 @@ public class UserController {
|
|||
}
|
||||
|
||||
@GetMapping("/special/delete/{userId}")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#userId)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#userId)", msClass = UserService.class)
|
||||
public void deleteUser(@PathVariable(value = "userId") String userId) {
|
||||
userService.deleteUser(userId);
|
||||
// 剔除在线用户
|
||||
|
@ -62,13 +63,13 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("/special/update")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user)", content = "#msClass.getLogDetails(#user)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user)", content = "#msClass.getLogDetails(#user)", msClass = UserService.class)
|
||||
public void updateUser(@RequestBody UserRequest user) {
|
||||
userService.updateUserRole(user);
|
||||
}
|
||||
|
||||
@PostMapping("/special/update_status")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user.id)", content = "#msClass.getLogDetails(#user.id)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user.id)", content = "#msClass.getLogDetails(#user.id)", msClass = UserService.class)
|
||||
public void updateStatus(@RequestBody User user) {
|
||||
userService.updateUser(user);
|
||||
}
|
||||
|
@ -85,13 +86,13 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("/special/ws/member/add")
|
||||
@MsAuditLog(module = "workspace_member", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.userIds,#request.workspaceId)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.userIds,#request.workspaceId)", msClass = UserService.class)
|
||||
public void addMemberByAdmin(@RequestBody AddMemberRequest request) {
|
||||
userService.addMember(request);
|
||||
}
|
||||
|
||||
@GetMapping("/special/ws/member/delete/{workspaceId}/{userId}")
|
||||
@MsAuditLog(module = "workspace_member", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#userId)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#userId)", msClass = UserService.class)
|
||||
public void deleteMemberByAdmin(@PathVariable String workspaceId, @PathVariable String userId) {
|
||||
userService.deleteMember(workspaceId, userId);
|
||||
}
|
||||
|
@ -102,7 +103,7 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("/update/current")
|
||||
@MsAuditLog(module = "personal_information_personal_settings", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user.id)", content = "#msClass.getLogDetails(#user.id)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.PERSONAL_INFORMATION_PERSONAL_SETTINGS, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#user.id)", content = "#msClass.getLogDetails(#user.id)", msClass = UserService.class)
|
||||
public UserDTO updateCurrentUser(@RequestBody User user) {
|
||||
return userService.updateCurrentUser(user);
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ public class UserController {
|
|||
* 添加工作空间成员
|
||||
*/
|
||||
@PostMapping("/ws/member/add")
|
||||
@MsAuditLog(module = "workspace_member", type = OperLogConstants.CREATE, title = "添加工作空间成员")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.CREATE, title = "添加工作空间成员")
|
||||
public void addMember(@RequestBody AddMemberRequest request) {
|
||||
String wsId = request.getWorkspaceId();
|
||||
// workspaceService.checkWorkspaceOwner(wsId);
|
||||
|
@ -179,7 +180,7 @@ public class UserController {
|
|||
* 删除工作空间成员
|
||||
*/
|
||||
@GetMapping("/ws/member/delete/{workspaceId}/{userId}")
|
||||
@MsAuditLog(module = "workspace_member", type = OperLogConstants.DELETE, title = "删除工作空间成员")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.DELETE, title = "删除工作空间成员")
|
||||
public void deleteMember(@PathVariable String workspaceId, @PathVariable String userId) {
|
||||
// workspaceService.checkWorkspaceOwner(workspaceId);
|
||||
String currentUserId = SessionUtils.getUser().getId();
|
||||
|
@ -219,7 +220,7 @@ public class UserController {
|
|||
|
||||
/*管理员修改用户密码*/
|
||||
@PostMapping("/special/password")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = UserService.class)
|
||||
public int updateUserPassword(@RequestBody EditPassWordRequest request) {
|
||||
return userService.updateUserPassword(request);
|
||||
}
|
||||
|
@ -240,13 +241,13 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.IMPORT)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.IMPORT)
|
||||
public ExcelResponse testCaseImport(MultipartFile file, HttpServletRequest request) {
|
||||
return userService.userImport(file, request);
|
||||
}
|
||||
|
||||
@PostMapping("/special/batchProcessUserInfo")
|
||||
@MsAuditLog(module = "system_user", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = UserService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = UserService.class)
|
||||
public String batchProcessUserInfo(@RequestBody UserBatchProcessRequest request) {
|
||||
String returnString = "success";
|
||||
userService.batchProcessUserInfo(request);
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.controller;
|
|||
|
||||
import io.metersphere.base.domain.UserKey;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.security.ApiKeyHandler;
|
||||
|
@ -35,14 +36,14 @@ public class UserKeysController {
|
|||
}
|
||||
|
||||
@GetMapping("generate")
|
||||
@MsAuditLog(module = "personal_information_apikeys", type = OperLogConstants.CREATE, title = "API KEY")
|
||||
@MsAuditLog(module = OperLogModule.PERSONAL_INFORMATION_APIKEYS, type = OperLogConstants.CREATE, title = "API KEY")
|
||||
public void generateUserKey() {
|
||||
String userId = SessionUtils.getUser().getId();
|
||||
userKeyService.generateUserKey(userId);
|
||||
}
|
||||
|
||||
@GetMapping("delete/{id}")
|
||||
@MsAuditLog(module = "personal_information_apikeys", type = OperLogConstants.DELETE, title = "API KEY")
|
||||
@MsAuditLog(module = OperLogModule.PERSONAL_INFORMATION_APIKEYS, type = OperLogConstants.DELETE, title = "API KEY")
|
||||
public void deleteUserKey(@PathVariable String id) {
|
||||
userKeyService.deleteUserKey(id);
|
||||
}
|
||||
|
@ -53,7 +54,7 @@ public class UserKeysController {
|
|||
}
|
||||
|
||||
@GetMapping("disable/{id}")
|
||||
@MsAuditLog(module = "personal_information_apikeys", type = OperLogConstants.UPDATE, title = "API KEY")
|
||||
@MsAuditLog(module = OperLogModule.PERSONAL_INFORMATION_APIKEYS, type = OperLogConstants.UPDATE, title = "API KEY")
|
||||
public void disabledUserKey(@PathVariable String id) {
|
||||
userKeyService.disableUserKey(id);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.Workspace;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.WorkspaceRequest;
|
||||
|
@ -27,7 +28,7 @@ public class WorkspaceController {
|
|||
private UserService userService;
|
||||
|
||||
@PostMapping("add")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
public Workspace addWorkspace(@RequestBody Workspace workspace) {
|
||||
return workspaceService.saveWorkspace(workspace);
|
||||
}
|
||||
|
@ -38,33 +39,33 @@ public class WorkspaceController {
|
|||
}
|
||||
|
||||
@PostMapping("special/add")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
public Workspace addWorkspaceByAdmin(@RequestBody Workspace workspace) {
|
||||
return workspaceService.addWorkspaceByAdmin(workspace);
|
||||
}
|
||||
|
||||
@PostMapping("update")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#workspace.id)", content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#workspace.id)", content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
public Workspace updateWorkspace(@RequestBody Workspace workspace) {
|
||||
// workspaceService.checkWorkspaceOwnerByOrgAdmin(workspace.getId());
|
||||
return workspaceService.saveWorkspace(workspace);
|
||||
}
|
||||
|
||||
@PostMapping("special/update")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#workspace.id)", content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#workspace.id)", content = "#msClass.getLogDetails(#workspace.id)", msClass = WorkspaceService.class)
|
||||
public void updateWorkspaceByAdmin(@RequestBody Workspace workspace) {
|
||||
workspaceService.updateWorkspaceByAdmin(workspace);
|
||||
}
|
||||
|
||||
@GetMapping("special/delete/{workspaceId}")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#workspaceId)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#workspaceId)", msClass = WorkspaceService.class)
|
||||
public void deleteWorkspaceByAdmin(@PathVariable String workspaceId) {
|
||||
userService.refreshSessionUser("workspace", workspaceId);
|
||||
workspaceService.deleteWorkspace(workspaceId);
|
||||
}
|
||||
|
||||
@GetMapping("delete/{workspaceId}")
|
||||
@MsAuditLog(module = "system_workspace", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#workspaceId)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_WORKSPACE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#workspaceId)", msClass = WorkspaceService.class)
|
||||
public void deleteWorkspace(@PathVariable String workspaceId) {
|
||||
// workspaceService.checkWorkspaceOwnerByOrgAdmin(workspaceId);
|
||||
userService.refreshSessionUser("workspace", workspaceId);
|
||||
|
@ -89,7 +90,7 @@ public class WorkspaceController {
|
|||
}
|
||||
|
||||
@PostMapping("/member/update")
|
||||
@MsAuditLog(module = "workspace_member", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#memberDTO)", content = "#msClass.getLogDetails(#memberDTO)", msClass = WorkspaceService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_MEMBER, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#memberDTO)", content = "#msClass.getLogDetails(#memberDTO)", msClass = WorkspaceService.class)
|
||||
public void updateOrgMember(@RequestBody WorkspaceMemberDTO memberDTO) {
|
||||
workspaceService.updateWorkspaceMember(memberDTO);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
package io.metersphere.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||
import io.metersphere.base.domain.IssueTemplate;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.BaseQueryRequest;
|
||||
import io.metersphere.service.WorkspaceService;
|
||||
import io.metersphere.service.WorkstationService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RequestMapping("workstation")
|
||||
|
@ -23,8 +14,7 @@ public class WorkstationController {
|
|||
private WorkstationService workstationService;
|
||||
|
||||
@PostMapping("/creat_case_count/list")
|
||||
public Map<String,Integer> list() {
|
||||
|
||||
return workstationService.getMyCreatedCaseGroupContMap();
|
||||
public Map<String, Integer> list() {
|
||||
return workstationService.getMyCreatedCaseGroupContMap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.metersphere.ldap.controller;
|
||||
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.controller.ResultHolder;
|
||||
import io.metersphere.controller.request.LoginRequest;
|
||||
import io.metersphere.ldap.service.LdapService;
|
||||
|
@ -16,7 +17,7 @@ public class LdapController {
|
|||
private LdapService ldapService;
|
||||
|
||||
@PostMapping(value = "/signin")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.LOGIN, title = "LDAP")
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.LOGIN, title = "LDAP")
|
||||
public ResultHolder login(@RequestBody LoginRequest request) {
|
||||
return ldapService.login(request);
|
||||
}
|
||||
|
@ -27,7 +28,7 @@ public class LdapController {
|
|||
}
|
||||
|
||||
@PostMapping("/test/login")
|
||||
@MsAuditLog(module = "system_parameter_setting", type = OperLogConstants.LOGIN, title = "LDAP")
|
||||
@MsAuditLog(module = OperLogModule.SYSTEM_PARAMETER_SETTING, type = OperLogConstants.LOGIN, title = "LDAP")
|
||||
public void testLogin(@RequestBody LoginRequest request) {
|
||||
ldapService.authenticate(request);
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ public class MsLogAspect {
|
|||
// 项目ID
|
||||
msOperLog.setProjectId(msLog.project());
|
||||
|
||||
String module = Translator.get(msLog.module());
|
||||
String module = msLog.module();
|
||||
msOperLog.setOperModule(StringUtils.isNotEmpty(module) ? module : msLog.module());
|
||||
//获取方法参数名
|
||||
String[] params = discoverer.getParameterNames(method);
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.track.controller;
|
|||
import io.metersphere.base.domain.IssueComment;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.notice.annotation.SendNotice;
|
||||
|
@ -42,14 +43,14 @@ public class IssueCommentController {
|
|||
|
||||
@GetMapping("/delete/{commentId}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#commentId)", msClass = TestCaseCommentService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#commentId)", msClass = TestCaseCommentService.class)
|
||||
public void deleteComment(@PathVariable String commentId) {
|
||||
issueCommentService.delete(commentId);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
public IssueComment editComment(@RequestBody SaveIssueCommentRequest request) {
|
||||
return issueCommentService.edit(request);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.base.domain.IssuesDao;
|
|||
import io.metersphere.base.domain.IssuesWithBLOBs;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -50,7 +51,7 @@ public class IssuesController {
|
|||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_ISSUE_READ_CREATE)
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#issuesRequest)", msClass = IssuesService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#issuesRequest)", msClass = IssuesService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.DEFECT_TASK, target = "#issuesRequest",
|
||||
event = NoticeConstants.Event.CREATE, mailTemplate = "track/IssuesCreate", subject = "缺陷通知")
|
||||
public IssuesWithBLOBs addIssues(@RequestBody IssuesUpdateRequest issuesRequest) {
|
||||
|
@ -59,7 +60,7 @@ public class IssuesController {
|
|||
|
||||
@PostMapping("/update")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_ISSUE_READ_EDIT)
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#issuesRequest.id)", content = "#msClass.getLogDetails(#issuesRequest.id)", msClass = IssuesService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#issuesRequest.id)", content = "#msClass.getLogDetails(#issuesRequest.id)", msClass = IssuesService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.DEFECT_TASK, target = "#issuesRequest",
|
||||
event = NoticeConstants.Event.UPDATE, mailTemplate = "track/IssuesUpdate", subject = "缺陷通知")
|
||||
public void updateIssues(@RequestBody IssuesUpdateRequest issuesRequest) {
|
||||
|
@ -101,7 +102,7 @@ public class IssuesController {
|
|||
|
||||
@PostMapping("/delete")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_ISSUE_READ_DELETE)
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = IssuesService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#request.id)", msClass = IssuesService.class)
|
||||
public void deleteIssue(@RequestBody IssuesRequest request) {
|
||||
issuesService.deleteIssue(request);
|
||||
}
|
||||
|
@ -112,7 +113,7 @@ public class IssuesController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "track_bug", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssuesService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_BUG, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssuesService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.DEFECT_TASK, target = "#targetClass.get(#id)", targetClass = IssuesService.class, event = NoticeConstants.Event.DELETE, mailTemplate = "track/IssuesDelete", subject = "缺陷通知")
|
||||
public void delete(@PathVariable String id) {
|
||||
issuesService.delete(id);
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.track.controller;
|
|||
import io.metersphere.base.domain.TestCaseComment;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.notice.annotation.SendNotice;
|
||||
|
@ -26,7 +27,7 @@ public class TestCaseCommentController {
|
|||
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.getTestCase(#request.caseId)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.COMMENT, mailTemplate = "track/TestCaseComment", subject = "测试用例通知")
|
||||
public TestCaseComment saveComment(@RequestBody SaveCommentRequest request) {
|
||||
|
@ -41,16 +42,14 @@ public class TestCaseCommentController {
|
|||
|
||||
@GetMapping("/delete/{commentId}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#commentId)", msClass = TestCaseCommentService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#commentId)", msClass = TestCaseCommentService.class)
|
||||
public void deleteComment(@PathVariable String commentId) {
|
||||
testCaseCommentService.delete(commentId);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
// @SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.getTestCase(#request.caseId)", targetClass = TestCaseService.class,
|
||||
// event = NoticeConstants.Event.COMMENT, mailTemplate = "track/TestCaseComment", subject = "测试用例通知")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
public TestCaseComment editComment(@RequestBody SaveCommentRequest request) {
|
||||
return testCaseCommentService.edit(request);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import io.metersphere.base.domain.TestCaseWithBLOBs;
|
|||
import io.metersphere.base.mapper.TestCaseMapper;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -193,7 +194,7 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping(value = "/add", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_CREATE)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, targetClass = TestCaseMapper.class,
|
||||
event = NoticeConstants.Event.CREATE, mailTemplate = "track/TestCaseCreate", subject = "测试用例通知")
|
||||
public TestCase addTestCase(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file", required = false) List<MultipartFile> files) {
|
||||
|
@ -213,7 +214,7 @@ public class TestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/edit", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.getTestCase(#request.id)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.UPDATE, mailTemplate = "track/TestCaseUpdate", subject = "测试用例通知")
|
||||
public TestCase editTestCase(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file", required = false) List<MultipartFile> files) {
|
||||
|
@ -221,20 +222,20 @@ public class TestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/edit/testPlan", consumes = {"multipart/form-data"})
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogBeforeDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogBeforeDetails(#request.id)", title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseService.class)
|
||||
public String editTestCaseByTestPlan(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file", required = false) List<MultipartFile> files) {
|
||||
return testCaseService.editTestCase(request, files);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{testCaseId}")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String testCaseId) {
|
||||
checkPermissionService.checkTestCaseOwner(testCaseId);
|
||||
return testCaseService.deleteTestCaseBySameVersion(testCaseId);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteToGc/{testCaseId}")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getTestCase(#testCaseId)", targetClass = TestCaseService.class,
|
||||
mailTemplate = "track/TestCaseDelete", subject = "测试用例通知")
|
||||
public int deleteToGC(@PathVariable String testCaseId) {
|
||||
|
@ -243,7 +244,7 @@ public class TestCaseController {
|
|||
}
|
||||
|
||||
@GetMapping("/deletePublic/{versionId}/{refId}")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, event = NoticeConstants.Event.DELETE, target = "#targetClass.getTestCase(#testCaseId)", targetClass = TestCaseService.class,
|
||||
mailTemplate = "track/TestCaseDelete", subject = "测试用例通知")
|
||||
public void deletePublic(@PathVariable String versionId, @PathVariable String refId) {
|
||||
|
@ -252,7 +253,7 @@ public class TestCaseController {
|
|||
|
||||
|
||||
@PostMapping("/import")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.IMPORT, project = "#projectId")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.IMPORT, project = "#projectId")
|
||||
public ExcelResponse testCaseImport(@RequestPart("request") TestCaseImportRequest request, @RequestPart("file") MultipartFile file, HttpServletRequest httpRequest) {
|
||||
checkPermissionService.checkProjectOwner(request.getProjectId());
|
||||
return testCaseService.testCaseImport(file, request, httpRequest);
|
||||
|
@ -272,21 +273,21 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping("/export/testcase")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public void testCaseExport(HttpServletResponse response, @RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.testCaseExport(response, request);
|
||||
}
|
||||
|
||||
@PostMapping("/export/testcase/xmind")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.EXPORT, sourceId = "#request.id", title = "#request.name", project = "#request.projectId")
|
||||
public void testCaseXmindExport(HttpServletResponse response, @RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.testCaseXmindExport(response, request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.findByBatchRequest(#request)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.UPDATE, mailTemplate = "track/TestCaseUpdate", subject = "测试用例通知")
|
||||
public void editTestCaseBath(@RequestBody TestCaseBatchRequest request) {
|
||||
|
@ -299,14 +300,14 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping("/batch/copy")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_COPY)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
public void copyTestCaseBath(@RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.copyTestCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/copy/public")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.findByBatchRequest(#request)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.CREATE, mailTemplate = "track/TestCaseUpdate", subject = "测试用例通知")
|
||||
public void copyTestCaseBathPublic(@RequestBody TestCaseBatchRequest request) {
|
||||
|
@ -316,14 +317,14 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping("/batch/delete")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_DELETE)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
public void deleteTestCaseBath(@RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.deleteTestCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/deleteToGc")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_DELETE)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.findByBatchRequest(#request)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "track/TestCaseDelete", subject = "测试用例通知")
|
||||
public void deleteToGcBatch(@RequestBody TestCaseBatchRequest request) {
|
||||
|
@ -332,7 +333,7 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping("/batch/movePublic/deleteToGc")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_DELETE)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_DEL, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.findByBatchRequest(#request)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "track/TestCaseDelete", subject = "测试用例通知")
|
||||
public void deleteToGcBatchPublic(@RequestBody List<String> ids) {
|
||||
|
@ -340,7 +341,7 @@ public class TestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/reduction")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#testCaseId)", msClass = TestCaseService.class)
|
||||
public void reduction(@RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.reduction(request);
|
||||
}
|
||||
|
@ -370,7 +371,7 @@ public class TestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/save")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.CREATE, title = "#testCaseWithBLOBs.name", content = "#msClass.getLogDetails(#testCaseWithBLOBs.id)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.CREATE, title = "#testCaseWithBLOBs.name", content = "#msClass.getLogDetails(#testCaseWithBLOBs.id)", msClass = TestCaseService.class)
|
||||
public TestCaseWithBLOBs saveTestCase(@RequestBody EditTestCaseRequest request) {
|
||||
request.setId(UUID.randomUUID().toString());
|
||||
return testCaseService.addTestCase(request);
|
||||
|
@ -378,7 +379,7 @@ public class TestCaseController {
|
|||
|
||||
@PostMapping("/minder/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.BATCH_UPDATE, project = "#request.projectId", beforeEvent = "#msClass.getCaseLogDetails(#request)", content = "#msClass.getCaseLogDetails(#request)", msClass = TestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.BATCH_UPDATE, project = "#request.projectId", beforeEvent = "#msClass.getCaseLogDetails(#request)", content = "#msClass.getCaseLogDetails(#request)", msClass = TestCaseService.class)
|
||||
public void minderEdit(@RequestBody TestCaseMinderEditRequest request) {
|
||||
testCaseService.minderEdit(request);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.metersphere.track.controller;
|
||||
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.track.dto.TestCaseDTO;
|
||||
import io.metersphere.track.request.issues.IssuesRelevanceRequest;
|
||||
|
@ -26,7 +27,7 @@ public class TestCaseIssuesController {
|
|||
}
|
||||
|
||||
@PostMapping("/relate")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.ASSOCIATE_ISSUE, content = "#msClass.getLogDetails(#request)", msClass = TestCaseIssueService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.ASSOCIATE_ISSUE, content = "#msClass.getLogDetails(#request)", msClass = TestCaseIssueService.class)
|
||||
public void relate(@RequestBody IssuesRelevanceRequest request) {
|
||||
testCaseIssueService.relate(request);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.track.controller;
|
|||
|
||||
import io.metersphere.base.domain.TestCaseNode;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.service.CheckPermissionService;
|
||||
import io.metersphere.track.dto.TestCaseNodeDTO;
|
||||
|
@ -79,26 +80,26 @@ public class TestCaseNodeController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
public String addNode(@RequestBody TestCaseNode node) {
|
||||
return testCaseNodeService.addNode(node);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
public int editNode(@RequestBody DragNodeRequest node) {
|
||||
return testCaseNodeService.editNode(node);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = TestCaseNodeService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#nodeIds)", msClass = TestCaseNodeService.class)
|
||||
public int deleteNode(@RequestBody List<String> nodeIds) {
|
||||
//nodeIds 包含删除节点ID及其所有子节点ID
|
||||
return testCaseNodeService.deleteNode(nodeIds);
|
||||
}
|
||||
|
||||
@PostMapping("/drag")
|
||||
@MsAuditLog(module = "track_test_case", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = TestCaseNodeService.class)
|
||||
public void dragNode(@RequestBody DragNodeRequest node) {
|
||||
testCaseNodeService.dragNode(node);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.track.controller;
|
|||
|
||||
import io.metersphere.base.domain.TestCaseReport;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.track.request.testCaseReport.CreateReportRequest;
|
||||
import io.metersphere.track.service.TestCaseReportService;
|
||||
|
@ -29,20 +30,20 @@ public class TestCaseReportController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseReportService.class)
|
||||
public String addByTemplateId(@RequestBody CreateReportRequest request) {
|
||||
request.setId(UUID.randomUUID().toString());
|
||||
return testCaseReportService.addTestCaseReportByTemplateId(request);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#TestCaseReport.id)", content = "#msClass.getLogDetails(#TestCaseReport.id)", msClass = TestCaseReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#TestCaseReport.id)", content = "#msClass.getLogDetails(#TestCaseReport.id)", msClass = TestCaseReportService.class)
|
||||
public void edit(@RequestBody TestCaseReport TestCaseReport) {
|
||||
testCaseReportService.editTestCaseReport(TestCaseReport);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseReportService.class)
|
||||
public int delete(@PathVariable String id) {
|
||||
return testCaseReportService.deleteTestCaseReport(id);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.track.controller;
|
|||
|
||||
import io.metersphere.base.domain.TestCaseReportTemplate;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.track.request.testCaseReport.QueryTemplateRequest;
|
||||
import io.metersphere.track.service.TestCaseReportTemplateService;
|
||||
|
@ -28,19 +29,19 @@ public class TestCaseReportTemplateController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@MsAuditLog(module = "workspace_template_settings", type = OperLogConstants.CREATE, title = "#testCaseReportTemplate.name",sourceId = "#testCaseReportTemplate.id")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS, type = OperLogConstants.CREATE, title = "#testCaseReportTemplate.name",sourceId = "#testCaseReportTemplate.id")
|
||||
public void add(@RequestBody TestCaseReportTemplate testCaseReportTemplate) {
|
||||
testCaseReportTemplateService.addTestCaseReportTemplate(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "workspace_template_settings", type = OperLogConstants.UPDATE, title = "#testCaseReportTemplate.name",sourceId = "#testCaseReportTemplate.id")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS, type = OperLogConstants.UPDATE, title = "#testCaseReportTemplate.name",sourceId = "#testCaseReportTemplate.id")
|
||||
public void edit(@RequestBody TestCaseReportTemplate testCaseReportTemplate) {
|
||||
testCaseReportTemplateService.editTestCaseReportTemplate(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "workspace_template_settings", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseReportTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestCaseReportTemplateService.class)
|
||||
public int delete(@PathVariable String id) {
|
||||
return testCaseReportTemplateService.deleteTestCaseReportTemplate(id);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.base.domain.TestCaseReview;
|
|||
import io.metersphere.base.domain.User;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -52,7 +53,7 @@ public class TestCaseReviewController {
|
|||
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_CREATE)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.CREATE, title = "#reviewRequest.name", content = "#msClass.getLogDetails(#reviewRequest.id)", msClass = TestCaseReviewService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.CREATE, title = "#reviewRequest.name", content = "#msClass.getLogDetails(#reviewRequest.id)", msClass = TestCaseReviewService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.REVIEW_TASK, event = NoticeConstants.Event.CREATE, mailTemplate = "track/ReviewInitiate", subject = "测试评审通知")
|
||||
public TestCaseReview saveCaseReview(@RequestBody SaveTestCaseReviewRequest reviewRequest) {
|
||||
reviewRequest.setId(UUID.randomUUID().toString());
|
||||
|
@ -84,7 +85,7 @@ public class TestCaseReviewController {
|
|||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testCaseReview.id)", title = "#testCaseReview.name", content = "#msClass.getLogDetails(#testCaseReview.id)", msClass = TestCaseReviewService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testCaseReview.id)", title = "#testCaseReview.name", content = "#msClass.getLogDetails(#testCaseReview.id)", msClass = TestCaseReviewService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.REVIEW_TASK, event = NoticeConstants.Event.UPDATE, mailTemplate = "track/ReviewUpdate", subject = "测试评审通知")
|
||||
public TestCaseReview editCaseReview(@RequestBody SaveTestCaseReviewRequest testCaseReview) {
|
||||
return testCaseReviewService.editCaseReview(testCaseReview);
|
||||
|
@ -92,7 +93,7 @@ public class TestCaseReviewController {
|
|||
|
||||
@GetMapping("/delete/{reviewId}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_DELETE)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#reviewId)", msClass = TestCaseReviewService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#reviewId)", msClass = TestCaseReviewService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.REVIEW_TASK, target = "#targetClass.getTestReview(#reviewId)", targetClass = TestCaseReviewService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "track/ReviewDelete", subject = "测试评审通知")
|
||||
public void deleteCaseReview(@PathVariable String reviewId) {
|
||||
|
@ -107,7 +108,7 @@ public class TestCaseReviewController {
|
|||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = TestCaseReviewService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = TestCaseReviewService.class)
|
||||
public void testReviewRelevance(@RequestBody ReviewRelevanceRequest request) {
|
||||
testCaseReviewService.testReviewRelevance(request);
|
||||
}
|
||||
|
@ -155,7 +156,7 @@ public class TestCaseReviewController {
|
|||
|
||||
@PostMapping("/comment/save")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = TestCaseCommentService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.REVIEW_TASK, target = "#targetClass.getTestCase(#request.caseId)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.COMMENT, mailTemplate = "track/TestCaseComment", subject = "测试评审通知")
|
||||
public TestCaseComment saveComment(@RequestBody SaveCommentRequest request) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
|||
import io.metersphere.api.dto.definition.BatchRunDefinitionRequest;
|
||||
import io.metersphere.api.dto.definition.TestPlanApiCaseDTO;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -63,27 +64,27 @@ public class TestPlanApiCaseController {
|
|||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_RELEVANCE_OR_CANCEL)
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanApiCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanApiCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
return testPlanApiCaseService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_RELEVANCE_OR_CANCEL)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanApiCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanApiCaseService.class)
|
||||
public void deleteApiCaseBath(@RequestBody TestPlanApiCaseBatchRequest request) {
|
||||
testPlanApiCaseService.deleteApiCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/update/env")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_RELEVANCE_OR_CANCEL)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanApiCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanApiCaseService.class)
|
||||
public void batchUpdateEnv(@RequestBody TestPlanApiCaseBatchRequest request) {
|
||||
testPlanApiCaseService.batchUpdateEnv(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.planIds)", msClass = TestPlanApiCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.planIds)", msClass = TestPlanApiCaseService.class)
|
||||
public List<MsExecResponseDTO> run(@RequestBody BatchRunDefinitionRequest request) {
|
||||
return testPlanApiCaseService.run(request);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import io.metersphere.api.service.ApiAutomationService;
|
|||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.PermissionConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -96,7 +97,7 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_CREATE)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.CREATE, title = "#testPlan.name", content = "#msClass.getLogDetails(#testPlan.id)", msClass = TestPlanService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.CREATE, title = "#testPlan.name", content = "#msClass.getLogDetails(#testPlan.id)", msClass = TestPlanService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TEST_PLAN_TASK, event = NoticeConstants.Event.CREATE, mailTemplate = "track/TestPlanStart", subject = "测试计划通知")
|
||||
public TestPlan addTestPlan(@RequestBody AddTestPlanRequest testPlan) {
|
||||
testPlan.setId(UUID.randomUUID().toString());
|
||||
|
@ -105,7 +106,7 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testPlanDTO.id)", content = "#msClass.getLogDetails(#testPlanDTO.id)", msClass = TestPlanService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#testPlanDTO.id)", content = "#msClass.getLogDetails(#testPlanDTO.id)", msClass = TestPlanService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TEST_PLAN_TASK, event = NoticeConstants.Event.UPDATE, mailTemplate = "track/TestPlanUpdate", subject = "测试计划通知")
|
||||
public TestPlan editTestPlan(@RequestBody AddTestPlanRequest testPlanDTO) {
|
||||
return testPlanService.editTestPlanWithRequest(testPlanDTO);
|
||||
|
@ -113,7 +114,7 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/edit/status/{planId}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_EDIT)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#planId)", content = "#msClass.getLogDetails(#planId)", msClass = TestPlanService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#planId)", content = "#msClass.getLogDetails(#planId)", msClass = TestPlanService.class)
|
||||
public void editTestPlanStatus(@PathVariable String planId) {
|
||||
checkPermissionService.checkTestPlanOwner(planId);
|
||||
testPlanService.editTestPlanStatus(planId);
|
||||
|
@ -134,7 +135,7 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/delete/{testPlanId}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_DELETE)
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testPlanId)", msClass = TestPlanService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testPlanId)", msClass = TestPlanService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TEST_PLAN_TASK, target = "#targetClass.get(#testPlanId)", targetClass = TestPlanService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "track/TestPlanDelete", subject = "测试计划通知")
|
||||
public int deleteTestPlan(@PathVariable String testPlanId) {
|
||||
|
@ -143,7 +144,7 @@ public class TestPlanController {
|
|||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = TestPlanService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request)", msClass = TestPlanService.class)
|
||||
public void testPlanRelevance(@RequestBody PlanCaseRelevanceRequest request) {
|
||||
testPlanService.testPlanRelevance(request);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.metersphere.base.domain.LoadTest;
|
|||
import io.metersphere.base.domain.TestPlanLoadCase;
|
||||
import io.metersphere.base.domain.TestPlanLoadCaseWithBLOBs;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.TriggerMode;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -37,7 +38,7 @@ public class TestPlanLoadCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/relevance")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request.caseIds,#request.testPlanId)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#request.caseIds,#request.testPlanId)", msClass = TestPlanLoadCaseService.class)
|
||||
public void relevanceCase(@RequestBody LoadCaseRequest request) {
|
||||
testPlanLoadCaseService.relevanceCase(request);
|
||||
}
|
||||
|
@ -54,19 +55,19 @@ public class TestPlanLoadCaseController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanLoadCaseService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
testPlanLoadCaseService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/run")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.testPlanLoadId)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.testPlanLoadId)", msClass = TestPlanLoadCaseService.class)
|
||||
public String run(@RequestBody RunTestPlanRequest request) {
|
||||
return testPlanLoadCaseService.run(request);
|
||||
}
|
||||
|
||||
@PostMapping("/run/batch")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.EXECUTE, content = "#msClass.getRunLogDetails(#request.requests)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.EXECUTE, content = "#msClass.getRunLogDetails(#request.requests)", msClass = TestPlanLoadCaseService.class)
|
||||
public void runBatch(@RequestBody RunBatchTestPlanRequest request) {
|
||||
if (request.getRequests() != null) {
|
||||
for (RunTestPlanRequest req : request.getRequests()) {
|
||||
|
@ -82,19 +83,19 @@ public class TestPlanLoadCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanLoadCaseService.class)
|
||||
public void batchDelete(@RequestBody LoadCaseReportBatchRequest request) {
|
||||
testPlanLoadCaseService.batchDelete(request);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanLoadCase.id)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanLoadCase.id)", msClass = TestPlanLoadCaseService.class)
|
||||
public void update(@RequestBody TestPlanLoadCaseWithBLOBs testPlanLoadCase) {
|
||||
testPlanLoadCaseService.update(testPlanLoadCase);
|
||||
}
|
||||
|
||||
@PostMapping("/update/api")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanLoadCase.id)", msClass = TestPlanLoadCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanLoadCase.id)", msClass = TestPlanLoadCaseService.class)
|
||||
public void updateByApi(@RequestBody TestPlanLoadCase testPlanLoadCase) {
|
||||
testPlanLoadCaseService.updateByApi(testPlanLoadCase);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
|
|||
import io.metersphere.base.domain.TestPlanReport;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.constants.ReportTriggerMode;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
|
@ -66,7 +67,7 @@ public class TestPlanReportController {
|
|||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "track_report", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testPlanReportIdList)", msClass = TestPlanReportService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_REPORT, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#testPlanReportIdList)", msClass = TestPlanReportService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_REPORT_TASK, target = "#targetClass.getReports(#testPlanReportIdList)", targetClass = TestPlanReportService.class,
|
||||
event = NoticeConstants.Event.DELETE, mailTemplate = "track/ReportDelete", subject = "报告通知")
|
||||
public void delete(@RequestBody List<String> testPlanReportIdList) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
|
|||
import io.metersphere.api.dto.automation.*;
|
||||
import io.metersphere.commons.constants.ApiRunMode;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.constants.RunModeConstants;
|
||||
|
@ -61,19 +62,19 @@ public class TestPlanScenarioCaseController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanScenarioCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanScenarioCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
return testPlanScenarioCaseService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
public void deleteApiCaseBath(@RequestBody TestPlanScenarioCaseBatchRequest request) {
|
||||
testPlanScenarioCaseService.deleteApiCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/run")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.planCaseIds)", msClass = TestPlanScenarioCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.planCaseIds)", msClass = TestPlanScenarioCaseService.class)
|
||||
public List<MsExecResponseDTO> run(@RequestBody RunTestPlanScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Completed.name());
|
||||
if(request.getConfig() == null){
|
||||
|
@ -86,7 +87,7 @@ public class TestPlanScenarioCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/jenkins/run")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.EXECUTE, content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
public List<MsExecResponseDTO> runByRun(@RequestBody RunTestPlanScenarioRequest request) {
|
||||
request.setExecuteType(ExecuteType.Saved.name());
|
||||
request.setTriggerMode(ApiRunMode.API.name());
|
||||
|
@ -95,7 +96,7 @@ public class TestPlanScenarioCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/batch/update/env")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanScenarioCaseService.class)
|
||||
public void batchUpdateEnv(@RequestBody RelevanceScenarioRequest request) {
|
||||
testPlanScenarioCaseService.batchUpdateEnv(request);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.TestPlanTestCaseWithBLOBs;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.ResetOrderRequest;
|
||||
|
@ -96,31 +97,31 @@ public class TestPlanTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanTestCase.id)", msClass = TestPlanTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UPDATE, content = "#msClass.getLogDetails(#testPlanTestCase.id)", msClass = TestPlanTestCaseService.class)
|
||||
public void editTestCase(@RequestBody TestPlanTestCaseWithBLOBs testPlanTestCase) {
|
||||
testPlanTestCaseService.editTestCase(testPlanTestCase);
|
||||
}
|
||||
|
||||
@PostMapping("/minder/edit")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getCaseLogDetails(#testPlanTestCases)", msClass = TestPlanTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getCaseLogDetails(#testPlanTestCases)", msClass = TestPlanTestCaseService.class)
|
||||
public void editTestCaseForMinder(@RequestBody List<TestPlanTestCaseWithBLOBs> testPlanTestCases) {
|
||||
testPlanTestCaseService.editTestCaseForMinder(testPlanTestCases);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/edit")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanTestCaseService.class)
|
||||
public void editTestCaseBath(@RequestBody TestPlanCaseBatchRequest request) {
|
||||
testPlanTestCaseService.editTestCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = TestPlanTestCaseService.class)
|
||||
public void deleteTestCaseBath(@RequestBody TestPlanCaseBatchRequest request) {
|
||||
testPlanTestCaseService.deleteTestCaseBath(request);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
@MsAuditLog(module = "track_test_plan", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanTestCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
return testPlanTestCaseService.deleteTestCase(id);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.TestCaseReviewTestCase;
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.OperLogModule;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.ResetOrderRequest;
|
||||
|
@ -32,25 +33,25 @@ public class TestReviewTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
public int deleteTestCase(@RequestBody DeleteRelevanceRequest request) {
|
||||
return testReviewTestCaseService.deleteTestCase(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
public void deleteTestCaseBatch(@RequestBody TestReviewCaseBatchRequest request) {
|
||||
testReviewTestCaseService.deleteTestCaseBatch(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/edit/status")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.BATCH_UPDATE, beforeEvent = "#msClass.batchLogDetails(#request)", content = "#msClass.getLogDetails(#request)", msClass = TestReviewTestCaseService.class)
|
||||
public void editTestCaseBatch(@RequestBody TestReviewCaseBatchRequest request) {
|
||||
testReviewTestCaseService.editTestCaseBatchStatus(request);
|
||||
}
|
||||
|
||||
@PostMapping("/minder/edit/{reviewId}")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#testCases)", msClass = TestReviewTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.ASSOCIATE_CASE, content = "#msClass.getLogDetails(#testCases)", msClass = TestReviewTestCaseService.class)
|
||||
public void editTestCaseForMinder(@PathVariable("reviewId") String reviewId, @RequestBody List<TestCaseReviewTestCase> testCases) {
|
||||
testReviewTestCaseService.editTestCaseForMinder(reviewId, testCases);
|
||||
}
|
||||
|
@ -61,7 +62,7 @@ public class TestReviewTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@MsAuditLog(module = "track_test_case_review", type = OperLogConstants.REVIEW, content = "#msClass.getLogDetails(#testCaseReviewTestCase)", msClass = TestReviewTestCaseService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE_REVIEW, type = OperLogConstants.REVIEW, content = "#msClass.getLogDetails(#testCaseReviewTestCase)", msClass = TestReviewTestCaseService.class)
|
||||
public void editTestCase(@RequestBody TestCaseReviewTestCase testCaseReviewTestCase) {
|
||||
testReviewTestCaseService.editTestCase(testCaseReviewTestCase);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,11 @@
|
|||
<span>{{ getType(scope.row.operType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operModule" :label="$t('operating_log.object')" show-overflow-tooltip width="120px"/>
|
||||
<el-table-column prop="operModule" :label="$t('operating_log.object')" show-overflow-tooltip width="120px">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ getModule(scope.row.operModule) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operTitle" :label="$t('operating_log.name')" :show-overflow-tooltip="true" width="180px">
|
||||
<template v-slot:default="scope">
|
||||
<el-link v-if="isLink(scope.row)" style="color: #409EFF" @click="clickResource(scope.row)">
|
||||
|
@ -127,7 +131,13 @@
|
|||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import MsTableOperator from "@/business/components/common/components/MsTableOperator";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {getUrl, LOG_TYPE, LOG_TYPE_MAP, SYSLIST} from "@/business/components/settings/operatinglog/config";
|
||||
import {
|
||||
getUrl,
|
||||
LOG_MODULE_MAP,
|
||||
LOG_TYPE,
|
||||
LOG_TYPE_MAP,
|
||||
SYSLIST
|
||||
} from "@/business/components/settings/operatinglog/config";
|
||||
import MsLogDetail from "@/business/components/settings/operatinglog/LogDetail";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
|
@ -156,6 +166,7 @@ export default {
|
|||
screenHeight: 'calc(100vh - 215px)',
|
||||
LOG_TYPE: new LOG_TYPE(this),
|
||||
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
||||
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
||||
sysList: new SYSLIST(),
|
||||
}
|
||||
},
|
||||
|
@ -165,19 +176,20 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
isLink(row) {
|
||||
let uri = getUrl(row);
|
||||
let uri = getUrl(row, this);
|
||||
if ((row.operType === 'UPDATE' || row.operType === 'CREATE' || row.operType === 'EXECUTE' || row.operType === 'DEBUG') && uri !== "/#") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
clickResource(resource) {
|
||||
let uri = getUrl(resource);
|
||||
let uri = getUrl(resource, this);
|
||||
if (!resource.sourceId) {
|
||||
this.toPage(uri);
|
||||
}
|
||||
let operModule = resource.operModule;
|
||||
if (operModule === "系统-系统参数设置" || operModule === "系统-系統參數設置" || operModule === "System parameter setting") {
|
||||
let module = this.getLogModule(operModule);
|
||||
if (module === "系统-系统参数设置" || module === "系统-系統參數設置" || module === "System parameter setting") {
|
||||
this.toPage(uri);
|
||||
} else {
|
||||
let resourceId = resource.sourceId;
|
||||
|
@ -273,6 +285,9 @@ export default {
|
|||
getType(type) {
|
||||
return this.LOG_TYPE_MAP.get(type);
|
||||
},
|
||||
getModule(val) {
|
||||
return this.LOG_MODULE_MAP.get(val) ? this.LOG_MODULE_MAP.get(val) : val;
|
||||
},
|
||||
search() {
|
||||
this.initTableData();
|
||||
},
|
||||
|
|
|
@ -99,7 +99,11 @@
|
|||
<span>{{ getType(scope.row.operType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operModule" :label="$t('operating_log.object')" show-overflow-tooltip width="120px"/>
|
||||
<el-table-column prop="operModule" :label="$t('operating_log.object')" show-overflow-tooltip width="120px">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ getLogModule(scope.row.operModule) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operTitle" :label="$t('operating_log.name')" :show-overflow-tooltip="true" width="180px">
|
||||
<template v-slot:default="scope">
|
||||
<el-link v-if="isLink(scope.row)" style="color: #409EFF" @click="clickResource(scope.row)">
|
||||
|
@ -126,7 +130,7 @@
|
|||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import {getUrl, LOG_TYPE, LOG_TYPE_MAP, SYSLIST} from "./config";
|
||||
import {getUrl, LOG_MODULE_MAP, LOG_TYPE, LOG_TYPE_MAP, SYSLIST} from "./config";
|
||||
import MsLogDetail from "./LogDetail";
|
||||
|
||||
export default {
|
||||
|
@ -153,6 +157,7 @@ export default {
|
|||
screenHeight: 'calc(100vh - 270px)',
|
||||
LOG_TYPE: new LOG_TYPE(this),
|
||||
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
||||
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
||||
sysList:new SYSLIST(),
|
||||
}
|
||||
},
|
||||
|
@ -200,19 +205,20 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
isLink(row) {
|
||||
let uri = getUrl(row);
|
||||
let uri = getUrl(row, this);
|
||||
if ((row.operType === 'UPDATE' || row.operType === 'CREATE' || row.operType === 'EXECUTE' || row.operType === 'DEBUG') && uri !== "/#") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
clickResource(resource) {
|
||||
let uri = getUrl(resource);
|
||||
let uri = getUrl(resource, this);
|
||||
if (!resource.sourceId) {
|
||||
this.toPage(uri);
|
||||
}
|
||||
let operModule = resource.operModule;
|
||||
if (operModule === "系统-系统参数设置" || operModule === "系统-系統參數設置" || operModule === "System parameter setting") {
|
||||
let module = this.getLogModule(operModule);
|
||||
if (module === "系统-系统参数设置" || module === "系统-系統參數設置" || module === "System parameter setting") {
|
||||
this.toPage(uri);
|
||||
} else {
|
||||
let resourceId = resource.sourceId;
|
||||
|
@ -305,6 +311,9 @@ export default {
|
|||
getType(type) {
|
||||
return this.LOG_TYPE_MAP.get(type);
|
||||
},
|
||||
getLogModule(val) {
|
||||
return this.LOG_MODULE_MAP.get(val) ? this.LOG_MODULE_MAP.get(val) : val;
|
||||
},
|
||||
search() {
|
||||
this.initTableData();
|
||||
},
|
||||
|
|
|
@ -56,6 +56,41 @@ export function LOG_TYPE_MAP(_this) {
|
|||
return LOG_TYPE_MAP;
|
||||
}
|
||||
|
||||
export function LOG_MODULE_MAP(_this) {
|
||||
let LOG_MODULE_MAP = new Map([
|
||||
['SYSTEM_PARAMETER_SETTING', _this.$t('operating_log.system_parameter_setting')],
|
||||
['SYSTEM_TEST_RESOURCE', _this.$t('operating_log.system_test_resource')],
|
||||
['SYSTEM_USER', _this.$t('operating_log.system_user')],
|
||||
['SYSTEM_WORKSPACE', _this.$t('operating_log.system_workspace')],
|
||||
['WORKSPACE_TEMPLATE_SETTINGS', _this.$t('operating_log.workspace_template_settings')],
|
||||
['WORKSPACE_MESSAGE_SETTINGS', _this.$t('operating_log.workspace_message_settings')],
|
||||
['WORKSPACE_TEMPLATE_SETTINGS_FIELD', _this.$t('operating_log.workspace_template_settings_field')],
|
||||
['WORKSPACE_TEMPLATE_SETTINGS_ISSUE', _this.$t('operating_log.workspace_template_settings_issue')],
|
||||
['WORKSPACE_SERVICE_INTEGRATION', _this.$t('operating_log.workspace_service_integration')],
|
||||
['WORKSPACE_TEMPLATE_SETTINGS_CASE', _this.$t('operating_log.workspace_template_settings_case')],
|
||||
['WORKSPACE_MEMBER', _this.$t('operating_log.workspace_member')],
|
||||
['API_AUTOMATION', _this.$t('operating_log.api_automation')],
|
||||
['API_AUTOMATION_REPORT', _this.$t('operating_log.api_automation_report')],
|
||||
['API_DEFINITION', _this.$t('operating_log.api_definition')],
|
||||
['API_DEFINITION_CASE', _this.$t('operating_log.api_definition_case')],
|
||||
['TRACK_TEST_PLAN', _this.$t('operating_log.track_test_plan')],
|
||||
['TRACK_BUG', _this.$t('operating_log.track_bug')],
|
||||
['TRACK_TEST_CASE_REVIEW', _this.$t('operating_log.track_test_case_review')],
|
||||
['TRACK_TEST_CASE', _this.$t('operating_log.track_test_case')],
|
||||
['TRACK_REPORT', _this.$t('operating_log.track_report')],
|
||||
['AUTH_TITLE', _this.$t('operating_log.auth_title')],
|
||||
['PROJECT_PROJECT_JAR', _this.$t('operating_log.project_project_jar')],
|
||||
['PROJECT_ENVIRONMENT_SETTING', _this.$t('operating_log.project_environment_setting')],
|
||||
['PROJECT_PROJECT_MANAGER', _this.$t('operating_log.project_project_manager')],
|
||||
['PROJECT_FILE_MANAGEMENT', _this.$t('operating_log.project_file_management')],
|
||||
['PROJECT_PROJECT_MEMBER', _this.$t('operating_log.project_project_member')],
|
||||
['PERSONAL_INFORMATION_PERSONAL_SETTINGS', _this.$t('operating_log.personal_information_personal_settings')],
|
||||
['PERSONAL_INFORMATION_APIKEYS', _this.$t('operating_log.personal_information_apikeys')],
|
||||
['GROUP_PERMISSION', _this.$t('operating_log.group_permission')],
|
||||
]);
|
||||
return LOG_MODULE_MAP;
|
||||
}
|
||||
|
||||
export function SYSLIST() {
|
||||
let sysList = [
|
||||
{
|
||||
|
@ -201,7 +236,7 @@ export function SYSLIST() {
|
|||
}
|
||||
|
||||
|
||||
export function getUrl(d) {
|
||||
export function getUrl(d, _this) {
|
||||
let url = "/#";
|
||||
let resourceId = d.sourceId;
|
||||
if (resourceId && (resourceId.startsWith("\"") || resourceId.startsWith("["))) {
|
||||
|
@ -214,7 +249,9 @@ export function getUrl(d) {
|
|||
return url;
|
||||
}
|
||||
}
|
||||
switch (d.operModule) {
|
||||
let moduleMap = LOG_MODULE_MAP(_this);
|
||||
let module = moduleMap.get(d.operModule) ? moduleMap.get(d.operModule) : d.operModule;
|
||||
switch (module) {
|
||||
case "接口自动化" :
|
||||
case "Api automation" :
|
||||
case"接口自動化":
|
||||
|
|
|
@ -2294,7 +2294,7 @@ export default {
|
|||
tapd_current_owner: "Tapd Current Owner",
|
||||
zentao_bug_build: "Zentao Impact version",
|
||||
zentao_bug_assigned: "Zentao handler",
|
||||
third_party_integrated: "Third-party Platform Integrated",
|
||||
third_party_integrated: "Third-party Platform",
|
||||
use_third_party: "Enable Jira Issue Template",
|
||||
update_third_party_bugs: "Update the defects of third-party platforms",
|
||||
sync_bugs: "Synchronization Issue",
|
||||
|
@ -2600,6 +2600,42 @@ export default {
|
|||
before_change: "Before change",
|
||||
after_change: "After change",
|
||||
share: "Share",
|
||||
api_definition: "Api definition",
|
||||
api_definition_case: "Api definition case",
|
||||
api_automation: "Api automation",
|
||||
api_automation_report: "Test Report",
|
||||
track_test_case: "Test case",
|
||||
track_test_case_review: "Case review",
|
||||
track_test_plan: "Test plan",
|
||||
track_bug: "Defect management",
|
||||
track_report: "Report",
|
||||
performance_test: "Performance test",
|
||||
performance_test_report: "Performance test report",
|
||||
system_user: "System user",
|
||||
system_organization: "System organization",
|
||||
system_workspace: "workspace",
|
||||
system_test_resource: "System test resource",
|
||||
system_parameter_setting: "System parameter setting",
|
||||
system_quota_management: "System Quota management",
|
||||
system_authorization_management: "System authorization management",
|
||||
organization_member: "Organization member",
|
||||
organization_workspace: "Organization workspace",
|
||||
project_project_member: "Project member",
|
||||
workspace_service_integration: "Workspace service integration",
|
||||
workspace_message_settings: "Workspace message settings",
|
||||
workspace_member: "Workspace member",
|
||||
workspace_template_settings_field: "Workspace template settings field",
|
||||
workspace_template_settings: "Workspace template settings",
|
||||
workspace_template_settings_case: "Workspace template settings case",
|
||||
workspace_template_settings_issue: "Workspace template settings issue",
|
||||
project_project_manager: "Project project manager",
|
||||
project_project_jar: "Project project jar",
|
||||
project_environment_setting: "Project environment setting",
|
||||
project_file_management: "Project file management",
|
||||
personal_information_personal_settings: "Personal information personal settings",
|
||||
personal_information_apikeys: "Personal information API Keys",
|
||||
auth_title: "Auth",
|
||||
group_permission: "Group",
|
||||
change_history: "Change log",
|
||||
change_content: "Change content"
|
||||
},
|
||||
|
|
|
@ -2603,6 +2603,42 @@ export default {
|
|||
before_change: "变更前",
|
||||
after_change: "变更后",
|
||||
share: "分享",
|
||||
api_definition: "接口定义",
|
||||
api_definition_case: "接口定义用例",
|
||||
api_automation: "接口自动化",
|
||||
api_automation_report: "测试报告",
|
||||
track_test_case: "测试用例",
|
||||
track_test_case_review: "用例评审",
|
||||
track_test_plan: "测试计划",
|
||||
track_bug: "缺陷管理",
|
||||
track_report: "报告",
|
||||
performance_test: "性能测试",
|
||||
performance_test_report: "性能测试报告",
|
||||
system_user: "系统-用户",
|
||||
system_organization: "系统-组织",
|
||||
system_workspace: "工作空间",
|
||||
system_test_resource: "系统-测试资源池",
|
||||
system_parameter_setting: "系统-系统参数设置",
|
||||
system_quota_management: "系统-配额管理",
|
||||
system_authorization_management: "系统-授权管理",
|
||||
organization_member: "组织-成员",
|
||||
organization_workspace: "组织-工作空间",
|
||||
workspace_service_integration: "工作空间-服务集成",
|
||||
workspace_message_settings: "工作空间-消息设置",
|
||||
workspace_member: "工作空间-成员",
|
||||
workspace_template_settings_field: "工作空间-模版设置-自定义字段",
|
||||
workspace_template_settings: "工作空间-模版设置",
|
||||
workspace_template_settings_case: "工作空间-模版设置-用例模版",
|
||||
workspace_template_settings_issue: "工作空间-模版设置-缺陷模版",
|
||||
project_project_manager: "项目-项目管理",
|
||||
project_project_member: "项目-成员",
|
||||
project_project_jar: "項目-JAR包管理",
|
||||
project_environment_setting: "项目-环境设置",
|
||||
project_file_management: "项目-文件管理",
|
||||
personal_information_personal_settings: "个人信息-个人设置",
|
||||
personal_information_apikeys: "个人信息-API Keys",
|
||||
auth_title: "系统认证",
|
||||
group_permission: "用户组与权限",
|
||||
change_history: "变更记录",
|
||||
change_content: "变更内容"
|
||||
},
|
||||
|
|
|
@ -2602,6 +2602,42 @@ export default {
|
|||
before_change: "變更前",
|
||||
after_change: "變更後",
|
||||
share: "分享",
|
||||
api_definition: "接口定義",
|
||||
api_definition_case: "接口定義用例",
|
||||
api_automation: "接口自動化",
|
||||
api_automation_report: "測試報告",
|
||||
track_test_case: "測試用例",
|
||||
track_test_case_review: "用例評審",
|
||||
track_test_plan: "測試計劃",
|
||||
track_bug: "缺陷管理",
|
||||
track_report: "報告",
|
||||
performance_test: "性能測試",
|
||||
performance_test_report: "性能測試報告",
|
||||
system_user: "系統-用戶",
|
||||
system_organization: "系統-組織",
|
||||
system_workspace: "工作空間",
|
||||
system_test_resource: "系統-測試資源池",
|
||||
system_parameter_setting: "系統-系統參數設置",
|
||||
system_quota_management: "系統-配額管理",
|
||||
system_authorization_management: "系統-授權管理",
|
||||
organization_member: "組織-成員",
|
||||
organization_workspace: "組織-工作空間",
|
||||
workspace_service_integration: "工作空間-服務集成",
|
||||
workspace_message_settings: "工作空間-消息設置",
|
||||
workspace_member: "工作空間-成員",
|
||||
workspace_template_settings_field: "工作空間-模版設置-自定義字段",
|
||||
workspace_template_settings: "工作空間-模版設置",
|
||||
workspace_template_settings_case: "工作空間-模版設置-用例模版",
|
||||
workspace_template_settings_issue: "工作空間-模版設置-缺陷模版",
|
||||
project_project_manager: "項目-項目管理",
|
||||
project_project_member: "項目-成員",
|
||||
project_project_jar: "項目-JAR包管理",
|
||||
project_environment_setting: "項目-環境設置",
|
||||
project_file_management: "項目-文件管理",
|
||||
personal_information_personal_settings: "個人信息-個人設置",
|
||||
personal_information_apikeys: "個人信息-API Keys",
|
||||
auth_title: "系統認證",
|
||||
group_permission: "用戶組與權限",
|
||||
change_history: "變更記錄",
|
||||
change_content: "變更內容"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue