Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-3520_stamper-enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier authored Oct 16, 2023
2 parents ea8f95a + 73d31c0 commit 35a6991
Show file tree
Hide file tree
Showing 32 changed files with 1,792 additions and 1,607 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ CMD ["nginx", "-g", "daemon off;"]
HEALTHCHECK CMD wget --spider http://127.0.0.1/login || nginx -s reload || exit 1

#########################################################################
# phrasaseanet adapted simplesaml service provider
# phraseanet adapted simplesaml service provider
#########################################################################

FROM php:7.0-fpm-stretch as phraseanet-saml-sp
Expand Down Expand Up @@ -353,7 +353,7 @@ RUN echo "deb http://archive.debian.org/debian stretch main non-free" > /etc/apt
&& docker-php-ext-install -j$(nproc) ldap \
&& docker-php-ext-install zip mbstring pdo_mysql gettext mcrypt \
&& pecl install \
redis \
redis-5.3.7 \
&& docker-php-ext-enable redis \
&& pecl clear-cache \
&& docker-php-source delete
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: 93
assetFileVersion: 94
};
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=93";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=94";
/******/ 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=93";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=94";
/******/ 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=93";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=94";
/******/ 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=93";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=94";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
12 changes: 7 additions & 5 deletions Phraseanet-production-client/dist/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -11528,11 +11528,13 @@ var workzone = function workzone(services) {
},
dataType: 'json',
success: function success(data) {
setTimeout(function () {
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}, 6000);

console.log(data.message);
if (data.success) {
setTimeout(function () {
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}, 6000);
} else {
(0, _jquery2.default)('.refresh-list').trigger('click');
}
}
});
}
Expand Down
12 changes: 7 additions & 5 deletions Phraseanet-production-client/dist/production.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -11528,11 +11528,13 @@ var workzone = function workzone(services) {
},
dataType: 'json',
success: function success(data) {
setTimeout(function () {
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}, 6000);

console.log(data.message);
if (data.success) {
setTimeout(function () {
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}, 6000);
} else {
(0, _jquery2.default)('.refresh-list').trigger('click');
}
}
});
}
Expand Down
13 changes: 8 additions & 5 deletions Phraseanet-production-client/src/components/ui/workzone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1641,12 +1641,15 @@ const workzone = (services) => {
},
dataType: 'json',
success: function (data) {
setTimeout(function(){
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}
, 6000);
if (data.success) {
setTimeout(function () {
getPublicationAssetsList(publicationId, exposeName, assetsContainer, 1);
}
, 6000);
} else {
$('.refresh-list').trigger('click');
}

console.log(data.message);
}
});
}
Expand Down
14 changes: 11 additions & 3 deletions lib/Alchemy/Phrasea/Command/Maintenance/CleanLogDocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class CleanLogDocsCommand extends Command

public function __construct()
{
parent::__construct('BETA - Clean:log_docs');
parent::__construct('clean:log_docs');

$this
->setDescription('clean the log_docs for all databox (if not specified) or a specific databox_id ')
->setDescription('Beta - clean the log_docs for all databox (if not specified) or a specific databox_id ')
->addOption('databox_id', null, InputOption::VALUE_REQUIRED, 'the databox to clean')
->addOption('older_than', null, InputOption::VALUE_REQUIRED, 'delete older than <OLDER_THAN>')
->addOption('action', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'download, mail, ftp, delete (if delete , delete also log entry for all events like push, add , validate, edit, collection, status, print, substit, publish for this record_id)')
Expand Down Expand Up @@ -112,11 +112,19 @@ public function doExecute(InputInterface $input, OutputInterface $output)
}

$output->writeln(sprintf("\n \n dry-run , %d log docs entry to delete for databox %s", count($rowsActionDelete), $databox->get_dbname()));
// displayed only the 1000 first row to avoid memory leak

$displayedRows = array_slice($rowsActionDelete, 0, 1000);
if (count($rows) > 1000) {
array_push($displayedRows, array_fill_keys(['id', 'log_id', 'date', 'record_id', 'final', 'action'], ' ... '));
array_push($displayedRows, array_fill_keys(['id', 'log_id', 'date', 'record_id', 'final', 'action'], ' ... '));
}

$logEntryTable = $this->getHelperSet()->get('table');
$headers = ['id', 'log_id', 'date', 'record_id', 'final', 'action'];
$logEntryTable
->setHeaders($headers)
->setRows($rowsActionDelete)
->setRows($displayedRows)
->render($output);

} else {
Expand Down
14 changes: 11 additions & 3 deletions lib/Alchemy/Phrasea/Command/Maintenance/CleanLogSearchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class CleanLogSearchCommand extends Command
{
public function __construct()
{
parent::__construct('BETA - Clean:log_search');
parent::__construct('clean:log_search');

$this
->setDescription('clean the log_search for all databox (if not specified) or a specific databox_id ')
->setDescription('Beta - clean the log_search for all databox (if not specified) or a specific databox_id ')
->addOption('databox_id', null, InputOption::VALUE_REQUIRED, 'the databox to clean')
->addOption('older_than', null, InputOption::VALUE_REQUIRED, 'delete older than <OLDER_THAN>')
->addOption('dry-run', null, InputOption::VALUE_NONE, 'dry run, list and count')
Expand Down Expand Up @@ -77,11 +77,19 @@ public function doExecute(InputInterface $input, OutputInterface $output)
$stmt->closeCursor();

$output->writeln(sprintf("\n \n dry-run , %d log search entry to delete for databox %s", count($rows), $databox->get_dbname()));
// displayed only the 1000 first row to avoid memory leak

$displayedRows = array_slice($rows, 0, 1000);
if (count($rows) > 1000) {
array_push($displayedRows, array_fill_keys(['id', 'date', 'search', 'results', 'coll_id'], ' ... '));
array_push($displayedRows, array_fill_keys(['id', 'date', 'search', 'results', 'coll_id'], ' ... '));
}

$logEntryTable = $this->getHelperSet()->get('table');
$headers = ['id', 'date', 'search', 'results', 'coll_id'];
$logEntryTable
->setHeaders($headers)
->setRows($rows)
->setRows($displayedRows)
->render($output);
} else {
$stmt = $databox->get_connection()->executeQuery($sqlDelete);
Expand Down
13 changes: 10 additions & 3 deletions lib/Alchemy/Phrasea/Command/Maintenance/CleanLogViewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class CleanLogViewCommand extends Command
{
public function __construct()
{
parent::__construct('BETA - Clean:log_view');
parent::__construct('clean:log_view');

$this
->setDescription('clean the log_view for all databox (if not specified) or a specific databox_id ')
->setDescription('Beta - clean the log_view for all databox (if not specified) or a specific databox_id ')
->addOption('databox_id', null, InputOption::VALUE_REQUIRED, 'the databox to clean')
->addOption('older_than', null, InputOption::VALUE_REQUIRED, 'delete older than <OLDER_THAN>')
->addOption('dry-run', null, InputOption::VALUE_NONE, 'dry run, list and count')
Expand Down Expand Up @@ -77,12 +77,19 @@ public function doExecute(InputInterface $input, OutputInterface $output)
$stmt->closeCursor();

$output->writeln(sprintf("\n \n dry-run , %d log view entry to delete for databox %s", count($rows), $databox->get_dbname()));
// displayed only the 1000 first row to avoid memory leak
$displayedRows = array_slice($rows, 0, 1000);
if (count($rows) > 1000) {
array_push($displayedRows, array_fill_keys(['id', 'date', 'record_id', 'coll_id'], ' ... '));
array_push($displayedRows, array_fill_keys(['id', 'date', 'record_id', 'coll_id'], ' ... '));
}
$logEntryTable = $this->getHelperSet()->get('table');
$headers = ['id', 'date', 'record_id', 'coll_id'];
$logEntryTable
->setHeaders($headers)
->setRows($rows)
->setRows($displayedRows)
->render($output);

} else {
$stmt = $databox->get_connection()->executeQuery($sqlDelete);

Expand Down
4 changes: 2 additions & 2 deletions lib/Alchemy/Phrasea/Media/Subdef/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public function __construct(TranslatorInterface $translator)
{
$this->translator = $translator;

$this->registerOption(new OptionType\Range($this->translator->trans('Dimension'), self::OPTION_SIZE, 20, 3000, 800));
$this->registerOption(new OptionType\Range($this->translator->trans('Resolution'), self::OPTION_RESOLUTION, 50, 300, 72));
$this->registerOption(new OptionType\Range($this->translator->trans('Dimension'), self::OPTION_SIZE, 20, 5000, 800));
$this->registerOption(new OptionType\Range($this->translator->trans('Resolution'), self::OPTION_RESOLUTION, 50, 1000, 72));
$this->registerOption(new OptionType\Boolean($this->translator->trans('Remove ICC Profile'), self::OPTION_STRIP, false));
$this->registerOption(new OptionType\Boolean($this->translator->trans('Flatten layers'), self::OPTION_FLATTEN, false));
$this->registerOption(new OptionType\Range($this->translator->trans('Quality'), self::OPTION_QUALITY, 0, 100, 75));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function exposeAction(PhraseaApplication $app, Request $request)
{
$exposeConfiguration = $app['conf']->get(['phraseanet-service', 'expose-service'], null);

$form = $app->form(new PSExposeConfigurationType(), $exposeConfiguration);
$form = $app->form(new PSExposeConfigurationType($this->app), $exposeConfiguration);

$form->handleRequest($request);

Expand Down
Loading

0 comments on commit 35a6991

Please sign in to comment.