output preflight-checks nicely

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-15 10:27:46 +02:00
parent 07a1ad8c58
commit ed7faae947
3 changed files with 30 additions and 4 deletions

View File

@@ -2145,6 +2145,9 @@ Vielen Dank, Ihr Administrator',
'manual_config' => 'Ich werden die Dienste manuell konfigurieren, direkt zum Login umleiten',
],
'errors' => [
'wrong_ownership' => 'Die froxlor Dateien gehören nicht vollständig dem Benutzer %s:%s',
'missing_extensions' => 'Folgende PHP Erweiterungen werden zusätzlich benötigt',
'suggestedextensions' => 'Folgende PHP Erweiterungen werden empfohlen',
'databaseexists' => 'Datenbank existiert bereits, Uberschreiben-Option oder anderen Namen wählen.',
'unabletocreatedb' => 'Test-Datenbank konnte nicht erstellt werden',
'unabletodropdb' => 'Test-Datenbank konnte nicht gelöscht werden',

View File

@@ -2506,6 +2506,9 @@ Yours sincerely, your administrator',
'manual_config' => 'I will manually configure the services, just take me to the login',
],
'errors' => [
'wrong_ownership' => 'Make sure the froxlor files are owned by %s:%s',
'missing_extensions' => 'The following php extensions are required and not installed',
'suggestedextensions' => 'The following php extensions could not be found but are recommended',
'databaseexists' => 'Database already exist, please set override option to rebuild or chose another name',
'unabletocreatedb' => 'Test database could not be created',
'unabletodropdb' => 'Test database could not be dropped',

View File

@@ -79,8 +79,19 @@
{% if preflight.criticals %}
<p class="text-muted">{{ lng('install.critical_error') }}</p>
<ul>
{% for critical in preflight.criticals %}
<li>{{ critical|json_encode }}</li>
{% for ctype, critical in preflight.criticals %}
{% if ctype == 'wrong_ownership' %}
<li>{{ lng('install.errors.' ~ ctype, [critical.user, critical.group]) }}</li>
{% elseif ctype == 'missing_extensions' %}
<li>{{ lng('install.errors.' ~ ctype) }}<ul>
{% for missext in critical %}
<li>{{ missext }}</li>
{% endfor %}
</ul>
</li>
{% else %}
<li>{{ critical|raw }}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
@@ -88,8 +99,17 @@
{% if preflight.suggestions %}
<p class="text-muted">{{ lng('install.suggestions') }}</p>
<ul>
{% for suggestion in preflight.suggestions %}
<li>{{ suggestion|json_encode }}</li>
{% for ctype, suggestion in preflight.suggestions %}
{% if ctype == 'missing_extensions' %}
<li>{{ lng('install.errors.suggestedextensions') }}<ul>
{% for missext in suggestion %}
<li>{{ missext }}</li>
{% endfor %}
</ul>
</li>
{% else %}
<li>{{ suggestion|raw }}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}