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) {
|
||||
config.logRes = false;
|
||||
}
|
||||
if (config.logData == null) {
|
||||
config.logData = false;
|
||||
}
|
||||
|
||||
logger.info(`http request:${config.url},method:${config.method}`);
|
||||
if (config.logParams !== false && 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) {
|
||||
config.timeout = 15000;
|
||||
}
|
||||
|
@ -226,6 +232,7 @@ export type HttpRequestConfig<D = any> = {
|
|||
skipCheckRes?: boolean;
|
||||
logParams?: boolean;
|
||||
logRes?: boolean;
|
||||
logData?: boolean;
|
||||
httpProxy?: string;
|
||||
returnOriginRes?: boolean;
|
||||
} & AxiosRequestConfig<D>;
|
||||
|
|
|
@ -23,7 +23,12 @@
|
|||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<template #footer>
|
||||
<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 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>
|
||||
</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="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
|
||||
</template>
|
||||
|
|
|
@ -63,7 +63,7 @@ export class FarcdnAccess extends BaseAccess {
|
|||
}
|
||||
},
|
||||
encrypt: false,
|
||||
required: true
|
||||
required: false
|
||||
})
|
||||
httpProxy!: string;
|
||||
|
||||
|
@ -80,7 +80,7 @@ export class FarcdnAccess extends BaseAccess {
|
|||
|
||||
async onTestRequest() {
|
||||
try{
|
||||
const data = await this.findSSLCertConfig(1);
|
||||
const data = await this.findSSLCertConfig(2106);
|
||||
if (data) {
|
||||
return "ok";
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ export class FarcdnAccess extends BaseAccess {
|
|||
sslCertId,
|
||||
};
|
||||
const res= await this.doRequest({
|
||||
url: "/findSSLCertConfig",
|
||||
url: "/api/source/findSSLCertConfig",
|
||||
data: params
|
||||
});
|
||||
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",
|
||||
data: params,
|
||||
httpProxy: this.httpProxy||undefined,
|
||||
logRes:true,
|
||||
logParams:true,
|
||||
logData:true,
|
||||
});
|
||||
|
||||
if (res.code === "200") {
|
||||
|
|
Loading…
Reference in New Issue