add possibility to show subdomains fully in php-settings listing; UI adjustments

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-08-26 09:54:06 +02:00
parent 7f6ea29e15
commit 546040541c
10 changed files with 33 additions and 5 deletions

View File

@@ -230,6 +230,15 @@ return [
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'panel_phpconfigs_hidesubdomains' => [
'label' => lng('serversettings.panel_phpconfigs_hidesubdomains'),
'settinggroup' => 'panel',
'varname' => 'phpconfigs_hidesubdomains',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'panel_phpconfigs_hidestdsubdomain' => [
'label' => lng('serversettings.panel_phpconfigs_hidestdsubdomain'),
'settinggroup' => 'panel',

View File

@@ -112,6 +112,6 @@ if ($page == 'overview') {
'alert_msg' => $ui_text . $message
]);
} else {
Response::standardSuccess('update.noupdatesavail', [(Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') . ' ' : '')]);
Response::standardSuccess('update.noupdatesavail', Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') . ' ' : '');
}
}

View File

@@ -726,6 +726,7 @@ opcache.validate_timestamps'),
('panel', 'allow_preset_admin', '0'),
('panel', 'password_regex', ''),
('panel', 'phpconfigs_hidestdsubdomain', '0'),
('panel', 'phpconfigs_hidesubdomains', '1'),
('panel', 'allow_theme_change_admin', '1'),
('panel', 'allow_theme_change_customer', '1'),
('panel', 'password_alpha_lower', '1'),

View File

@@ -140,6 +140,7 @@ if (Froxlor::isFroxlorVersion('0.10.99')) {
Settings::AddNew("system.update_channel", 'stable');
Settings::AddNew("system.updatecheck_data", '');
Settings::AddNew("system.update_notify_last", $update_to);
Settings::AddNew("panel.phpconfigs_hidesubdomains", '1');
Update::lastStepStatus(0);
Update::showUpdateStep("Adjusting existing settings");

View File

@@ -26,6 +26,7 @@
use Froxlor\Froxlor;
use Froxlor\FileDir;
use Froxlor\FroxlorLogger;
use Froxlor\Settings;
use Froxlor\UI\Response;
use Froxlor\Database\IntegrityCheck;
use Froxlor\Install\Update;

View File

@@ -41,7 +41,13 @@ class PHPConf
if ($subdomains_count == 0 && empty($domains)) {
$domains = lng('admin.phpsettings.notused');
} else {
$domains .= !empty($subdomains_count) ? ((!empty($domains) ? '+ ' : '') . $subdomains_count . ' ' . lng('customer.subdomains')) : '';
if (Settings::Get('panel.phpconfigs_hidesubdomains') == '1') {
$domains .= !empty($subdomains_count) ? ((!empty($domains) ? '+ ' : '') . $subdomains_count . ' ' . lng('customer.subdomains')) : '';
} else {
foreach ($attributes['fields']['subdomains'] as $configdomain) {
$domains .= $idna->decode($configdomain) . "<br>";
}
}
}
return $domains;

View File

@@ -1752,6 +1752,10 @@ Vielen Dank, Ihr Administrator',
'title' => 'Verwende Domainnamen im Documentroot',
'description' => 'Wenn aktiviert wird dem standard Documentroot zusätzlich der Domain-Name angehängt.<br /><br />Beispiel:<br />/var/customers/customer_name/example.tld/<br />/var/customers/customer_name/subdomain.example.tld/',
],
'panel_phpconfigs_hidesubdomains' => [
'title' => 'Verstecke Subdomains in PHP-Konfigurations-Übersicht',
'description' => 'Wenn aktiviert, werden die Subdomains der Kunden nicht in der PHP-Konfigurations-Übersicht angezeigt, lediglich die Anzahl.<br /><br />Hinweis: Nur relevant, wenn FCGID oder PHP-FPM aktiviert ist.',
],
'panel_phpconfigs_hidestdsubdomain' => [
'title' => 'Verstecke Standard-Subdomains in PHP-Konfigurations-Übersicht',
'description' => 'Wenn aktiviert, werden die Standard-Subdomains der Kunden nicht mehr in der PHP-Konfigurations-Übersicht angezeigt.<br /><br />Hinweis: Nur relevant, wenn FCGID oder PHP-FPM aktiviert ist.',

View File

@@ -2128,6 +2128,10 @@ Yours sincerely, your administrator',
'title' => 'Use domain name as default value for DocumentRoot path',
'description' => 'If enabled and DocumentRoot path is empty, default value will be the (sub)domain name.<br /><br />Examples: <br />/var/customers/customer_name/example.com/<br />/var/customers/customer_name/subdomain.example.com/',
],
'panel_phpconfigs_hidesubdomains' => [
'title' => 'Hide subdomains in PHP-configuration overview',
'description' => 'If activated the subdomains of customers will not be listed in the php-configurations overview, only the number of subdomains is shown.<br /><br />Note: This is only visible if you have enabled FCGID or PHP-FPM',
],
'panel_phpconfigs_hidestdsubdomain' => [
'title' => 'Hide standard-subdomains in PHP-configuration overview',
'description' => 'If activated the standard-subdomains for customers will not be displayed in the php-configurations overview<br /><br />Note: This is only visible if you have enabled FCGID or PHP-FPM',

View File

@@ -18,8 +18,10 @@
{% block content %}
<div class="alert alert-info fade show" role="alert">
<p>{{ lng('admin.configfiles.minihowto') }}</p>
<div class="pb-2">
<div class="alert alert-info fade show" role="alert">
<p>{{ lng('admin.configfiles.minihowto')|raw }}</p>
</div>
</div>
<form action="{{ action|default(filename) }}" method="post" enctype="application/x-www-form-urlencoded" class="form">

View File

@@ -1,7 +1,7 @@
{% extends "Froxlor/user/table.html.twig" %}
{% block content %}
<div class="row mb-2">
<div class="pb-2">
{% include 'Froxlor/misc/alertbox.html.twig' %}
</div>
{{ parent() }}