perf: 1panel支持先上传证书再选择证书

This commit is contained in:
xiaojunnuo
2026-04-10 00:08:10 +08:00
parent a7a4f66633
commit 7a9eec88e8
10 changed files with 197 additions and 5 deletions
@@ -7,6 +7,9 @@ import { ILogger } from "@certd/basic";
import dayjs from "dayjs";
import { uniq } from "lodash-es";
export interface ICertInfoGetter {
getByPipelineId: (pipelineId: number) => Promise<CertInfo>;
}
export type CertInfo = {
crt: string; //fullchain证书
key: string; //私钥
@@ -1,2 +1,2 @@
export const CertApplyPluginNames = [":cert:"];
export const EVENT_CERT_APPLY_SUCCESS = "CertApply.success";
export const EVENT_CERT_APPLY_SUCCESS = "CertApply.success";
@@ -1,4 +1,4 @@
export * from "./convert.js";
export * from "./cert-reader.js";
export * from "./consts.js";
export * from "./dns-provider/index.js";
export * from "./dns-provider/index.js";
@@ -44,6 +44,10 @@ export function createRemoteSelectInputDefine(opts?: {
component?: any;
value?: any;
pageSize?: number;
uploadCert?: {
title?: string;
columns?: Record<string, any>;
};
}) {
const title = opts?.title || "请选择";
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
@@ -74,6 +78,7 @@ export function createRemoteSelectInputDefine(opts?: {
multi,
pageSize: opts?.pageSize,
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
uploadCert: opts?.uploadCert,
...opts.component,
},
value: opts.value,