Search Filter question

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Search Filter question

Post by smiles »

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?
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Search Filter question

Post by smiles »

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.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Search Filter question

Post by smiles »

Is there anyone on the Dev team that will consult (even if there are fees involved) on this issue?
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Search Filter question

Post by Osiris »

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.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Search Filter question

Post by smiles »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest