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
622e8dba
Commit
622e8dba
authored
Apr 05, 2017
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall / add select all, for
https://github.com/opnsense/core/issues/1514
parent
07f5033b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
15 deletions
+50
-15
firewall_nat.php
src/www/firewall_nat.php
+7
-2
firewall_nat_1to1.php
src/www/firewall_nat_1to1.php
+7
-3
firewall_nat_npt.php
src/www/firewall_nat_npt.php
+8
-2
firewall_nat_out.php
src/www/firewall_nat_out.php
+8
-2
firewall_rules.php
src/www/firewall_rules.php
+7
-2
firewall_scrub.php
src/www/firewall_scrub.php
+6
-2
firewall_virtual_ip.php
src/www/firewall_virtual_ip.php
+7
-2
No files found.
src/www/firewall_nat.php
View file @
622e8dba
...
@@ -216,6 +216,11 @@ $( document ).ready(function() {
...
@@ -216,6 +216,11 @@ $( document ).ready(function() {
$
(
"
#iform
"
).
submit
();
$
(
"
#iform
"
).
submit
();
});
});
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
// watch scroll position and set to last known on page load
// watch scroll position and set to last known on page load
watchScrollPosition
();
watchScrollPosition
();
});
});
...
@@ -245,7 +250,7 @@ $( document ).ready(function() {
...
@@ -245,7 +250,7 @@ $( document ).ready(function() {
<td
colspan=
"2"
>
</td>
<td
colspan=
"2"
>
</td>
</tr>
</tr>
<tr>
<tr>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th>
<?=
gettext
(
"If"
);
?>
</th>
<th>
<?=
gettext
(
"If"
);
?>
</th>
...
@@ -293,7 +298,7 @@ $( document ).ready(function() {
...
@@ -293,7 +298,7 @@ $( document ).ready(function() {
?>
?>
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_edit.php?id=
<?=
$nnats
;
?>
';"
>
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_edit.php?id=
<?=
$nnats
;
?>
';"
>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$nnats
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$nnats
;
?>
"
/>
</td>
</td>
<td>
<td>
<?php
if
(
isset
(
$natent
[
'nordr'
]))
:
?>
<?php
if
(
isset
(
$natent
[
'nordr'
]))
:
?>
...
...
src/www/firewall_nat_1to1.php
View file @
622e8dba
...
@@ -165,9 +165,13 @@ $main_buttons = array(
...
@@ -165,9 +165,13 @@ $main_buttons = array(
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#iform
"
).
submit
();
$
(
"
#iform
"
).
submit
();
});
});
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
// watch scroll position and set to last known on page load
// watch scroll position and set to last known on page load
watchScrollPosition
();
watchScrollPosition
();
});
});
</script>
</script>
...
@@ -193,7 +197,7 @@ $main_buttons = array(
...
@@ -193,7 +197,7 @@ $main_buttons = array(
<table
class=
"table table-striped"
>
<table
class=
"table table-striped"
>
<thead>
<thead>
<tr>
<tr>
<th>
</th>
<th>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th>
</th>
<th>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th>
<?=
gettext
(
"External IP"
);
?>
</th>
<th>
<?=
gettext
(
"External IP"
);
?>
</th>
...
@@ -210,7 +214,7 @@ $main_buttons = array(
...
@@ -210,7 +214,7 @@ $main_buttons = array(
?>
?>
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
valign=
"top"
ondblclick=
"document.location='firewall_nat_1to1_edit.php?id=
<?=
$i
;
?>
';"
>
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
valign=
"top"
ondblclick=
"document.location='firewall_nat_1to1_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
</td>
</td>
<td>
<td>
<a
href=
"#"
type=
"submit"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
!
isset
(
$natent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
class=
"act_toggle"
>
<a
href=
"#"
type=
"submit"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
!
isset
(
$natent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
class=
"act_toggle"
>
...
...
src/www/firewall_nat_npt.php
View file @
622e8dba
...
@@ -167,6 +167,12 @@ $main_buttons = array(
...
@@ -167,6 +167,12 @@ $main_buttons = array(
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#iform
"
).
submit
();
$
(
"
#iform
"
).
submit
();
});
});
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
// watch scroll position and set to last known on page load
// watch scroll position and set to last known on page load
watchScrollPosition
();
watchScrollPosition
();
});
});
...
@@ -191,7 +197,7 @@ $main_buttons = array(
...
@@ -191,7 +197,7 @@ $main_buttons = array(
<thead>
<thead>
<tr>
<tr>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th
width=
"2%"
>
</th>
<th
width=
"2%"
>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th>
<?=
gettext
(
"External Prefix"
);
?>
</th>
<th>
<?=
gettext
(
"External Prefix"
);
?>
</th>
...
@@ -207,7 +213,7 @@ $main_buttons = array(
...
@@ -207,7 +213,7 @@ $main_buttons = array(
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_npt_edit.php?id=
<?=
$i
;
?>
';"
>
<tr
<?=
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_npt_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
</td>
<td>
</td>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
</td>
</td>
<td>
<td>
<a
href=
"#"
class=
"act_toggle"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
!
isset
(
$natent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
>
<a
href=
"#"
class=
"act_toggle"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
!
isset
(
$natent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
>
...
...
src/www/firewall_nat_out.php
View file @
622e8dba
...
@@ -234,6 +234,12 @@ include("head.inc");
...
@@ -234,6 +234,12 @@ include("head.inc");
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#action
"
).
val
(
"
toggle
"
);
$
(
"
#iform
"
).
submit
();
$
(
"
#iform
"
).
submit
();
});
});
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
// watch scroll position and set to last known on page load
// watch scroll position and set to last known on page load
watchScrollPosition
();
watchScrollPosition
();
});
});
...
@@ -329,7 +335,7 @@ include("head.inc");
...
@@ -329,7 +335,7 @@ include("head.inc");
<thead>
<thead>
<tr><th
colspan=
"12"
>
<?=
gettext
(
"Manual rules:"
);
?>
</th></tr>
<tr><th
colspan=
"12"
>
<?=
gettext
(
"Manual rules:"
);
?>
</th></tr>
<tr>
<tr>
<th>
</th>
<th>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th>
</th>
<th>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th>
<?=
gettext
(
"Interface"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Source"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Source"
);
?>
</th>
...
@@ -350,7 +356,7 @@ include("head.inc");
...
@@ -350,7 +356,7 @@ include("head.inc");
?>
?>
<tr
<?=
$mode
==
"disabled"
||
$mode
==
"automatic"
||
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_out_edit.php?id=
<?=
$i
;
?>
';"
>
<tr
<?=
$mode
==
"disabled"
||
$mode
==
"automatic"
||
isset
(
$natent
[
'disabled'
])
?
"class=
\"
text-muted
\"
"
:
""
;
?>
ondblclick=
"document.location='firewall_nat_out_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
</td>
</td>
<td>
<td>
<?php
<?php
...
...
src/www/firewall_rules.php
View file @
622e8dba
...
@@ -240,6 +240,11 @@ $( document ).ready(function() {
...
@@ -240,6 +240,11 @@ $( document ).ready(function() {
$
(
"
#fw_category
"
).
addClass
(
'
hidden
'
);
$
(
"
#fw_category
"
).
addClass
(
'
hidden
'
);
}
}
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
});
});
</script>
</script>
...
@@ -280,7 +285,7 @@ $( document ).ready(function() {
...
@@ -280,7 +285,7 @@ $( document ).ready(function() {
<table
class=
"table table-striped table-hover"
id=
"rules"
>
<table
class=
"table table-striped table-hover"
id=
"rules"
>
<thead>
<thead>
<tr>
<tr>
<th>
</th>
<th>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th>
</th>
<th>
</th>
<th>
<?=
gettext
(
"Proto"
);
?>
</th>
<th>
<?=
gettext
(
"Proto"
);
?>
</th>
<th>
<?=
gettext
(
"Source"
);
?>
</th>
<th>
<?=
gettext
(
"Source"
);
?>
</th>
...
@@ -436,7 +441,7 @@ $( document ).ready(function() {
...
@@ -436,7 +441,7 @@ $( document ).ready(function() {
?>
?>
<tr
class=
"rule"
data-category=
"
<?=
!
empty
(
$filterent
[
'category'
])
?
$filterent
[
'category'
]
:
""
;
?>
"
>
<tr
class=
"rule"
data-category=
"
<?=
!
empty
(
$filterent
[
'category'
])
?
$filterent
[
'category'
]
:
""
;
?>
"
>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
</td>
</td>
<td>
<td>
<a
href=
"#"
class=
"act_toggle"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
empty
(
$filterent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
><span
class=
"glyphicon
<?=
$iconfn
;
?>
"
></span></a>
<a
href=
"#"
class=
"act_toggle"
id=
"toggle_
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
empty
(
$filterent
[
'disabled'
]))
?
gettext
(
"disable rule"
)
:
gettext
(
"enable rule"
);
?>
"
><span
class=
"glyphicon
<?=
$iconfn
;
?>
"
></span></a>
...
...
src/www/firewall_scrub.php
View file @
622e8dba
...
@@ -205,6 +205,10 @@ $( document ).ready(function() {
...
@@ -205,6 +205,10 @@ $( document ).ready(function() {
});
});
$
(
"
#scrub_interface_disable
"
).
change
();
$
(
"
#scrub_interface_disable
"
).
change
();
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
// watch scroll position and set to last known on page load
// watch scroll position and set to last known on page load
watchScrollPosition
();
watchScrollPosition
();
...
@@ -295,7 +299,7 @@ $( document ).ready(function() {
...
@@ -295,7 +299,7 @@ $( document ).ready(function() {
<th
colspan=
"2"
>
</th>
<th
colspan=
"2"
>
</th>
</tr>
</tr>
<tr>
<tr>
<th>
</th>
<th>
<input
type=
"checkbox"
id=
"selectAll"
>
</th>
<th>
<?=
gettext
(
"Interfaces"
);
?>
</th>
<th>
<?=
gettext
(
"Interfaces"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Source"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Source"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Destination"
);
?>
</th>
<th
class=
"hidden-xs hidden-sm"
>
<?=
gettext
(
"Destination"
);
?>
</th>
...
@@ -310,7 +314,7 @@ $( document ).ready(function() {
...
@@ -310,7 +314,7 @@ $( document ).ready(function() {
foreach
(
$a_scrub
as
$i
=>
$scrubEntry
)
:?>
foreach
(
$a_scrub
as
$i
=>
$scrubEntry
)
:?>
<
tr
>
<
tr
>
<
td
>
<
td
>
<
input
type
=
"checkbox"
name
=
"rule[]"
value
=
"<?=
$i
;?>"
/>
<
input
class
="
rule_select
"
type="
checkbox
" name="
rule
[]
" value="
<?=
$i
;
?>
" />
<a
href=
"#"
class=
"act_toggle"
data-id=
"
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
empty
(
$scrubEntry
[
'disabled'
]))
?
gettext
(
"disable"
)
:
gettext
(
"enable"
);
?>
"
>
<a
href=
"#"
class=
"act_toggle"
data-id=
"
<?=
$i
;
?>
"
data-toggle=
"tooltip"
title=
"
<?=
(
empty
(
$scrubEntry
[
'disabled'
]))
?
gettext
(
"disable"
)
:
gettext
(
"enable"
);
?>
"
>
<span
class=
"glyphicon glyphicon-play
<?=
(
empty
(
$scrubEntry
[
'disabled'
]))
?
"text-success"
:
"text-muted"
;
?>
"
></span>
<span
class=
"glyphicon glyphicon-play
<?=
(
empty
(
$scrubEntry
[
'disabled'
]))
?
"text-success"
:
"text-muted"
;
?>
"
></span>
</a>
</a>
...
...
src/www/firewall_virtual_ip.php
View file @
622e8dba
...
@@ -256,6 +256,11 @@ $main_buttons = array(
...
@@ -256,6 +256,11 @@ $main_buttons = array(
$
(
"
#action
"
).
val
(
"
move
"
);
$
(
"
#action
"
).
val
(
"
move
"
);
$
(
"
#iform
"
).
submit
();
$
(
"
#iform
"
).
submit
();
});
});
// select All
$
(
"
#selectAll
"
).
click
(
function
(){
$
(
"
.rule_select
"
).
prop
(
"
checked
"
,
$
(
this
).
prop
(
"
checked
"
));
});
});
});
</script>
</script>
<?php
include
(
"fbegin.inc"
);
?>
<?php
include
(
"fbegin.inc"
);
?>
...
@@ -280,7 +285,7 @@ $main_buttons = array(
...
@@ -280,7 +285,7 @@ $main_buttons = array(
<table
class=
"table table-striped"
>
<table
class=
"table table-striped"
>
<thead>
<thead>
<tr>
<tr>
<td></td>
<td><
input
type=
"checkbox"
id=
"selectAll"
><
/td>
<td>
<?=
gettext
(
"Virtual IP address"
);
?>
</td>
<td>
<?=
gettext
(
"Virtual IP address"
);
?>
</td>
<td>
<?=
gettext
(
"Interface"
);
?>
</td>
<td>
<?=
gettext
(
"Interface"
);
?>
</td>
<td>
<?=
gettext
(
"Type"
);
?>
</td>
<td>
<?=
gettext
(
"Type"
);
?>
</td>
...
@@ -297,7 +302,7 @@ $main_buttons = array(
...
@@ -297,7 +302,7 @@ $main_buttons = array(
if
(
!
empty
(
$vipent
[
'subnet'
])
||
!
empty
(
$vipent
[
'range'
])
||
!
empty
(
$vipent
[
'subnet_bits'
])
||
(
isset
(
$vipent
[
'range'
][
'from'
])
&&
!
empty
(
$vipent
[
'range'
][
'from'
])))
:
?>
if
(
!
empty
(
$vipent
[
'subnet'
])
||
!
empty
(
$vipent
[
'range'
])
||
!
empty
(
$vipent
[
'subnet_bits'
])
||
(
isset
(
$vipent
[
'range'
][
'from'
])
&&
!
empty
(
$vipent
[
'range'
][
'from'
])))
:
?>
<tr
ondblclick=
"document.location='firewall_virtual_ip_edit.php?id=
<?=
$i
;
?>
';"
>
<tr
ondblclick=
"document.location='firewall_virtual_ip_edit.php?id=
<?=
$i
;
?>
';"
>
<td>
<td>
<input
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
<input
class=
"rule_select"
type=
"checkbox"
name=
"rule[]"
value=
"
<?=
$i
;
?>
"
/>
</td>
</td>
<td>
<td>
<?=
(
$vipent
[
'type'
]
==
"single"
||
$vipent
[
'type'
]
==
"network"
)
&&
!
empty
(
$vipent
[
'subnet_bits'
])
?
$vipent
[
'subnet'
]
.
"/"
.
$vipent
[
'subnet_bits'
]
:
""
;
?>
<?=
(
$vipent
[
'type'
]
==
"single"
||
$vipent
[
'type'
]
==
"network"
)
&&
!
empty
(
$vipent
[
'subnet_bits'
])
?
$vipent
[
'subnet'
]
.
"/"
.
$vipent
[
'subnet_bits'
]
:
""
;
?>
...
...
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