mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
perf: 证书流水线可以开启webhook
This commit is contained in:
@@ -243,6 +243,9 @@ export default {
|
||||
|
||||
addToMonitorEnabled: "Add to Cert Monitor",
|
||||
addToMonitorDomains: "Add to Monitor Domains",
|
||||
|
||||
webhookEnabled: "Webhook Enabled",
|
||||
webhookEnabledHelper: "Support webhook trigger pipeline, please check webhook address in trigger source",
|
||||
},
|
||||
notificationDefault: "Use Default Notification",
|
||||
monitor: {
|
||||
|
||||
@@ -247,6 +247,8 @@ export default {
|
||||
groupIdTitle: "流水线分组",
|
||||
addToMonitorEnabled: "添加到证书监控",
|
||||
addToMonitorDomains: "添加到监控域名",
|
||||
webhookEnabled: "开启Webhook",
|
||||
webhookEnabledHelper: "支持webhook触发流水线,请在触发源中查看webhook地址",
|
||||
},
|
||||
notificationDefault: "使用默认通知",
|
||||
monitor: {
|
||||
|
||||
@@ -19,6 +19,9 @@ export function fillPipelineByDefaultForm(pipeline: any, form: any) {
|
||||
if (form.triggerCron) {
|
||||
triggers.push({ title: "定时触发", type: "timer", props: { cron: form.triggerCron } });
|
||||
}
|
||||
if (form.webhookEnabled) {
|
||||
triggers.push({ title: "Webhook触发", type: "webhook" });
|
||||
}
|
||||
const notifications = [];
|
||||
if (form.notification != null) {
|
||||
notifications.push({
|
||||
@@ -299,6 +302,22 @@ export function useCertPipelineCreator() {
|
||||
order: 999,
|
||||
},
|
||||
},
|
||||
webhookEnabled: {
|
||||
title: t("certd.pipelineForm.webhookEnabled"),
|
||||
type: "switch",
|
||||
form: {
|
||||
helper: t("certd.pipelineForm.webhookEnabledHelper"),
|
||||
value: false,
|
||||
component: {
|
||||
name: "a-switch",
|
||||
vModel: "checked",
|
||||
},
|
||||
col: {
|
||||
span: 24,
|
||||
},
|
||||
order: 999,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<text-editable v-model="pipeline.title" :hover-show="false" :disabled="!editMode"></text-editable>
|
||||
</div>
|
||||
<div class="more flex items-center flex-1 justify-end">
|
||||
<div v-if="isCert" class="flex items-center hidden md:block">
|
||||
<div v-if="isCert && pipelineDetail.lastVars?.certExpiresTime" class="flex items-center hidden md:block">
|
||||
<a-tag :color="pipelineDetail.lastVars?.certExpiresTime > Date.now() ? 'green' : 'red'">
|
||||
<span class="flex">
|
||||
<fs-icon icon="ion:time-outline"></fs-icon>
|
||||
|
||||
Reference in New Issue
Block a user