From 791f5342beb74e825df56d6d03ba43f575435018 Mon Sep 17 00:00:00 2001 From: Marc Fraile Date: Thu, 29 Oct 2026 14:44:57 -0400 Subject: [PATCH] Add new parameter params.service.frontend; use new parameter to determine URL style in user emails. --- cloudgene.yaml | 1 + main.nf | 8 ++++++-- nextflow.config | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cloudgene.yaml b/cloudgene.yaml index 19637db..77b4060 100644 --- a/cloudgene.yaml +++ b/cloudgene.yaml @@ -32,6 +32,7 @@ workflow: contact: "${CLOUDGENE_CONTACT_NAME}" email: "${CLOUDGENE_CONTACT_EMAIL}" url: "${CLOUDGENE_SERVICE_URL}" + frontend: "${CLOUDGENE_SERVICE_FRONTEND}" groups: - id: validation label: "Input Validation" diff --git a/main.nf b/main.nf index 14f7144..f642035 100644 --- a/main.nf +++ b/main.nf @@ -166,13 +166,17 @@ workflow.onComplete { println "::set-value-and-submit name=genome_build::${params.build}" } + def downloads_url = (params.service.frontend == 'vue') + ? "${params.service.url}/jobs/${params.project_id}" + : "${params.service.url}/index.html#!jobs/${params.project_id}" + // imputation job if (params.merge_results == true && params.encryption.enabled == true) { if (params.send_mail && params.user.email != null) { sendMail { to "${params.user.email}" subject "[${params.service.name}] Job ${params.project} is complete" - body "Dear ${params.user.name},\n\nYour imputation job has finished succesfully. The password for the imputation results is: ${params.encryption_password}\n\nYou can download the results from the following link: ${params.service.url}/index.html#!jobs/${params.project_id}" + body "Dear ${params.user.name},\n\nYour imputation job has finished succesfully. The password for the imputation results is: ${params.encryption_password}\n\nYou can download the results from the following link: ${downloads_url}" } println "::message:: Data have been exported successfully. We have sent a notification email to ${params.user.email}" } else { @@ -186,7 +190,7 @@ workflow.onComplete { sendMail { to "${params.user.email}" subject "[${params.service.name}] Job ${params.project} is complete" - body "Dear ${params.user.name},\n\nYour PGS job has finished successfully.\n\nYou can download the results from the following link: ${params.service.url}/index.html#!jobs/${params.project_id}" + body "Dear ${params.user.name},\n\nYour PGS job has finished successfully.\n\nYou can download the results from the following link: ${downloads_url}" } println "::message:: Data have been exported successfully. We have sent a notification email to ${params.user.email}" } else { diff --git a/nextflow.config b/nextflow.config index ec1f42e..4fb583b 100644 --- a/nextflow.config +++ b/nextflow.config @@ -30,6 +30,7 @@ params { email : null, url : null, threads : -1, + frontend: "canjs", ] user = [