Device Port filter by vlan includes both tagging and untagged

This commit is contained in:
Oliver Gorwits
2013-01-29 21:31:49 +00:00
parent 4f8105a109
commit 782084a8fa
2 changed files with 10 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2.004001 - 2013-01-29 2.004001 - 2013-01-29
[ENHANCEMENTS]
* Device Port filter by vlan includes both tagging and untagged (closes #37)
[BUG FIXES] [BUG FIXES]
* No longer prompt for demo/demo credentials (closes #38) (J. Binks) * No longer prompt for demo/demo credentials (closes #38) (J. Binks)

View File

@@ -197,7 +197,12 @@ ajax '/ajax/content/device/ports' => sub {
my $q = param('f'); my $q = param('f');
if ($q) { if ($q) {
if ($q =~ m/^\d+$/) { if ($q =~ m/^\d+$/) {
$set = $set->search({'me.vlan' => $q}); $set = $set->search({
-or => {
'me.vlan' => $q,
'port_vlans_tagged.vlan' => $q,
},
}, { join => 'port_vlans_tagged' });
return unless $set->count; return unless $set->count;
} }
else { else {