feat: event management and websocket for updates

This commit is contained in:
Andrew Rioux
2025-02-22 16:04:15 -05:00
parent 005048f1ce
commit faaa4d2d1a
48 changed files with 1409 additions and 204 deletions
@@ -0,0 +1,50 @@
{
"db_name": "SQLite",
"query": "SELECT c.mode, c.regular_interval, c.random_min_time, c.random_max_time, c.cron_schedule, c.cron_mode\n FROM beacon_template t\n INNER JOIN beacon_config c ON c.config_id = t.config_id\n WHERE t.template_id = ?",
"describe": {
"columns": [
{
"name": "mode",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "regular_interval",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "random_min_time",
"ordinal": 2,
"type_info": "Integer"
},
{
"name": "random_max_time",
"ordinal": 3,
"type_info": "Integer"
},
{
"name": "cron_schedule",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "cron_mode",
"ordinal": 5,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
true,
true,
true,
true,
true,
true
]
},
"hash": "04472775affd2b1694c05f5ab8125528bb5448e0378a7b9cf3ed58eaa2101d1e"
}
@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO beacon_checkin (beacon_id, checkin_date) VALUES (?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "6e5e4ddd5c8b60c2180ca4cadf1449dc8b8b37a8887cd5b01f1ca9d0a411b897"
}
@@ -0,0 +1,68 @@
{
"db_name": "SQLite",
"query": "SELECT beacon_id, template_id, peer_ip, nickname, cwd, operating_system, beacon_userent, hostname, config_id FROM beacon_instance",
"describe": {
"columns": [
{
"name": "beacon_id",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "template_id",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "peer_ip",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "nickname",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "cwd",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "operating_system",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "beacon_userent",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "hostname",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "config_id",
"ordinal": 8,
"type_info": "Integer"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
false,
false,
false,
false,
false,
true
]
},
"hash": "75edc2bc9adda52aa7e9cd68f980db95744690cb3fc1b9cccfb3ab6f63d0ab25"
}
@@ -0,0 +1,50 @@
{
"db_name": "SQLite",
"query": "SELECT c.mode as mode, c.regular_interval as regular_interval, c.random_min_time as random_min_time,\n c.random_max_time as random_max_time, c.cron_schedule as cron_schedule, c.cron_mode as cron_mode\n FROM beacon_instance i\n INNER JOIN beacon_config c ON c.config_id = i.config_id\n WHERE i.beacon_id = ?\n UNION\n SELECT c.mode as mode, c.regular_interval as regular_interval, c.random_min_time as random_min_time,\n c.random_max_time as random_max_time, c.cron_schedule as cron_schedule, c.cron_mode as cron_mode\n FROM beacon_instance i\n INNER JOIN beacon_template t ON i.template_id = t.template_id\n INNER JOIN beacon_config c ON t.config_id = c.config_id\n WHERE i.beacon_id = ?",
"describe": {
"columns": [
{
"name": "mode",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "regular_interval",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "random_min_time",
"ordinal": 2,
"type_info": "Integer"
},
{
"name": "random_max_time",
"ordinal": 3,
"type_info": "Integer"
},
{
"name": "cron_schedule",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "cron_mode",
"ordinal": 5,
"type_info": "Text"
}
],
"parameters": {
"Right": 2
},
"nullable": [
true,
true,
true,
true,
true,
true
]
},
"hash": "bb07fb691f373dea848c0368d4c36e4c2b079d2d1efc0006d43d6833023101a3"
}
@@ -0,0 +1,26 @@
{
"db_name": "SQLite",
"query": "SELECT beacon_id, category_id FROM beacon_category_assignment",
"describe": {
"columns": [
{
"name": "beacon_id",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "category_id",
"ordinal": 1,
"type_info": "Integer"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false
]
},
"hash": "e7dddc194dcb297f672a9270f801ea23192e9fa53559b9fcfcffddeb3f571d15"
}
@@ -1,36 +1,26 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM beacon_listener WHERE listener_id = ?",
"query": "SELECT port, domain_name, certificate, privkey FROM beacon_listener WHERE listener_id = ?",
"describe": {
"columns": [
{
"name": "listener_id",
"name": "port",
"ordinal": 0,
"type_info": "Integer"
},
{
"name": "port",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "public_ip",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "domain_name",
"ordinal": 3,
"ordinal": 1,
"type_info": "Text"
},
{
"name": "certificate",
"ordinal": 4,
"ordinal": 2,
"type_info": "Blob"
},
{
"name": "privkey",
"ordinal": 5,
"ordinal": 3,
"type_info": "Blob"
}
],
@@ -38,13 +28,11 @@
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false,
false
]
},
"hash": "e7dc753795b8976b14b5c4baec20d16eff715a4d2ffe93c6723bad368483fb69"
"hash": "f130d1b3b891a4f5d57b69bcf111230b85d7fb636517e825a42c2a59fc8b8311"
}
@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO beacon_instance\n (beacon_id, template_id, peer_ip, nickname, cwd, operating_system, beacon_userent, hostname)\n VALUES\n (?, ?, ?, \"\", ?, ?, ?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 7
},
"nullable": []
},
"hash": "fa45ebf8fb26791336d5ab3701a3fc6fdf17d3eaddb0e5cff099e0396fe4dddd"
}