Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
3d93e25b
Commit
3d93e25b
authored
Jan 18, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: remove indirect mapping and fix remaining services
parent
d4ff81bb
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
57 additions
and
60 deletions
+57
-60
diag_logs_gateways.php
src/www/diag_logs_gateways.php
+3
-0
diag_logs_ntpd.php
src/www/diag_logs_ntpd.php
+1
-1
fbegin.inc
src/www/fbegin.inc
+5
-26
load_balancer_pool_edit.php
src/www/load_balancer_pool_edit.php
+1
-1
services_ntpd.php
src/www/services_ntpd.php
+1
-1
services_ntpd_gps.php
src/www/services_ntpd_gps.php
+1
-1
services_ntpd_pps.php
src/www/services_ntpd_pps.php
+2
-2
services_snmp.php
src/www/services_snmp.php
+1
-1
services_upnp.php
src/www/services_upnp.php
+1
-1
status_gateway_groups.php
src/www/status_gateway_groups.php
+3
-0
status_gateways.php
src/www/status_gateways.php
+2
-0
status_ntpd.php
src/www/status_ntpd.php
+1
-1
status_upnp.php
src/www/status_upnp.php
+1
-1
system_gateway_groups.php
src/www/system_gateway_groups.php
+3
-0
system_gateway_groups_edit.php
src/www/system_gateway_groups_edit.php
+3
-0
system_gateways.php
src/www/system_gateways.php
+26
-24
system_gateways_edit.php
src/www/system_gateways_edit.php
+2
-0
No files found.
src/www/diag_logs_gateways.php
View file @
3d93e25b
...
...
@@ -3,4 +3,7 @@
$logfile
=
'/var/log/gateways.log'
;
$logclog
=
true
;
require_once
'services.inc'
;
$shortcut_section
=
'apinger'
;
require_once
'diag_logs_template.inc'
;
src/www/diag_logs_ntpd.php
View file @
3d93e25b
...
...
@@ -4,6 +4,6 @@ $logfile = '/var/log/ntpd.log';
$logclog
=
true
;
require_once
'services.inc'
;
$shortcut_section
=
'ntp'
;
$shortcut_section
=
'ntp
d
'
;
require_once
'diag_logs_template.inc'
;
src/www/fbegin.inc
View file @
3d93e25b
...
...
@@ -29,42 +29,21 @@
POSSIBILITY OF SUCH DAMAGE.
*/
function
find_service_by_
shortcut
(
$names
)
function
find_service_by_
name
(
$names
)
{
$shortcuts
=
array
();
if
(
!
is_array
(
$names
))
{
$names
=
array
(
$names
);
}
$shortcuts
[
'dhcpd'
]
=
'dhcpd'
;
$shortcuts
[
'dhcrelay'
]
=
'dhcrelay'
;
$shortcuts
[
'dhcrelay6'
]
=
'dhcrelay6'
;
$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
[
'snmp'
]
=
'bsnmpd'
;
$shortcuts
[
'squid'
]
=
'squid'
;
$shortcuts
[
'upnp'
]
=
'miniupnpd'
;
$services
=
get_services
();
foreach
(
$s
hortcuts
as
$shortcut
=>
$realnam
e
)
{
foreach
(
$s
ervices
as
$servic
e
)
{
foreach
(
$names
as
$name
)
{
if
(
$shortcut
==
$name
)
{
foreach
(
$services
as
$service
)
if
(
$service
[
'name'
]
==
$realname
)
{
if
(
$service
[
'name'
]
==
$name
)
{
return
$service
;
}
}
}
}
return
array
();
}
...
...
@@ -232,7 +211,7 @@ if($need_alert_display == true) {
$ssvc
=
find_service_by_openvpn_vpnid
(
$vpnid
);
break
;
default
:
$ssvc
=
find_service_by_
shortcut
(
$shortcut_section
);
$ssvc
=
find_service_by_
name
(
$shortcut_section
);
break
;
}
if
(
!
empty
(
$ssvc
))
{
...
...
src/www/load_balancer_pool_edit.php
View file @
3d93e25b
...
...
@@ -146,7 +146,7 @@ if ($_POST) {
}
}
$shortcut_section
=
"relayd"
;
$shortcut_section
=
'relayd'
;
include
(
"head.inc"
);
...
...
src/www/services_ntpd.php
View file @
3d93e25b
...
...
@@ -157,7 +157,7 @@ if (empty($pconfig['interface'])) {
$pconfig
[
'interface'
]
=
explode
(
","
,
$pconfig
[
'interface'
]);
}
$shortcut_section
=
'ntp'
;
$shortcut_section
=
'ntp
d
'
;
include
(
"head.inc"
);
...
...
src/www/services_ntpd_gps.php
View file @
3d93e25b
...
...
@@ -130,7 +130,7 @@ if ($_POST) {
}
$pconfig
=
&
$config
[
'ntpd'
][
'gps'
];
$shortcut_section
=
"ntp"
;
$shortcut_section
=
'ntpd'
;
$closehead
=
false
;
include
(
"head.inc"
);
...
...
src/www/services_ntpd_pps.php
View file @
3d93e25b
...
...
@@ -87,9 +87,9 @@ if ($_POST) {
$retval
=
system_ntp_configure
();
$savemsg
=
get_std_save_message
();
}
$pconfig
=
&
$config
[
'ntpd'
][
'pps'
];
$shortcut_section
=
"ntp"
;
$pconfig
=
&
$config
[
'ntpd'
][
'pps'
];
$shortcut_section
=
'ntpd'
;
include
(
"head.inc"
);
...
...
src/www/services_snmp.php
View file @
3d93e25b
...
...
@@ -152,7 +152,7 @@ if ($_POST) {
}
}
$shortcut_section
=
"snmp"
;
$shortcut_section
=
'bsnmpd'
;
$closehead
=
false
;
include
(
"head.inc"
);
...
...
src/www/services_upnp.php
View file @
3d93e25b
...
...
@@ -29,7 +29,7 @@
ini_set
(
'max_execution_time'
,
'0'
);
$shortcut_section
=
"upnp"
;
$shortcut_section
=
'miniupnpd'
;
require_once
(
"guiconfig.inc"
);
require_once
(
"services.inc"
);
...
...
src/www/status_gateway_groups.php
View file @
3d93e25b
...
...
@@ -28,6 +28,7 @@
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"services.inc"
);
// request report data
if
(
!
isset
(
$config
[
'gateways'
][
'gateway_group'
])
||
!
is_array
(
$config
[
'gateways'
][
'gateway_group'
]))
{
...
...
@@ -41,6 +42,8 @@ $a_gateways = return_gateways_array();
legacy_html_escape_form_data
(
$a_gateways
);
legacy_html_escape_form_data
(
$a_gateway_groups
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
?>
...
...
src/www/status_gateways.php
View file @
3d93e25b
...
...
@@ -35,6 +35,8 @@ $a_gateways = return_gateways_array();
$gateways_status
=
return_gateways_status
(
true
);
legacy_html_escape_form_data
(
$a_gateways
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
?>
...
...
src/www/status_ntpd.php
View file @
3d93e25b
...
...
@@ -145,7 +145,7 @@ if (isset($config['ntpd']['gps']['type']) && ($config['ntpd']['gps']['type'] ==
}
}
$shortcut_section
=
"ntp"
;
$shortcut_section
=
'ntpd'
;
include
(
"head.inc"
);
...
...
src/www/status_upnp.php
View file @
3d93e25b
...
...
@@ -44,7 +44,7 @@ exec("/sbin/pfctl -aminiupnpd -sn", $rdr_entries, $pf_ret);
$now
=
time
();
$year
=
date
(
"Y"
);
$shortcut_section
=
"upnp"
;
$shortcut_section
=
'miniupnpd'
;
include
(
"head.inc"
);
...
...
src/www/system_gateway_groups.php
View file @
3d93e25b
...
...
@@ -31,6 +31,7 @@ require_once("guiconfig.inc");
require_once
(
"interfaces.inc"
);
require_once
(
"openvpn.inc"
);
require_once
(
"system.inc"
);
require_once
(
"services.inc"
);
require_once
(
"pfsense-utils.inc"
);
require_once
(
"rrd.inc"
);
...
...
@@ -112,6 +113,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
legacy_html_escape_form_data
(
$a_gateway_groups
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
$main_buttons
=
array
(
...
...
src/www/system_gateway_groups_edit.php
View file @
3d93e25b
...
...
@@ -29,6 +29,7 @@
require_once
(
"guiconfig.inc"
);
require_once
(
"vpn.inc"
);
require_once
(
"services.inc"
);
require_once
(
"interfaces.inc"
);
if
(
!
is_array
(
$config
[
'gateways'
]))
{
...
...
@@ -143,6 +144,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
legacy_html_escape_form_data
(
$a_gateways
);
legacy_html_escape_form_data
(
$pconfig
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
?>
...
...
src/www/system_gateways.php
View file @
3d93e25b
...
...
@@ -205,6 +205,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
legacy_html_escape_form_data
(
$a_gateways
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
$main_buttons
=
array
(
...
...
src/www/system_gateways_edit.php
View file @
3d93e25b
...
...
@@ -477,6 +477,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
legacy_html_escape_form_data
(
$a_gateways
);
legacy_html_escape_form_data
(
$pconfig
);
$shortcut_section
=
'apinger'
;
include
(
"head.inc"
);
?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment