Hi all, love this plugin TheWitness! I made a little mod to it though that I thought I'd share.
With some of my switches (okay, probably all of my switches) I run multiple VLANs on them. Sometime I want information on just a particular VLAN for a site or a switch. MAC Track has all that information so I took a stab a modifying the code to help me filter for a VLAN and display information about it in the viewer table.
I made some changes to mactrack_view.php
and I think I have it working now. I've included both of the modified files below in the attached .zip file. In the mactrack_view.php I've tagged most of the changes with "//VLAN changes start" and "//VLAN changes end" so you can see where I made changes (or just look for every instance of "m_vlan_id" which is the session variable I use). I marked the changes in html/inc_mactrack_view_site_filter_table.php with some HTML comments (just look for "VLAN" and it'll take you to the area I added stuff).
Now my display has a VLAN filter drop-down list in it (highlighted in the image below),
And when I choose a VLAN the table updates and filter's the display (as shown below),
One thing that I think I'm going to do is alter the mac_track_ports table to index both the vlan_id and vlan_name rows to help speed up the creation of the drop-down list. But I really HATE modifying database tables just in case the changes I make screw up future usability.
Not sure if anyone else will find this mod useful, but I thought I'd share it anyway.