diff --git a/src/rust/lqosd/src/node_manager/local_api/flow_explorer.rs b/src/rust/lqosd/src/node_manager/local_api/flow_explorer.rs index 6331ceca..d5b89783 100644 --- a/src/rust/lqosd/src/node_manager/local_api/flow_explorer.rs +++ b/src/rust/lqosd/src/node_manager/local_api/flow_explorer.rs @@ -91,12 +91,12 @@ fn all_flows_to_transport(boot_time: u64, all_flows_for_asn: Vec<(FlowbeeKey, Fl .collect::>() } -pub async fn country_timeline(Path(country_name): Path) -> Json> { +pub async fn country_timeline(Path(iso_code): Path) -> Json> { let time_since_boot = time_since_boot().unwrap(); let since_boot = Duration::from(time_since_boot); let boot_time = unix_now().unwrap() - since_boot.as_secs(); - let all_flows_for_asn = RECENT_FLOWS.all_flows_for_country(&country_name); + let all_flows_for_asn = RECENT_FLOWS.all_flows_for_country(&iso_code); let flows = all_flows_to_transport(boot_time, all_flows_for_asn); diff --git a/src/rust/lqosd/src/throughput_tracker/flow_data/flow_analysis/finished_flows.rs b/src/rust/lqosd/src/throughput_tracker/flow_data/flow_analysis/finished_flows.rs index dc5b73ac..4e2ce9a6 100644 --- a/src/rust/lqosd/src/throughput_tracker/flow_data/flow_analysis/finished_flows.rs +++ b/src/rust/lqosd/src/throughput_tracker/flow_data/flow_analysis/finished_flows.rs @@ -292,13 +292,13 @@ impl TimeBuffer { .collect() } - pub fn all_flows_for_country(&self, country_name: &str) -> Vec<(FlowbeeKey, FlowbeeLocalData, FlowAnalysis)> { + pub fn all_flows_for_country(&self, iso_code: &str) -> Vec<(FlowbeeKey, FlowbeeLocalData, FlowAnalysis)> { let buffer = self.buffer.lock().unwrap(); buffer .iter() .filter(|flow| { let country = get_asn_name_and_country(flow.data.0.remote_ip.as_ip()); - country.name == country_name + country.flag == iso_code }) .map(|flow| flow.data.clone()) .collect()