From f690fc7edd5dd3339836785740f3457f93af56f8 Mon Sep 17 00:00:00 2001 From: Carlo Minotti <50220438+minottic@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:39:14 +0100 Subject: [PATCH] Enable landing page form for URLs retrieve --- backend | 2 +- dev/config/backend/config.local.js | 3 ++- helm/configs/backend/config.local.js | 3 ++- helm/configs/backend/job-template.html | 27 ++++++++++++++++++- .../development/environment.ts | 8 +++++- .../production/environment.ts | 7 ++++- .../landing-page-server/qa/environment.ts | 7 ++++- landing-page-server | 2 +- 8 files changed, 51 insertions(+), 8 deletions(-) diff --git a/backend b/backend index 4608c5eb..d12426f6 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit 4608c5eb39a0decfbc55b4a0cfc96d78ac03a613 +Subproject commit d12426f63c69ea2d6c791dd31f6999d09cf9b57b diff --git a/dev/config/backend/config.local.js b/dev/config/backend/config.local.js index 99d0505d..51a36a85 100644 --- a/dev/config/backend/config.local.js +++ b/dev/config/backend/config.local.js @@ -30,7 +30,8 @@ module.exports = { from: "scicatarchivemanager@YOUR.DOMAIN", to: undefined, subject: "[SciCat " + process.env.NODE_ENV + "]", - text: undefined, // can also set html key and this will override this + text: undefined, // can also set html key and this will override this, + publicRetrieve: true, }, logbook: { enabled: false diff --git a/helm/configs/backend/config.local.js b/helm/configs/backend/config.local.js index 3d91d0b4..58704bd1 100644 --- a/helm/configs/backend/config.local.js +++ b/helm/configs/backend/config.local.js @@ -35,7 +35,8 @@ module.exports = { from: "dacatmail@psi.ch", replyTo: "scicatarchivemanager@psi.ch", subject: "[SciCat " + process.env.ENV + "]", - scicatHref: process.env.ENV === "production"? "https://discovery.psi.ch": `https://discovery-${process.env.ENV}.psi.ch` + scicatHref: process.env.ENV === "production"? "https://discovery.psi.ch": `https://discovery-${process.env.ENV}.psi.ch`, + publicRetrieve: true, }, queue: "rabbitmq", logbook: { diff --git a/helm/configs/backend/job-template.html b/helm/configs/backend/job-template.html index a22430dc..a7000936 100644 --- a/helm/configs/backend/job-template.html +++ b/helm/configs/backend/job-template.html @@ -92,7 +92,12 @@

{{subject}}

{{#with jobSubmissionNotification}}
+ {{#if (or (eq jobType "retrieve") (eq jobType "archive"))}} Your {{jobType}} job has been submitted and will be processed as soon as possible.
+ {{else}} + Your {{jobType}} job has been submitted and will be processed as soon as possible.
+ Job id: {{jobId}}.
+ {{/if}} You will be notified by email as soon as the job is completed.
{{#if jobData}} @@ -100,20 +105,28 @@

{{subject}}

+ {{#unless (eq jobType "public")}} + {{/unless}} + {{#unless (eq jobType "public")}} + {{/unless}} {{#each jobData}} + {{#unless (eq ../jobType "public")}} + {{/unless}} + {{#unless (eq ../jobType "public")}} + {{/unless}} {{/each}}
PIDOwnergroupSourcefolder SizeArchivable Retrievable
{{pid}}{{ownerGroup}}{{sourceFolder}} {{formatBytes size}}{{archivable}} {{retrievable}}
@@ -124,7 +137,11 @@

{{subject}}

{{#with jobFinishedNotification}}
+ {{#if (or (eq jobType "retrieve") (eq jobType "archive"))}} Your {{jobType}} job is now finished.
+ {{else}} + Your {{jobType}} job is now finished. Job id: {{jobId}}
+ {{/if}} {{#if jobStatusMessage}} The returned job status is: {{jobStatusMessage}} {{/if}} @@ -139,7 +156,9 @@

{{subject}}

PID Name + {{#unless (eq ../jobType "public")}} Ownergroup + {{/unless}} Sourcefolder Size @@ -147,7 +166,9 @@

{{subject}}

{{pid}} {{name}} + {{#unless (eq ../../jobType "public")}} {{ownerGroup}} + {{/unless}} {{sourceFolder}} {{formatBytes size}} @@ -160,7 +181,9 @@

{{subject}}

PID Name + {{#unless (eq ../jobType "public")}} Ownergroup + {{/unless}} {{#if (eq ../jobParams.option "URLs")}} Sourcefolder Download parts (size) @@ -176,7 +199,9 @@

{{subject}}

{{pid}} {{name}} + {{#unless (eq ../../jobType "public")}} {{ownerGroup}} + {{/unless}} {{#if (eq ../../jobParams.option "URLs")}} {{sourceFolder}} @@ -204,7 +229,7 @@

{{subject}}

You can now download the data by clicking on the download icon in the Download parts column of the table. The data is potentially spread over several tar files which you then must untar on your destination system. The data will be available for download for the next 30 days.
- Anyone with these URLs will be able to download the data. Do not forward them to people who should not see the data. + Anyone with these URLs will be able to download the data.{{#unless (eq jobType "public")}} Do not forward them to people who should not see the data.{{/unless}}

{{else if (eq jobParams.option "PSI")}}

You can now use the command 'datasetRetriever' to move the retrieved datasets to their final destination. diff --git a/helm/configs/landing-page-server/development/environment.ts b/helm/configs/landing-page-server/development/environment.ts index 0dc8e7db..ee60ac0f 100644 --- a/helm/configs/landing-page-server/development/environment.ts +++ b/helm/configs/landing-page-server/development/environment.ts @@ -10,5 +10,11 @@ export const environment = { oaiProviderRoute: null, production: true, scicatBaseUrl: "https://discovery-development.psi.ch", - showLogoBanner: false + showLogoBanner: false, + retrieveToEmail: { + option: "URLs", + username: "lp_service", + title: "Please enter your email address where you will receive the download procedure", + confirmMessage: "Are you sure you want to continue?" + }, }; diff --git a/helm/configs/landing-page-server/production/environment.ts b/helm/configs/landing-page-server/production/environment.ts index 52f5a0a6..bf02ae8a 100644 --- a/helm/configs/landing-page-server/production/environment.ts +++ b/helm/configs/landing-page-server/production/environment.ts @@ -10,5 +10,10 @@ export const environment = { oaiProviderRoute: null, production: true, scicatBaseUrl: "https://discovery.psi.ch", - showLogoBanner: false + showLogoBanner: false, + retrieveToEmail: { + option: "URLs", + username: "lp_service", + title: "Please enter your email address where you will receive the download procedure" + }, }; diff --git a/helm/configs/landing-page-server/qa/environment.ts b/helm/configs/landing-page-server/qa/environment.ts index d30a00cd..4c0f808a 100644 --- a/helm/configs/landing-page-server/qa/environment.ts +++ b/helm/configs/landing-page-server/qa/environment.ts @@ -10,5 +10,10 @@ export const environment = { oaiProviderRoute: null, production: true, scicatBaseUrl: "https://discovery-qa.psi.ch", - showLogoBanner: false + showLogoBanner: false, + retrieveToEmail: { + option: "URLs", + username: "lp_service", + title: "Please enter your email address where you will receive the download procedure" + }, }; diff --git a/landing-page-server b/landing-page-server index d2fe3c98..c6f13549 160000 --- a/landing-page-server +++ b/landing-page-server @@ -1 +1 @@ -Subproject commit d2fe3c9822a4ce94eadb41f9a8c93a530b0e4849 +Subproject commit c6f13549503f6ab181233e3b37585bc3dbe418ac