From d41637c20830ff4dee8346da50aea3b798ac992e Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Thu, 18 Sep 2025 10:46:39 -0500 Subject: [PATCH] Chore: Remove all references to the anonymous stats system now that it's gone. --- src/lqos.example | 4 -- src/rust/check_licenses.sh | 2 +- .../lqos_config/src/etc/etclqos_migration.rs | 4 +- src/rust/lqos_config/src/etc/v15/example.toml | 4 -- .../src/node_manager/js_build/esbuild.sh | 2 +- .../js_build/src/config/config_helper.js | 1 - .../node_manager/js_build/src/config_anon.js | 45 ------------------- .../js_build/src/configuration.js | 4 -- .../src/node_manager/static2/config_anon.html | 22 --------- .../node_manager/static2/configuration.html | 16 ------- .../lqosd/src/node_manager/static_pages.rs | 1 - 11 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 src/rust/lqosd/src/node_manager/js_build/src/config_anon.js delete mode 100644 src/rust/lqosd/src/node_manager/static2/config_anon.html diff --git a/src/lqos.example b/src/lqos.example index a6504833..ff297435 100644 --- a/src/lqos.example +++ b/src/lqos.example @@ -5,10 +5,6 @@ node_name = "Example Node" packet_capture_time = 10 queue_check_period_ms = 1000 -[usage_stats] -send_anonymous = true -anonymous_server = "stats.libreqos.io:9125" - [tuning] stop_irq_balance = true netdev_budget_usecs = 8000 diff --git a/src/rust/check_licenses.sh b/src/rust/check_licenses.sh index 5d9e5867..1d2c953c 100755 --- a/src/rust/check_licenses.sh +++ b/src/rust/check_licenses.sh @@ -3,7 +3,7 @@ # Checks all Rust projects for accidental inclusion of something GPL-3 # licensed. -PROJECTS="lqos_anonymous_stats_server lqos_bus lqos_config lqos_heimdall lqos_node_manager lqos_python lqos_queue_tracker lqos_setup lqos_sys lqos_utils lqosd lqusers xdp_iphash_to_cpu_cmdline xdp_pping" +PROJECTS="lqos_bus lqos_config lqos_heimdall lqos_node_manager lqos_python lqos_queue_tracker lqos_setup lqos_sys lqos_utils lqosd lqusers xdp_iphash_to_cpu_cmdline xdp_pping" TOOL="cargo license --help" # Check that the tool exists diff --git a/src/rust/lqos_config/src/etc/etclqos_migration.rs b/src/rust/lqos_config/src/etc/etclqos_migration.rs index ddc27fd9..4121b6f4 100644 --- a/src/rust/lqos_config/src/etc/etclqos_migration.rs +++ b/src/rust/lqos_config/src/etc/etclqos_migration.rs @@ -17,9 +17,7 @@ pub struct EtcLqos { /// In ms. pub queue_check_period_ms: u64, - /// If present, provides a unique ID for the node. Used for - /// anonymous stats (to identify nodes without providing an actual - /// identity), and long-term stas. + /// If present, provides a unique ID for the node. Used for Insight. pub node_id: Option, /// If present, provide a name for the node. diff --git a/src/rust/lqos_config/src/etc/v15/example.toml b/src/rust/lqos_config/src/etc/v15/example.toml index deb197de..4a1e0892 100644 --- a/src/rust/lqos_config/src/etc/v15/example.toml +++ b/src/rust/lqos_config/src/etc/v15/example.toml @@ -5,10 +5,6 @@ node_name = "Example Node" packet_capture_time = 10 queue_check_period_ms = 1000 -[usage_stats] -send_anonymous = true -anonymous_server = "stats.libreqos.io:9125" - [tuning] stop_irq_balance = true netdev_budget_usecs = 8000 diff --git a/src/rust/lqosd/src/node_manager/js_build/esbuild.sh b/src/rust/lqosd/src/node_manager/js_build/esbuild.sh index 892b60fe..e0e7af3c 100755 --- a/src/rust/lqosd/src/node_manager/js_build/esbuild.sh +++ b/src/rust/lqosd/src/node_manager/js_build/esbuild.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -scripts=( index.js template.js login.js first-run.js shaped-devices.js tree.js help.js unknown-ips.js configuration.js circuit.js flow_map.js all_tree_sankey.js asn_explorer.js lts_trial.js config_general.js config_anon.js config_tuning.js config_queues.js config_stormguard.js config_lts.js config_iprange.js config_flows.js config_integration.js config_spylnx.js config_uisp.js config_powercode.js config_sonar.js config_interface.js config_network.js config_devices.js config_users.js config_wispgate.js ) +scripts=( index.js template.js login.js first-run.js shaped-devices.js tree.js help.js unknown-ips.js configuration.js circuit.js flow_map.js all_tree_sankey.js asn_explorer.js lts_trial.js config_general.js config_tuning.js config_queues.js config_stormguard.js config_lts.js config_iprange.js config_flows.js config_integration.js config_spylnx.js config_uisp.js config_powercode.js config_sonar.js config_interface.js config_network.js config_devices.js config_users.js config_wispgate.js ) for script in "${scripts[@]}" do echo "Building {$script}" diff --git a/src/rust/lqosd/src/node_manager/js_build/src/config/config_helper.js b/src/rust/lqosd/src/node_manager/js_build/src/config/config_helper.js index 3699602a..37013295 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/config/config_helper.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/config/config_helper.js @@ -137,7 +137,6 @@ export function validNodeList(network_json) { export function renderConfigMenu(currentPage) { const menuItems = [ { href: "config_general.html", icon: "fa-server", text: "General", id: "general" }, - { href: "config_anon.html", icon: "fa-user-secret", text: "Anonymous Usage Stats", id: "anon" }, { href: "config_tuning.html", icon: "fa-warning", text: "Tuning", id: "tuning" }, { href: "config_interface.html", icon: "fa-chain", text: "Network Mode", id: "interface" }, { href: "config_queues.html", icon: "fa-car", text: "Queues", id: "queues" }, diff --git a/src/rust/lqosd/src/node_manager/js_build/src/config_anon.js b/src/rust/lqosd/src/node_manager/js_build/src/config_anon.js deleted file mode 100644 index e042f215..00000000 --- a/src/rust/lqosd/src/node_manager/js_build/src/config_anon.js +++ /dev/null @@ -1,45 +0,0 @@ -import {saveConfig, loadConfig, renderConfigMenu} from "./config/config_helper"; - -function validateConfig() { - // Validate server address format if provided - const server = document.getElementById("anonymousServer").value.trim(); - if (server) { - const parts = server.split(':'); - if (parts.length !== 2 || isNaN(parseInt(parts[1]))) { - alert("Statistics Server must be in format HOST:PORT"); - return false; - } - } - return true; -} - -function updateConfig() { - // Update only the usage stats section - window.config.usage_stats.send_anonymous = document.getElementById("sendAnonymous").checked; - window.config.usage_stats.anonymous_server = document.getElementById("anonymousServer").value.trim(); -} - -// Render the configuration menu -renderConfigMenu('anon'); - -loadConfig(() => { - // window.config now contains the configuration. - // Populate form fields with config values - if (window.config && window.config.usage_stats) { - // Required fields - document.getElementById("sendAnonymous").checked = window.config.usage_stats.send_anonymous ?? true; - document.getElementById("anonymousServer").value = window.config.usage_stats.anonymous_server ?? "stats.libreqos.io:9125"; - - // Add save button click handler - document.getElementById('saveButton').addEventListener('click', () => { - if (validateConfig()) { - updateConfig(); - saveConfig(() => { - alert("Configuration saved successfully!"); - }); - } - }); - } else { - console.error("Usage statistics configuration not found in window.config"); - } -}); diff --git a/src/rust/lqosd/src/node_manager/js_build/src/configuration.js b/src/rust/lqosd/src/node_manager/js_build/src/configuration.js index 31daa356..701ca9fa 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/configuration.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/configuration.js @@ -14,10 +14,6 @@ const bindings = [ { field: "bindPacketCaptureTime", path: ".packet_capture_time", data: "integer", editable: true, min: 1, max: 300 }, { field: "bindQueueCheckPeriodMs", path: ".queue_check_period_ms", data: "integer", editable: true, min: 100, max: 100000 }, - // Anonymous Usage - { field: "bindSendAnonymous", path: ".usage_stats.send_anonymous", data: "bool", editable: true }, - { field: "bindAnonymousServer", path: ".usage_stats.anonymous_server", data: "string", editable: true, required: true }, - // Tuning { field: "bindStopIrqBalance", path: ".tuning.stop_irq_balance", data: "bool", editable: true }, { field: "bindNetdevBudgetUs", path: ".tuning.netdev_budget_usecs", data: "integer", editable: true }, diff --git a/src/rust/lqosd/src/node_manager/static2/config_anon.html b/src/rust/lqosd/src/node_manager/static2/config_anon.html deleted file mode 100644 index be0b118c..00000000 --- a/src/rust/lqosd/src/node_manager/static2/config_anon.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
-
-
- - -
Help improve LibreQoS by sharing anonymous usage data
-
- -
- - -
Server address and port for anonymous statistics collection
-
- - -
-
-
- - diff --git a/src/rust/lqosd/src/node_manager/static2/configuration.html b/src/rust/lqosd/src/node_manager/static2/configuration.html index 23604b6c..a9ba106d 100644 --- a/src/rust/lqosd/src/node_manager/static2/configuration.html +++ b/src/rust/lqosd/src/node_manager/static2/configuration.html @@ -120,22 +120,6 @@ - -
-

Anonymous Usage Statistics Settings

- - - - - - - - - - -
-
-

Tuning Settings

diff --git a/src/rust/lqosd/src/node_manager/static_pages.rs b/src/rust/lqosd/src/node_manager/static_pages.rs index ca6aa84a..eae18aa4 100644 --- a/src/rust/lqosd/src/node_manager/static_pages.rs +++ b/src/rust/lqosd/src/node_manager/static_pages.rs @@ -43,7 +43,6 @@ pub(super) fn static_routes() -> Result { "lts_trial_success.html", "lts_trial_fail.html", "config_general.html", - "config_anon.html", "config_tuning.html", "config_queues.html", "config_lts.html", -- knotmirror 0.0.1