mirror of https://github.com/certd/certd
fix: 修复西部数码账户级别apikey不可用的bug
parent
f2f56adfd7
commit
f8f3e8b43f
|
@ -3,7 +3,7 @@
|
|||
"version": "1.25.8",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"build": ""
|
||||
"build": "echo 'basic'"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -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<T = any> {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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 <a-progress percent={percent} strokeColor={color} format={(percent: number) => `${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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ export class WestDnsProvider extends AbstractDnsProvider<westRecord> {
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue