diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index ce370914..0c4e4a4c 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -3,7 +3,7 @@ "version": "1.25.8", "main": "src/index.js", "scripts": { - "build": "" + "build": "echo 'basic'" }, "author": "", "license": "MIT", diff --git a/packages/plugins/plugin-cert/src/dns-provider/api.ts b/packages/plugins/plugin-cert/src/dns-provider/api.ts index d0a05cea..94115e28 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/api.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/api.ts @@ -1,4 +1,4 @@ -import { HttpClient, IAccess, ILogger, Registrable } from "@certd/pipeline"; +import { HttpClient, IAccess, ILogger, Registrable, utils } from "@certd/pipeline"; export type DnsProviderDefine = Registrable & { accessType: string; @@ -22,6 +22,7 @@ export type DnsProviderContext = { access: IAccess; logger: ILogger; http: HttpClient; + utils: typeof utils; }; export interface IDnsProvider { diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index 630da3c2..3fee9830 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -1,4 +1,4 @@ -import { Decorator, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline"; +import { Decorator, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, utils } from "@certd/pipeline"; import type { CertInfo, PrivateKeyType, SSLProvider } from "./acme.js"; import { AcmeService } from "./acme.js"; import _ from "lodash-es"; @@ -181,7 +181,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin { // @ts-ignore const dnsProvider: IDnsProvider = new DnsProviderClass(); - const context: DnsProviderContext = { access, logger: this.logger, http: this.http }; + const context: DnsProviderContext = { access, logger: this.logger, http: this.http, utils }; Decorator.inject(dnsProviderDefine.autowire, dnsProvider, context); dnsProvider.setCtx(context); await dnsProvider.onInstance(); diff --git a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx index 7b75d504..fc2b588f 100644 --- a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx +++ b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx @@ -68,6 +68,9 @@ function install(app: App, options: any = {}) { }, conditionalRender: { match(scope) { + if (scope.key === "__blank__") { + return false; + } //不能用 !scope.value , 否则switch组件设置为关之后就消失了 const { value, key, props } = scope; return !value && key != "_index" && value != false; @@ -147,17 +150,18 @@ function install(app: App, options: any = {}) { } }, columns: { - // createdAt: { - // title: "创建时间", - // type: "datetime", - // form: { - // show: false - // }, - // column: { - // show: false, - // order: 1000 - // } - // } + __blank__: { + title: "", + type: "text", + form: { + show: false + }, + column: { + show: true, + order: 999999, + width: -1 + } + } } }; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx index b1563744..ba0b6bc2 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx @@ -185,11 +185,19 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp minWidth: 200, fixed: "right", buttons: { - view: { + play: { + title: null, + type: "link", + icon: "ant-design:play-outlined", click({ row }) { router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } }); } }, + // view: { + // click({ row }) { + // router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } }); + // } + // }, copy: { click: async (context) => { userStore.checkPlus(); @@ -260,7 +268,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp show: true }, column: { - width: 50 + width: 100 }, form: { show: false @@ -280,7 +288,8 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp column: { show: computed(() => { return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline; - }) + }), + width: 100 } }, title: { @@ -306,9 +315,11 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp } }, content: { - title: "定时任务数量", + title: "定时任务数", type: "number", column: { + align: "center", + width: 100, cellRender({ value }) { if (value && value.triggers) { return value.triggers?.length > 0 ? value.triggers.length : "-"; @@ -346,7 +357,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp const percent = (leftDays / 90) * 100; return `${leftDays} 天`} />; }, - width: 110 + width: 150 } }, lastHistoryTime: { @@ -357,7 +368,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp }, column: { sorter: true, - width: 120, + width: 150, align: "center" } }, @@ -415,6 +426,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp helper: "历史记录保持条数,多余的会被删除" }, column: { + width: 130, show: false } }, @@ -438,7 +450,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp }, column: { sorter: true, - width: 125, + width: 155, align: "center" } }, @@ -449,6 +461,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp show: false }, column: { + width: 125, show: false } } diff --git a/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts index 9b5be555..15131115 100644 --- a/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts @@ -37,7 +37,7 @@ export class WestDnsProvider extends AbstractDnsProvider { private async doRequestApi(url: string, data: any = null, method = 'post') { if (this.access.scope === 'account') { - data.apikey = this.access.apikey; + data.apikey = this.ctx.utils.hash.md5(this.access.apikey); data.username = this.access.username; } else { data.apidomainkey = this.access.apidomainkey;