summaryrefslogtreecommitdiffstats
path: root/usr/local/www/graph.php
diff options
context:
space:
mode:
authordwayne voelker <iamzam@gmail.com>2013-12-05 00:19:31 -0500
committerRenato Botelho <garga@FreeBSD.org>2013-12-07 18:50:41 -0200
commit0c8fb22238b833462e9861fd309e59a853a71160 (patch)
tree297d5912eaa7db3555592257af515dad21fa1e63 /usr/local/www/graph.php
parent52d5ef8d14d4dbe8974b657457d3244469016154 (diff)
downloadpfsense-0c8fb22238b833462e9861fd309e59a853a71160.zip
pfsense-0c8fb22238b833462e9861fd309e59a853a71160.tar.gz
Allow setting a default scale type preference for the traffic graphs widget
I originally submitted this at https://redmine.pfsense.org/issues/2994 but it seems that is not used for commits now so I am adding it here. It works great on my box, and I can't see these changes causing any issues on other types. I like to have Autoscale (follow) set for the traffic graphs widget and hate having to click on Autoscale (up) to change it to follow every time I enter the dashboard page. This preference is written to the traffic graph widget section in config.xml
Diffstat (limited to 'usr/local/www/graph.php')
-rwxr-xr-xusr/local/www/graph.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php
index 7cfd346..666f198 100755
--- a/usr/local/www/graph.php
+++ b/usr/local/www/graph.php
@@ -55,7 +55,11 @@ $ifnum = get_real_interface($ifnum);
$ifname=@$_GET["ifname"]?$_GET["ifname"]:"Interface $ifnum"; //Interface name that will be showed on top right of graph
/********* Other conf *******/
-$scale_type="up"; //Autoscale default setup : "up" = only increase scale; "follow" = increase and decrease scale according to current graphed datas
+if (isset($config["widgets"]["trafficgraphs"]["scale_type"]))
+ $scale_type = $config["widgets"]["trafficgraphs"]["scale_type"];
+else
+ $scale_type = "up";
+
$nb_plot=120; //NB plot in graph
if ($_GET["timeint"])
$time_interval = $_GET["timeint"]; //Refresh time Interval
OpenPOWER on IntegriCloud