perf(monitor): 支持查看监控执行记录

- 新增监控任务执行记录页面及相关API
- 添加数据库表结构及多数据库支持
- 完善国际化翻译
- 实现批量删除功能
- 优化站点监控服务逻辑
This commit is contained in:
xiaojunnuo
2026-04-06 01:17:02 +08:00
parent 73b8e85976
commit b5cc794061
12 changed files with 454 additions and 12 deletions
@@ -45,7 +45,6 @@ export class JobHistoryController extends CrudController<JobHistoryService> {
return await super.list(body);
}
@Post('/info', { description: Constants.per.authOnly, summary: "查询监控运行历史详情" })
async info(@Query('id') id: number) {
await this.checkOwner(this.service,id,"read");
@@ -55,8 +54,12 @@ export class JobHistoryController extends CrudController<JobHistoryService> {
@Post('/delete', { description: Constants.per.authOnly, summary: "删除监控运行历史" })
async delete(@Query('id') id: number) {
await this.checkOwner(this.service,id,"write");
const res = await super.delete(id);
return res
return await super.delete(id);
}
@Post('/batchDelete', { description: Constants.per.authOnly, summary: "批量删除监控运行历史" })
async batchDelete(@Body('ids') ids: number[]) {
const { projectId, userId } = await this.getProjectUserIdWrite()
await this.service.batchDelete(ids,userId,projectId);
return this.ok();
}
}