Display error message on graphs_action_execute

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
matej_v
Posts: 29
Joined: Thu Feb 12, 2009 3:02 pm
Location: Slovenia

Display error message on graphs_action_execute

Post by matej_v »

I'm writing a plugin that uses graphs_action_prepare and graphs_action_execute hooks. Is there a way to display an error message to the user on graphs.php page if my plugin encounters an error in graphs_action_execute?

I was looking at a couple plugins that use these hook (mainly Aggregate), but there any errors go only to Cacti log file with no indication to the user, that something went wrong.

Any help would be greatly appreciated.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please see latest AGGREGATE 0.7. That's the best you can achieve for now. And yes, I'd like to improve this part as well
Reinhard
matej_v
Posts: 29
Joined: Thu Feb 12, 2009 3:02 pm
Location: Slovenia

Post by matej_v »

OK, I figured it out thanks to your hint. For future reference: basically you need to set

Code: Select all

$_SESSION["sess_messages"]

in your code. This can also be done by function form_input_validate as is done in Aggregate plugin.

Thanks for your help gandalf.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests