mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Sort IP protocols and countries by DOWNLOAD not upload. Oops.
This commit is contained in:
parent
b6cb7614d6
commit
c204ca2c4a
@ -140,7 +140,7 @@ impl TimeBuffer {
|
|||||||
country_summary.push((last_country, total_bytes, rtt));
|
country_summary.push((last_country, total_bytes, rtt));
|
||||||
|
|
||||||
// Sort by bytes downloaded descending
|
// Sort by bytes downloaded descending
|
||||||
country_summary.sort_by(|a, b| b.1.up.cmp(&a.1.up));
|
country_summary.sort_by(|a, b| b.1.down.cmp(&a.1.down));
|
||||||
|
|
||||||
country_summary
|
country_summary
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ impl TimeBuffer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let mut results = results.into_iter().collect::<Vec<(String, DownUpOrder<u64>)>>();
|
let mut results = results.into_iter().collect::<Vec<(String, DownUpOrder<u64>)>>();
|
||||||
results.sort_by(|a, b| b.1.up.cmp(&a.1.up));
|
results.sort_by(|a, b| b.1.down.cmp(&a.1.down));
|
||||||
// Keep only the top 10
|
// Keep only the top 10
|
||||||
results.truncate(10);
|
results.truncate(10);
|
||||||
results
|
results
|
||||||
|
Loading…
Reference in New Issue
Block a user