mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 11:26:13 +00:00
services: bring back service widgets for dns
This commit is contained in:
parent
07923379b6
commit
d4ff81bbbc
@ -3,4 +3,7 @@
|
||||
$logfile = '/var/log/resolver.log';
|
||||
$logclog = true;
|
||||
|
||||
require_once 'services.inc';
|
||||
$shortcut_section = array('dnsmasq', 'unbound');
|
||||
|
||||
require_once 'diag_logs_template.inc';
|
||||
|
||||
@ -29,21 +29,26 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
function find_service_by_shortcut($name)
|
||||
function find_service_by_shortcut($names)
|
||||
{
|
||||
$shortcuts = array();
|
||||
|
||||
/* WIP unify mapping so "shortcuts" are no longer needed */
|
||||
if (!is_array($names)) {
|
||||
$names = array($names);
|
||||
}
|
||||
|
||||
$shortcuts['dhcpd'] = 'dhcpd';
|
||||
$shortcuts['dhcrelay'] = 'dhcrelay';
|
||||
$shortcuts['dhcrelay6'] = 'dhcrelay6';
|
||||
$shortcuts['forwarder'] = 'dnsmasq';
|
||||
$shortcuts['dnsmasq'] = 'dnsmasq';
|
||||
$shortcuts['unbound'] = 'unbound';
|
||||
|
||||
/* WIP unify mapping so "shortcuts" are no longer needed */
|
||||
$shortcuts['gateways'] = 'apinger';
|
||||
$shortcuts['ipsec'] = 'ipsec';
|
||||
$shortcuts['ntp'] = 'ntpd';
|
||||
$shortcuts['openvpn'] = 'openvpn';
|
||||
$shortcuts['relayd'] = 'relayd';
|
||||
$shortcuts['resolver'] = 'unbound';
|
||||
$shortcuts['snmp'] = 'bsnmpd';
|
||||
$shortcuts['squid'] = 'squid';
|
||||
$shortcuts['upnp'] = 'miniupnpd';
|
||||
@ -51,10 +56,12 @@ function find_service_by_shortcut($name)
|
||||
$services = get_services();
|
||||
|
||||
foreach ($shortcuts as $shortcut => $realname) {
|
||||
if ($shortcut == $name) {
|
||||
foreach ($services as $service)
|
||||
if ($service['name'] == $realname) {
|
||||
return $service;
|
||||
foreach ($names as $name) {
|
||||
if ($shortcut == $name) {
|
||||
foreach ($services as $service)
|
||||
if ($service['name'] == $realname) {
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,6 +139,7 @@ if ($_GET['act'] == "del") {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'dnsmasq';
|
||||
$closehead = false;
|
||||
|
||||
include("head.inc");
|
||||
|
||||
@ -111,6 +111,8 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'dnsmasq';
|
||||
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
|
||||
@ -156,6 +156,8 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'dnsmasq';
|
||||
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
|
||||
@ -133,6 +133,7 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
$closehead = false;
|
||||
|
||||
include_once("head.inc");
|
||||
|
||||
@ -156,6 +156,7 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
$closehead = false;
|
||||
|
||||
include("head.inc");
|
||||
|
||||
@ -113,6 +113,7 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
$closehead = false;
|
||||
|
||||
include_once("head.inc");
|
||||
|
||||
@ -101,6 +101,8 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
|
||||
@ -191,6 +191,8 @@ if ($_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
|
||||
@ -88,8 +88,9 @@ if ($_GET['act'] == "del") {
|
||||
}
|
||||
}
|
||||
|
||||
$shortcut_section = 'unbound';
|
||||
$closehead = false;
|
||||
$pgtitle = array(gettext('Services'), gettext('DNS Resolver'), gettext('Overrides'));
|
||||
|
||||
include_once("head.inc");
|
||||
|
||||
?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user