aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/postgresql.php
diff options
context:
space:
mode:
authorPim van den Berg2012-08-10 18:56:30 +0200
committerPim van den Berg2012-08-10 19:00:16 +0200
commitfd04134830d3111c137b47c7ba25a049ab597715 (patch)
treec2390f06640f2127ab3e987cd3bdaf1d639b3dc2 /plugin/postgresql.php
parenttype: add scale support to default/generic stacked types (diff)
downloadapt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.zip
apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.gz
apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.bz2
apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.xz
introduce config option datasize to show graphs in bits or bytes
Config setting $CONFIG['datasize'] can be set to bits or bytes to show graph data in bits or bytes. Inspired-by: Neptune Ning (Plan) <frostyplanet@gmail.com>
Diffstat (limited to 'plugin/postgresql.php')
-rw-r--r--plugin/postgresql.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/postgresql.php b/plugin/postgresql.php
index 1eadc8d..ed984a6 100644
--- a/plugin/postgresql.php
+++ b/plugin/postgresql.php
@@ -51,7 +51,8 @@ switch($obj->args['type']) {
51 ); 51 );
52 $obj->rrd_title = sprintf('PostgreSQL DB size (%s)', 52 $obj->rrd_title = sprintf('PostgreSQL DB size (%s)',
53 !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); 53 !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : '');
54 $obj->rrd_vertical = 'Bytes'; 54 $obj->rrd_vertical = ucfirst($CONFIG['datasize']);
55 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
55 break; 56 break;
56 case 'pg_n_tup_c': 57 case 'pg_n_tup_c':
57 $obj->order = array( 58 $obj->order = array(