X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=clearadm%2Fvobdetails.cgi;h=0fc968e811c37f53dfaf2a543627cfeda08d4e20;hb=HEAD;hp=89a38d681dbd52756d97ea5efea9308b588ad891;hpb=0c802537ec02d6cfea4c41b3138535c09a319489;p=clearscm.git diff --git a/clearadm/vobdetails.cgi b/clearadm/vobdetails.cgi index 89a38d6..0fc968e 100755 --- a/clearadm/vobdetails.cgi +++ b/clearadm/vobdetails.cgi @@ -52,11 +52,12 @@ use warnings; use FindBin; use Getopt::Long; -use CGI qw (:standard :cgi-lib *table start_Tr end_Tr); +use CGI qw(:standard :cgi-lib *table start_Tr end_Tr); use CGI::Carp 'fatalsToBrowser'; use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib"; +use Clearadm; use ClearadmWeb; use Clearcase; use Clearcase::Vob; @@ -77,7 +78,7 @@ if ($Clearcase::CC->region) { my $VERSION = '$Revision: 1.11 $'; ($VERSION) = ($VERSION =~ /\$Revision: (.*) /); -sub DisplayTable ($) { +sub DisplayTable($) { my ($vob) = @_; my $active = ($vob->active) ? 'YES' : 'NO'; @@ -91,6 +92,10 @@ sub DisplayTable ($) { -class => 'main', }; + my $clearadm = Clearadm->new; + + my %clearadmvob = $clearadm->GetVob($vob->tag, $vob->region); + display start_Tr; display th {class => 'label'}, 'Tag:'; display td {class => 'data', colspan => 3}, setField $vob->tag; @@ -199,53 +204,80 @@ sub DisplayTable ($) { display th {class => 'labelCentered', colspan => 10}, 'VOB Storage Pools'; display end_Tr; + my $image = $clearadmvob{adminsmall} + ? "data:image/png;base64,$clearadmvob{adminsmall}" + : "plotstorage.cgi?type=vob&storage=admin&tiny=1&tag=" . $vob->tag; + display start_Tr; display th {class => 'label'}, 'Admin:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=admin&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=admin&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=admin&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; + + $image = $clearadmvob{sourcesmall} + ? "data:image/png;base64,$clearadmvob{sourcesmall}" + : 'plotstorage.cgi?type=vob&storage=source&tiny=1®ion=' . $vob->region . '&tag=' . $vob->tag; + display th {class => 'label'}, 'Source Size:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=source&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=source&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=source&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; display end_Tr; display start_Tr; + $image = $clearadmvob{dbsmall} + ? "data:image/png;base64,$clearadmvob{dbsmall}" + : 'plotstorage.cgi?type=vob&storage=db&tiny=1®ion=' . $vob->region . '&tag=' . $vob->tag; + display th {class => 'label'}, 'Database:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=db&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=db&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=db&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; + + $image = $clearadmvob{derivedobjsmall} + ? "data:image/png;base64,$clearadmvob{derivedobjsmall}" + : 'plotstorage.cgi?type=vob&storage=derivedobj&tiny=1®ion=' . $vob->region . '&tag=' . $vob->tag; + display th {class => 'label'}, 'Derived Obj:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=derivedobj&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=derivedobj&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=derivedobj&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; display end_Tr; display start_Tr; + $image = $clearadmvob{cleartextsmall} + ? "data:image/png;base64,$clearadmvob{cleartextsmall}" + : 'plotstorage.cgi?type=vob&storage=cleartext&tiny=1®ion=' . $vob->retion . '&tag=' . $vob->tag; + display th {class => 'label'}, 'Cleartext:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=cleartext&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=cleartext&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=cleartext&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; + + $image = $clearadmvob{totalsmall} + ? "data:image/png;base64,$clearadmvob{totalsmall}" + : 'plotstorage.cgi?type=vob&storage=total&tiny=1®ion=' . $vob->region . '&tag=' . $vob->tag; + display th {class => 'label'}, 'Total Size:'; display td {class => 'data', colspan => 4, align => 'center'}, a {href => - "plot.cgi?type=vob&storage=total&scaling=Hour&points=24&tag=" . $vob->tag + 'plot.cgi?type=vob&storage=total&scaling=Day&points=7®ion=' . $vob->region . '&tag=' . $vob->tag }, img { - src => "plotstorage.cgi?type=vob&storage=total&tiny=1&tag=" . $vob->tag, + src => $image, border => 0, }; display end_Tr; @@ -255,21 +287,21 @@ sub DisplayTable ($) { return; } # DisplayTable -sub DisplayRegion { +sub DisplayRegion() { display start_form (action => 'vobdetails.cgi'); display 'Region '; my ($defaultRegion, @regions) = ('', ('Clearcase not installed')); - display popup_menu ( + display popup_menu( -name => 'region', -values => [@regions], -default => $defaultRegion, -onchange => 'submit();', ); - display submit ( + display submit( -value => 'Go', ); @@ -287,11 +319,11 @@ sub DisplayVobs($) { push @vobs, 'No VOBs'; } # unless - display start_form (action => 'vobdetails.cgi'); + display start_form(action => 'vobdetails.cgi'); display 'Region '; - display popup_menu ( + display popup_menu( -name => 'region', -values => [$Clearcase::CC->regions], -default => $region, @@ -300,13 +332,13 @@ sub DisplayVobs($) { display b ' VOB: '; - display popup_menu ( + display popup_menu( -name => 'vob', -values => \@vobs, -onchange => 'submit();', ); - display submit ( + display submit( -value => 'Go', ); @@ -316,7 +348,7 @@ sub DisplayVobs($) { } # DisplayVobs # Main -GetOptions ( +GetOptions( \%opts, 'usage' => sub { Usage }, 'verbose' => sub { set_verbose }, @@ -344,7 +376,7 @@ unless ($opts{tag}) { exit; } # unless -my $vob = Clearcase::Vob->new ($opts{tag}, $opts{region}); +my $vob = Clearcase::Vob->new($opts{tag}, $opts{region}); DisplayTable $vob; @@ -388,6 +420,7 @@ L =begin html
+Clearadm
ClearadmWeb
Clearcase
Clearcase::View