Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Aug 16, 2017 10:35 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [FC] MAC Track MOD: VLAN Filter
PostPosted: Sat Jan 06, 2007 2:24 am 
Offline
Cacti User

Joined: Sun May 29, 2005 7:34 pm
Posts: 173
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 html/inc_mactrack_view_site_filter_table.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),
Image

And when I choose a VLAN the table updates and filter's the display (as shown below),
Image

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.


Attachments:
File comment: MAC Track VLAN Filter MOD files
mactrack_vlan_filter_mod.zip [9.39 KiB]
Downloaded 330 times
Top
 Profile  
 
 Post subject: Appreciated
PostPosted: Mon Jan 08, 2007 10:00 am 
Offline
Cacti User

Joined: Tue Dec 19, 2006 4:35 pm
Posts: 59
Little "mods" like these are always useful :-) Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 8:12 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
This is Done!! in SVN.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 8:58 am 
Offline

Joined: Thu Nov 02, 2006 3:10 am
Posts: 22
Hi Witness, when will be available new version of MAC Track ?

_________________
David


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 9:40 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
I have 3 major features to write and am taking Device Type exports from users who have extended the interface. However, I am keeping the SVN fully operational for new features.

You can take snapshots. I have and will not touch scanning functions at this point, I am only adding UI feature and new functionality to go along with the existing data, so you should be safe.

However, you MUST be at Cacti 0.8.6i in order to take the SVN version.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 10:09 am 
Offline
Cacti User

Joined: Sun May 29, 2005 7:34 pm
Posts: 173
TheWitness wrote:
This is Done!! in SVN.

TheWitness
Was this in SVN before my post, if so sorry about that. I don't typically look at the SVN versions. I suppose I should.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 10:11 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Yes.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: [FC] MAC Track MOD: VLAN Filter
PostPosted: Fri Mar 10, 2017 3:30 pm 
Offline
Cacti User
User avatar

Joined: Tue Sep 12, 2006 3:06 am
Posts: 116
But still is not available in the stable version of branch 0.8.7x/0.8.8x... :( maybe I'm wrong, but I haven't seen it. :roll:
I've noticed the presence of the mac_track_vlan table and digged into the Cacti forum, finding out this post... funny enough, I hade to write a script by myself in order to retrieve all the vlans from the switchs; I've never wasted that time if I knew that mactrack already had this hidden functionality... :-?

I'm quite sure most of the mactrack users would find it very useful. :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group