Blame | Last modification | View Log | Download | RSS feed
<?php
function backupView ( $parameters ) {
if ( isset($parameters['device_id'] ) ) {
if ( ! isset( $parameters['count'] ) ) $parameters['count'] = 5;
$query = "select
backups_run.start_time Started,
backups_run.end_time Ended,
backups_run.version Version,
format(backups_run.files_count,0) Files,
format(backups_run.files_size/1024/1024,0) 'Size (M)',
format(backups_run.transferred_count,0) Transfer,
format(backups_run.skipped,0) Skipped,
format(backups_run.files_deleted,0) Deleted,
format(backups_run.data_sent/1024/1024,2) 'MB Out',
format(backups_run.data_received/1024/1024,2) 'MB In',
backups_run.disk_used Disk
from
backups_run join backups using (backups_id)
where
backups.device_id = $parameters[device_id]
order by
backups_run.report_date desc
limit $parameters[count]";
return queryToTable( $query );
} // if
} // function backupView
?>