ASNMTAP

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use strict;

# - - - - - - - - - - UPDATE VERSION EVERY NEW RELEASE: - - - - - - - - -

# Prepare new release ---------------------------------------------------
# copy current release '3.002.003' to '3.002.004'
#                       3.002.xxx      3.001.yyy

# replace 'Version      : 3.002.xxx'  with `3.002.yyy;`

# rename `MANIFEST-3.002.xxx` with `MANIFEST-3.002.yyy.sql`
# rename `asnmtap-3.002.xxx.sql` with `asnmtap-3.002.yyy.sql`

# replace `asnmtap-3.002.xxx` with `asnmtap-3.002.yyy`

# replace `(q$Revision: 3.002.xxx$ =~ /\d+/g)` with `(q$Revision: 3.002.yyy$ =~ /\d+/g)`
# replace `v3.002.xxx;` with `v3.002.yyy;`
# replace `'3.002.xxx'` with `'3.002.yyy'`
# replace ASNMTAP 3.002.xxx postfix; nl-BE; rv:3.002.xxx) Gecko/yyyymmdd with ASNMTAP 3.002.yyy postfix; nl-BE; rv:3.002.yyy) Gecko/2010....

# Upload new release ----------------------------------------------------
# replace 'Latest update: dd month 2011' with 'Latest update: .. ... 2010'

applications/archive.pl  view on Meta::CPAN

        #   if ( $rv ) {
        #     my $mysqlInfo = $dbh->{mysql_info};
        #     my ($records, $deleted, $skipped, $warnings) = ($mysqlInfo =~ /^Records:\s+(\d+)\s+Deleted:\s+(\d+)\s+Skipped:\s+(\d+)\s+Warnings: (\d+)$/);

        #     if ($deleted eq '0' and $skipped eq '0' and $warnings eq '0') {
        #       print EMAILREPORT "S+ LOAD DATA ... : $records record(s) added for $filename\n";
        #       my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
        #       print EMAILREPORT "S+ E R R O R: <$stderr>\n" unless ( $status );
        #     } else {
        #       print EMAILREPORT "S+ LOAD DATA ... WARNING for $filename: $mysqlInfo, <$records> <$deleted> <$skipped> <$warnings>\n";
        #       rename("$path/$filename", "$path/$filename-LOAD-DATA-FAILED");
        #     }
        #   }

        #   $dbh->disconnect or $rv = errorTrapDBI("Sorry, the database was unable to add your entry.", $debug);
        # }

        my $_debug = ( ( $debug eq 'T' ) ? 1 : 0);
        my $dbh = CSV_prepare_table ("$path/", $filename, '', $SERVERTABLEVENTS, \@EVENTS, \%EVENTS, \$logger, $_debug);
        my $rv = CSV_import_from_table (1, $dbh, $SERVERTABLEVENTS, \@EVENTS, 'id', $doForce, \$logger, $_debug);

applications/archive.pl  view on Meta::CPAN

          } else {
            print EMAILREPORT "S+ IMPORT CSV DATA ... OK: ALL records imported from $path/$filename\n";
            my ($status, $stdout, $stderr) = call_system ('gzip --force '.$path.'/'.$filename, $debug);
            print EMAILREPORT "S+ E R R O R: <$stderr>\n" unless ( $status );
          }
        } else {
          if ($debug) {
            print "S- IMPORT CSV DATA ... CRITICAL: ZERO records imported from $path/$filename\n";
          } else {
            print EMAILREPORT "S- IMPORT CSV DATA ... CRITICAL: ZERO records imported from $path/$filename\n";
            rename("$path/$filename", "$path/$filename-LOAD-DATA-FAILED");
          }
        }

        CSV_cleanup_table ($dbh, \$logger, $_debug);
      }
    } elsif ( $staart eq "$command-$catalogID_uKey.sql.gz" ) {
      if ($datum le get_yearMonthDay($removeGzipEpoch)) {
	      if ($debug) {
          print "S- <$datum><", get_yearMonthDay($removeGzipEpoch), "><$path><$filename>\n";
        } else {

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

      printDebugNOK ("    DEPENDENT ----- : $system_action");
    }

    if ($dumphttp ne 'N') {
      my $httpdumpFilenameTmpKnownError = $httpdumpFilenameTmp .'-KnownError';
      unlink ($httpdumpFilenameTmpKnownError) if (-e "$httpdumpFilenameTmpKnownError");

      if ($dumphttp eq 'A' || (($dumphttp eq 'W' or $dumphttp eq 'C' or $dumphttp eq 'U') && $exit_value > 0)) {
        if (-e "$httpdumpFilenameTmp") {
          $debugFilename = $httpdumpFilename .'-'. $dumphttpRename .'.htm';
          rename("$httpdumpFilenameTmp", "$debugFilename");
        }
      } else {
        unlink ($httpdumpFilenameTmp) if (-e "$httpdumpFilenameTmp");
      }
    }
  } else {
    $action = 'Failed';
    $dumphttpRename = 'UNKNOWN';
    printDebugAll ("    call_system --- : $system_action: <$exit_value><$signal_num><$dumped_core><$stderr>");
    printDebugNOK ("    call_system --- : $system_action: <$exit_value><$signal_num><$dumped_core><$stderr>");

applications/collector.pl  view on Meta::CPAN

      printDebugNOK ("    DEPENDENT ----- : $system_action");
    }

    if ($dumphttp ne 'N') {
      my $httpdumpFilenameTmpKnownError = $httpdumpFilenameTmp .'-KnownError';
      unlink ($httpdumpFilenameTmpKnownError) if (-e "$httpdumpFilenameTmpKnownError");

      if ($dumphttp eq 'A' || (($dumphttp eq 'W' or $dumphttp eq 'C' or $dumphttp eq 'U') && $exit_value > 0)) {
        if (-e "$httpdumpFilenameTmp") {
          $debugFilename = $httpdumpFilename .'-'. $dumphttpRename .'.htm';
          rename("$httpdumpFilenameTmp", "$debugFilename");
        }
      } else {
        unlink ($httpdumpFilenameTmp) if (-e "$httpdumpFilenameTmp");
      }
    }
  } else {
    $action = 'Failed';
    $dumphttpRename = 'UNKNOWN';
    printDebugAll ("    call_system --- : $system_action: <$exit_value><$signal_num><$dumped_core><$stderr>");
    printDebugNOK ("    call_system --- : $system_action: <$exit_value><$signal_num><$dumped_core><$stderr>");

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


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

  printStatusHeader('', $configNumber, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $playSoundStatus);

  printStatusFooter('', $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $playSoundStatus);

  printHtmlFooter('');

  close(HTML);
  rename("$htmlOutput.tmp", "$htmlOutput.html") if (-e "$htmlOutput.tmp");

  close(HTMLCV);
  rename("$htmlOutput-cv.tmp", "$htmlOutput-cv.html") if (-e "$htmlOutput-cv.tmp");

  close(HTMLMCV);
  rename("$htmlOutput-mcv.tmp", "$htmlOutput-mcv.html") if (-e "$htmlOutput-mcv.tmp");
}

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

sub signal_DIE {
  #print "kill -DIE <$PROGNAME v$version -C $checklist> pid: <$pidfile><", get_datetimeSignal(), ">\n";
}

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

applications/display.pl  view on Meta::CPAN


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

  printStatusHeader('', $configNumber, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $playSoundStatus);

  printStatusFooter('', $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $playSoundStatus);

  printHtmlFooter('');

  close(HTML);
  rename("$htmlOutput.tmp", "$htmlOutput.html") if (-e "$htmlOutput.tmp");

  close(HTMLCV);
  rename("$htmlOutput-cv.tmp", "$htmlOutput-cv.html") if (-e "$htmlOutput-cv.tmp");

  close(HTMLMCV);
  rename("$htmlOutput-mcv.tmp", "$htmlOutput-mcv.html") if (-e "$htmlOutput-mcv.tmp");
}

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

sub signal_DIE {
  #print "kill -DIE <$PROGNAME v$version -C $checklist> pid: <$pidfile><", get_datetimeSignal(), ">\n";
}

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

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

=over 4

=item log4perl.cnf

General configuration file for the log4perl integration for the ASNMTAP Applications

=over 4

=item HTML to PDF

For testing HTML to PDF you can rename /opt/asnmtap/applications/htmlroot/img/logos/bodyimage.gif-orig to /opt/asnmtap/applications/htmlroot/img/logos/bodyimage.gif

You can lateron copy your wanted bodyimage picture to /opt/asnmtap/applications/htmlroot/img/logos/bodyimage.gif or you can change te parameter <COMMON><HTMLTOPDF>OPTIONS into the Applications.cnf config file.

 <COMMON>
   <HTMLTOPDF>
     OPTIONS --bodyimage /opt/asnmtap/applications/htmlroot/img/logos/bodyimage.gif --charset iso-8859-1 --format pdf14 --size A4 --landscape --browserwidth 1280 --top 10mm --bottom 10mm --left 10mm --right 10mm --fontsize 10.0 --fontspacing 1.2 --he...
   </HTMLTOPDF>
 </COMMON>

If you change the --bodyimage parameter, don't forget also to change the same parameter into the file /opt/asnmtap/applications/htmlroot/cgi-bin/htmldoc.sh for the on the fly HTML to PDF generating.

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

    return $url;
  } else {
    return '';
  }
}

# Destructor  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub DESTROY { 
  print (ref ($_[0]), "::DESTROY: ()\n") if ( ${$_[0]->{asnmtapInherited}}->getOptionsValue ( 'debug' ) );
  rename ( $_[0]->{_KnownError}, $_[0]->{_KnownError} .'-KnownError' ) if ( defined $_[0]->{_KnownError} and ! $_[0]->{_unknownErrors} );
  ${$_[0]->{asnmtapInherited}}->appendPerformanceData ( "'url timing retries'=". $_[0]->{_timing_tries} .';;;;' );
}

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

1;

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

__END__



( run in 0.498 second using v1.01-cache-2.11-cpan-e9daa2b36ef )