mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
updating config-file xml's; prepare config-details view via ajax for config-commands/files to show in configuration
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
parent
91d41af44a
commit
000cb93def
@ -658,7 +658,7 @@ opcache.validate_timestamps'),
|
||||
('system', 'hsts_preload', '0'),
|
||||
('system', 'leregistered', '0'),
|
||||
('system', 'leaccount', ''),
|
||||
('system', 'nssextrausers', '0'),
|
||||
('system', 'nssextrausers', '1'),
|
||||
('system', 'le_domain_dnscheck', '1'),
|
||||
('system', 'ssl_protocols', 'TLSv1.2'),
|
||||
('system', 'tlsv13_cipher_list', ''),
|
||||
|
@ -984,6 +984,9 @@ class FroxlorInstall
|
||||
foreach ($distros as $_distribution) {
|
||||
$dist = new \Froxlor\Config\ConfigParser($_distribution);
|
||||
$dist_display = $dist->distributionName . " " . $dist->distributionCodename . " (" . $dist->distributionVersion . ")";
|
||||
if ($dist->deprecated) {
|
||||
$dist_display .= " [deprecated]";
|
||||
}
|
||||
$distributions_select_data[] = [
|
||||
'label' => $dist_display,
|
||||
'value' => str_replace(".xml", "", strtolower(basename($_distribution))),
|
||||
|
@ -116,6 +116,8 @@ class Ajax
|
||||
return $this->resetTablelisting();
|
||||
case 'editapikey':
|
||||
return $this->editApiKey();
|
||||
case 'getConfigDetails':
|
||||
return $this->getConfigDetails();
|
||||
default:
|
||||
return $this->errorResponse('Action not found!');
|
||||
}
|
||||
@ -317,4 +319,15 @@ class Ajax
|
||||
));
|
||||
return $this->jsonResponse(['allowed_from' => $allowed_from, 'valid_until' => $valid_until]);
|
||||
}
|
||||
|
||||
private function getConfigDetails()
|
||||
{
|
||||
$distro = isset($_POST['distro,']) ? $_POST['distro,'] : "";
|
||||
$section = isset($_POST['section']) ? $_POST['section'] : "";
|
||||
$daemon = isset($_POST['daemon']) ? $_POST['daemon'] : "";
|
||||
|
||||
// @todo
|
||||
|
||||
return $this->jsonResponse(['title' => 'TODO', 'content' => '<div class="alert alert-warning" role="alert">TODO</div>']);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<froxlor>
|
||||
<distribution name="Ubuntu" codename="Bionic"
|
||||
version="18.04" defaulteditor="/bin/nano">
|
||||
version="18.04" defaulteditor="/bin/nano" deprecated="true">
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -4557,7 +4557,7 @@ UPLOADGID=
|
||||
</daemon>
|
||||
<!-- libnss-extrausers -->
|
||||
<daemon name="libnssextrausers"
|
||||
title="libnss-extrausers (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-extrausers">
|
||||
<install><![CDATA[apt-get install libnss-extrausers]]></install>
|
||||
<commands index="1">
|
||||
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
|
||||
@ -4618,7 +4618,7 @@ aliases: files
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- FCGID -->
|
||||
<daemon name="fcgid" title="FCGID (alternative to mod_php)">
|
||||
<daemon name="fcgid" title="FCGID">
|
||||
<install><![CDATA[apt-get install apache2-suexec-pristine libapache2-mod-fcgid php-cgi]]></install>
|
||||
<command><![CDATA[a2enmod suexec fcgid]]></command>
|
||||
<commands index="1">
|
||||
@ -4636,7 +4636,7 @@ aliases: files
|
||||
</daemon>
|
||||
<!-- PHP-FPM -->
|
||||
<daemon name="php-fpm"
|
||||
title="PHP-FPM (alternative to mod_php)">
|
||||
title="PHP-FPM">
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
|
@ -2,11 +2,6 @@
|
||||
<froxlor>
|
||||
<distribution name="Debian" codename="Bullseye"
|
||||
version="11.x" defaulteditor="/bin/nano">
|
||||
<!-- OS defaults to be loaded on installation -->
|
||||
<defaults>
|
||||
<default settinggroup="system" varname="nssextrausers" value="1"></default>
|
||||
<default settinggroup="system" varname="use_mod_proxy" value="1"></default>
|
||||
</defaults>
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -4773,7 +4768,7 @@ UPLOADGID=
|
||||
</daemon>
|
||||
<!-- libnss-extrausers -->
|
||||
<daemon name="libnssextrausers"
|
||||
title="libnss-extrausers (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-extrausers">
|
||||
<install><![CDATA[apt-get install libnss-extrausers]]></install>
|
||||
<commands index="1">
|
||||
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
|
||||
@ -4834,7 +4829,7 @@ aliases: files
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- FCGID -->
|
||||
<daemon name="fcgid" title="FCGID (alternative to mod_php)">
|
||||
<daemon name="fcgid" title="FCGID">
|
||||
<install><![CDATA[apt-get install apache2-suexec-pristine libapache2-mod-fcgid php-cgi]]></install>
|
||||
<command><![CDATA[a2enmod suexec fcgid]]></command>
|
||||
<commands index="1">
|
||||
@ -4852,7 +4847,7 @@ aliases: files
|
||||
</daemon>
|
||||
<!-- PHP-FPM -->
|
||||
<daemon name="php-fpm"
|
||||
title="PHP-FPM (alternative to mod_php)">
|
||||
title="PHP-FPM">
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<froxlor>
|
||||
<distribution name="Debian" codename="Buster"
|
||||
version="10.x" defaulteditor="/bin/nano">
|
||||
version="10.x" defaulteditor="/bin/nano" deprecated="true">
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -4759,7 +4759,7 @@ UPLOADGID=
|
||||
</daemon>
|
||||
<!-- libnss-extrausers -->
|
||||
<daemon name="libnssextrausers"
|
||||
title="libnss-extrausers (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-extrausers">
|
||||
<install><![CDATA[apt-get install libnss-extrausers]]></install>
|
||||
<commands index="1">
|
||||
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
|
||||
@ -4820,7 +4820,7 @@ aliases: files
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- FCGID -->
|
||||
<daemon name="fcgid" title="FCGID (alternative to mod_php)">
|
||||
<daemon name="fcgid" title="FCGID">
|
||||
<install><![CDATA[apt-get install apache2-suexec-pristine libapache2-mod-fcgid php-cgi]]></install>
|
||||
<command><![CDATA[a2enmod suexec fcgid]]></command>
|
||||
<commands index="1">
|
||||
@ -4838,7 +4838,7 @@ aliases: files
|
||||
</daemon>
|
||||
<!-- PHP-FPM -->
|
||||
<daemon name="php-fpm"
|
||||
title="PHP-FPM (alternative to mod_php)">
|
||||
title="PHP-FPM">
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
|
@ -2,38 +2,16 @@
|
||||
<froxlor>
|
||||
<distribution name="CentOS" version="7"
|
||||
defaulteditor="/usr/bin/nano">
|
||||
<defaults>
|
||||
<property>
|
||||
<varname>apacheconf_vhost</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/conf.d/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apacheconf_diroptions</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/conf.d/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apacheconf_htpasswddir</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/froxlor-htpasswd/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apachereload_command</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart httpd.service</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>bindreload_command</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart named.service</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>crondreload</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart crond.service</value>
|
||||
</property>
|
||||
</defaults>
|
||||
<!-- OS defaults to be loaded on installation -->
|
||||
<defaults>
|
||||
<default settinggroup="system" varname="nssextrausers" value="0"></default>
|
||||
<default settinggroup="system" varname="apacheconf_vhost" value="/etc/httpd/conf.d/"></default>
|
||||
<default settinggroup="system" varname="apacheconf_diroptions" value="/etc/httpd/conf.d/"></default>
|
||||
<default settinggroup="system" varname="apacheconf_htpasswddir" value="/etc/httpd/froxlor-htpasswd/"></default>
|
||||
<default settinggroup="system" varname="apachereload_command" value="systemctl reload-or-restart httpd.service"></default>
|
||||
<default settinggroup="system" varname="bindreload_command" value="systemctl reload-or-restart named.service"></default>
|
||||
<default settinggroup="system" varname="crondreload" value="systemctl reload-or-restart crond.service"></default>
|
||||
</defaults>
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -2351,7 +2329,7 @@ ControlsLog /var/log/proftpd/controls.log
|
||||
</daemon>
|
||||
<!-- libnss-mysql -->
|
||||
<daemon name="libnss"
|
||||
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-mysql">
|
||||
<install><![CDATA[yum --enablerepo=extras install epel-release]]></install>
|
||||
<install><![CDATA[yum install libnss-mysql nscd]]></install>
|
||||
<file name="/etc/libnss-mysql.cfg" chown="root:root"
|
||||
|
@ -2,38 +2,16 @@
|
||||
<froxlor>
|
||||
<distribution name="CentOS" version="8"
|
||||
defaulteditor="/usr/bin/nano">
|
||||
<defaults>
|
||||
<property>
|
||||
<varname>apacheconf_vhost</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/conf.d/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apacheconf_diroptions</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/conf.d/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apacheconf_htpasswddir</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>/etc/httpd/froxlor-htpasswd/</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>apachereload_command</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart httpd.service</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>bindreload_command</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart named.service</value>
|
||||
</property>
|
||||
<property>
|
||||
<varname>crondreload</varname>
|
||||
<settinggroup>system</settinggroup>
|
||||
<value>systemctl reload-or-restart crond.service</value>
|
||||
</property>
|
||||
</defaults>
|
||||
<!-- OS defaults to be loaded on installation -->
|
||||
<defaults>
|
||||
<default settinggroup="system" varname="nssextrausers" value="0"></default>
|
||||
<default settinggroup="system" varname="apacheconf_vhost" value="/etc/httpd/conf.d/"></default>
|
||||
<default settinggroup="system" varname="apacheconf_diroptions" value="/etc/httpd/conf.d/"></default>
|
||||
<default settinggroup="system" varname="apacheconf_htpasswddir" value="/etc/httpd/froxlor-htpasswd/"></default>
|
||||
<default settinggroup="system" varname="apachereload_command" value="systemctl reload-or-restart httpd.service"></default>
|
||||
<default settinggroup="system" varname="bindreload_command" value="systemctl reload-or-restart named.service"></default>
|
||||
<default settinggroup="system" varname="crondreload" value="systemctl reload-or-restart crond.service"></default>
|
||||
</defaults>
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -2354,7 +2332,7 @@ ControlsLog /var/log/proftpd/controls.log
|
||||
</daemon>
|
||||
<!-- libnss-mysql -->
|
||||
<daemon name="libnss"
|
||||
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-mysql">
|
||||
<install><![CDATA[dnf --enablerepo=extras install epel-release]]></install>
|
||||
<install><![CDATA[dnf install libnss-mysql nscd]]></install>
|
||||
<file name="/etc/libnss-mysql.cfg" chown="root:root"
|
||||
|
@ -3973,7 +3973,7 @@ UPLOADGID=
|
||||
</daemon>
|
||||
<!-- libnss-extrausers -->
|
||||
<daemon name="libnssextrausers"
|
||||
title="libnss-extrausers (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-extrausers">
|
||||
<install><![CDATA[apt-get install libnss-extrausers]]></install>
|
||||
<commands index="1">
|
||||
<command><![CDATA[mkdir -p /var/lib/extrausers]]></command>
|
||||
@ -4042,7 +4042,7 @@ aliases: files
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- FCGID -->
|
||||
<daemon name="fcgid" title="FCGID (alternative to mod_php)">
|
||||
<daemon name="fcgid" title="FCGID">
|
||||
<install><![CDATA[apt-get install apache2-suexec-pristine libapache2-mod-fcgid php-cgi]]></install>
|
||||
<command><![CDATA[a2enmod suexec fcgid]]></command>
|
||||
<commands index="1">
|
||||
@ -4060,7 +4060,7 @@ aliases: files
|
||||
</daemon>
|
||||
<!-- PHP-FPM -->
|
||||
<daemon name="php-fpm"
|
||||
title="PHP-FPM (alternative to mod_php)">
|
||||
title="PHP-FPM">
|
||||
<install>
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
|
@ -2,6 +2,10 @@
|
||||
<froxlor>
|
||||
<distribution name="Gentoo" version="2.2"
|
||||
defaulteditor="/usr/bin/nano">
|
||||
<!-- OS defaults to be loaded on installation -->
|
||||
<defaults>
|
||||
<default settinggroup="system" varname="nssextrausers" value="0"></default>
|
||||
</defaults>
|
||||
<services>
|
||||
<!-- HTTP -->
|
||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||
@ -3673,7 +3677,7 @@ account required pam_mysql.so user=<SQL_UNPRIVILEGED_USER> passwd=<SQL_UN
|
||||
</daemon>
|
||||
<!-- libnss-mysql -->
|
||||
<daemon name="libnss"
|
||||
title="libnss-mysql (required for FCGID/php-fpm/mpm-itk)">
|
||||
title="libnss-mysql">
|
||||
<install><![CDATA[emerge sys-auth/libnss-mysql]]></install>
|
||||
<file name="/etc/libnss-mysql.cfg" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
@ -3795,7 +3799,7 @@ aliases: files
|
||||
</file>
|
||||
</daemon>
|
||||
<!-- FCGID -->
|
||||
<daemon name="fcgid" title="FCGID (alternative to mod_php)">
|
||||
<daemon name="fcgid" title="FCGID">
|
||||
<command><![CDATA[echo "dev-lang/php cgi" >> /etc/portage/package.use]]></command>
|
||||
<install><![CDATA[emerge dev-lang/php sys-auth/libnss-mysql]]></install>
|
||||
<commands index="1">
|
||||
@ -3832,7 +3836,7 @@ aliases: files
|
||||
</daemon>
|
||||
<!-- PHP-FPM -->
|
||||
<daemon name="php-fpm"
|
||||
title="PHP-FPM (alternative to mod_php)">
|
||||
title="PHP-FPM">
|
||||
<command><![CDATA[echo "dev-lang/php fpm" >> /etc/portage/package.use]]></command>
|
||||
<install><![CDATA[emerge dev-lang/php sys-auth/libnss-mysql]]></install>
|
||||
<commands index="1">
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@
|
||||
{% block content %}
|
||||
<form action="{{ action|default(filename) }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
|
||||
{% block settings %}
|
||||
<div class="row row-cols-2 row-cols-md-2 row-cols-xl-4 g-3">
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4 g-3">
|
||||
{% for stype,field in fields %}
|
||||
<div class="col">
|
||||
<div class="card h-100 position-relative">
|
||||
@ -57,6 +57,9 @@
|
||||
{{ daemon.title }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<a class="show-config text-secondary opacity-50 float-end" role="button" data-dist="{{ distribution }}" data-section="{{ stype }}" data-daemon="{{ dtype }}" title="show config">
|
||||
<i class="fa-regular fa-file-code"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="form-check">
|
||||
@ -82,6 +85,9 @@
|
||||
{{ daemon.title }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<a class="show-config text-secondary opacity-50 float-end" role="button" data-dist="{{ distribution }}" data-section="{{ stype }}" data-daemon="{{ dtype }}" title="show config">
|
||||
<i class="fa-regular fa-file-code"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -103,4 +109,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="modal fade" id="configTplShow" aria-hidden="true" aria-labelledby="configTplShowLabel" tabindex="-1">
|
||||
<div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="configTplShowLabel"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ lng('panel.modalclose') }}"></button>
|
||||
</div>
|
||||
<div class="modal-body text-start">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-bs-dismiss="modal">{{ lng('panel.modalclose') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
$(function() {
|
||||
$(function () {
|
||||
/*
|
||||
* config files - select all recommended
|
||||
*/
|
||||
@ -11,4 +11,30 @@ $(function() {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$('.show-config').on('click', function () {
|
||||
var distro = $(this).data('dist');
|
||||
var section = $(this).data('section');
|
||||
var daemon = $(this).data('daemon');
|
||||
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=getConfigDetails",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: { distro: distro, section: section, daemon: daemon },
|
||||
success: function (data) {
|
||||
$('#configTplShowLabel').html(data.title);
|
||||
$('#configTplShow .modal-body').html(data.content);
|
||||
var myModal = new bootstrap.Modal(document.getElementById('configTplShow'));
|
||||
myModal.show();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
$('#configTplShowLabel').html('Error');
|
||||
$('#configTplShow .modal-body').html('<div class="alert alert-danger" role="alert">' + request.responseJSON.message + '</div>');
|
||||
var myModal = new bootstrap.Modal(document.getElementById('configTplShow'));
|
||||
myModal.show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -1,16 +1,16 @@
|
||||
$(document).ready(function () {
|
||||
$(function () {
|
||||
/*
|
||||
* table columns - manage columns modal
|
||||
*/
|
||||
let form = $('#manageColumnsModal form');
|
||||
|
||||
form.submit(function (event) {
|
||||
form.on('submit', function (event) {
|
||||
$.ajax({
|
||||
url: 'lib/ajax.php?action=updatetablelisting&listing=' + form.data('listing') + '&theme=' + window.$theme,
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data : form.serialize(),
|
||||
success : function () {
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: form.serialize(),
|
||||
success: function () {
|
||||
window.location.href = '';
|
||||
},
|
||||
error: function (request) {
|
||||
@ -20,13 +20,13 @@ $(document).ready(function () {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('#manageColumnsModal form #reset').click(function () {
|
||||
$('#manageColumnsModal form #reset').on('click', function () {
|
||||
$.ajax({
|
||||
url: 'lib/ajax.php?action=resettablelisting&listing=' + form.data('listing') + '&theme=' + window.$theme,
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data : {},
|
||||
success : function () {
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function () {
|
||||
window.location.href = '';
|
||||
},
|
||||
error: function (request) {
|
||||
|
Loading…
Reference in New Issue
Block a user