| Line 4... | Line 4... | 
          
            | 4 | /* this is a cleanup, and should be in the main function. It creates a view which shows only devices which are systems */
 | 4 | /* this is a cleanup, and should be in the main function. It creates a view which shows only devices which are systems */
 | 
          
            | 5 | create or replace view view_device_systems as select * from device where device_type_id in (select device_type_id from device_type where show_as_system = 'Y');
 | 5 | create or replace view view_device_systems as select * from device where device_type_id in (select device_type_id from device_type where show_as_system = 'Y');
 | 
          
            | 6 | /* add maintenance report */
 | 6 | /* add maintenance report */
 | 
          
            | 7 | insert into _system( group_name,key_name,theValue,added_date ) values ( 'device view', 'Maintenance', 'callable.php:maintenanceView', now() );
 | 7 | insert into _system( group_name,key_name,theValue,added_date ) values ( 'device view', 'Maintenance', 'callable.php:maintenanceView', now() );
 | 
          
            | 8 |  
 | 8 |  
 | 
          
            | - |   | 9 | delete from report where name = 'New Report';
 | 
          
            | - |   | 10 | insert into report ( name, query, parameters ) values ('Backup History','select
 | 
          
            | - |   | 11 |    backups_run.start_time Started,
 | 
          
            | - |   | 12 |    backups_run.end_time Ended,
 | 
          
            | - |   | 13 |    backups_run.version Version,
 | 
          
            | - |   | 14 |    format(backups_run.files_count,0) Files,
 | 
          
            | - |   | 15 |    format(backups_run.files_size/1024/1024,0) \'Size (M)\',
 | 
          
            | - |   | 16 |    format(backups_run.transferred_count,0) Transfer,
 | 
          
            | - |   | 17 |    format(backups_run.skipped,0) Skipped,
 | 
          
            | - |   | 18 |    format(backups_run.files_deleted,0) Deleted,
 | 
          
            | - |   | 19 |    format(backups_run.data_sent/1024/1024,2) \'MB Out\',
 | 
          
            | - |   | 20 |    format(backups_run.data_received/1024/1024,2) \'MB In\',
 | 
          
            | - |   | 21 |    backups_run.disk_used Disk
 | 
          
            | - |   | 22 | from
 | 
          
            | - |   | 23 |    backups_run join backups using (backups_id)
 | 
          
            | - |   | 24 | where
 | 
          
            | - |   | 25 |    backups.device_id = <device_id>
 | 
          
            | - |   | 26 | order by
 | 
          
            | - |   | 27 |    backups_run.report_date desc
 | 
          
            | - |   | 28 | limit <count>','device_id++Device ID++++
 | 
          
            | - |   | 29 | count++Number of Reports++++');
 | 
          
            | - |   | 30 |  
 | 
          
            | - |   | 31 | insert into _system( group_name,key_name,theValue,added_date ) values ( 'device view', 'Backup', 'callable.php:backupView', now() );
 |