refactor(任务中心): 优化停止任务的日志记录
This commit is contained in:
parent
08aad6f490
commit
415c6ae553
|
@ -350,12 +350,12 @@ public class ApiTaskCenterService {
|
|||
LogDTO dto = LogDTOBuilder.builder()
|
||||
.projectId(reportDTO.getProjectId())
|
||||
.organizationId(orgMap.get(reportDTO.getProjectId()))
|
||||
.type(OperationLogType.UPDATE.name())
|
||||
.type(OperationLogType.STOP.name())
|
||||
.module(module)
|
||||
.method(OperationLogAspect.getMethod())
|
||||
.path(OperationLogAspect.getPath())
|
||||
.sourceId(reportDTO.getId())
|
||||
.content(String.format("停止任务:%s", reportDTO.getName()))
|
||||
.content(reportDTO.getName())
|
||||
.createUser(userId)
|
||||
.build().getLogDTO();
|
||||
logs.add(dto);
|
||||
|
|
|
@ -19,7 +19,8 @@ public enum OperationLogType {
|
|||
DISASSOCIATE,
|
||||
ASSOCIATE,
|
||||
QRCODE,
|
||||
ARCHIVED;
|
||||
ARCHIVED,
|
||||
STOP;
|
||||
|
||||
public boolean contains(OperationLogType keyword) {
|
||||
return this.name().contains(keyword.name());
|
||||
|
|
|
@ -350,12 +350,12 @@ public class TestPlanTaskCenterService {
|
|||
LogDTO dto = LogDTOBuilder.builder()
|
||||
.projectId(reportDTO.getProjectId())
|
||||
.organizationId(orgMap.get(reportDTO.getProjectId()))
|
||||
.type(OperationLogType.UPDATE.name())
|
||||
.type(OperationLogType.STOP.name())
|
||||
.module(module)
|
||||
.method(OperationLogAspect.getMethod())
|
||||
.path(OperationLogAspect.getPath())
|
||||
.sourceId(reportDTO.getId())
|
||||
.content(String.format("停止任务:%s", reportDTO.getName()))
|
||||
.content(reportDTO.getName())
|
||||
.createUser(userId)
|
||||
.build().getLogDTO();
|
||||
logs.add(dto);
|
||||
|
|
|
@ -84,4 +84,8 @@ export const operationTypeOptions = [
|
|||
label: 'system.log.operateType.archived',
|
||||
value: 'ARCHIVED',
|
||||
},
|
||||
{
|
||||
label: 'system.log.operateType.stop',
|
||||
value: 'STOP',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -455,6 +455,10 @@
|
|||
label: 'system.log.operateType.archived',
|
||||
value: 'ARCHIVED',
|
||||
},
|
||||
{
|
||||
label: 'system.log.operateType.stop',
|
||||
value: 'STOP',
|
||||
},
|
||||
];
|
||||
|
||||
function resetFilter() {
|
||||
|
|
|
@ -35,4 +35,5 @@ export default {
|
|||
'system.log.log': 'Operation log',
|
||||
'system.log.time': 'Operation time',
|
||||
'system.log.content': 'in {module} under {range}',
|
||||
'system.log.operateType.stop': 'Stop',
|
||||
};
|
||||
|
|
|
@ -35,4 +35,5 @@ export default {
|
|||
'system.log.log': '操作日志',
|
||||
'system.log.time': '操作时间',
|
||||
'system.log.content': '{operator} 在 {range} 下的 {module} 中 ',
|
||||
'system.log.operateType.stop': '停止',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue