Merge branch 'master' into PHRAS-3150-Make-optional-for-sync-admin-password

This commit is contained in:
Nicolas Maillat
2020-07-06 23:23:22 +02:00
committed by GitHub
13 changed files with 79 additions and 86 deletions

5
.env
View File

@@ -13,6 +13,8 @@ RABBITMQ_MANAGEMENT_PORT=10811
MYSQL_ROOT_PASSWORD=root
SERVER_NAME=phraseanet-docker
# --------------- GATEWAY TIMEOUT -----------------------
GATEWAY_SEND_TIMEOUT=120
# --------------- PHP CONFIGURATION --------------------
@@ -21,6 +23,9 @@ MAX_BODY_SIZE=2G
# Max input var
MAX_INPUT_VARS=12000
MAX_EXECUTION_TIME=120
MAX_INPUT_TIME=60
# Enable opcache ? (0/1)
OPCACHE_ENABLED=1
# session cache limiter (off/on)

View File

@@ -19,6 +19,7 @@ services:
- phraseanet
environment:
- MAX_BODY_SIZE
- GATEWAY_SEND_TIMEOUT
ports:
- ${PHRASEANET_APP_PORT}:80
@@ -40,6 +41,8 @@ services:
- PHRASEANET_PROJECT_NAME
- MAX_BODY_SIZE
- MAX_INPUT_VARS
- MAX_EXECUTION_TIME
- MAX_INPUT_TIME
- OPCACHE_ENABLED
- SESSION_CACHE_LIMITER
- PHP_LOG_LEVEL

View File

@@ -2,6 +2,6 @@
set -xe
cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" > /etc/nginx/conf.d/default.conf
cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_SEND_TIMEOUT/$GATEWAY_SEND_TIMEOUT/g" > /etc/nginx/conf.d/default.conf
exec "$@"

View File

@@ -1,3 +1,4 @@
send_timeout $GATEWAY_SEND_TIMEOUT;
upstream backend {
server phraseanet:9000;
}

View File

@@ -58,7 +58,7 @@ chown -R app:app \
www
if [ -d "plugins/" ];then
chown -R app:app plugin;
chown -R app:app plugins;
fi
bash -e docker-php-entrypoint $@

View File

@@ -380,7 +380,7 @@ expose_php = On
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 9999
max_execution_time = $MAX_EXECUTION_TIME
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
@@ -390,7 +390,7 @@ max_execution_time = 9999
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60
max_input_time = $MAX_INPUT_TIME
; Maximum input variable nesting level
; http://php.net/max-input-nesting-level

View File

@@ -1242,7 +1242,7 @@ class ThesaurusController extends Controller
$this->getDispatcher()->dispatch(WorkerEvents::POPULATE_INDEX, new PopulateIndexEvent($data));
return $this->app->json($data);
return $this->app->json(["status" => "success"]);
}
/**

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0",
"npm": "^6.0.0",
"npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.241-d",
"phraseanet-production-client": "0.34.248-d",
"requirejs": "^2.3.5",
"tinymce": "^4.0.28",
"underscore": "^1.8.3",

View File

@@ -92,7 +92,9 @@
</video>
</div>
<div class="videotools-spinner ui-widget-overlay ui-front hidden" id="videotools-spinner" style="opacity: 0.9">
<img src="/assets/common/images/icons/loading.svg" alt="" id="gif-loader">
</div>
<div id="thumb_camera_button"></div>
<div class="vertical-divider"></div>

View File

@@ -45,7 +45,7 @@
<label for="feed_add_title"><b>{{ 'publication : titre' | trans }}</b> &nbsp;<span>( {{ 'publication : title warning' | trans }} )</span></label>
<input class="required_text input-block-level" style="max-width:500px" type="text" name="title" id="feed_add_title" value="{{title}}" />
<label><span class="feed_title_warning feed_warning">{{ 'publication : title alert' | trans }}</span></label>
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b> &nbsp;<span class="feed_subtitle_warning feed_warning">{{ 'publication : subtitle warning' | trans }}</span></label>
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b> &nbsp;<span>( {{ 'publication : subtitle warning' | trans }} )</span></label>
<textarea id="feed_add_subtitle" style="max-width:500px" class="input-block-level" name="subtitle" rows="5">{{desc}}</textarea>
<label><span class="feed_subtitle_warning feed_warning">{{ 'publication : subtitle alert' | trans }}</span></label>
<label for="feed_add_author_name"><b>{{ 'publication : autheur' | trans }}</b></label>

View File

@@ -33,23 +33,17 @@
<a href="javascript:void(0)" id="delete_sy">{{ 'thesaurus:properties:: Mettre dans le stock' | trans }}</a>
</div>
<div id="desktop" class="dialog">
<div class="menu" id="flagsMenu" style="z-index:999">
{% for code, language in languages %}
<a id='flagMenu_{{ code }}' href='javascript:void(0)' class=''>
<img src='/assets/common/images/lng/{{ code }}_flag_18.gif' />{{ language }}</a>
{% endfor %}
</div>
<div style='text-align:right'>
<H4>{{ fullpath | raw }}</H4>
<div style='float:right'>
<b>id:</b>&nbsp;{{ id }}
</div>
<H4>{{ fullpath | raw }}</H4><br/>
{% if typ == "CT" %}
<br/>
{% elseif typ == "TH" %}
{#{% elseif typ == "TH" %}
{% trans with {'%hits%' : hits} %}thesaurus:: %hits% reponses retournees{% endtrans %}
<br/>
<br/>
<br/>#}
{% endif %}
<div id="TSY" class="tableContainer" style="margin:10px; position:relative; top:0px; left:0px">
<div>
@@ -295,8 +289,8 @@
// td.setAttribute("colSpan", "3"); // attention au 'S' majuscule !!!
td.innerHTML = n.getAttribute("t");
td = tr.appendChild(document.createElement("td"));
td.innerHTML = n.getAttribute("hits");
/*td = tr.appendChild(document.createElement("td"));
td.innerHTML = n.getAttribute("hits");*/
td = tr.appendChild(document.createElement("td"));
td.innerHTML = n.getAttribute("id");
@@ -322,17 +316,6 @@
;
if(tr)
myGUI.select(tr);
/* switch(o.id.substr(0, 4))
{
case "FLG_": // le drapeau
document.getElementById("flagsMenu").runAsMenu( evt, tr );
break;
case "SYN_": // le synonyme
document.getElementById("syMenu").runAsMenu( evt, tr );
$('.delete_term').html('');
$('.delete_term', tr).append($('#syMenu').html());
break;
}*/
}
break;
case "MOUSEDOWN":

View File

@@ -169,10 +169,6 @@
<p><img id='flagMenu_{{ code }}' src='/assets/common/images/lng/{{ code }}_flag_18.gif' /> {{ language }}</p>
{% endfor %}
{# {% for code, language in flags %}
<a id='flagMenu_{{ code }}' href='javascript:void(0)' class=''>
<img src='/assets/common/images/lng/{{ code }}_flag_18.gif' />{{ language }}</a>
{% endfor %}#}
</div>
<div class="menu" id="kctermMenu" style="z-index:999; width:240px;">
<a href="javascript:void(0)" class="" id="kcterm_properties" style="font-weight:700">{{ 'thesaurus::menu: proprietes' | trans }}</a>
@@ -1525,55 +1521,58 @@
*/
/**Populate btn action**/
$('#populate_btn').click(function (e) {
e.preventDefault();
$("#confirm_populate").dialog({
modal: true,
title: "{{ 'thesaurus: Populate title' | trans }}",
autoOpen:false,
width: 400,
open:function () {
$(this).closest(".ui-dialog")
.find(".ui-button:first") // the first button
.addClass("close-dialog").hide();
$('.cancel_button').click(function () {
$('.close-dialog').trigger('click');
});
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
$('#THP_C').html('+');
$(document).ready(function () {
/**Populate btn action**/
$('#populate_btn').bind('click', function (e) {
e.preventDefault();
$("#confirm_populate").dialog({
modal: true,
title: "{{ 'thesaurus: Populate title' | trans }}",
autoOpen:false,
width: 400,
open:function () {
$(this).closest(".ui-dialog")
.find(".ui-button:first") // the first button
.addClass("close-dialog").hide();
$('.cancel_button').click(function () {
$('.close-dialog').trigger('click');
});
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
$('#THP_C').html('+');
}
});
$("#confirm_populate").dialog('open');
$('#confirm_populate_button').click(function () {
$.ajax({
type: 'GET',
url: '/admin/worker-manager/populate-status',
data: {
sbasIds: [{{ bid }}]
},
success: function (data) {
if (data == 0) {
$.ajax({
url: '/thesaurus/populate',
type: 'POST',
data: {
databox_id: {{ bid }}
},
success: function (data) {
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
$('.close-dialog').trigger('click');
}
});
} else {
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
}
}
});
})
});
}
});
$("#confirm_populate").dialog('open');
$('#confirm_populate_button').unbind('click').bind('click', function (e) {
e.preventDefault();
$.ajax({
type: 'GET',
url: '/admin/worker-manager/populate-status',
data: {
sbasIds: [{{ bid }}]
},
success: function (data) {
if (data == 0) {
$.ajax({
url: '/thesaurus/populate',
type: 'POST',
data: {
databox_id: {{ bid }}
},
success: function (data) {
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
$('.close-dialog').trigger('click');
}
});
} else {
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
}
}
});
})
});
})
</script>
</body>

View File

@@ -7678,10 +7678,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0"
pym.js "^1.3.1"
phraseanet-production-client@0.34.241-d:
version "0.34.241-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.241-d.tgz#a23d12ccb8f41ee86bb6acb4c56524c0415090fa"
integrity sha512-iEnl9MIPNM6+9ZYn0J6OB6SWABql94xMPfL/Mi3NKQbK8UQumKK2styQmuiDRTgdGjdyyUo+B+96KlMuiS/L6w==
phraseanet-production-client@0.34.248-d:
version "0.34.248-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.248-d.tgz#92b23159cff6437b9aba0a2a9cbc63979b4c68c6"
integrity sha512-DgIToC7zdKBIvH47Rr2fceMJT4Aj8WQcHftEBqqFVTH/qQ4kLFMOZqR6aTezwlHms11opZ5s5CFVvM3kkVqa/w==
dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6"