From ff492535a018dc38afacceb9b6216639f2965862 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Tue, 16 Jul 2024 09:57:44 -0500 Subject: [PATCH] Remove final warning from lqosd - lqosd now builds warning-free. --- src/rust/lqosd/src/node_manager/js_build/src/tree.js | 2 +- src/rust/lqosd/src/node_manager/local_api.rs | 2 +- src/rust/lqosd/src/node_manager/local_api/network_tree.rs | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/rust/lqosd/src/node_manager/js_build/src/tree.js b/src/rust/lqosd/src/node_manager/js_build/src/tree.js index e99a10d3..4ac5ee84 100644 --- a/src/rust/lqosd/src/node_manager/js_build/src/tree.js +++ b/src/rust/lqosd/src/node_manager/js_build/src/tree.js @@ -16,7 +16,7 @@ var subscribed = false; // This runs first and builds the initial structure on the page function getInitialTree() { - $.get("/local-api/networkTree/0", (data) => { + $.get("/local-api/networkTree", (data) => { //console.log(data); tree = data; diff --git a/src/rust/lqosd/src/node_manager/local_api.rs b/src/rust/lqosd/src/node_manager/local_api.rs index c7e7d7ad..09b19a87 100644 --- a/src/rust/lqosd/src/node_manager/local_api.rs +++ b/src/rust/lqosd/src/node_manager/local_api.rs @@ -24,7 +24,7 @@ pub fn local_api() -> Router { .route("/versionCheck", get(version_check::version_check)) .route("/deviceCount", get(device_counts::count_users)) .route("/devicesAll", get(shaped_device_api::all_shaped_devices)) - .route("/networkTree/:parent", get(network_tree::get_network_tree)) + .route("/networkTree", get(network_tree::get_network_tree)) .route("/sanity", get(support::run_sanity_check)) .route("/gatherSupport", post(support::gather_support_data)) .route("/submitSupport", post(support::submit_support_data)) diff --git a/src/rust/lqosd/src/node_manager/local_api/network_tree.rs b/src/rust/lqosd/src/node_manager/local_api/network_tree.rs index b021df0a..40c5eb33 100644 --- a/src/rust/lqosd/src/node_manager/local_api/network_tree.rs +++ b/src/rust/lqosd/src/node_manager/local_api/network_tree.rs @@ -1,11 +1,8 @@ -use axum::extract::Path; use axum::Json; use lqos_config::NetworkJsonTransport; use crate::shaped_devices_tracker::NETWORK_JSON; -pub async fn get_network_tree( - Path(parent): Path -) -> Json> { +pub async fn get_network_tree() -> Json> { let net_json = NETWORK_JSON.read().unwrap(); let result: Vec<(usize, NetworkJsonTransport)> = net_json .get_nodes_when_ready()