From ac4136f9c69f68170b195fb731bd31c3ee69d9ea Mon Sep 17 00:00:00 2001 From: tori-27 <82616652+tori-27@users.noreply.github.com> Date: Sat, 12 Oct 2024 01:12:06 +0200 Subject: [PATCH] =?UTF-8?q?WebUI:=20agent=20edit/detail=20view:=20change?= =?UTF-8?q?=20the=20**HELP**=20url=20based=20on=20the=20b=E2=80=A6=20(#421?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/agent/AgentForm.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 }); }