INSERT INTO agents (name, dir_name, package_name, minimal_version, dev_type, show_in_shortcut, description) VALUES
('Advantech routers', 'agent_advantech', 'aDWARFG_SHORT_advantech.tgz', '6.2.0', 2, true, 'Supports V2, V2i, V3 and V4 running ConelOS/ICR OS'),
("Teltonika routers - only monitoring", 'agent_teltonika', 'aDWARFG_SHORT_teltonika.ipk', NULL, 4, true, 'Monitoring only functionality, server certificate check is disabled.'),
("OpenWRT - only monitoring", 'agent_owrt', 'aDWARFG_SHORT_owrt.ipk', NULL, 3, true, 'Needs installing openssh-client for tunnels on the OpenWRT system, otherwise monitoring-only. Server certificate check is disabled.'),
('GNU/Linux (generic)', 'agent_linux', 'aDWARFG_SHORT_linux.tgz', NULL, 1, true, 'Generic Linux agent with systemd/initd integration. Cmdline installation.'),
("Teltonika routers - cmdline, mon. only", 'agent_teltonika', 'aDWARFG_SHORT_teltonika.tgz', NULL, 4, false, 'Cmdline install. Needs installing openssh-client for tunnels on the Teltonika system. Server certificate check is disabled.'),
("OpenWRT - cmdline, mon. only", 'agent_owrt', 'aDWARFG_SHORT_owrt.tgz', NULL, 3, false, 'Cmdline install. Needs installing openssh-client for tunnels on the OpenWRT system. Server certificate check is disabled.'),
("AAD - automated agent deployment tool", 'aad', 'push_agent.py', NULL, 1, false, 'A command-line level Python tool to automate mass device installation. See documentation before experimenting.');

INSERT INTO agent_device_type_map (agent_id, device_type_id) VALUES (1, 2), (2, 1), (3, 3), (4, 4), (1, 5);

INSERT INTO agent_versions (dev_type, version_major, version_minor, version_patchlevel, actual) VALUES
(1, 1, 0, 1, true),
(2, 1, 0, 1, true),
(3, 1, 0, 1, true),
(4, 1, 0, 1, true);

INSERT INTO product_versions (id, actual, version_major, version_minor, version_patchlevel, version_string, major, beta, notification, force_display, release_date, description) values 
(1, true, 1, 0, 5, 'Party patch5', false, false, true, true, '2025-10-10',
'<h5>Release notes</h5>'
'<h6>Server:</h6><ul>'
'<li>Fix for bug in version parsing for ICR OS 6.5.0+ (under some conditions).</li>'
'<li>Backport: Self-signed certificate distributed to devices now contains CA certificate.</li>'
'</ul><h6>Agents:</h6><ul>'
'</ul>');

INSERT INTO product_flags(id, version, description) values ('buildtag', 1, 'BUILDTAG');
INSERT INTO product_flags(id, version, description) values ('about_info', 1, 'ABOUTTXT');
