Blame | Last modification | View Log | Download | RSS feed
<?php
global $DATABASE_DEFINITION;
$DATABASE_DEFINITION['unknown_entry'] = array(
'table name' => 'unknown_entry',
'key field' => 'unknown_entry_id',
'display name' => 'Unknown Entries',
'display columns' => array('processed_date','report_date','device_name','unknown_entry_id','processed_by','client_name'),
'display query' => 'select processed_date,report_date,device_name,unknown_entry_id,processed_by,client_name from unknown_entry',
'field info' => array(
/* When set the entry has been taken care of by a user */
'processed_date' => array('type' => 'datetime'),
/* The date of the report that found this entry */
'report_date' => array('required' => true , 'type' => 'datetime'),
/* Name of a device from the report */
'device_name' => array('required' => true , 'type' => 'string' , 'width' => 64),
'unknown_entry_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
'processed_by' => array('type' => 'lookup', 'table' => 'login', 'keyfield' => 'login_id', 'display_field' => 'name'),
/* Name of the client from the report */
'client_name' => array('required' => true , 'type' => 'string' , 'width' => 64)
)
);
$DATABASE_DEFINITION['device_alias'] = array(
'table name' => 'device_alias',
'key field' => 'device_alias_id',
'display name' => 'Device Aliases',
'display columns' => array('Device','Alias'),
'display query' => 'select device.name Device,device_alias_id,alias Alias from device_alias join device using (device_id) order by device.name,alias',
'field info' => array(
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
'device_alias_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
'added_date' => array('required' => true , 'type' => 'datetime'),
/* Name found on report */
'alias' => array('keyfield' => true , 'type' => 'string' , 'width' => 64)
)
);
$DATABASE_DEFINITION['client_alias'] = array(
'table name' => 'client_alias',
'key field' => 'client_alias_id',
'display name' => 'Client Aliases',
'display columns' => array('Client','Alias'),
'display query' => 'select client_alias_id,client.name Client,alias Alias from client_alias join client using (client_id)',
'field info' => array(
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
'client_alias_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
'added_date' => array('required' => true , 'type' => 'datetime'),
/* Name found on report */
'alias' => array('keyfield' => true , 'type' => 'string' , 'width' => 64)
)
);
$DATABASE_DEFINITION['computer_uptime'] = array(
'table name' => 'computer_uptime',
'key field' => 'computer_uptime_id',
'display name' => 'Computer Uptimes',
'display columns' => array('Device','Rebooted'),
'display query' => 'select device.name Device,last_reboot Rebooted,computer_uptime_id from computer_uptime join device using (device_id) order by device.name,last_reboot desc',
'field info' => array(
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
/* date record was added */
'added_date' => array('type' => 'datetime'),
/* date and time of last reboot */
'last_reboot' => array('type' => 'datetime'),
'computer_uptime_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10)
)
);
$DATABASE_DEFINITION['device_operating_system'] = array(
'table name' => 'device_operating_system',
'key field' => array('device_id','operating_system_id','removed_date'),
'display name' => 'Operating Systems on a Device',
'display columns' => array('device_id','removed_date','operating_system_id','added_date'),
'display query' => 'select device_id,removed_date,operating_system_id,added_date from device_operating_system',
'field info' => array(
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
/* date record was deleted/supserceded */
'removed_date' => array('keyfield' => true , 'type' => 'datetime', 'default' => 'null', 'required' => false ),
/* a link to the operating_system table */
'operating_system_id' => array('keyfield' => true , 'required' => true , 'type' => 'int' , 'width' => 10),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['disk_info'] = array(
'table name' => 'disk_info',
'key field' => 'disk_info_id',
'display name' => 'Disk Information',
'display columns' => array('Device','Partition','Mount'),
'display query' => 'select disk_device Partition,disk_info_id,capacity,device.name Device,mount_point Mount from disk_info join device using (device_id) order by device.name, disk_device',
'field info' => array(
/* actual device name generally partition name */
'disk_device' => array('type' => 'string' , 'width' => 64),
'disk_info_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
/* size in kilobytes of partition */
'capacity' => array('type' => 'decimal'),
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
/* the file system ext3 ntfs with which this if formatted */
'filesystem' => array('type' => 'string' , 'width' => 32),
/* date record was added */
'added_date' => array('type' => 'datetime'),
/* place on file system where this is mounted or drive letter for Windows */
'mount_point' => array('type' => 'string' , 'width' => 64)
)
);
$DATABASE_DEFINITION['disk_space'] = array(
'table name' => 'disk_space',
'key field' => 'disk_space_id',
'display name' => 'Disk Space (HUGE TABLE)',
'display columns' => array('Device','Partition','Mounted','Used'),
'display query' => 'select disk_space_id, device.name Device, disk_info.disk_device Partition, disk_info.mount_point Mounted, space_used Used from disk_space join disk_info using (disk_info_id) join device using (device_id) where disk_space.removed_date is null',
'field info' => array(
/* link into disk_info table */
'disk_info_id' => array('type' => 'lookup', 'table' => 'disk_info', 'keyfield' => 'disk_info_id', 'display_field' => 'disk_device'),
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
'disk_space_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* space used in kilobytes */
'default' => array('type' => 'NULL'),
'space_used' => array('type' => 'decimal'),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['installed_packages'] = array(
'table name' => 'installed_packages',
'key field' => 'installed_packages_id',
'display name' => 'Installed Packages',
'display columns' => array('Device','Package','Version'),
'display query' => 'select software.package_name Package, software_version.version Version, device.name Device, installed_packages_id from installed_packages join device using (device_id) join software using (software_id) join software_version using (software_version_id) limit 100',
'field info' => array(
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
/* link into software_version table */
'software_version_id' => array('required' => true , 'type' => 'int' , 'width' => 10),
'installed_packages_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* link into software table */
'software_id' => array('required' => true , 'type' => 'int' , 'width' => 10),
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['network'] = array(
'table name' => 'network',
'key field' => 'network_id',
'display name' => 'Networking',
'display columns' => array('Device','Interface','Address'),
'display query' => 'select device.name Device, network_id,interface Interface,address Address from network join device using (device_id) order by device.name,interface',
'field info' => array(
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
/* If provided the IP6 address */
'ip6' => array('type' => 'string' , 'width' => 32),
'network_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
/* If provided the IP6 subnet mask */
'ip6net' => array('type' => 'int' , 'width' => 10),
/* the interface. eth0 whatever used. Note that some interface names can be long */
'interface' => array('type' => 'string' , 'width' => 32),
'added_date' => array('type' => 'datetime'),
/* The subnet netmask */
'netmask' => array('type' => 'string' , 'width' => 15),
/* The IP4 Address associated here */
'address' => array('type' => 'string' , 'width' => 15),
/* MAC hardware address */
'mac' => array('type' => 'string' , 'width' => 20),
/* MTU value */
'mtu' => array('type' => 'int' , 'width' => 10)
)
);
$DATABASE_DEFINITION['operating_system'] = array(
'table name' => 'operating_system',
'key field' => 'operating_system_id',
'display name' => 'Operating Systems',
'display columns' => array('Distro','Name','Codename','Release','Kernel'),
'display query' => 'select distro Distro,name Name,distro_codename Codename,distro_release "Release",kernel Kernel,operating_system_id from operating_system order by distro, distro_release desc',
'field info' => array(
/* date record was closed */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
/* For Linux the distribution name */
'distro' => array('type' => 'string' , 'width' => 255),
/* Version. Note this is a very large field in some cases */
'version' => array('type' => 'text'),
/* Name of the OS */
'name' => array('type' => 'string' , 'width' => 255),
/* For Linux the distribution code name */
'distro_codename' => array('type' => 'string' , 'width' => 255),
/* For Linux the distribution release */
'distro_release' => array('type' => 'string' , 'width' => 255),
/* kernel information */
'kernel' => array('type' => 'string' , 'width' => 255),
/* For Linux the distribution description */
'distro_description' => array('type' => 'string' , 'width' => 255),
'operating_system_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['software'] = array(
'table name' => 'software',
'key field' => 'software_id',
'display name' => 'Software Packages',
'display columns' => array('Name'),
'display query' => 'select software_id,package_name Name from software order by package_name',
'field info' => array(
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
'software_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* actual name of software package */
'package_name' => array('type' => 'string' , 'width' => 64),
/* any additional description */
'description' => array('type' => 'string' , 'width' => 64),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['software_version'] = array(
'table name' => 'software_version',
'key field' => 'software_version_id',
'display name' => 'Software Versions',
'display columns' => array('removed_date','software_version_id','version','added_date'),
'display query' => 'select removed_date,software_version_id,version,added_date from software_version',
'field info' => array(
/* date record was deleted/supserceded */
'removed_date' => array('type' => 'datetime', 'default' => 'null', 'required' => false ),
'software_version_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
/* version number */
'version' => array('keyfield' => true , 'type' => 'string' , 'width' => 64),
/* date record was added */
'added_date' => array('type' => 'datetime')
)
);
$DATABASE_DEFINITION['sysinfo_report'] = array(
'table name' => 'sysinfo_report',
'key field' => 'sysinfo_report_id',
'display name' => 'Sysinfo Reports',
'display columns' => array('Date','Device','Version'),
'display query' => 'select report_date Date,version Version,device.name Device,sysinfo_report_id from sysinfo_report join device using (device_id)',
'field info' => array(
'report_date' => array('type' => 'datetime'),
/* The version of the client */
'version' => array('required' => true , 'default' => '1.0' , 'type' => 'string' , 'width' => 5),
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
'added_date' => array('type' => 'datetime'),
'sysinfo_report_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10)
)
)
?>