- Release Notes for bweb 1.39.23
+ Release Notes for bweb 1.39.26
+
+2006/10/31:
+ - remove Purged and Recycle volume size from total pool size
2006/10/26:
- Fix javascript sort bug
<li><a href="?action=job">Historique</a> </li>
<li><a href="?action=running">Jobs en cours</a>
<li><a href="?action=next_job">Prochains Jobs</a> </li>
- <li><a href="?action=restore" title="Lancer brestore">Restaure</a> </li>
+ <li><a href="?action=restore" title="Lancer brestore">Restauration</a> </li>
</ul>
</li>
<li style="padding: 0.25em 2em;">Medias
my $all = $self->dbh_selectall_hashref($query, 'name') ;
+ $query = "
+SELECT Pool.Name AS name,
+ sum(VolBytes) AS size
+FROM Media JOIN Pool ON (Media.PoolId = Pool.PoolId)
+WHERE Media.VolStatus IN ('Recycled', 'Purged')
+GROUP BY Pool.Name;
+";
+ my $empty = $self->dbh_selectall_hashref($query, 'name');
+
foreach my $p (values %$all) {
if ($p->{volmax} > 0) { # mysql returns 0.0000
+ # we remove Recycled/Purged media from pool usage
+ if (defined $empty->{$p->{name}}) {
+ $p->{voltotal} -= $empty->{$p->{name}}->{size};
+ }
$p->{poolusage} = sprintf('%.2f', $p->{voltotal} * 100/ $p->{volmax}) ;
} else {
$p->{poolusage} = 0;