Subversion Repositories computer_asset_manager_v1

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
50 rodolico 1
<?php
2
 
3
 
4
   function backupView ( $parameters ) {
5
      if ( isset($parameters['device_id'] ) ) {
6
         if ( ! isset( $parameters['count'] ) ) $parameters['count'] = 5;
7
         $query = "select
8
               backups_run.start_time Started,
9
               backups_run.end_time Ended,
10
               backups_run.version Version,
11
               format(backups_run.files_count,0) Files,
12
               format(backups_run.files_size/1024/1024,0) 'Size (M)',
13
               format(backups_run.transferred_count,0) Transfer,
14
               format(backups_run.skipped,0) Skipped,
15
               format(backups_run.files_deleted,0) Deleted,
16
               format(backups_run.data_sent/1024/1024,2) 'MB Out',
17
               format(backups_run.data_received/1024/1024,2) 'MB In',
18
               backups_run.disk_used Disk
19
            from
20
               backups_run join backups using (backups_id)
21
            where
22
               backups.device_id = $parameters[device_id]
23
            order by
24
               backups_run.report_date desc
25
            limit $parameters[count]";
26
         return queryToTable( $query );
27
      } // if
28
   } // function backupView
29
 
30
?>