perf: history增加触发类型显示

This commit is contained in:
xiaojunnuo
2025-06-09 11:13:51 +08:00
parent 0aea9c129c
commit 7f6070c960
5 changed files with 54 additions and 3 deletions
@@ -60,12 +60,13 @@ export class HistoryService extends BaseService<HistoryEntity> {
return new HistoryDetail(entity, log);
}
async start(pipeline: PipelineEntity) {
async start(pipeline: PipelineEntity,triggerType:string) {
const bean = {
userId: pipeline.userId,
pipelineId: pipeline.id,
title: pipeline.title,
status: 'start',
triggerType
};
const { id } = await this.add(bean);
//清除大于pipeline.keepHistoryCount的历史记录
@@ -497,7 +497,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
};
const userId = entity.userId;
const historyId = await this.historyService.start(entity);
const historyId = await this.historyService.start(entity,triggerType);
const userIsAdmin = await this.userService.isAdmin(userId);
const user: UserInfo = {
id: userId,