aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2013-06-16 16:15:32 +0200
committerPim van den Berg2013-06-16 16:16:33 +0200
commitdc2735abe0b425ec54a2ca4611954b170031b0f1 (patch)
tree0897f8047a2a7c7c5d8232a238b89f4dc2c8d3c6
parentplugin/openvpn: fix traffic graph (diff)
downloadapt-panopticon_cgp-dc2735abe0b425ec54a2ca4611954b170031b0f1.zip
apt-panopticon_cgp-dc2735abe0b425ec54a2ca4611954b170031b0f1.tar.gz
apt-panopticon_cgp-dc2735abe0b425ec54a2ca4611954b170031b0f1.tar.bz2
apt-panopticon_cgp-dc2735abe0b425ec54a2ca4611954b170031b0f1.tar.xz
plugin/openvpn: add datasize support
-rw-r--r--plugin/openvpn.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/openvpn.php b/plugin/openvpn.php
index 63111f5..0f1a2c2 100644
--- a/plugin/openvpn.php
+++ b/plugin/openvpn.php
@@ -24,7 +24,8 @@ switch(GET('t')) {
24 'tx' => '00b000', 24 'tx' => '00b000',
25 ); 25 );
26 $obj->rrd_title = sprintf('Traffic (%s)', $obj->args['pinstance']); 26 $obj->rrd_title = sprintf('Traffic (%s)', $obj->args['pinstance']);
27 $obj->rrd_vertical = '%s per second'; 27 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize']));
28 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
28 $obj->rrd_format = '%5.1lf%s'; 29 $obj->rrd_format = '%5.1lf%s';
29 break; 30 break;
30 case 'users': 31 case 'users':