Line 3... |
Line 3... |
3 |
$DATABASE_DEFINITION['license'] = array(
|
3 |
$DATABASE_DEFINITION['license'] = array(
|
4 |
'display name' => 'License',
|
4 |
'display name' => 'License',
|
5 |
'table name' => 'license',
|
5 |
'table name' => 'license',
|
6 |
'key field' => 'license_id',
|
6 |
'key field' => 'license_id',
|
7 |
'display columns' => array('Client', 'Device','Product', 'License'),
|
7 |
'display columns' => array('Client', 'Device','Product', 'License'),
|
8 |
'display query' => "select license_product.name 'Product', license.license 'License', device.name 'Device', client.name 'Client' from license join license_product using (license_product_id) left outer join device using (device_id) join client using ( client_id ) order by license_product.name, device.name",
|
8 |
'display query' => "select license_id,license_product.name 'Product', license.license 'License', device.name 'Device', client.name 'Client' from license join license_product using (license_product_id) left outer join device using (device_id) join client using ( client_id ) order by license_product.name, device.name",
|
9 |
'field info' => array(
|
9 |
'field info' => array(
|
10 |
'license_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
10 |
'license_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
11 |
'license_product_id' => array('type' => 'lookup', 'table' => 'license_product', 'keyfield' => 'license_product_id', 'display_field' => 'name'),
|
11 |
'license_product_id' => array('type' => 'lookup', 'table' => 'license_product', 'keyfield' => 'license_product_id', 'display_field' => 'name'),
|
- |
|
12 |
// following uses the view computers to limit the devices which are actually machines
|
12 |
'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
|
13 |
'device_id' => array('type' => 'lookup', 'table' => 'view_device_systems', 'keyfield' => 'device_id', 'display_field' => 'name', 'filter'=>"removed_date is null and device_type_id in (select device_type_id from device_type where show_as_system = 'Y'"),
|
13 |
'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
|
14 |
'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
|
14 |
'license' => array( 'type' => 'text' ),
|
15 |
'license' => array( 'type' => 'text' ),
|
15 |
'removed_date' => array('type' => 'datetime', 'required' => false ),
|
16 |
'removed_date' => array('type' => 'datetime', 'required' => false ),
|
16 |
'added_date' => array('type' => 'datetime', 'required' => true),
|
17 |
'added_date' => array('type' => 'datetime', 'required' => true),
|
17 |
)
|
18 |
)
|
18 |
);
|
19 |
);
|
19 |
$DATABASE_DEFINITION['license_product'] = array(
|
20 |
$DATABASE_DEFINITION['license_product'] = array(
|
20 |
'table name' => 'license_product',
|
21 |
'table name' => 'license_product',
|
21 |
'display name' => 'License Product List',
|
22 |
'display name' => 'License Product List',
|
22 |
'key field' => 'license_product_id',
|
23 |
'key field' => 'license_product_id',
|
23 |
'display columns' => array('Product','Device','Task'),
|
24 |
'display columns' => array('Product'),
|
24 |
'display query' => "select name 'Product' from license_product",
|
25 |
'display query' => "select license_product_id,name 'Product' from license_product",
|
25 |
'field info' => array(
|
26 |
'field info' => array(
|
26 |
'license_product_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
27 |
'license_product_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
|
27 |
'name' => array('type' => 'text'),
|
28 |
'name' => array('type' => 'text'),
|
28 |
)
|
29 |
)
|
29 |
);
|
30 |
);
|