show scheduled and burned columns
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 16:29:42 +0000 (17:29 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 16:29:42 +0000 (17:29 +0100)
lib/BackupPC/Search.pm

index 77a68d3..5e45f35 100644 (file)
@@ -391,7 +391,8 @@ print STDERR "## sort=". ($param->{'sort'} || 'no sort param') . " burn sql orde
                        b.date,
                        date_part('epoch',now()) - b.date as age,
                        p.size,
                        b.date,
                        date_part('epoch',now()) - b.date as age,
                        p.size,
-                       count(ab.date) as copies
+                       count(ap.*) as scheduled,
+                       count(ab.*) as burned
                FROM backup_parts p
                JOIN backups b          ON b.id = p.backup_id
                LEFT OUTER JOIN archive_parts  ap ON ap.backup_part_id = p.id
                FROM backup_parts p
                JOIN backups b          ON b.id = p.backup_id
                LEFT OUTER JOIN archive_parts  ap ON ap.backup_part_id = p.id
@@ -773,7 +774,9 @@ EOF3
                sort_header($param, 'Age/days', 'age', 'center') .
                sort_header($param, 'Size', 'size', 'center') .
        qq{
                sort_header($param, 'Age/days', 'age', 'center') .
                sort_header($param, 'Size', 'size', 'center') .
        qq{
-                       <td align="center">copies</td></tr>
+                       <td align="center" title="scheduled">sc</td>
+                       <td align="center" title="burned">bu</td>
+               </tr>
        };
 
        my @color = (' bgcolor="#e0e0e0"', '');
        };
 
        my @color = (' bgcolor="#e0e0e0"', '');
@@ -793,7 +796,8 @@ EOF3
                        ,'<td align="center">', epoch_to_iso( $backup->{'date'} ), '</td>'
                        ,'<td align="center">', $backup->{'age'}, '</td>'
                        ,'<td align="right">', unit($backup->{'size'}), '</td>'
                        ,'<td align="center">', epoch_to_iso( $backup->{'date'} ), '</td>'
                        ,'<td align="center">', $backup->{'age'}, '</td>'
                        ,'<td align="right">', unit($backup->{'size'}), '</td>'
-                       ,'<td align="left">', '*' x $backup->{copies}, '</td>'
+                       ,'<td align="center">', $backup->{scheduled}, '</td>'
+                       ,'<td align="center">', $backup->{burned}, '</td>'
                        ,"</tr>\n"
                );
        }
                        ,"</tr>\n"
                );
        }