mirror of
				https://github.com/LibreQoE/LibreQoS.git
				synced 2025-02-25 18:55:32 -06:00 
			
		
		
		
	Sort IP protocols and countries by DOWNLOAD not upload. Oops.
This commit is contained in:
		@@ -140,7 +140,7 @@ impl TimeBuffer {
 | 
			
		||||
        country_summary.push((last_country, total_bytes, rtt));
 | 
			
		||||
 | 
			
		||||
        // 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
 | 
			
		||||
    }
 | 
			
		||||
@@ -231,7 +231,7 @@ impl TimeBuffer {
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        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
 | 
			
		||||
        results.truncate(10);
 | 
			
		||||
        results
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user