5 =head1 NAME $RCSfile: index.cgi,v $
7 Clearadm: Portal to your Clearcase Infrastructure
15 Andrew DeFaria <Andrew@ClearSCM.com>
23 Mon Oct 25 11:10:47 PDT 2008
27 $Date: 2011/02/14 14:50:48 $
33 Clearadm is a web based portal into your Clearcase infrastucture. It seeks to
34 provide your CM staff with an easy to use, yet informative interface to locate,
35 report on and monitor various aspects of the Clearcase infrastructure.
45 use CGI qw(:standard *table start_Tr end_Tr);
46 use CGI::Carp 'fatalsToBrowser';
49 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
58 my $clearadm = Clearadm->new;
62 'usage' => sub { Usage },
63 'verbose' => sub { set_verbose },
64 'debug' => sub { set_debug },
65 ) or Usage "Invalid parameter";
68 verbose "$ClearadmWeb::APPNAME V$ClearadmWeb::VERSION";
74 Clearadm is a web based portal into your infrastructure. It seeks to provide
75 your system administrative staff with an easy to use, yet informative interface
76 to locate, report on and monitor various aspects of your infrastructure.
79 Additionally, Clearacdm is aware of Clearcase servers as well as Clearcase
80 objects such as views, vobs, etc. When systems are added to Clearadm that house
81 or server Clearcase objects, additional information is collected about those
85 display h1 {class => 'center'}, 'Systems Snapshot';
87 display start_table {cellspacing => 1};
94 my @systems = $clearadm->FindSystem;
96 $perRow = @systems if @systems < $perRow;
101 if ($i++ % $perRow == 0) {
106 my %load = $clearadm->GetLatestLoadavg ($system{name});
110 $data = '<strike>' if $system{active} eq 'false';
113 href => "systemdetails.cgi?system=$system{name}"
114 }, ucfirst $system{name};
116 if ($system{notification}) {
117 $data .= ' ' . a {
118 href => "alertlog.cgi?system=$system{name}"}, img {
122 title => 'This system has alerts',
126 my $image = $system{loadavgsmall}
127 ? "data:image/png;base64,$system{loadavgsmall}"
128 : "plotloadavg.cgi?system=$system{name}&tiny=1";
132 "plot.cgi?type=loadavg&system=$system{name}&scaling=Hour&points=24"
138 $data .= '</strike>' if $system{active} eq 'false';
140 $load{uptime} ||= 'Unknown';
142 display td {class => 'dataCentered'}, "$data ",
143 font {class => 'dim' }, "<br>Up: $load{uptime}";
146 while ($i % $perRow != 0) {
148 display td {class => 'data'}, ' ';
159 =head1 CONFIGURATION AND ENVIRONMENT
161 DEBUG: If set then $debug is set to this level.
163 VERBOSE: If set then $verbose is set to this level.
165 TRACE: If set then $trace is set to this level.
173 L<CGI::Carp|CGI::Carp>
177 L<Getopt::Long|Getopt::Long>
179 =head2 ClearSCM Perl Modules
193 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/Clearadm.pm">Clearadm</a><br>
194 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/ClearadmWeb.pm">ClearadmWeb</a><br>
195 <a href="http://clearscm.com/php/scm_man.php?file=lib/Display.pm">Display</a><br>
196 <a href="http://clearscm.com/php/scm_man.php?file=lib/Utils.pm">Utils</a><br>
201 =head1 BUGS AND LIMITATIONS
203 There are no known bugs in this script
205 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
207 =head1 LICENSE AND COPYRIGHT
209 Copyright (c) 2010, ClearSCM, Inc. All rights reserved.