mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			679 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			679 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
<?php
 | 
						|
 | 
						|
/**
 | 
						|
 * Generate html for displaying data usage.
 | 
						|
 */
 | 
						|
function DisplayDataUsage(&$extraFooterScripts)
 | 
						|
{
 | 
						|
    exec("ip -o link show | awk -F ': ' '{print $2}' | grep -v lo ", $interfacesWlo);
 | 
						|
    echo renderTemplate("data_usage", [ "interfaces" => $interfacesWlo ]);
 | 
						|
 | 
						|
    $extraFooterScripts[] = array('src'=>'vendor/raphael/raphael.min.js',
 | 
						|
                                  'defer'=>false);
 | 
						|
    $extraFooterScripts[] = array('src'=>'vendor/morrisjs/morris.min.js', 'defer'=>false);
 | 
						|
    $extraFooterScripts[] = array('src'=>'vendor/datatables/js/jquery.dataTables.min.js', 'defer'=>false);
 | 
						|
    $extraFooterScripts[] = array('src'=>'js/bandwidthcharts.js', 'defer'=>false);
 | 
						|
}
 |