Improve VLAN Inventory performance and show all VLANs (C. Stromsoe)
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2.027005 - 2014-05-15
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* Improve VLAN Inventory performance and show all VLANs (C. Stromsoe)
|
||||||
|
|
||||||
2.027004 - 2014-05-15
|
2.027004 - 2014-05-15
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|||||||
@@ -16,19 +16,19 @@ register_report(
|
|||||||
|
|
||||||
get '/ajax/content/report/vlaninventory' => require_login sub {
|
get '/ajax/content/report/vlaninventory' => require_login sub {
|
||||||
my $set = schema('netdisco')->resultset('DeviceVlan')->search(
|
my $set = schema('netdisco')->resultset('DeviceVlan')->search(
|
||||||
{ 'vlan.description' => { '!=', 'NULL' } },
|
{ 'me.description' => { '!=', 'NULL' } },
|
||||||
{ join => { 'ports' => 'vlan' },
|
{ join => { 'ports' => 'vlan' },
|
||||||
select => [
|
select => [
|
||||||
'vlan.vlan',
|
'me.vlan',
|
||||||
'vlan.description',
|
'me.description',
|
||||||
{ count => { distinct => 'ports.ip' } },
|
{ count => { distinct => 'ports.ip' } },
|
||||||
{ count => 'ports.vlan' }
|
{ count => 'ports.vlan' }
|
||||||
],
|
],
|
||||||
as => [qw/ vlan description dcount pcount /],
|
as => [qw/ vlan description dcount pcount /],
|
||||||
group_by => [qw/ vlan.vlan vlan.description /],
|
group_by => [qw/ me.vlan me.description /],
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return unless $set->count;
|
return unless $set->has_rows;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
template 'ajax/report/vlaninventory.tt', { results => $set, },
|
template 'ajax/report/vlaninventory.tt', { results => $set, },
|
||||||
|
|||||||
Reference in New Issue
Block a user