Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHRAS-3928_download_async #4386

Merged
merged 37 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0640580
WIP/POC DO NOT MERGE
jygaulier Oct 5, 2023
1d036dd
WIP OK TO TEST ; DO NOT MERGE
jygaulier Oct 11, 2023
0ee7874
WIP/POC DO NOT MERGE
jygaulier Oct 5, 2023
85eca07
WIP OK TO TEST ; DO NOT MERGE
jygaulier Oct 11, 2023
99d7cc7
Merge branch 'master' into PHRAS-3928_poc-pusher
jygaulier Oct 12, 2023
a43bc75
Merge branch 'PHRAS-3928_poc-pusher' of github.com:alchemy-fr/Phrasea…
jygaulier Oct 12, 2023
03a7cda
cleanup
jygaulier Oct 12, 2023
8e44279
cleanup
jygaulier Oct 12, 2023
b6a497d
better conf & cleanup
jygaulier Oct 12, 2023
1bb9047
fix typo
jygaulier Oct 12, 2023
13ac9dc
fix stamp transparency (bump imagine)
jygaulier Oct 12, 2023
a9f7cf0
Merge branch 'master' into PHRAS-3928_poc-pusher
jygaulier Oct 16, 2023
9d873cf
fix test
jygaulier Oct 16, 2023
4a3b913
Merge branch 'PHRAS-3928_poc-pusher' of github.com:alchemy-fr/Phrasea…
jygaulier Oct 16, 2023
375321b
fix missing js feedback (when worker publish before client subscribes)
jygaulier Oct 17, 2023
bdf2ced
cleanup
jygaulier Oct 17, 2023
566605c
fix "remove stamp" choice
jygaulier Oct 18, 2023
b5b3077
add default conf
jygaulier Oct 18, 2023
bf7a2ea
WIP/POC DO NOT MERGE
jygaulier Oct 5, 2023
b6b4325
WIP OK TO TEST ; DO NOT MERGE
jygaulier Oct 11, 2023
53d0df4
WIP/POC DO NOT MERGE
jygaulier Oct 5, 2023
ad357af
WIP OK TO TEST ; DO NOT MERGE
jygaulier Oct 11, 2023
a302a34
cleanup
jygaulier Oct 12, 2023
8328714
cleanup
jygaulier Oct 12, 2023
46e3cef
better conf & cleanup
jygaulier Oct 12, 2023
d015984
fix typo
jygaulier Oct 12, 2023
e7f9650
fix stamp transparency (bump imagine)
jygaulier Oct 12, 2023
11b3e33
fix test
jygaulier Oct 16, 2023
db2c0c1
fix missing js feedback (when worker publish before client subscribes)
jygaulier Oct 17, 2023
70d77de
cleanup
jygaulier Oct 17, 2023
de31b34
fix "remove stamp" choice
jygaulier Oct 18, 2023
84709b1
add default conf
jygaulier Oct 18, 2023
d65d681
WIP OK TO TEST generates an excel report for async download.
jygaulier Oct 19, 2023
2ef09ae
fix for rebase
jygaulier Oct 19, 2023
13643c9
fix xl formating for tabs >1
jygaulier Oct 24, 2023
fe36a87
fix test
jygaulier Oct 26, 2023
5d1365a
Merge branch 'master' into PHRAS-3928_poc-pusher
nmaillat Oct 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
# - "deleteRecord"
# - "editRecord"
# - "exportMail"
# - "downloadAsync"
# - "exposeUpload"
# - "exportFtp"
# - "mainQueue"
Expand Down Expand Up @@ -105,7 +106,7 @@
# Example with all profiles:
# - COMPOSE_FILE=docker-compose.yml:docker-compose.datastores.yml:docker-compose.tools.yml
# - COMPOSE_PROFILES=app,setup,gateway-classic,db,elasticsearch,redis,redis-session,rabbitmq,pma,mailhog,assetsInjest,createRecord,deleteRecord,editRecord,
# exportMail,exposeUpload,exportFtp,mainQueue,populateIndex,pullAssets,recordsActions,subdefCreation,
# exportMail,downloadAsync,exposeUpload,exportFtp,mainQueue,populateIndex,pullAssets,recordsActions,subdefCreation,
# validationReminder,webhook,writeMetadatas,shareBasket,scheduler,elk,db-backup,phraseanet-saml-sp
#

Expand Down Expand Up @@ -197,7 +198,10 @@ GATEWAY_FASTCGI_HTTPS=off
# Content Security Policy (CSP)
# security that helps to detect and mitigate certain types of attacks, including Cross-Site Scripting
## @run
GATEWAY_CSP="default-src 'self' 127.0.0.1 https://apiws.carrick-skills.com:8443 https://apiws.carrick-flow.com:8443 https://fonts.gstatic.com *.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com *.axept.io *.matomo.cloud *.newrelic.com *.nr-data.net https://www.googletagmanager.com *.google-analytics.com *.phrasea.io https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: ; script-src 'unsafe-inline' 'unsafe-eval' 'self' https://www.gstatic.com *.alchemyasp.com *.axept.io *.matomo.cloud *.newrelic.com https://www.googletagmanager.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: blob: ; style-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://fonts.googleapis.com https://www.google.com https://www.gstatic.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com ; img-src 'self' data: blob: *.tiles.mapbox.com https://axeptio.imgix.net *.cloudfront.net *.phrasea.io *.amazonaws.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com https://www.gnu.org/graphics/ ; object-src 'self'; frame-ancestors 'self'"
## GATEWAY_CSP="default-src 'self' 127.0.0.1 https://apiws.carrick-skills.com:8443 https://apiws.carrick-flow.com:8443 https://fonts.gstatic.com *.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com *.axept.io *.matomo.cloud *.newrelic.com *.nr-data.net https://www.googletagmanager.com *.google-analytics.com *.phrasea.io https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: ; script-src 'unsafe-inline' 'unsafe-eval' 'self' https://www.gstatic.com *.alchemyasp.com *.axept.io *.matomo.cloud *.newrelic.com https://www.googletagmanager.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: blob: ; style-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://fonts.googleapis.com https://www.google.com https://www.gstatic.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com ; img-src 'self' data: blob: *.tiles.mapbox.com https://axeptio.imgix.net *.cloudfront.net *.phrasea.io *.amazonaws.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com https://www.gnu.org/graphics/ https://sockjs-eu.pusher.com:443 wss://ws-eu.pusher.com ; object-src 'self'; frame-ancestors 'self'"


GATEWAY_CSP="default-src 'self' 127.0.0.1 https://sockjs-eu.pusher.com:443 wss://ws-eu.pusher.com https://apiws.carrick-skills.com:8443 https://apiws.carrick-flow.com:8443 https://fonts.gstatic.com *.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com *.axept.io *.matomo.cloud *.newrelic.com *.nr-data.net https://www.googletagmanager.com *.google-analytics.com *.phrasea.io https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 data: ;script-src 'unsafe-inline' 'unsafe-eval' 'self' https://www.gstatic.com *.alchemyasp.com *.axept.io *.matomo.cloud *.newrelic.com https://www.googletagmanager.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 ;style-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://fonts.googleapis.com https://www.google.com https://www.gstatic.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443;img-src 'self' data: blob: *.tiles.mapbox.com https://axeptio.imgix.net *.cloudfront.net *.phrasea.io *.amazonaws.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 ; object-src 'self';frame-ancestors 'self'"

# --- RabbitMQ settings ------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -414,6 +418,23 @@ DB_BACKUP_CRON_TIME=
DB_BACKUP_GZIP_LEVEL=9


# --- Pusher settings --------------------------------------------------------------------------------------

# Pusher settings used when PHRASEANET_DOWNLOAD_ASYNC=true (configuration.yml: download_async / enabled=true)

# key
# @run
PUSHER_AUTH_KEY

# secret
# @run
PUSHER_SECRET

# app_id
# @run
PUSHER_APP_ID


# --- Application cache settings ---------------------------------------------------------------------------------------------------

# Cache setting type can be "redis" or "arraycache"
Expand Down Expand Up @@ -463,6 +484,9 @@ [email protected]
# @run
PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly

# Use Pusher to enable async download.
# @run
PHRASEANET_DOWNLOAD_ASYNC=false


# --- Phraseanet MySQL settings ----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -686,6 +710,9 @@ PHRASEANET_WORKER_editRecord=2
# @run
PHRASEANET_WORKER_exportMail=2

# @run
PHRASEANET_WORKER_downloadAsync=2

# @run
PHRASEANET_WORKER_exposeUpload=2

Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module.exports = {
setupDir: _root + 'tests/setup/node.js',
karmaConf: _root + 'config/karma.conf.js',
// change this version when you change JS file for lazy loading
assetFileVersion: 95
assetFileVersion: 96
};
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=95";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=96";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=95";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=96";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=95";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=96";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=95";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=96";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
9 changes: 6 additions & 3 deletions Phraseanet-production-client/dist/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -7715,10 +7715,10 @@ var exportRecord = function exportRecord(services) {
return false;
});

(0, _jquery2.default)('input[name="obj[]"]', (0, _jquery2.default)('#download, #sendmail, #ftp')).bind('change', function () {
(0, _jquery2.default)('input.caption', (0, _jquery2.default)('#download, #sendmail, #ftp')).bind('change', function () {
var $form = (0, _jquery2.default)(this).closest('form');

if ((0, _jquery2.default)('input.caption[name="obj[]"]:checked', $form).length > 0) {
if ((0, _jquery2.default)('input.caption:checked', $form).length > 0) {
(0, _jquery2.default)('div.businessfields', $form).show();
} else {
(0, _jquery2.default)('div.businessfields', $form).hide();
Expand Down Expand Up @@ -7819,7 +7819,10 @@ var exportRecord = function exportRecord(services) {
return true;
}

return { initialize: initialize, openModal: openModal };
return {
initialize: initialize,
openModal: openModal
};
};

exports.default = exportRecord;
Expand Down
9 changes: 6 additions & 3 deletions Phraseanet-production-client/dist/production.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -7715,10 +7715,10 @@ var exportRecord = function exportRecord(services) {
return false;
});

(0, _jquery2.default)('input[name="obj[]"]', (0, _jquery2.default)('#download, #sendmail, #ftp')).bind('change', function () {
(0, _jquery2.default)('input.caption', (0, _jquery2.default)('#download, #sendmail, #ftp')).bind('change', function () {
var $form = (0, _jquery2.default)(this).closest('form');

if ((0, _jquery2.default)('input.caption[name="obj[]"]:checked', $form).length > 0) {
if ((0, _jquery2.default)('input.caption:checked', $form).length > 0) {
(0, _jquery2.default)('div.businessfields', $form).show();
} else {
(0, _jquery2.default)('div.businessfields', $form).hide();
Expand Down Expand Up @@ -7819,7 +7819,10 @@ var exportRecord = function exportRecord(services) {
return true;
}

return { initialize: initialize, openModal: openModal };
return {
initialize: initialize,
openModal: openModal
};
};

exports.default = exportRecord;
Expand Down
15 changes: 15 additions & 0 deletions Phraseanet-production-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Phraseanet-production-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"mapbox-gl-circle": "^1.6.5",
"mapbox.js": "^2.4.0",
"nouislider": "^9.2.0",
"pusher-js": "^8.3.0",
"pym.js": "^1.3.1",
"rx": "^4.1.0",
"sprintf-js": "^1.1.1",
Expand Down
Loading