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
4a2943f7
Commit
4a2943f7
authored
Sep 14, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diagnostics: merge reworked firewall pages from master
parent
9033011d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
497 additions
and
550 deletions
+497
-550
diag_pf_info.php
src/www/diag_pf_info.php
+59
-54
diag_states_summary.php
src/www/diag_states_summary.php
+134
-173
diag_system_pftop.php
src/www/diag_system_pftop.php
+125
-161
diag_tables.php
src/www/diag_tables.php
+179
-162
No files found.
src/www/diag_pf_info.php
View file @
4a2943f7
...
...
@@ -29,68 +29,73 @@
require_once
(
"guiconfig.inc"
);
$pgtitle
=
gettext
(
"Diagnostics: pfInfo"
);
if
(
$_REQUEST
[
'getactivity'
])
{
$text
=
`/sbin/pfctl -vvsi`
;
$text
.=
"<p/>"
;
$text
.=
`/sbin/pfctl -vvsm`
;
$text
.=
"<p/>"
;
$text
.=
`/sbin/pfctl -vvst`
;
$text
.=
"<p/>"
;
$text
.=
`/sbin/pfctl -vvsI`
;
echo
$text
;
exit
;
$data_tabs
=
array
(
"info"
,
"memory"
,
"timeouts"
,
"interfaces"
);
if
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'POST'
)
{
if
(
isset
(
$_POST
[
'getactivity'
]))
{
$diag
=
configd_run
(
"filter diag info json"
);
echo
$diag
;
}
exit
;
}
include
(
"head.inc"
);
?>
<body>
<?php
include
(
"fbegin.inc"
);
?>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
setTimeout
(
'
getpfinfo()
'
,
500
);});
//
<!
[
CDATA
[
function
getpfinfo
()
{
jQuery
.
ajax
({
type
:
"
POST
"
,
url
:
"
/diag_pf_info.php
"
,
data
:
'
getactivity=yes
'
,
async
:
false
,
complete
:
activitycallback
});
}
function
activitycallback
(
transport
)
{
jQuery
(
'
#pfactivitydiv
'
).
html
(
'
<font face="Courier" size="2"><pre style="text-align:left;">
'
+
transport
.
responseText
+
'
<
\
/pre><
\
/font>
'
);
setTimeout
(
'
getpfinfo()
'
,
2000
);
}
//]]>
$
(
document
).
ready
(
function
()
{
function
getpfinfo
()
{
jQuery
.
ajax
({
type
:
"
post
"
,
url
:
"
/diag_pf_info.php
"
,
data
:
'
getactivity=yes
'
,
dataType
:
"
json
"
,
success
:
function
(
data
)
{
// push data into tabs
$
.
each
(
data
,
function
(
key
,
value
)
{
if
(
$
(
"
#data_
"
+
key
.
toLowerCase
()).
length
)
{
$
(
"
#data_
"
+
key
.
toLowerCase
()).
html
(
value
);
}
});
setTimeout
(
getpfinfo
,
2000
);
}
});
}
getpfinfo
();
});
</script>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid col-xs-12 col-sm-10 col-md-9"
>
<div
class=
"row"
>
<section
class=
"col-xs-12"
>
<?php
if
(
$savemsg
)
{
echo
"<div id=
\"
savemsg
\"
>"
;
print_info_box
(
$savemsg
);
echo
"</div>"
;
}
if
(
isset
(
$input_errors
)
&&
count
(
$input_errors
)
>
0
)
print_input_errors
(
$input_errors
);
?>
<div
id=
"pfactivitydiv"
>
<?=
gettext
(
"Gathering PF information, please wait..."
);
?>
</div>
</section>
</div>
</div>
<div
class=
"container-fluid col-xs-12"
>
<div
class=
"row"
>
<section
class=
"col-xs-12"
>
<ul
class=
"nav nav-tabs"
data-tabs=
"tabs"
id=
"maintabs"
>
<?php
foreach
(
$data_tabs
as
$i
=>
$tabname
)
:?>
<
li
<?=
$i
==
0
?
'class="active"'
:
''
;
?>
>
<a
data-toggle=
"tab"
href=
"#
<?=
$tabname
;
?>
"
id=
"
<?=
$tabname
;
?>
_tab"
>
<?=
ucfirst
(
$tabname
);
?>
</a>
</li>
<?php
endforeach
;
?>
</ul>
<div
class=
"tab-content content-box tab-content"
>
<?php
foreach
(
$data_tabs
as
$i
=>
$tabname
)
:?>
<
div
id
=
"<?=
$tabname
;?>"
class
="
tab
-
pane
fade
in
<?=
$i
==
0
?
'active'
:
''
;
?>
">
<div
class=
"container-fluid"
>
<pre
id=
"data_
<?=
$tabname
;
?>
"
class=
"pre-scrollable"
>
<?=
gettext
(
"Gathering PF information, please wait..."
);
?>
</pre>
</div>
</div>
<?php
endforeach
;
?>
</div>
</section>
</div>
</div>
</section>
<?php
include
(
"foot.inc"
);
?>
src/www/diag_states_summary.php
View file @
4a2943f7
This diff is collapsed.
Click to expand it.
src/www/diag_system_pftop.php
View file @
4a2943f7
This diff is collapsed.
Click to expand it.
src/www/diag_tables.php
View file @
4a2943f7
This diff is collapsed.
Click to expand it.
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