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
0a7e8655
Commit
0a7e8655
authored
Dec 11, 2015
by
Manuel Faux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaner way to show banner for disabled services
parent
5d159b2c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
21 deletions
+31
-21
diag_logs_filter.php
src/www/diag_logs_filter.php
+1
-4
diag_logs_filter_dynamic.php
src/www/diag_logs_filter_dynamic.php
+1
-4
diag_logs_filter_plain.php
src/www/diag_logs_filter_plain.php
+1
-4
diag_logs_filter_summary.php
src/www/diag_logs_filter_summary.php
+1
-3
diag_pf_info.php
src/www/diag_pf_info.php
+1
-0
firewall_rules.php
src/www/firewall_rules.php
+1
-3
guiconfig.inc
src/www/guiconfig.inc
+24
-2
status_filter_reload.php
src/www/status_filter_reload.php
+1
-1
No files found.
src/www/diag_logs_filter.php
View file @
0a7e8655
...
...
@@ -606,10 +606,7 @@ include("head.inc");
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$config
[
'system'
][
'disablefilter'
]))
:
?>
<?php
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
?>
<?php
endif
;
?>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
...
...
src/www/diag_logs_filter_dynamic.php
View file @
0a7e8655
...
...
@@ -87,10 +87,7 @@ include("head.inc");
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$config
[
'system'
][
'disablefilter'
]))
:
?>
<?php
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
?>
<?php
endif
;
?>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
...
...
src/www/diag_logs_filter_plain.php
View file @
0a7e8655
...
...
@@ -63,10 +63,7 @@ include("head.inc");
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$config
[
'system'
][
'disablefilter'
]))
:
?>
<?php
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
?>
<?php
endif
;
?>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
...
...
src/www/diag_logs_filter_summary.php
View file @
0a7e8655
...
...
@@ -114,9 +114,7 @@ include("head.inc"); ?>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$config
[
'system'
][
'disablefilter'
]))
:
?>
<?php
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
?>
<?php
endif
;
?>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
...
...
src/www/diag_pf_info.php
View file @
0a7e8655
...
...
@@ -69,6 +69,7 @@ $( document ).ready(function() {
<section
class=
"page-content-main"
>
<div
class=
"container-fluid col-xs-12"
>
<div
class=
"row"
>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<section
class=
"col-xs-12"
>
<ul
class=
"nav nav-tabs"
data-tabs=
"tabs"
id=
"maintabs"
>
<?php
...
...
src/www/firewall_rules.php
View file @
0a7e8655
...
...
@@ -200,9 +200,7 @@ $( document ).ready(function() {
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
if
(
isset
(
$config
[
'system'
][
'disablefilter'
]))
:
?>
<?php
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
?>
<?php
endif
;
?>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$savemsg
))
print_info_box
(
$savemsg
);
?>
<?php
if
(
is_subsystem_dirty
(
'filter'
))
:
?>
<p>
<?php
print_info_box_apply
(
gettext
(
"The firewall rule configuration has been changed.<br />You must apply the changes in order for them to take effect."
));
?>
...
...
src/www/guiconfig.inc
View file @
0a7e8655
...
...
@@ -237,8 +237,7 @@ function print_info_box($msg)
EOFnp;
}
function
print_warning_box
(
$msg
)
{
function
print_warning_box
(
$msg
)
{
echo
<<<EOFnp
<div class="col-xs-12">
<div class="alert alert-warning alert-dismissible" role="alert">
...
...
@@ -248,6 +247,29 @@ function print_warning_box($msg)
EOFnp;
}
function
is_service_enabled
(
$service
)
{
global
$config
;
switch
(
$service
)
{
case
'firewall'
:
case
'filter'
:
return
!
isset
(
$config
[
'system'
][
'disablefilter'
]);
default
:
return
false
;
}
}
function
print_service_disabled_banner
(
$service
)
{
if
(
!
is_service_enabled
(
$service
))
{
switch
(
$service
)
{
case
'firewall'
:
case
'filter'
:
print_warning_box
(
gettext
(
"The firewall has globally been disabled. Configured rules are currently not enforced."
));
break
;
}
}
}
function
get_std_save_message
()
{
global
$d_sysrebootreqd_path
;
$filter_related
=
false
;
...
...
src/www/status_filter_reload.php
View file @
0a7e8655
...
...
@@ -65,7 +65,7 @@ include("head.inc");
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<?php
print_service_disabled_banner
(
'firewall'
);
?>
<?php
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<section
class=
"col-xs-12"
>
...
...
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