Filter by VLAN in Pors with Multiple Nodes report

This commit is contained in:
Oliver Gorwits
2015-10-04 19:58:01 +01:00
parent a268ad1674
commit 98165b75c3
3 changed files with 18 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2.033003 - 2015-10-04
[ENHANCEMENTS]
* Filter by VLAN in Pors with Multiple Nodes report
2.033002 - 2015-09-29
[ENHANCEMENTS]

View File

@@ -17,6 +17,8 @@ register_report(
get '/ajax/content/report/portmultinodes' => require_login sub {
my @results = schema('netdisco')->resultset('Device')->search(
{ 'ports.remote_ip' => undef,
(param('vlan') ?
('ports.vlan' => param('vlan'), 'nodes.vlan' => param('vlan')) : ()),
'nodes.active' => 1,
'wireless.port' => undef
},

View File

@@ -0,0 +1,10 @@
<div class="clearfix nd_netmap-sidebar">
<em class="muted nd_sidebar-label">Filter by VLAN:</em><br/>
<input id="nd_port-query" placeholder="" type="number"
name="vlan" value="[% params.vlan | html_entity %]" type="text"
rel="tooltip" data-placement="left" data-offset="5" data-title="VLAN"/>
</div>
<button id="[% tab.tag %]_submit" type="submit" class="btn btn-info">
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Ports</button>