Subversion Repositories computer_asset_manager_v1

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 50
Line 1... Line 1...
1
<?php
1
<?php
2
 
-
 
3
 
-
 
4
?>
-
 
5
 
2
   
-
 
3
   /* Just a linking table to available backup servers */
-
 
4
   $DATABASE_DEFINITION['backups_server'] = array( 
-
 
5
      'table name' => 'backups_server',
-
 
6
      'key field' => 'backups_server_id',
-
 
7
      'display columns' => array('device_id','backups_server_id','backup_space'),
-
 
8
      'display query' => 'select device_id,backups_server_id,backup_space from backups_server',
-
 
9
      'field info' => array(
-
 
10
         'device_id' => array('display name' => 'device_id' , 'type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
-
 
11
         'backups_server_id' => array('display name' => 'backups_server_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
-
 
12
         /* size in bytes available for backups */
-
 
13
         'backup_space' => array('display name' => 'backup_space' , 'type' => 'bigint')
-
 
14
      )
-
 
15
   );
-
 
16
   /* stores information on backup jobs allocated */
-
 
17
   $DATABASE_DEFINITION['backups'] = array( 
-
 
18
      'table name' => 'backups',
-
 
19
      'key field' => 'backups_id',
-
 
20
      'display columns' => array('backups_server_id','device_id','responsible_party','backups_id','notes','allocated_size','start_time'),
-
 
21
      'display query' => 'select backups_server_id,device_id,responsible_party,backups_id,notes,allocated_size,start_time from backups',
-
 
22
      'field info' => array(
-
 
23
         'backups_server_id' => array('display name' => 'backups_server_id' , 'type' => 'lookup', 'table' => 'backup_server', 'keyfield' => 'backups_server_id', 'display_field' => 'name'),
-
 
24
         'device_id' => array('display name' => 'device_id' , 'type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
-
 
25
         /* email address of who to notify for problems */
-
 
26
         'responsible_party' => array('display name' => 'responsible_party' , 'type' => 'string' , 'width' => 64),
-
 
27
         'backups_id' => array('display name' => 'backups_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
-
 
28
         /* any notes we want to keep on this */
-
 
29
         'notes' => array('display name' => 'notes' , 'type' => 'text'),
-
 
30
         /* number of bytes client is paying for */
-
 
31
         'allocated_size' => array('display name' => 'allocated_size' , 'default' => 1073741824 , 'type' => 'bigint'),
-
 
32
         /* default start time of backup */
-
 
33
         'start_time' => array('display name' => 'start_time' , 'type' => 'time')
-
 
34
      )
-
 
35
   );
-
 
36
   /* added for each backup that runs */
-
 
37
   $DATABASE_DEFINITION['backups_run'] = array( 
-
 
38
      'table name' => 'backups_run',
-
 
39
      'key field' => 'backups_run_id',
-
 
40
      'display columns' => array('files_count','report_date','version','start_time','files_deleted','files_size','backups_run_id','backups_id','end_time','data_received','data_sent','transferred_count','transferred_size'),
-
 
41
      'display query' => 'select files_count,report_date,version,start_time,files_deleted,files_size,backups_run_id,backups_id,end_time,data_received,data_sent,transferred_count,transferred_size from backups_run',
-
 
42
      'field info' => array(
-
 
43
         /* total number of files to be checked */
-
 
44
         'files_count' => array('display name' => 'files_count' , 'type' => 'bigint'),
-
 
45
         /* Date on the actual log file as part of its filename */
-
 
46
         'report_date' => array('display name' => 'report_date' , 'required' => true , 'type' => 'datetime'),
-
 
47
         /* Version of rsbackup creating processing this run */
-
 
48
         'version' => array('display name' => 'version' , 'type' => 'string' , 'width' => 10),
-
 
49
         /* when job started */
-
 
50
         'start_time' => array('display name' => 'start_time' , 'required' => true , 'default' => '0000-00-00 00:00:00' , 'type' => 'datetime'),
-
 
51
         /* number of files which were deleted */
-
 
52
         'files_deleted' => array('display name' => 'files_deleted' , 'type' => 'bigint'),
-
 
53
         /* size of all files to be checked in bytes */
-
 
54
         'files_size' => array('display name' => 'files_size' , 'type' => 'bigint'),
-
 
55
         'backups_run_id' => array('display name' => 'backups_run_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
-
 
56
         'backups_id' => array('display name' => 'backups_id' , 'type' => 'lookup', 'table' => 'backups', 'keyfield' => 'backups_id', 'display_field' => 'name'),
-
 
57
         /* when job ended */
-
 
58
         'end_time' => array('display name' => 'end_time' , 'required' => true , 'default' => '0000-00-00 00:00:00' , 'type' => 'datetime'),
-
 
59
         /* bytes received from server */
-
 
60
         'data_received' => array('display name' => 'data_received' , 'type' => 'bigint'),
-
 
61
         /* bytes sent to server */
-
 
62
         'data_sent' => array('display name' => 'data_sent' , 'type' => 'bigint'),
-
 
63
         /* number of files transferred */
-
 
64
         'transferred_count' => array('display name' => 'transferred_count' , 'type' => 'bigint'),
-
 
65
         /* size of files transferred in bytes */
-
 
66
         'transferred_size' => array('display name' => 'transferred_size' , 'type' => 'bigint')
-
 
67
      )
-
 
68
   );
-
 
69
   /* periodic reports from backup server itself on space used */
-
 
70
   $DATABASE_DEFINITION['backups_usage'] = array( 
-
 
71
      'table name' => 'backups_usage',
-
 
72
      'key field' => 'backups_usage_id',
-
 
73
      'display columns' => array('report_date','disk_usage','backups_usage_id','num_dirs','backups_id','num_files'),
-
 
74
      'display query' => 'select report_date,disk_usage,backups_usage_id,num_dirs,backups_id,num_files from backups_usage',
-
 
75
      'field info' => array(
-
 
76
         'report_date' => array('display name' => 'report_date' , 'required' => true , 'default' => '0000-00-00' , 'type' => 'date'),
-
 
77
         /* bytes used on backup server */
-
 
78
         'disk_usage' => array('display name' => 'disk_usage' , 'type' => 'bigint'),
-
 
79
         'backups_usage_id' => array('display name' => 'backups_usage_id' , 'keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int'),
-
 
80
         /* number of directories on backup server */
-
 
81
         'num_dirs' => array('display name' => 'num_dirs' , 'type' => 'bigint'),
-
 
82
         'backups_id' => array('display name' => 'backups_id' , 'type' => 'lookup', 'table' => 'backups', 'keyfield' => 'backups_id', 'display_field' => 'name'),
-
 
83
         /* number of files on backup server */
-
 
84
         'num_files' => array('display name' => 'num_files' , 'type' => 'bigint')
-
 
85
      )
-
 
86
   );
-
 
87
?>
-
 
88