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
f40a9f73
Commit
f40a9f73
authored
Apr 19, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(network insight) add multiple filter support
parent
77944999
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
NetworkinsightController.php
...ers/OPNsense/Diagnostics/Api/NetworkinsightController.php
+12
-1
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/NetworkinsightController.php
View file @
f40a9f73
...
@@ -141,7 +141,18 @@ class NetworkinsightController extends ApiControllerBase
...
@@ -141,7 +141,18 @@ class NetworkinsightController extends ApiControllerBase
$result
=
array
();
$result
=
array
();
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
get
(
"filter_field"
)
!=
null
&&
$this
->
request
->
get
(
"filter_value"
)
!=
null
)
{
if
(
$this
->
request
->
get
(
"filter_field"
)
!=
null
&&
$this
->
request
->
get
(
"filter_value"
)
!=
null
)
{
$data_filter
=
$this
->
request
->
get
(
"filter_field"
)
.
"="
.
$this
->
request
->
get
(
"filter_value"
);
$filter_fields
=
explode
(
','
,
$this
->
request
->
get
(
"filter_field"
));
$filter_values
=
explode
(
','
,
$this
->
request
->
get
(
"filter_value"
));
$data_filter
=
""
;
foreach
(
$filter_fields
as
$field_indx
=>
$filter_field
)
{
if
(
$data_filter
!=
''
)
{
$data_filter
.=
','
;
}
if
(
isset
(
$filter_values
[
$field_indx
]))
{
$data_filter
.=
$filter_field
.
'='
.
$filter_values
[
$field_indx
]
;
}
}
$data_filter
=
"'
{
$data_filter
}
'"
;
}
else
{
}
else
{
// no filter, empty parameter
// no filter, empty parameter
$data_filter
=
"''"
;
$data_filter
=
"''"
;
...
...
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