🔨 定时执行日志.
This commit is contained in:
@@ -15,10 +15,10 @@ UPDATE dict_value SET value = 'asset:exec-command' WHERE value = 'asset:exec';
|
|||||||
UPDATE dict_value SET value = 'exec-command:exec' WHERE value = 'exec:exec-command';
|
UPDATE dict_value SET value = 'exec-command:exec' WHERE value = 'exec:exec-command';
|
||||||
UPDATE dict_value SET value = 'exec-command:interrupt-exec' WHERE value = 'exec:interrupt-exec';
|
UPDATE dict_value SET value = 'exec-command:interrupt-exec' WHERE value = 'exec:interrupt-exec';
|
||||||
UPDATE dict_value SET value = 'exec-command:interrupt-host' WHERE value = 'exec:interrupt-host';
|
UPDATE dict_value SET value = 'exec-command:interrupt-host' WHERE value = 'exec:interrupt-host';
|
||||||
UPDATE dict_value SET value = 'exec-command-log:delete' WHERE value = 'exec:delete-log';
|
UPDATE dict_value SET value = 'exec-command-log:delete', label = '删除批量执行日志', sort = '10' WHERE value = 'exec:delete-log';
|
||||||
UPDATE dict_value SET value = 'exec-command-log:clear' WHERE value = 'exec:clear-log';
|
UPDATE dict_value SET value = 'exec-command-log:clear', label = '清理批量执行日志', sort = '20' WHERE value = 'exec:clear-log';
|
||||||
UPDATE dict_value SET value = 'exec-command-log:delete-host' WHERE value = 'exec:delete-host-log';
|
UPDATE dict_value SET value = 'exec-command-log:delete-host', label = '删除主机执行记录', sort = '30' WHERE value = 'exec:delete-host-log';
|
||||||
UPDATE dict_value SET value = 'exec-command-log:download' WHERE value = 'exec:download-host-log';
|
UPDATE dict_value SET value = 'exec-command-log:download', label = '下载批量执行日志', sort = '40' WHERE value = 'exec:download-host-log';
|
||||||
-- 操作日志修改
|
-- 操作日志修改
|
||||||
UPDATE operator_log SET module = 'asset:exec-command', type = 'exec-command:exec' WHERE type = 'exec:exec-command';
|
UPDATE operator_log SET module = 'asset:exec-command', type = 'exec-command:exec' WHERE type = 'exec:exec-command';
|
||||||
UPDATE operator_log SET module = 'asset:exec-command', type = 'exec-command:interrupt-exec' WHERE type = 'exec:interrupt-exec';
|
UPDATE operator_log SET module = 'asset:exec-command', type = 'exec-command:interrupt-exec' WHERE type = 'exec:interrupt-exec';
|
||||||
|
|||||||
@@ -29,13 +29,13 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行日志 api
|
* 批量执行日志 api
|
||||||
*
|
*
|
||||||
* @author Jiahang Li
|
* @author Jiahang Li
|
||||||
* @version 1.0.1
|
* @version 1.0.1
|
||||||
* @since 2024-3-11 11:31
|
* @since 2024-3-11 11:31
|
||||||
*/
|
*/
|
||||||
@Tag(name = "asset - 执行日志服务")
|
@Tag(name = "asset - 批量执行日志服务")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Validated
|
@Validated
|
||||||
@RestWrapper
|
@RestWrapper
|
||||||
@@ -54,7 +54,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@IgnoreLog(IgnoreLogMode.RET)
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
@Operation(summary = "分页查询执行日志")
|
@Operation(summary = "分页查询批量执行日志")
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:query')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:query')")
|
||||||
public DataGrid<ExecLogVO> getExecCommandLogPage(@Validated(Page.class) @RequestBody ExecLogQueryRequest request) {
|
public DataGrid<ExecLogVO> getExecCommandLogPage(@Validated(Page.class) @RequestBody ExecLogQueryRequest request) {
|
||||||
request.setSource(SOURCE);
|
request.setSource(SOURCE);
|
||||||
@@ -63,7 +63,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@IgnoreLog(IgnoreLogMode.RET)
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "查询执行日志")
|
@Operation(summary = "查询批量执行日志")
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:query')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:query')")
|
||||||
public ExecLogVO getExecCommandLog(@RequestParam("id") Long id) {
|
public ExecLogVO getExecCommandLog(@RequestParam("id") Long id) {
|
||||||
return execLogService.getExecLog(id, SOURCE);
|
return execLogService.getExecLog(id, SOURCE);
|
||||||
@@ -98,7 +98,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@OperatorLog(ExecCommandLogOperatorType.DELETE)
|
@OperatorLog(ExecCommandLogOperatorType.DELETE)
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除执行日志")
|
@Operation(summary = "删除批量执行日志")
|
||||||
@Parameter(name = "id", description = "id", required = true)
|
@Parameter(name = "id", description = "id", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:delete')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:delete')")
|
||||||
public Integer deleteExecCommandLog(@RequestParam("id") Long id) {
|
public Integer deleteExecCommandLog(@RequestParam("id") Long id) {
|
||||||
@@ -107,7 +107,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@OperatorLog(ExecCommandLogOperatorType.DELETE)
|
@OperatorLog(ExecCommandLogOperatorType.DELETE)
|
||||||
@DeleteMapping("/batch-delete")
|
@DeleteMapping("/batch-delete")
|
||||||
@Operation(summary = "删除执行日志")
|
@Operation(summary = "删除批量执行日志")
|
||||||
@Parameter(name = "idList", description = "idList", required = true)
|
@Parameter(name = "idList", description = "idList", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:delete')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:delete')")
|
||||||
public Integer batchDeleteExecCommandLog(@RequestParam("idList") List<Long> idList) {
|
public Integer batchDeleteExecCommandLog(@RequestParam("idList") List<Long> idList) {
|
||||||
@@ -124,7 +124,7 @@ public class ExecCommandLogController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/query-count")
|
@PostMapping("/query-count")
|
||||||
@Operation(summary = "查询执行日志数量")
|
@Operation(summary = "查询批量执行日志数量")
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:management:clear')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:management:clear')")
|
||||||
public Long getExecCommandLogCount(@RequestBody ExecLogQueryRequest request) {
|
public Long getExecCommandLogCount(@RequestBody ExecLogQueryRequest request) {
|
||||||
request.setSource(SOURCE);
|
request.setSource(SOURCE);
|
||||||
@@ -133,7 +133,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@OperatorLog(ExecCommandLogOperatorType.CLEAR)
|
@OperatorLog(ExecCommandLogOperatorType.CLEAR)
|
||||||
@PostMapping("/clear")
|
@PostMapping("/clear")
|
||||||
@Operation(summary = "清空执行日志")
|
@Operation(summary = "清空批量执行日志")
|
||||||
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:management:clear')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-command-log:management:clear')")
|
||||||
public Integer clearExecCommandLog(@RequestBody ExecLogQueryRequest request) {
|
public Integer clearExecCommandLog(@RequestBody ExecLogQueryRequest request) {
|
||||||
request.setSource(SOURCE);
|
request.setSource(SOURCE);
|
||||||
@@ -141,7 +141,7 @@ public class ExecCommandLogController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/tail")
|
@PostMapping("/tail")
|
||||||
@Operation(summary = "查看执行日志")
|
@Operation(summary = "查看批量执行日志")
|
||||||
@PreAuthorize("@ss.hasAnyPermission('asset:exec-command-log:query', 'asset:exec-command:exec')")
|
@PreAuthorize("@ss.hasAnyPermission('asset:exec-command-log:query', 'asset:exec-command:exec')")
|
||||||
public String getExecCommandLogTailToken(@Validated @RequestBody ExecLogTailRequest request) {
|
public String getExecCommandLogTailToken(@Validated @RequestBody ExecLogTailRequest request) {
|
||||||
request.setSource(SOURCE);
|
request.setSource(SOURCE);
|
||||||
@@ -150,7 +150,7 @@ public class ExecCommandLogController {
|
|||||||
|
|
||||||
@OperatorLog(ExecCommandLogOperatorType.DOWNLOAD)
|
@OperatorLog(ExecCommandLogOperatorType.DOWNLOAD)
|
||||||
@GetMapping("/download")
|
@GetMapping("/download")
|
||||||
@Operation(summary = "下载执行日志")
|
@Operation(summary = "下载批量执行日志")
|
||||||
@PreAuthorize("@ss.hasAnyPermission('asset:exec-command-log:query', 'asset:exec-command:exec')")
|
@PreAuthorize("@ss.hasAnyPermission('asset:exec-command-log:query', 'asset:exec-command:exec')")
|
||||||
public void downloadExecCommandLogFile(@RequestParam("id") Long id, HttpServletResponse response) {
|
public void downloadExecCommandLogFile(@RequestParam("id") Long id, HttpServletResponse response) {
|
||||||
execLogService.downloadLogFile(id, SOURCE, response);
|
execLogService.downloadLogFile(id, SOURCE, response);
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
### 查询计划任务日志
|
||||||
|
GET {{baseUrl}}/asset/exec-job-log/get?id=1
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
|
||||||
|
### 分页查询计划任务日志
|
||||||
|
POST {{baseUrl}}/asset/exec-job-log/query
|
||||||
|
Content-Type: application/json
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
{
|
||||||
|
"page": 1,
|
||||||
|
"limit": 10,
|
||||||
|
"id": "",
|
||||||
|
"userId": "",
|
||||||
|
"username": "",
|
||||||
|
"description": "",
|
||||||
|
"command": "",
|
||||||
|
"status": ""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### 删除计划任务日志
|
||||||
|
DELETE {{baseUrl}}/asset/exec-job-log/delete?id=1
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
|
||||||
|
### 批量删除计划任务日志
|
||||||
|
DELETE {{baseUrl}}/asset/exec-job-log/batch-delete?idList=1,2,3
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
|
||||||
|
### 查看执行日志
|
||||||
|
POST {{baseUrl}}/asset/exec-job-log/tail
|
||||||
|
Content-Type: application/json
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
{
|
||||||
|
"execId": 56
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### 下载执行日志文件
|
||||||
|
GET {{baseUrl}}/asset/exec-job-log/download?id=83
|
||||||
|
Authorization: {{token}}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
package com.orion.ops.module.asset.controller;
|
||||||
|
|
||||||
|
import com.orion.lang.define.wrapper.DataGrid;
|
||||||
|
import com.orion.ops.framework.biz.operator.log.core.annotation.OperatorLog;
|
||||||
|
import com.orion.ops.framework.common.validator.group.Page;
|
||||||
|
import com.orion.ops.framework.log.core.annotation.IgnoreLog;
|
||||||
|
import com.orion.ops.framework.log.core.enums.IgnoreLogMode;
|
||||||
|
import com.orion.ops.framework.web.core.annotation.RestWrapper;
|
||||||
|
import com.orion.ops.module.asset.define.operator.ExecJobLogOperatorType;
|
||||||
|
import com.orion.ops.module.asset.entity.request.exec.ExecLogQueryRequest;
|
||||||
|
import com.orion.ops.module.asset.entity.request.exec.ExecLogTailRequest;
|
||||||
|
import com.orion.ops.module.asset.entity.vo.ExecHostLogVO;
|
||||||
|
import com.orion.ops.module.asset.entity.vo.ExecLogStatusVO;
|
||||||
|
import com.orion.ops.module.asset.entity.vo.ExecLogVO;
|
||||||
|
import com.orion.ops.module.asset.enums.ExecSourceEnum;
|
||||||
|
import com.orion.ops.module.asset.service.ExecHostLogService;
|
||||||
|
import com.orion.ops.module.asset.service.ExecLogService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划任务日志 api
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.1
|
||||||
|
* @since 2024-3-11 11:31
|
||||||
|
*/
|
||||||
|
@Tag(name = "asset - 计划任务日志服务")
|
||||||
|
@Slf4j
|
||||||
|
@Validated
|
||||||
|
@RestWrapper
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/asset/exec-job-log")
|
||||||
|
@SuppressWarnings({"ELValidationInJSP", "SpringElInspection"})
|
||||||
|
public class ExecJobLogController {
|
||||||
|
|
||||||
|
private static final String SOURCE = ExecSourceEnum.JOB.name();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ExecLogService execLogService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ExecHostLogService execHostLogService;
|
||||||
|
|
||||||
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
|
@PostMapping("/query")
|
||||||
|
@Operation(summary = "分页查询计划任务日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:query')")
|
||||||
|
public DataGrid<ExecLogVO> getExecJobLogPage(@Validated(Page.class) @RequestBody ExecLogQueryRequest request) {
|
||||||
|
request.setSource(SOURCE);
|
||||||
|
return execLogService.getExecLogPage(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "查询计划任务日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:query')")
|
||||||
|
public ExecLogVO getExecJobLog(@RequestParam("id") Long id) {
|
||||||
|
return execLogService.getExecLog(id, SOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
|
@GetMapping("/host-list")
|
||||||
|
@Operation(summary = "查询全部执行主机日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:query')")
|
||||||
|
public List<ExecHostLogVO> getExecJobHostLogList(@RequestParam("logId") Long logId) {
|
||||||
|
return execHostLogService.getExecHostLogList(logId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
|
@GetMapping("/status")
|
||||||
|
@Operation(summary = "查询命令执行状态")
|
||||||
|
@Parameter(name = "idList", description = "idList", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:query')")
|
||||||
|
public ExecLogStatusVO getExecJobLogStatus(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return execLogService.getExecLogStatus(idList, SOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperatorLog(ExecJobLogOperatorType.DELETE)
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除计划任务日志")
|
||||||
|
@Parameter(name = "id", description = "id", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:delete')")
|
||||||
|
public Integer deleteExecJobLog(@RequestParam("id") Long id) {
|
||||||
|
return execLogService.deleteExecLogById(id, SOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperatorLog(ExecJobLogOperatorType.DELETE)
|
||||||
|
@DeleteMapping("/batch-delete")
|
||||||
|
@Operation(summary = "删除计划任务日志")
|
||||||
|
@Parameter(name = "idList", description = "idList", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:delete')")
|
||||||
|
public Integer batchDeleteExecJobLog(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return execLogService.deleteExecLogByIdList(idList, SOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperatorLog(ExecJobLogOperatorType.DELETE_HOST)
|
||||||
|
@DeleteMapping("/delete-host")
|
||||||
|
@Operation(summary = "删除执行主机日志")
|
||||||
|
@Parameter(name = "id", description = "id", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:delete')")
|
||||||
|
public Integer deleteExecJobHostLog(@RequestParam("id") Long id) {
|
||||||
|
return execHostLogService.deleteExecHostLogById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/query-count")
|
||||||
|
@Operation(summary = "查询计划任务日志数量")
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:management:clear')")
|
||||||
|
public Long getExecJobLogCount(@RequestBody ExecLogQueryRequest request) {
|
||||||
|
request.setSource(SOURCE);
|
||||||
|
return execLogService.queryExecLogCount(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperatorLog(ExecJobLogOperatorType.CLEAR)
|
||||||
|
@PostMapping("/clear")
|
||||||
|
@Operation(summary = "清空计划任务日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('asset:exec-job-log:management:clear')")
|
||||||
|
public Integer clearExecJobLog(@RequestBody ExecLogQueryRequest request) {
|
||||||
|
request.setSource(SOURCE);
|
||||||
|
return execLogService.clearExecLog(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/tail")
|
||||||
|
@Operation(summary = "查看计划任务日志")
|
||||||
|
@PreAuthorize("@ss.hasAnyPermission('asset:exec-job-log:query', 'asset:exec-job:exec')")
|
||||||
|
public String getExecJobLogTailToken(@Validated @RequestBody ExecLogTailRequest request) {
|
||||||
|
request.setSource(SOURCE);
|
||||||
|
return execLogService.getExecLogTailToken(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperatorLog(ExecJobLogOperatorType.DOWNLOAD)
|
||||||
|
@GetMapping("/download")
|
||||||
|
@Operation(summary = "下载计划任务日志")
|
||||||
|
@PreAuthorize("@ss.hasAnyPermission('asset:exec-job-log:query', 'asset:exec-job:exec')")
|
||||||
|
public void downloadExecJobLogFile(@RequestParam("id") Long id, HttpServletResponse response) {
|
||||||
|
execLogService.downloadLogFile(id, SOURCE, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -28,9 +28,9 @@ public class ExecCommandLogOperatorType extends InitializingOperatorTypes {
|
|||||||
@Override
|
@Override
|
||||||
public OperatorType[] types() {
|
public OperatorType[] types() {
|
||||||
return new OperatorType[]{
|
return new OperatorType[]{
|
||||||
new OperatorType(H, DELETE, "删除执行记录 <sb>${count}</sb> 条"),
|
new OperatorType(H, DELETE, "删除批量执行日志 <sb>${count}</sb> 条"),
|
||||||
new OperatorType(H, DELETE_HOST, "删除主机执行记录 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
new OperatorType(H, DELETE_HOST, "删除批量主机执行日志 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
||||||
new OperatorType(H, CLEAR, "清理执行记录 <sb>${count}</sb> 条"),
|
new OperatorType(H, CLEAR, "清理批量执行日志 <sb>${count}</sb> 条"),
|
||||||
new OperatorType(L, DOWNLOAD, "下载主机执行日志 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
new OperatorType(L, DOWNLOAD, "下载主机执行日志 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.orion.ops.module.asset.define.operator;
|
||||||
|
|
||||||
|
import com.orion.ops.framework.biz.operator.log.core.annotation.Module;
|
||||||
|
import com.orion.ops.framework.biz.operator.log.core.factory.InitializingOperatorTypes;
|
||||||
|
import com.orion.ops.framework.biz.operator.log.core.model.OperatorType;
|
||||||
|
|
||||||
|
import static com.orion.ops.framework.biz.operator.log.core.enums.OperatorRiskLevel.H;
|
||||||
|
import static com.orion.ops.framework.biz.operator.log.core.enums.OperatorRiskLevel.L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划任务日志 操作记录类型
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.1
|
||||||
|
* @since 2024-3-11 11:31
|
||||||
|
*/
|
||||||
|
@Module("asset:exec-job-log")
|
||||||
|
public class ExecJobLogOperatorType extends InitializingOperatorTypes {
|
||||||
|
|
||||||
|
public static final String DELETE = "exec-job-log:delete";
|
||||||
|
|
||||||
|
public static final String DELETE_HOST = "exec-job-log:delete-host";
|
||||||
|
|
||||||
|
public static final String CLEAR = "exec-job-log:clear";
|
||||||
|
|
||||||
|
public static final String DOWNLOAD = "exec-job-log:download";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OperatorType[] types() {
|
||||||
|
return new OperatorType[]{
|
||||||
|
new OperatorType(H, DELETE, "删除计划任务日志 <sb>${count}</sb> 条"),
|
||||||
|
new OperatorType(H, DELETE_HOST, "删除批量主机执行日志 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
||||||
|
new OperatorType(H, CLEAR, "清理计划任务日志 <sb>${count}</sb> 条"),
|
||||||
|
new OperatorType(L, DOWNLOAD, "下载主机执行日志 <sb>${logId}</sb> <sb>${hostName}</sb>"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ public class HistoryValueController {
|
|||||||
@IgnoreLog(IgnoreLogMode.RET)
|
@IgnoreLog(IgnoreLogMode.RET)
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
@Operation(summary = "分页查询历史归档")
|
@Operation(summary = "分页查询历史归档")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:history-value:query')")
|
@PreAuthorize("@ss.hasAnyPermission('infra:dict-value:update')")
|
||||||
public DataGrid<HistoryValueVO> getHistoryValuePage(@Validated(Page.class) @RequestBody HistoryValueQueryRequest request) {
|
public DataGrid<HistoryValueVO> getHistoryValuePage(@Validated(Page.class) @RequestBody HistoryValueQueryRequest request) {
|
||||||
return historyValueService.getHistoryValuePage(request);
|
return historyValueService.getHistoryValuePage(request);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user