mirror of https://github.com/certd/certd
chore:
parent
8ef63916ef
commit
378c777a38
|
@ -97,11 +97,17 @@ export function createAxiosService({ logger }: { logger: Logger }) {
|
||||||
if (config.logRes == null) {
|
if (config.logRes == null) {
|
||||||
config.logRes = false;
|
config.logRes = false;
|
||||||
}
|
}
|
||||||
|
if (config.logData == null) {
|
||||||
|
config.logData = false;
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`http request:${config.url},method:${config.method}`);
|
logger.info(`http request:${config.url},method:${config.method}`);
|
||||||
if (config.logParams !== false && config.params) {
|
if (config.logParams !== false && config.params) {
|
||||||
logger.info(`params:${JSON.stringify(config.params)}`);
|
logger.info(`params:${JSON.stringify(config.params)}`);
|
||||||
}
|
}
|
||||||
|
if (config.logData !== false && config.data) {
|
||||||
|
logger.info(`data:${JSON.stringify(config.data)}`);
|
||||||
|
}
|
||||||
if (config.timeout == null) {
|
if (config.timeout == null) {
|
||||||
config.timeout = 15000;
|
config.timeout = 15000;
|
||||||
}
|
}
|
||||||
|
@ -226,6 +232,7 @@ export type HttpRequestConfig<D = any> = {
|
||||||
skipCheckRes?: boolean;
|
skipCheckRes?: boolean;
|
||||||
logParams?: boolean;
|
logParams?: boolean;
|
||||||
logRes?: boolean;
|
logRes?: boolean;
|
||||||
|
logData?: boolean;
|
||||||
httpProxy?: string;
|
httpProxy?: string;
|
||||||
returnOriginRes?: boolean;
|
returnOriginRes?: boolean;
|
||||||
} & AxiosRequestConfig<D>;
|
} & AxiosRequestConfig<D>;
|
||||||
|
|
|
@ -23,7 +23,12 @@
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
<a-tooltip title="AI分析异常">
|
||||||
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
|
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
|
||||||
|
</a-tooltip>
|
||||||
|
<a-tooltip title="强制重新执行此步骤">
|
||||||
|
<fs-button key="rerun" type="primary" text="重新运行" icon="icon-park-outline:replay-music" @click="triggerRun(activeKey)"></fs-button>
|
||||||
|
</a-tooltip>
|
||||||
<fs-button key="cancel" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
|
<fs-button key="cancel" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
|
||||||
<fs-button key="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
|
<fs-button key="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class FarcdnAccess extends BaseAccess {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encrypt: false,
|
encrypt: false,
|
||||||
required: true
|
required: false
|
||||||
})
|
})
|
||||||
httpProxy!: string;
|
httpProxy!: string;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ export class FarcdnAccess extends BaseAccess {
|
||||||
|
|
||||||
async onTestRequest() {
|
async onTestRequest() {
|
||||||
try{
|
try{
|
||||||
const data = await this.findSSLCertConfig(1);
|
const data = await this.findSSLCertConfig(2106);
|
||||||
if (data) {
|
if (data) {
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ export class FarcdnAccess extends BaseAccess {
|
||||||
sslCertId,
|
sslCertId,
|
||||||
};
|
};
|
||||||
const res= await this.doRequest({
|
const res= await this.doRequest({
|
||||||
url: "/findSSLCertConfig",
|
url: "/api/source/findSSLCertConfig",
|
||||||
data: params
|
data: params
|
||||||
});
|
});
|
||||||
this.ctx.logger.info(`找到证书${sslCertId}: name=${res.name},domain=${res.commonNames},dnsNames=${res.dnsNames}`);
|
this.ctx.logger.info(`找到证书${sslCertId}: name=${res.name},domain=${res.commonNames},dnsNames=${res.dnsNames}`);
|
||||||
|
@ -181,6 +181,9 @@ export class FarcdnAccess extends BaseAccess {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: params,
|
data: params,
|
||||||
httpProxy: this.httpProxy||undefined,
|
httpProxy: this.httpProxy||undefined,
|
||||||
|
logRes:true,
|
||||||
|
logParams:true,
|
||||||
|
logData:true,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.code === "200") {
|
if (res.code === "200") {
|
||||||
|
|
Loading…
Reference in New Issue