mirror of https://github.com/certd/certd
chore:
parent
ae072929df
commit
6841c2328e
|
@ -29,3 +29,5 @@ test/**/*.js
|
||||||
/packages/ui/certd-server/data/db.sqlite
|
/packages/ui/certd-server/data/db.sqlite
|
||||||
/packages/ui/certd-server/data/keys.yaml
|
/packages/ui/certd-server/data/keys.yaml
|
||||||
/packages/pro/
|
/packages/pro/
|
||||||
|
|
||||||
|
test.js
|
|
@ -13,7 +13,8 @@ services:
|
||||||
- "7001:7001"
|
- "7001:7001"
|
||||||
# ↓↓↓↓ ---------------------------------------------------------- https端口,可以根据实际情况,是否暴露相关服务端口
|
# ↓↓↓↓ ---------------------------------------------------------- https端口,可以根据实际情况,是否暴露相关服务端口
|
||||||
- "7002:7002"
|
- "7002:7002"
|
||||||
|
networks:
|
||||||
|
- ip6net
|
||||||
# #↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo ENOTFOUND等错误,可以尝试设置dns配置
|
# #↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo ENOTFOUND等错误,可以尝试设置dns配置
|
||||||
# dns:
|
# dns:
|
||||||
# - 223.5.5.5
|
# - 223.5.5.5
|
||||||
|
@ -44,4 +45,9 @@ services:
|
||||||
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
|
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
|
||||||
# - certd_typeorm_dataSource_default_database=certd # 数据库名
|
# - certd_typeorm_dataSource_default_database=certd # 数据库名
|
||||||
|
|
||||||
|
networks:
|
||||||
|
ip6net:
|
||||||
|
enable_ipv6: true
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 2001:db8::/64
|
||||||
|
|
|
@ -88,11 +88,11 @@ class HttpError extends Error {
|
||||||
if (url) {
|
if (url) {
|
||||||
this.message = `${this.message}:${url}`;
|
this.message = `${this.message}:${url}`;
|
||||||
}
|
}
|
||||||
// const { stack, cause } = error;
|
const { stack, cause } = error;
|
||||||
delete this.cause;
|
// delete this.cause;
|
||||||
delete this.stack;
|
// delete this.stack;
|
||||||
// this.cause = cause;
|
this.cause = cause;
|
||||||
// this.stack = stack;
|
this.stack = stack;
|
||||||
delete error.stack;
|
delete error.stack;
|
||||||
delete error.cause;
|
delete error.cause;
|
||||||
delete error.response;
|
delete error.response;
|
||||||
|
|
|
@ -57,9 +57,9 @@ export class HttpError extends Error {
|
||||||
data: error.response?.data,
|
data: error.response?.data,
|
||||||
};
|
};
|
||||||
|
|
||||||
// const { stack, cause } = error;
|
const { stack, cause } = error;
|
||||||
// this.cause = cause;
|
this.cause = cause;
|
||||||
// this.stack = stack;
|
this.stack = stack;
|
||||||
delete error.response;
|
delete error.response;
|
||||||
delete error.config;
|
delete error.config;
|
||||||
delete error.request;
|
delete error.request;
|
||||||
|
|
|
@ -116,10 +116,14 @@ export class RunHistory {
|
||||||
}
|
}
|
||||||
|
|
||||||
logError(runnable: Runnable, e: Error) {
|
logError(runnable: Runnable, e: Error) {
|
||||||
// delete e.stack;
|
const { cause, stack } = e;
|
||||||
// delete e.cause;
|
delete e.stack;
|
||||||
const errorInfo = runnable.runnableType === "step" ? e : e.message;
|
delete e.cause;
|
||||||
this._loggers[runnable.id].error(`[${runnable.runnableType}] [${runnable.title}]<id:${runnable.id}> :`, errorInfo);
|
if (runnable.runnableType === "step") {
|
||||||
|
this._loggers[runnable.id].error(`[${runnable.runnableType}] [${runnable.title}]<id:${runnable.id}> :`, e, stack, cause);
|
||||||
|
} else {
|
||||||
|
this._loggers[runnable.id].error(`[${runnable.runnableType}] [${runnable.title}]<id:${runnable.id}> :`, e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
finally(runnable: Runnable) {
|
finally(runnable: Runnable) {
|
||||||
|
|
|
@ -74,16 +74,16 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||||
})
|
})
|
||||||
renewDays!: number;
|
renewDays!: number;
|
||||||
|
|
||||||
@TaskInput({
|
// @TaskInput({
|
||||||
title: "强制更新",
|
// title: "强制更新",
|
||||||
component: {
|
// component: {
|
||||||
name: "a-switch",
|
// name: "a-switch",
|
||||||
vModel: "checked",
|
// vModel: "checked",
|
||||||
},
|
// },
|
||||||
order: 100,
|
// order: 100,
|
||||||
helper: "是否强制重新申请证书",
|
// helper: "是否强制重新申请证书",
|
||||||
})
|
// })
|
||||||
forceUpdate!: string;
|
// forceUpdate!: string;
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "成功后邮件通知",
|
title: "成功后邮件通知",
|
||||||
|
@ -221,11 +221,11 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||||
* 是否更新证书
|
* 是否更新证书
|
||||||
*/
|
*/
|
||||||
async condition() {
|
async condition() {
|
||||||
if (this.forceUpdate) {
|
// if (this.forceUpdate) {
|
||||||
this.logger.info("强制更新证书选项已勾选,准备申请新证书");
|
// this.logger.info("强制更新证书选项已勾选,准备申请新证书");
|
||||||
this.logger.warn("申请完之后,切记取消强制更新,避免申请过多证书。");
|
// this.logger.warn("申请完之后,切记取消强制更新,避免申请过多证书。");
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
let inputChanged = this.ctx.inputChanged;
|
let inputChanged = this.ctx.inputChanged;
|
||||||
if (inputChanged) {
|
if (inputChanged) {
|
||||||
|
|
|
@ -139,7 +139,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
width: 300,
|
width: 300,
|
||||||
cellRender: ({ row, value }) => {
|
cellRender: ({ row, value }) => {
|
||||||
debugger;
|
debugger;
|
||||||
return <router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId } }}>{value}</router-link>;
|
return (
|
||||||
|
<router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId, editMode: false, historyId: row.id } }}>{value}</router-link>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,6 +5,7 @@ export type StatusEnumItem = {
|
||||||
icon: string;
|
icon: string;
|
||||||
spin?: boolean;
|
spin?: boolean;
|
||||||
iconSpin?: boolean;
|
iconSpin?: boolean;
|
||||||
|
iconColor?: string;
|
||||||
};
|
};
|
||||||
export type StatusEnumType = {
|
export type StatusEnumType = {
|
||||||
[key: string]: StatusEnumItem;
|
[key: string]: StatusEnumItem;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
import dns from "dns";
|
||||||
|
|
||||||
|
// axios.request({
|
||||||
|
// url:"http://[2407:3740:0:301::c]/"
|
||||||
|
// }).then(res=>{
|
||||||
|
// console.log(res)
|
||||||
|
// })
|
||||||
|
//
|
||||||
|
// dns.resolve("api.cloudflare.com", (err, address) => {
|
||||||
|
// console.log(address);
|
||||||
|
// })
|
||||||
|
|
||||||
|
import {http} from '@certd/basic'
|
||||||
|
http.request({
|
||||||
|
url:"https://api.cloudflare.com"
|
||||||
|
}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
})
|
Loading…
Reference in New Issue