From 23d271885496d0c74cbb44aba8ddad1a24cae26b Mon Sep 17 00:00:00 2001 From: D9ping Date: Tue, 11 Sep 2018 16:15:31 +0200 Subject: [PATCH] Renamed vnstat.php to bandwidth.php. Disabled bandwidth page by default. Signed-off-by: D9ping --- includes/{vnstat.php => bandwidth.php} | 5 +++-- includes/config.php | 2 +- index.php | 8 ++++---- installers/raspbian.sh | 2 +- js/bandwidthcharts.js | 3 ++- 5 files changed, 11 insertions(+), 9 deletions(-) rename includes/{vnstat.php => bandwidth.php} (96%) diff --git a/includes/vnstat.php b/includes/bandwidth.php similarity index 96% rename from includes/vnstat.php rename to includes/bandwidth.php index 86762ad..11bdd5a 100644 --- a/includes/vnstat.php +++ b/includes/bandwidth.php @@ -3,9 +3,10 @@ include_once( 'includes/status_messages.php' ); /** - * Generate html output for tab with vnstat traffic amount information. + * Generate html output for tab with charts and datatables + * with vnstat bandwidth use information. */ -function DisplayVnstat(&$extraFooterScripts) +function DisplayBandwidth(&$extraFooterScripts) { ?>
diff --git a/includes/config.php b/includes/config.php index 70f271f..0b122f0 100755 --- a/includes/config.php +++ b/includes/config.php @@ -26,7 +26,7 @@ define('RASPI_OPENVPN_ENABLED', false ); define('RASPI_TORPROXY_ENABLED', false ); define('RASPI_CONFAUTH_ENABLED', true ); define('RASPI_CHANGETHEME_ENABLED', true ); -define('RASPI_VNSTAT_ENABLED', true ); +define('RASPI_VNSTAT_ENABLED', false ); // Locale settings define('LOCALE_ROOT', 'locale'); diff --git a/index.php b/index.php index 420483f..cdc1df3 100755 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ include_once( 'includes/system.php' ); include_once( 'includes/configure_client.php' ); include_once( 'includes/networking.php' ); include_once( 'includes/themes.php' ); -include_once( 'includes/vnstat.php' ); +include_once( 'includes/bandwidth.php' ); $output = $return = 0; $page = $_GET['page']; @@ -158,7 +158,7 @@ $theme_url = 'dist/css/'.htmlspecialchars($theme, ENT_QUOTES);
  • - +
  • @@ -214,8 +214,8 @@ $extraFooterScripts = array(); case "theme_conf": DisplayThemeConfig(); break; - case "vnstat": - DisplayVnstat($extraFooterScripts); + case "bandwidth": + DisplayBandwidth($extraFooterScripts); break; case "system_info": DisplaySystem(); diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 01de6c1..ecf395c 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -9,7 +9,7 @@ function update_system_packages() { function install_dependencies() { install_log "Installing required packages" - sudo apt-get install lighttpd $php_package git hostapd dnsmasq vnstat || install_error "Unable to install dependencies" + sudo apt-get install lighttpd $php_package git hostapd dnsmasq || install_error "Unable to install dependencies" } install_raspap diff --git a/js/bandwidthcharts.js b/js/bandwidthcharts.js index bbb82da..55c6c51 100644 --- a/js/bandwidthcharts.js +++ b/js/bandwidthcharts.js @@ -82,4 +82,5 @@ ShowBandwidthChartHandler(); }); -})(jQuery); \ No newline at end of file +})(jQuery); +