diff --git a/web/src/components/agent/AgentForm.vue b/web/src/components/agent/AgentForm.vue index 42c30fde0..d336774e5 100644 --- a/web/src/components/agent/AgentForm.vue +++ b/web/src/components/agent/AgentForm.vue @@ -21,11 +21,7 @@ - + @@ -107,6 +103,16 @@ const agent = computed({ set: (value) => emit('update:modelValue', value), }); +const baseDocsUrl = 'https://woodpecker-ci.org/docs/next/administration/backends/'; + +const backendDocsUrl = computed(() => { + let backendUrlSuffix = agent.value.backend?.toLowerCase(); + if (backendUrlSuffix === 'custom') { + backendUrlSuffix = 'custom-backends'; + } + return `${baseDocsUrl}${backendUrlSuffix === '' ? 'docker' : backendUrlSuffix}`; +}); + function updateAgent(newValues: Partial) { emit('update:modelValue', { ...agent.value, ...newValues }); }