Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Aug 19, 2017 11:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Search Filter question
PostPosted: Fri Jan 13, 2017 1:17 pm 
Offline
Cacti User

Joined: Mon Sep 10, 2012 5:54 pm
Posts: 64
I have written a plugin using syslog plugin by cigamit as a reference. It contains the javascript filter functions (for searching based on user text input), and also some additional filtering based on dropdown selections.

Both of the filters work independently, but when I try to use the cacti nav bar functionality (browsing record pages next and prev), I lose my dropdown filter criteria. How do I tie them together? The javascript filter and the built in cacti form submissions?


Top
 Profile  
 
 Post subject: Re: Search Filter question
PostPosted: Wed Feb 22, 2017 3:28 pm 
Offline
Cacti User

Joined: Mon Sep 10, 2012 5:54 pm
Posts: 64
Still haven't been able to figure out how to reliably pass the filter criteria between the php and javascript.

Any help would be appreciated.


Top
 Profile  
 
 Post subject: Re: Search Filter question
PostPosted: Wed Mar 08, 2017 10:55 am 
Offline
Cacti User

Joined: Mon Sep 10, 2012 5:54 pm
Posts: 64
Is there anyone on the Dev team that will consult (even if there are fees involved) on this issue?


Top
 Profile  
 
 Post subject: Re: Search Filter question
PostPosted: Sat Mar 11, 2017 9:08 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 479
Review cdef.php. there is a function filter_vars() that will remember previous settings. There are examples everywhere on how it works.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Search Filter question
PostPosted: Tue Apr 04, 2017 4:07 pm 
Offline
Cacti User

Joined: Mon Sep 10, 2012 5:54 pm
Posts: 64
Understanding the functions "api_plugin_hook_function" and "validate_store_request_vars" was the key. I have this all working now.

Thanks to cigamit for the write-up on Plugin Migration steps here https://github.com/Cacti/cacti/wiki/PluginMigration


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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