5 =head1 NAME $RCSfile: deletealertlog.cgi,v $
7 Delete alertlog entries
15 Andrew DeFaria <Andrew@ClearSCM.com>
23 Mon Oct 25 11:10:47 PDT 2008
27 $Date: 2011/02/02 16:50:27 $
33 Usage deletealertlog.cgi: [-u|sage] [-ve|rbose] [-d|ebug]
37 -u|sage: Displays usage
39 -d|ebug: Output debug messages
41 alertlogid: Alertlog ID to delete or 'all' to clear the alertlog.
45 This script deletes alertlog entries.
54 use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
55 use CGI::Carp 'fatalsToBrowser';
57 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
64 my $VERSION = '$Revision: 1.2 $';
65 ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
71 usage => sub { Usage },
72 verbose => sub { set_verbose },
73 debug => sub { set_debug },
74 ) or Usage 'Invalid parameter';
77 verbose "$FindBin::Script v$VERSION";
79 $clearadm = Clearadm->new;
83 my $title = 'Alert Log';
87 my ($err, $msg) = $clearadm->DeleteAlertlog ($opts{alertlogid});
89 display h1 {class => 'center'}, $title;
91 if ($msg eq 'Records deleted') {
93 display h3 {class => 'center'}, "Cleared all alertlog entries";
95 display h3 {class => 'center'}, "Deleted alertlog record";
98 displayAlertlog (%opts);
100 displayError "Unable to delete alertlog entry (Status: $err)<br>$msg";
107 =head1 CONFIGURATION AND ENVIRONMENT
109 DEBUG: If set then $debug is set to this level.
111 VERBOSE: If set then $verbose is set to this level.
113 TRACE: If set then $trace is set to this level.
121 L<CGI::Carp|CGI::Carp>
125 L<Getopt::Long|Getopt::Long>
127 =head2 ClearSCM Perl Modules
141 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/Clearadm.pm">Clearadm</a><br>
142 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/ClearadmWeb.pm">ClearadmWeb</a><br>
143 <a href="http://clearscm.com/php/scm_man.php?file=lib/Display.pm">Display</a><br>
144 <a href="http://clearscm.com/php/scm_man.php?file=lib/Utils.pm">Utils</a><br>
149 =head1 BUGS AND LIMITATIONS
151 There are no known bugs in this script
153 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
155 =head1 LICENSE AND COPYRIGHT
157 Copyright (c) 2010, ClearSCM, Inc. All rights reserved.