ASNMTAP

 view release on metacpan or  search on metacpan

AUTHORS  view on Meta::CPAN



# FEATURE REQUEST - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Yves Van den Hove <yvdhove@users.sourceforge.net>
  * 1727568 Bij wisselen omgeving op dezelfde pagina blijven.
  * 1725445 Groeperen Mails
  * 1768193 PDF issues with Adobe Acrobat 8
  * 1768190 Please filter out the passwords from the HTML dump files for J2EE based Applications
  * 1724056 Timeout for Webtransact
  * 1706596 Collapse error summary


Tom De Clercq <tomsworld@users.sourceforge.net> 
  * 1507255 Detailed Statistics and Report Generation - output


# CONTRIBUTORS  - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

applications/display-test.pl  view on Meta::CPAN

  } elsif ($statusMessage =~ /403 Forbidden Connection/ ) {
    $errorMessage = 'The server understood the request, but is refusing to fulfill it. Access to a resource is not allowed. The most frequent case of this occurs when directory listing access is not allowed';
  } elsif ($statusMessage =~ /404 Page Not Found/ ) {
    $errorMessage = 'The resource request was not found. This is the code returned for missing pages or graphics. Viruses will often attempt to access resources that do not exist, so the error does not necessarily represent a problem';
  } elsif ($statusMessage =~ /405 Method Not Allowed/ ) {
    $errorMessage = 'The access method (GET, POST, HEAD) is not allowed on this resource';
  } elsif ($statusMessage =~ /406 Not Acceptable/ ) {
    $errorMessage = 'None of the acceptable file types (as requested by client) are available for this resource';
  } elsif ($statusMessage =~ /407 Proxy Authentication Required/ ) {
    $errorMessage = 'The client does not have access to this resource, proxy authorization is needed';
  } elsif ($statusMessage =~ /408 Request Timeout/ ) {
    $errorMessage = 'The client did not send a request within the required time period';
  } elsif ($statusMessage =~ /409 Conflict/ ) {
    $errorMessage = 'The request could not be completed due to a conflict with the current state of the resource';
  } elsif ($statusMessage =~ /410 Gone/ ) {
    $errorMessage = 'The requested resource is no longer available at the server and no forwarding address is known. This condition is similar to 404, except that the 410 error condition is expected to be permanent. Any robot seeing this response sho...
  } elsif ($statusMessage =~ /411 Length Required/ ) {
    $errorMessage = 'The request requires the Content-Length HTTP request field to be specified';
  } elsif ($statusMessage =~ /412 Precondition Failed/ ) {
    $errorMessage = 'The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server';
  } elsif ($statusMessage =~ /413 Request Entity Too Large/ ) {

applications/htmlroot/JSFX_Fireworks.js  view on Meta::CPAN

{
	JSFX.FireworkDisplay.Fireworks = new Array();
	JSFX.FireworkDisplay.running = true;

	JSFX.FireworkDisplay.loadImages();

	var i=0;
	for(i=0 ; i<numFireworks; i++)
		JSFX.FireworkDisplay.Fireworks[i]=new JSFX.Firework(i, JSFX.FireworkDisplay.fwImages);

	setTimeout("JSFX.FireworkDisplay.animate()", 30 );
}
JSFX.FireworkDisplay.loadImages = function()
{
	var i;
	JSFX.FireworkDisplay.fwImages = new Array();

	for(i=0 ; i<21 ; i++)
	{
		JSFX.FireworkDisplay.fwImages[i] = new Image();
		JSFX.FireworkDisplay.fwImages[i].src = "/asnmtap/img/fw0/"+i+".gif"
	}
}
JSFX.FireworkDisplay.animate = function()
{
	var i;
	for(i=0 ; i<JSFX.FireworkDisplay.Fireworks.length ; i++)
		JSFX.FireworkDisplay.Fireworks[i].animate();

	setTimeout("JSFX.FireworkDisplay.animate()", 30);
}
/*
 * End Class FireworkDisplay
 */

/*
 * Class Firework extends Layer
 */
JSFX.Firework = function(fwNo, theImages)
{

applications/htmlroot/JSFX_Fireworks2.js  view on Meta::CPAN

{
	JSFX.FireworkDisplay2.Fireworks = new Array();
	JSFX.FireworkDisplay2.running = true;

	JSFX.FireworkDisplay2.loadImages();

	var i=0;
	for(i=0 ; i<numFireworks; i++)
		JSFX.FireworkDisplay2.Fireworks[i]=new JSFX.Firework(i, JSFX.FireworkDisplay2.fwImages);

	setTimeout("JSFX.FireworkDisplay2.animate()", 30 );
}
JSFX.FireworkDisplay2.loadImages = function()
{
	var i;
	JSFX.FireworkDisplay2.fwImages = new Array();

	for(i=0 ; i<21 ; i++)
	{
		JSFX.FireworkDisplay2.fwImages[i] = new Image();
		JSFX.FireworkDisplay2.fwImages[i].src = "/asnmtap/img/fw0/"+i+".gif"
	}
}
JSFX.FireworkDisplay2.animate = function()
{
	var i;
	for(i=0 ; i<JSFX.FireworkDisplay2.Fireworks.length ; i++)
		JSFX.FireworkDisplay2.Fireworks[i].animate();

	setTimeout("JSFX.FireworkDisplay2.animate()", 30);
}
/*
 * End Class FireworkDisplay2
 */

/*
 * Class Firework extends Layer
 */
JSFX.Firework = function(fwNo, theImages)
{

applications/htmlroot/JSFX_Halloween.js  view on Meta::CPAN

} 
/*** END OF CODE FROM JSFX.Browser.js ***/
/*** START OF CODE FROM JSFX.Ghosts.js ***/

JSFX.Halloween = new Object();
JSFX.Halloween.Ghosts = new Array();
JSFX.Halloween.start = function()
{
	if(JSFX.Halloween.theTimer == null)
	{
		JSFX.Halloween.theTimer = setTimeout("JSFX.Halloween.animateAll()", 40);
	}
}
JSFX.Halloween.animateAll = function()
{
	JSFX.Halloween.theTimer = setTimeout("JSFX.Halloween.animateAll()", 40);
	var sp = JSFX.Halloween.Ghosts;
	var i;
	for(i=0 ; i<sp.length ; i++)
	{
		sp[i].animate();
	}

}
JSFX.AddGhost = function(img)
{

applications/htmlroot/JSFX_Layer.js  view on Meta::CPAN

	            return handler(xl, e);
		}
	}
	JSFX.Layer.prototype.removeEventHandler = function(eventName) 
	{
		this.elem[eventName] = null;
	}
}
/*** Event Handling - End ***/
/**************************************************************************/
JSFX.Layer.prototype.setTimeout = function(f, t) 
{
	setTimeout("window."+this.elem.id+"."+f, t);
}

applications/htmlroot/overlib.js  view on Meta::CPAN

	o3_frame = ol_frame;
	
	if(!(over=createDivContainer())) return false;

	parseTokens('o3_', overlib.arguments);
	if (!postParseChecks()) return false;

	if (o3_delay == 0) {
		return runHook("olMain", FREPLACE);
 	} else {
		o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);
		return false;
	}
}

// Clears popups if appropriate
function nd(time) {
	if (olLoaded && !isExclusive()) {
		hideDelay(time);  // delay popup close if time specified

		if (o3_removecounter >= 1) { o3_showingsticky = 0 };

applications/htmlroot/overlib_followscroll.js  view on Meta::CPAN

///////
// SUPPORT ROUTINES FOR SCROLL FEATURE
///////

// Scroller constructor
function Scroller(X,Y,refresh) {
	this.canScroll=0;
	this.refresh=refresh;
	this.x=X;
	this.y=Y;
	this.timer=setTimeout("repositionOver()",this.refresh);
}

// Removes the timer to stop replacing the layer.
function cancelScroll() {
	if (!o3_followscroll || typeof over.scroller == 'undefined') return;
	over.scroller.canScroll = 1;
	
	if (over.scroller.timer) {
		clearTimeout(over.scroller.timer);
		over.scroller.timer=null;
	}
}

// Find out how much we've scrolled.
	function getPageScrollY() {
	if (o3_frame.pageYOffset) return o3_frame.pageYOffset;
	if (eval(docRoot)) return eval('o3_frame.' + docRoot + '.scrollTop');
	return -1;
}

lib/ASNMTAP/Asnmtap/Applications.pm  view on Meta::CPAN


    print $HTML <<EndOfHtml;
    function startRefresh() {
      var pagedir_id = getPageDirCookie( 'pagedir_id_${pageDir}_${environment}' );

      if (pagedir_id == null || pagedir_id == "" || pagedir_id < 0 || pagedir_id > 2) {
        pagedir_id = 0;
        setPageDirCookie ( 'pagedir_id_${pageDir}_${environment}', '$HTTPSURL/nav/$pagedir', pagedir_id, 365 );
      }

      timerID = setTimeout("location.href='$HTTPSURL/nav/$pagedir/index" + pagedir_prefix[pagedir_id] + ".html'", $startRefresh);
      document.body.style.backgroundImage = 'url($IMAGESURL/startRefresh.gif)';
      document.getElementById('refreshID').innerHTML='<A HREF=\"javascript:stopRefresh();\" title=\"Stop Refresh\" alt=\"Stop Refresh\"><img src=\"$IMAGESURL/stop.gif\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0><\\/A>'
    }

    function stopRefresh() {
      clearTimeout(timerID);
      document.body.style.backgroundImage = 'url($IMAGESURL/stopRefresh.gif)';
      document.getElementById('refreshID').innerHTML='<A HREF=\"javascript:startRefresh();\" title=\"Start Refresh\" alt=\"Start Refresh\"><img src=\"$IMAGESURL/start.gif\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0<\\/A>'
    }
EndOfHtml
  }

  print $HTML "  </script>\n";

  if ( $openPngImage eq 'T' ) {
    print $HTML <<EndOfHtml;

lib/ASNMTAP/Asnmtap/Plugins/IO.pm  view on Meta::CPAN


sub scan_socket_info {
  my %defaults = ( asnmtapInherited  => undef,
                   custom            => undef,
                   customArguments   => undef,
                   protocol          => undef,
                   host              => undef,
                   port              => undef,
                   service           => undef,
                   request           => undef,
                   socketTimeout     => undef,
                   timeout           => 10,
                   POP3              => {}
                 );

  my %parms = (%defaults, @_);
  
  my $asnmtapInherited = $parms{asnmtapInherited};
  unless ( defined $asnmtapInherited ) { cluck ( 'ASNMTAP::Asnmtap::Plugins::IO: asnmtapInherited missing' ); exit $ERRORS{UNKNOWN} }

  unless ( defined $parms{protocol} ) {

lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm  view on Meta::CPAN

use constant Field_Refs	=> {
                             Method	        => { is_ref => FALSE, type => ''      },
                             Url            => { is_ref => FALSE, type => ''      },
                             Qs_var	        => { is_ref => TRUE,  type => 'ARRAY' },
                             Qs_fixed	      => { is_ref => TRUE,  type => 'ARRAY' },
                             Exp            => { is_ref => FALSE, type => 'ARRAY' },
                             Exp_Fault	    => { is_ref => FALSE, type => ''      },
                             Exp_Return     => { is_ref => TRUE,  type => 'HASH'  },
                             Msg            => { is_ref => FALSE, type => ''      },
                             Msg_Fault	    => { is_ref => FALSE, type => ''      },
                             Timeout        => { is_ref => FALSE, type => undef   },
                             Perfdata_Label => { is_ref => FALSE, type => undef   }
                           };

my (%returns, %downloaded, $ua);
keys %downloaded = 128;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub _handleHttpdErrors { print "<hr><h1>ASNMTAP::Asnmtap::Plugins::WebTransact It's not a bug, it's a feature!</h1><p>Error: $_[0]</p><hr>"; }

plugins/jUnit/check_jUnit.pl  view on Meta::CPAN


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# End plugin  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

$objectPlugins->exit (7);

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub scan_socket_info_jUnit {
  my ($asnmtapInherited, $protocol, $host, $port, $service, $request, $socketTimeout, $xml, $debug) = @_;

  my ($exit, $result, $action, $socketProtocol);
  $exit   = 0;
  $action = '<NIHIL>';

  print "\nscan_socket_info : <$protocol><$host><$port><$service><$request>\n$xml\n\n" if ($debug >= 2);

  if ($protocol eq 'tcp' || $protocol eq 'udp') { $socketProtocol = $protocol; } else { $socketProtocol = 'tcp'; }

  $SIG{ALRM} = sub { alarm (0); $exit = 1 };
  alarm ( 10 ); $exit = 0;

  use IO::Socket;

  if (defined $socketTimeout) {
    $result = new IO::Socket::INET ('Proto' => $socketProtocol, 'PeerAddr' => $host, 'PeerPort' => $port, 'Timeout' => $socketTimeout);
  } else {
    $result = new IO::Socket::INET ('Proto' => $socketProtocol, 'PeerAddr' => $host, 'PeerPort' => $port);
  }

  if ($result) {
    print "IO::Socket::INET : $result\n" if ($debug >= 2);
  } else {
    print "IO::Socket::INET : <NIHIL>\n" if ($debug >= 2);
    $$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, alert => "Cannot connect to $host:$port" }, $TYPE{APPEND} );
    return ( $ERRORS{UNKNOWN} );

plugins/nagios/templates/check_template-ftp.pl  view on Meta::CPAN


my $timeout = $objectNagios->timeout ();

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Start plugin  - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

my $returnValue = 1;

use Net::FTP;
my $ftp = Net::FTP->new(Host => $host, Timeout => $timeout, Debug => $debug) or $returnValue = errorTrapFTP ("Cannot connect to $host", "$@", $debug);
$ftp->login($username, $password) or $returnValue = errorTrapFTP ('Cannot login', $ftp->message, $debug) if ($returnValue);

if ( $returnValue ) {
  print "You are logged on\n" if ($debug);

  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  # Start plugin  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  # $ftp->cwd ("/test") or $returnValue = errorTrapFTP ("Cannot change to directory", $ftp->message, $debug ) if ($returnValue);

plugins/templates/check_template-IO.pl  view on Meta::CPAN

# Start plugin  - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

my $returnCode = scan_socket_info (
  asnmtapInherited => \$objectPlugins,
  protocol         => $protocol,
  host             => $host,
  port             => $port,
  service          => $service,
  request          => $request,
  socketTimeout    => 5,
  POP3             => {
    username          => $username, 
    password          => $password, 
    serviceReady      =>  "[XMail [0-9.]+ POP3 Server] service ready",
    passwordRequired  => 'Password required for',
    mailMessages      => "Maildrop has [0-9.]+ messages",
    closingSession    =>  "[XMail [0-9.]+ POP3 Server] closing session"
                      }
);

t/Asnmtap/Plugins/IO.t  view on Meta::CPAN

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute username\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::username: Missing attribute username' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username' },
    socketTimeout    => 'timeout'
  );

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute password\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::password: Missing attribute password' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username', password => 'password' },
    socketTimeout    => 'timeout'
  );

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute serviceReady\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::serviceReady: Missing attribute serviceReady' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username', password => 'password', serviceReady => 'serviceReady' },
    socketTimeout    => 'timeout'
  );

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute passwordRequired\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::passwordRequired: Missing attribute passwordRequired' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired' },
    socketTimeout    => 'timeout'
  );

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute mailMessages\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::mailMessages: Missing attribute mailMessages' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired', mailMessages => 'mailMessages' },
    socketTimeout    => 'timeout'
  );

  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute closingSession\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::closingSession: Missing attribute closingSession' );

  $returnCode = scan_socket_info (
    asnmtapInherited => \$objectPlugins,
    protocol         => 'tcp',
    host             => 'smtp.citap.com',
    port             => 110,
    service          => 'pop3',
    POP3             => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired', mailMessages => 'mailMessages', closingSession => 'closingSession' },
    socketTimeout    => 'timeout'
  );
  
  $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QWrong value for attribute socketTimeout: timeout\E/);
  ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::socketTimeout: Wrong value for attribute socketTimeout: timeout' );

  no warnings 'deprecated';
  $objectPlugins->{_pluginValues}->{stateValue} = $ERRORS{OK};
  $objectPlugins->{_pluginValues}->{stateError} = $STATE{$ERRORS{OK}};
  $objectPlugins->exit (0);
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.664 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )