From 2ff35acb404383c62cf4a25ed82d05803a79d6e8 Mon Sep 17 00:00:00 2001 From: parawizard Date: Wed, 15 Jan 2014 23:28:44 -0500 Subject: Update to frontend 1.5.1; fixes vnstat_php_frontend-1.5.1: -replaced the depreciated split() function with explode(); -renamed vnstat_php_frontend-1.5.1-updated config.php generation: -added two new static variables for vnstat_php_frontend-1.5.1; $locale and $language -updated version number // Unpack and move Vnstat frontend exec("cd .."); exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); $locale = "\$locale = 'en_US.UTF-8';"; $language = "\$language = 'en';"; $locale $language --- config/vnstat2/vnstat2.inc | 59 +++++++--------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) (limited to 'config/vnstat2') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index f0b76989..54a15aa6 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -199,8 +199,8 @@ function vnstat_php_frontend(){ global $config; // Unpack and move Vnstat frontend exec("cd .."); - exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.4.1.tar.gz"); - exec("mv vnstat_php_frontend-1.4.1 /usr/local/www/vnstat2"); + exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); + exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); // Find information to be writing in config.php // $iface_list_array_items exec("ls /conf/vnstat/ | grep -v '\.'", $vnstat_nic_in); @@ -227,6 +227,9 @@ function vnstat_php_frontend(){ } $iface_title_array = implode($iface_title_array_items2); // php in php static items + // added to new items for the front end version 1.5.1 + $locale = "\$locale = 'en_US.UTF-8';"; + $language = "\$language = 'en';"; $vnstat_bin2 = "\$vnstat_bin = '/usr/local/bin/vnstat';"; $data_dir2 = "\$data_dir = './dumps';"; $graph_format2 ="\$graph_format='svg';"; @@ -237,7 +240,7 @@ function vnstat_php_frontend(){ $config_file = << 'vnstat.css', - 'image_background' => array( 255, 255, 255, 0 ), - 'graph_background' => array( 220, 220, 230, 0 ), - 'graph_background_2' => array( 205, 205, 220, 0 ), - 'grid_stipple_1' => array( 140, 140, 140, 0 ), - 'grid_stipple_2' => array( 200, 200, 200, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 190, 20, 50 ), - 'rx_border' => array( 40, 80, 40, 90 ), - 'tx' => array( 130, 160, 100, 50 ), - 'tx_border' => array( 80, 40, 40, 90 ) - ); - - // A red colorscheme based on a contribution by Enrico Tröger - $colorscheme3 - 'stylesheet' => 'vnstat_red.css', - 'image_background' => array( 225, 225, 225, 0 ), - 'graph_background' => array( 220, 220, 230, 0 ), - 'graph_background_2' => array( 205, 205, 220, 0 ), - 'grid_stipple_1' => array( 140, 140, 140, 0 ), - 'grid_stipple_2' => array( 200, 200, 200, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 20, 20, 50 ), - 'rx_border' => array( 80, 40, 40, 90 ), - 'tx' => array( 130, 130, 130, 50 ), - 'tx_border' => array( 60, 60, 60, 90 ) - ); - - // A red colorscheme based on a contribution by Perry Mason - $colorscheme4 - 'stylesheet' => 'vnstat_pfSense.css', - 'image_background' => array( 240, 240, 240, 0 ), - 'graph_background' => array( 255, 255, 255, 0 ), - 'graph_background_2' => array( 255, 255, 255, 0 ), - 'grid_stipple_1' => array( 144, 0, 0, 0 ), - 'grid_stipple_2' => array( 144, 0, 0, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 20, 20, 50 ), - 'rx_border' => array( 80, 40, 40, 90 ), - 'tx' => array( 130, 130, 130, 50 ), - 'tx_border' => array( 60, 60, 60, 90 ) - ); ?> EOF; -- cgit v1.2.3