create new tag
, view all tags

PingPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on PingPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on PingPlugin

This is a plugin which can ping an IP/Host using the Net::Ping module.

Currently this takes 3 parameters: host, wait (time to wait for response, defaults to 5s), and format (with a default format). It's a single ping (i.e. I don't foresee adding support for count ). Simple.

One thing I want is to have it handle other plugin variables in the format parameters, like format="$percntCALC{$IF($EXACT($result,1),$host good,$host bad)}$percnt" , but it doesn't (re-)process it. How do I make TWiki re-analyze the data, other than by plugin order? expandCommonVariables only expands common variables smile

-- AaronLWalker - 2012-06-07

I currently only have a single format for the result. Would it be preferable to have a success format and failure format? Then what to do if they only specify one...

-- AaronLWalker - 2012-06-07

If you write format="%CALC{...}%" it will evaluate once before the PING variable, not what you want. If your write format="$percntCALC{...}$percnt", nothing happens because $percnt is not evaluated. That var is resolved case by case, such as in IF's then and else, and in SEARCH'es format. That is, you need to handle that in your plugin explicitly at the end of the format handling.

-- PeterThoeny - 2012-06-07

On multiple formats, how about single format and an onerror parameter? That way users can customize the error message, such as:
onerror="| %RED% $error %ENDCOLOR% |"

-- PeterThoeny - 2012-06-07

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2012-12-02 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.