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