5 =head1 NAME $RCSfile: vobdetails.cgi,v $
15 Andrew DeFaria <Andrew@ClearSCM.com>
23 Mon Oct 25 11:10:47 PDT 2008
27 $Date: 2011/01/14 16:51:58 $
33 Usage vobdetails.cgi: [-u|sage] [-r|egion <region>] -vo|b <vobtag>
37 -u|sage: Displays usage
38 -r|egion <region>: Region to use when looking for the vob
39 -vo|b <vobtag>: Tag of vob to display details for
42 -d|ebug: Output debug messages
46 This script display the details for the given vob
55 use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
56 use CGI::Carp 'fatalsToBrowser';
58 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
69 my $subtitle = 'VOB Details';
71 if ($Clearcase::CC->region) {
72 $opts{region} ||= $Clearcase::CC->region;
74 $opts{region} ||= 'Clearcase not installed';
77 my $VERSION = '$Revision: 1.11 $';
78 ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
80 sub DisplayTable ($) {
83 my $active = ($vob->active) ? 'YES' : 'NO';
84 my $gpath = $vob->gpath;
86 $gpath = font {-class => 'unknown'}, '<no-gpath>'
87 if $gpath eq '<no-gpath>';
95 display th {class => 'label'}, 'Tag:';
96 display td {class => 'data', colspan => 3}, setField $vob->tag;
97 display th {class => 'label'}, 'Server:';
98 display td {class => 'data'}, a {
99 href => 'systemdetails.cgi?system=' . $vob->shost
101 display th {class => 'label'}, 'Region:';
102 display td {class => 'data', colspan => 3}, $vob->region;
106 display th {class => 'label'}, 'Type:';
107 display td {class => 'data', colspan => 3}, $vob->access;
108 display th {class => 'label'}, 'Attributes:';
109 display td {class => 'data'}, $vob->vob_registry_attributes;
110 display th {class => 'label'}, 'Mount Opts:';
111 display td {class => 'data', colspan => 3}, $vob->mopts;
115 display th {class => 'label'}, 'Owner:';
116 display td {class => 'data', colspan => 3}, $vob->owner;
117 display th {class => 'label'}, 'Active:';
118 display td {class => 'data'}, $active;
119 display th {class => 'label'}, 'ACLs Enabled:';
120 display td {class => 'data', colspan => 3}, $vob->aclsEnabled;
124 display th {class => 'label'}, 'Created by:';
125 display td {class => 'data', colspan => 3}, $vob->ownername;
126 display th {class => 'label'}, 'on:';
127 display td {class => 'data'}, $vob->created;
128 display th {class => 'label'}, 'Atomic Checkin:';
129 display td {class => 'data', colspan => 3}, $vob->atomicCheckin;
133 display th {class => 'label'}, 'Comment:';
134 display td {class => 'data', colspan => 5}, $vob->comment;
135 display th {class => 'label'}, 'Schema Version:';
136 display td {class => 'data', colspan => 3}, $vob->schemaVersion;
140 display th {class => 'label'}, 'Global Path:';
141 display td {class => 'data', colspan => 5}, $gpath;
142 display th {class => 'label'}, 'Registry Attributes:';
143 display td {class => 'data', colspan => 3}, $vob->vob_registry_attributes;
147 display th {class => 'label'}, 'Access Path:';
148 display td {class => 'data', colspan => 5}, $vob->access_path;
149 display th {class => 'label'}, 'Group:';
150 display td {class => 'data', colspan => 3}, $vob->group;
154 display th {class => 'label'}, 'Family UUID:';
155 display td {class => 'data', colspan => 5}, $vob->family_uuid;
156 display th {class => 'label'}, 'Remote Privilage:';
157 display td {class => 'data', colspan => 3}, $vob->remotePrivilege;
161 display th {class => 'label'}, 'Replica UUID:';
162 display td {class => 'data', colspan => 5}, $vob->replica_uuid;
163 display th {class => 'label'}, 'Master Replica:';
164 display td {class => 'data', colspan => 3}, $vob->masterReplica;
167 my $groups = join "<br>", $vob->groups;
170 display th {class => 'label'}, 'Groups:';
171 display td {class => 'data', colspan => 10}, $groups;
174 my %attributes = $vob->attributes;
177 for (keys %attributes) {
178 $attributes .= "$_ = $attributes{$_}<br>";
182 display th {class => 'label'}, 'Attributes:';
183 display td {class => 'data', colspan => 10}, $attributes;
186 my %hyperlinks = $vob->hyperlinks;
189 for (keys %hyperlinks) {
190 $hyperlinks .= "$_ = $hyperlinks{$_}<br>";
194 display th {class => 'label'}, 'Hyperlinks:';
195 display td {class => 'data', colspan => 10}, $hyperlinks;
199 display th {class => 'labelCentered', colspan => 10}, 'VOB Storage Pools';
203 display th {class => 'label'}, 'Admin:';
204 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
205 "plot.cgi?type=vob&storage=admin&scaling=Hour&points=24&tag=" . $vob->tag
207 src => "plotstorage.cgi?type=vob&storage=admin&tiny=1&tag=" . $vob->tag,
210 display th {class => 'label'}, 'Source Size:';
211 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
212 "plot.cgi?type=vob&storage=source&scaling=Hour&points=24&tag=" . $vob->tag
214 src => "plotstorage.cgi?type=vob&storage=source&tiny=1&tag=" . $vob->tag,
220 display th {class => 'label'}, 'Database:';
221 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
222 "plot.cgi?type=vob&storage=db&scaling=Hour&points=24&tag=" . $vob->tag
224 src => "plotstorage.cgi?type=vob&storage=db&tiny=1&tag=" . $vob->tag,
227 display th {class => 'label'}, 'Derived Obj:';
228 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
229 "plot.cgi?type=vob&storage=derivedobj&scaling=Hour&points=24&tag=" . $vob->tag
231 src => "plotstorage.cgi?type=vob&storage=derivedobj&tiny=1&tag=" . $vob->tag,
237 display th {class => 'label'}, 'Cleartext:';
238 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
239 "plot.cgi?type=vob&storage=cleartext&scaling=Hour&points=24&tag=" . $vob->tag
241 src => "plotstorage.cgi?type=vob&storage=cleartext&tiny=1&tag=" . $vob->tag,
244 display th {class => 'label'}, 'Total Size:';
245 display td {class => 'data', colspan => 4, align => 'center'}, a {href =>
246 "plot.cgi?type=vob&storage=total&scaling=Hour&points=24&tag=" . $vob->tag
248 src => "plotstorage.cgi?type=vob&storage=total&tiny=1&tag=" . $vob->tag,
259 display start_form (action => 'vobdetails.cgi');
263 my ($defaultRegion, @regions) = ('', ('Clearcase not installed'));
267 -values => [@regions],
268 -default => $defaultRegion,
269 -onchange => 'submit();',
284 my @vobs = Clearcase::Vobs->new ($region);
287 push @vobs, 'No VOBs';
290 display start_form (action => 'vobdetails.cgi');
296 -values => [$Clearcase::CC->regions],
298 -onchange => 'submit();',
306 -onchange => 'submit();',
321 'usage' => sub { Usage },
322 'verbose' => sub { set_verbose },
323 'debug' => sub { set_debug },
326 ) or Usage "Invalid parameter";
329 verbose "$FindBin::Script v$VERSION";
337 unless ($opts{tag}) {
338 unless ($opts{region}) {
341 DisplayVobs $opts{region};
347 my $vob = Clearcase::Vob->new ($opts{tag}, $opts{region});
355 =head1 CONFIGURATION AND ENVIRONMENT
357 DEBUG: If set then $debug is set to this level.
359 VERBOSE: If set then $verbose is set to this level.
361 TRACE: If set then $trace is set to this level.
369 L<CGI::Carp|CGI::Carp>
373 L<Getopt::Long|Getopt::Long>
375 =head2 ClearSCM Perl Modules
391 <a href="http://clearscm.com/php/scm_man.php?file=clearadm/lib/ClearadmWeb.pm">ClearadmWeb</a><br>
392 <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase.pm">Clearcase</a><br>
393 <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase/View.pm">Clearcase::View</a><br>
394 <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase/Views.pm">Clearcase::Views</a><br>
395 <a href="http://clearscm.com/php/scm_man.php?file=lib/Display.pm">Display</a><br>
396 <a href="http://clearscm.com/php/scm_man.php?file=lib/Utils.pm">Utils</a><br>
401 =head1 BUGS AND LIMITATIONS
403 There are no known bugs in this script
405 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
407 =head1 LICENSE AND COPYRIGHT
409 Copyright (c) 2010, ClearSCM, Inc. All rights reserved.