From d3e4677ea4fac8e7533749d7f4187e410489e536 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 6 Jul 2026 19:56:54 +0800 Subject: [PATCH] =?UTF-8?q?perf(pipeline):=20=E5=B0=86=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E4=BF=9D=E7=95=99=E6=9D=A1=E6=95=B0=E4=BB=8E?= =?UTF-8?q?30=E8=B0=83=E6=95=B4=E4=B8=BA100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一修改所有新建流水线场景下的默认keepHistoryCount配置,提升历史记录留存数量 --- .../certd-client/src/views/certd/pipeline/cert-upload/use.tsx | 2 +- .../ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx | 2 +- .../ui/certd-client/src/views/certd/pipeline/template/use.tsx | 2 +- .../src/modules/pipeline/service/pipeline-service.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx index 602f2d11a..ac7f6be20 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx @@ -207,7 +207,7 @@ export function useCertUpload() { const { id } = await api.Save({ title: pipeline.title, content: JSON.stringify(pipeline), - keepHistoryCount: 30, + keepHistoryCount: 100, type: "cert_upload", groupId: form.groupId, }); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx index f532c1534..756561a70 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx @@ -605,7 +605,7 @@ export function useCertPipelineCreator({ formWrapperRef }: { formWrapperRef: Ref const { id } = await api.Save({ title: pipeline.title, content: JSON.stringify(pipeline), - keepHistoryCount: 30, + keepHistoryCount: 100, type: "cert", groupId, addToMonitorEnabled: form.addToMonitorEnabled, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx index 67e3465a7..82283db2b 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx @@ -160,7 +160,7 @@ export async function createPipelineByTemplate(opts: { templateId: number; title return await templateApi.CreatePipelineByTemplate({ title, content: JSON.stringify(pipeline), - keepHistoryCount: keepHistoryCount ?? 30, + keepHistoryCount: keepHistoryCount ?? 100, groupId, templateId, }); diff --git a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts index 26bad0575..9d69ba5bd 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts @@ -1376,7 +1376,7 @@ export class PipelineService extends BaseService { bean.status = "none"; bean.type = "cert_auto"; bean.disabled = false; - bean.keepHistoryCount = 30; + bean.keepHistoryCount = 100; bean.projectId = req.projectId; await this.save(bean);