mirror of
https://github.com/certd/certd.git
synced 2026-04-14 04:20:52 +08:00
perf: webhook触发器一个流水线限制只能添加一个
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<fs-copyable :model-value="webhookUrl" class="flex-1 overflow-hidden"></fs-copyable>
|
||||
</div>
|
||||
<a-button class="mt-2" type="primary" size="small" @click="refreshWebhookKey">重新生成</a-button>
|
||||
<div class="helper">支持post和get请求</div>
|
||||
<div class="helper">支持post和get请求(同一个流水线的webhook地址是唯一的)</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
</template>
|
||||
@@ -41,6 +41,7 @@ onMounted(() => {
|
||||
const refreshWebhookKey = () => {
|
||||
Modal.confirm({
|
||||
title: "确认重新生成Webhook URL吗?",
|
||||
content: "重新生成后,旧的webhook地址将失效",
|
||||
okText: "确认",
|
||||
okType: "danger",
|
||||
onOk: async () => {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="editMode" class="task-container is-add">
|
||||
<div v-if="editMode && !hasWebhookTrigger" class="task-container is-add">
|
||||
<div class="line line-right">
|
||||
<div class="flow-line"></div>
|
||||
</div>
|
||||
@@ -994,6 +994,10 @@ export default defineComponent({
|
||||
const isCert = computed(() => {
|
||||
return currentPipeline.value?.type?.startsWith("cert");
|
||||
});
|
||||
|
||||
const hasWebhookTrigger = computed(() => {
|
||||
return currentPipeline.value?.triggers?.some((item: any) => item.type === "webhook");
|
||||
});
|
||||
return {
|
||||
isCert,
|
||||
pipeline,
|
||||
@@ -1013,6 +1017,7 @@ export default defineComponent({
|
||||
viewCert,
|
||||
downloadCert,
|
||||
pipelineDetail,
|
||||
hasWebhookTrigger,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user