From 58fd05194b41d1003552ae789c7d567ba3b4c706 Mon Sep 17 00:00:00 2001 From: Leanid Astrakou Date: Fri, 6 Dec 2024 17:17:44 -0500 Subject: [PATCH] Save last downloaded URL & display it in post download page Signed-off-by: Leanid Astrakou --- _includes/legal-script.html | 28 ++++++++++++++++------------ post_download.md | 11 ++++++++++- post_download_legacy.md | 11 ++++++++++- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/_includes/legal-script.html b/_includes/legal-script.html index a243e2a0..761f0ae8 100644 --- a/_includes/legal-script.html +++ b/_includes/legal-script.html @@ -13,7 +13,7 @@ `post_download.html?version=${pkgVers}&type=${params.get('type')}`; document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', componentName, artifact); - window.open(`https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/${pkgVers}/${artifact}`, + windowOpenAndSaveURL(`https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/${pkgVers}/${artifact}`, '_blank'); } } @@ -23,7 +23,7 @@ document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', 'Zowe CLI ' + params.get('version'), 'zowe-cli-package-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + (params.get('preview') ? 'next' : params.get('version')) + '/zowe-cli-package-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip', '_blank'); @@ -37,7 +37,7 @@ ga && ga('send', 'event', 'download', 'Zowe CLI Plugins ' + params.get('version'), 'zowe-cli-plugins-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + (params.get('preview') ? 'next' : params.get('version')) + '/zowe-cli-plugins-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip', '_blank'); @@ -51,7 +51,7 @@ ga && ga('send', 'event', 'download', 'Zowe SMPE ' + params.get('version'), 'zowe-smpe-package-' + params.get( 'version') + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + '/zowe-smpe-package-' + params.get('version') + '.zip', '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-smpe-package-' + @@ -65,7 +65,7 @@ ga && ga('send', 'event', 'download', 'Zowe Containerization ' + params.get('version'), 'zowe-containerization-' + params.get('version') + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + '/zowe-containerization-' + params.get('version') + '.zip', '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-containerization-' + @@ -83,7 +83,7 @@ ga && ga('send', 'event', 'download', 'Zowe PSWI ' + params.get('version'), 'zowe-PSWI-' + params.get( 'version') + '.pax.Z'); - window.open(pswiUrl, '_blank'); + windowOpenAndSaveURL(pswiUrl, '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-PSWI-' + params @@ -96,7 +96,7 @@ ga && ga('send', 'event', 'download', 'Zowe Chat ' + params.get('version'), 'zowe-chat-' + params.get('version') + '.tar.gz'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/chat/" + params.get('version') + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/chat/" + params.get('version') + '/zowe-chat-' + 'tech-preview-1.tar.gz', '_blank'); // + params.get('version') + '.tar.gz', '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-chat-' + @@ -107,7 +107,7 @@ document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', 'Zowe SMPE ' + params.get('version'), 'zowe-python-sdk-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + (params.get('preview') ? 'next' : params.get('version')) + '/zowe-python-sdk-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip', '_blank'); @@ -120,7 +120,7 @@ document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', 'Zowe SMPE ' + params.get('version'), 'zowe-nodejs-sdk-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + (params.get('preview') ? 'next' : params.get('version')) + '/zowe-nodejs-sdk-' + (params.get('preview') ? 'next-' + params.get('preview') : params.get('version')) + '.zip', '_blank'); @@ -133,7 +133,7 @@ document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', 'Zowe CLI Active Development ' + params.get('version'), 'zowe-cli-package-' + params.get('package') + '.zip'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + '-active-development-cli/zowe-cli-package-' + params.get('package') + '.zip', '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-cli-package-' + @@ -171,7 +171,7 @@ ga && ga('send', 'event', 'download', params.get('type') + ' ' + params.get('version'), // e.g. zen-windows 1.0.0, zen-deb 1.1.0 zenFile); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/zen/" + zenRtPath, '_blank'); + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/zen/" + zenRtPath, '_blank'); } document.getElementById('download_file_message').innerHTML = `You are downloading the Zowe Server Install Wizard for ${zenDistro} version ${params.get('version')}`; @@ -181,7 +181,7 @@ document.getElementById('download_button').onclick = function () { ga && ga('send', 'event', 'download', 'Zowe Binary ' + params.get('version'), 'zowe-' + params.get( 'version') + '.pax'); - window.open("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + + windowOpenAndSaveURL("https://zowe.jfrog.io/zowe/list/libs-release-local/org/zowe/" + params.get('version') + '/zowe-' + params.get('version') + '.pax', '_blank'); } document.getElementById('download_file_message').innerHTML = 'You are downloading zowe-' + params.get( @@ -190,4 +190,8 @@ } } + function windowOpenAndSaveURL(url) { + localStorage.setItem('zowe-last-download-url', url); + window.open(url, '_blank'); + } \ No newline at end of file diff --git a/post_download.md b/post_download.md index 29d768f7..f0048676 100644 --- a/post_download.md +++ b/post_download.md @@ -7,8 +7,17 @@ extraJs: [common.html, post-download-script.html]

Thank you for downloading the Zowe binary

If you had an issue or your download did not start, please click - here to try again. + here to try again or copy the following URL to your browser: +

+
How to verify binaries with digital signatures
diff --git a/post_download_legacy.md b/post_download_legacy.md index 2d415ffe..098f29de 100644 --- a/post_download_legacy.md +++ b/post_download_legacy.md @@ -7,8 +7,17 @@ extraJs: post-download-script-legacy.html

Thank you for downloading the Zowe binary

If you had an issue or your download did not start, please click - here to try again. + here to try again or copy the following URL to your browser: +

+
Verify Hash and Signature of Zowe Binary

These commands are tested on both Mac OS X v10.13.6 and Ubuntu v17.11.