aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2013-05-13 20:41:14 +0200
committerPim van den Berg2013-05-13 20:41:14 +0200
commita2814f6a4b46a5d9e86146c837ae11343dde4ea7 (patch)
tree0e821febc948da493ecb40a31ecfdbf4df0e80ab
parenttype: stick to the rrdgraph time specification (diff)
downloadapt-panopticon_cgp-a2814f6a4b46a5d9e86146c837ae11343dde4ea7.zip
apt-panopticon_cgp-a2814f6a4b46a5d9e86146c837ae11343dde4ea7.tar.gz
apt-panopticon_cgp-a2814f6a4b46a5d9e86146c837ae11343dde4ea7.tar.bz2
apt-panopticon_cgp-a2814f6a4b46a5d9e86146c837ae11343dde4ea7.tar.xz
move width/heigth from plugins to type __construct
-rw-r--r--detail.php2
-rw-r--r--plugin/apache.php2
-rw-r--r--plugin/apcups.php2
-rw-r--r--plugin/battery.php2
-rw-r--r--plugin/bind.php2
-rw-r--r--plugin/conntrack.php2
-rw-r--r--plugin/contextswitch.php2
-rw-r--r--plugin/cpu.php2
-rw-r--r--plugin/cpufreq.php2
-rw-r--r--plugin/df.php2
-rw-r--r--plugin/disk.php2
-rw-r--r--plugin/dns.php2
-rw-r--r--plugin/entropy.php2
-rw-r--r--plugin/filecount.php2
-rw-r--r--plugin/hddtemp.php2
-rw-r--r--plugin/interface.php2
-rw-r--r--plugin/ip6tables.php2
-rw-r--r--plugin/iptables.php2
-rw-r--r--plugin/irq.php2
-rw-r--r--plugin/libvirt.php2
-rw-r--r--plugin/load.php2
-rw-r--r--plugin/md.php2
-rw-r--r--plugin/memcached.php2
-rw-r--r--plugin/memory.php2
-rw-r--r--plugin/mysql.php2
-rw-r--r--plugin/netlink.php2
-rw-r--r--plugin/nfs.php2
-rw-r--r--plugin/nginx.php2
-rw-r--r--plugin/ntpd.php2
-rw-r--r--plugin/nut.php2
-rw-r--r--plugin/ping.php2
-rw-r--r--plugin/postgresql.php2
-rw-r--r--plugin/powerdns.php2
-rw-r--r--plugin/processes.php2
-rw-r--r--plugin/sensors.php2
-rw-r--r--plugin/snmp.php2
-rw-r--r--plugin/swap.php2
-rw-r--r--plugin/tail.php2
-rw-r--r--plugin/tcpconns.php2
-rw-r--r--plugin/uptime.php2
-rw-r--r--plugin/users.php2
-rw-r--r--plugin/varnish.php2
-rw-r--r--plugin/vmem.php2
-rw-r--r--plugin/vserver.php8
-rw-r--r--plugin/wireless.php2
-rw-r--r--plugin/zfs_arc.php2
-rw-r--r--type/Default.class.php4
47 files changed, 4 insertions, 98 deletions
diff --git a/detail.php b/detail.php
index 9cfeb53..5aa38de 100644
--- a/detail.php
+++ b/detail.php
@@ -17,8 +17,6 @@ $pinstance = validate_get(GET('pi'), 'pinstance');
17$category = validate_get(GET('c'), 'category'); 17$category = validate_get(GET('c'), 'category');
18$type = validate_get(GET('t'), 'type'); 18$type = validate_get(GET('t'), 'type');
19$tinstance = validate_get(GET('ti'), 'tinstance'); 19$tinstance = validate_get(GET('ti'), 'tinstance');
20$width = GET('x');
21$heigth = GET('y');
22$seconds = GET('s'); 20$seconds = GET('s');
23 21
24$selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin); 22$selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin);
diff --git a/plugin/apache.php b/plugin/apache.php
index c942255..7e4919a 100644
--- a/plugin/apache.php
+++ b/plugin/apache.php
@@ -150,8 +150,6 @@ switch ($obj->args['type']) {
150 break; 150 break;
151} 151}
152 152
153$obj->width = $width;
154$obj->heigth = $heigth;
155$obj->rrd_format = '%5.1lf'; 153$obj->rrd_format = '%5.1lf';
156 154
157# backwards compatibility 155# backwards compatibility
diff --git a/plugin/apcups.php b/plugin/apcups.php
index 07498f0..faa586e 100644
--- a/plugin/apcups.php
+++ b/plugin/apcups.php
@@ -18,8 +18,6 @@ require_once 'inc/collectd.inc.php';
18# apcups/voltage-output.rrd 18# apcups/voltage-output.rrd
19 19
20$obj = new Type_Default($CONFIG); 20$obj = new Type_Default($CONFIG);
21$obj->width = $width;
22$obj->heigth = $heigth;
23 21
24switch($obj->args['type']) { 22switch($obj->args['type']) {
25 case 'charge': 23 case 'charge':
diff --git a/plugin/battery.php b/plugin/battery.php
index ade645c..b03aba7 100644
--- a/plugin/battery.php
+++ b/plugin/battery.php
@@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php';
13# battery-X/voltage.rrd 13# battery-X/voltage.rrd
14 14
15$obj = new Type_Default($CONFIG); 15$obj = new Type_Default($CONFIG);
16$obj->width = $width;
17$obj->heigth = $heigth;
18$obj->colors = array( 16$obj->colors = array(
19 'value' => '0000f0', 17 'value' => '0000f0',
20); 18);
diff --git a/plugin/bind.php b/plugin/bind.php
index 0eb0a0d..e6d562c 100644
--- a/plugin/bind.php
+++ b/plugin/bind.php
@@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php';
8 8
9 9
10$obj = new Type_GenericStacked($CONFIG); 10$obj = new Type_GenericStacked($CONFIG);
11$obj->width = $width;
12$obj->heigth = $heigth;
13 11
14$obj->rrd_title = sprintf('%s/%s', $obj->args['pinstance'], $obj->args['type']); 12$obj->rrd_title = sprintf('%s/%s', $obj->args['pinstance'], $obj->args['type']);
15$obj->rrd_format = '%5.1lf%s'; 13$obj->rrd_format = '%5.1lf%s';
diff --git a/plugin/conntrack.php b/plugin/conntrack.php
index 6c38776..0415f2a 100644
--- a/plugin/conntrack.php
+++ b/plugin/conntrack.php
@@ -17,8 +17,6 @@ $obj->ds_names = array(
17$obj->colors = array( 17$obj->colors = array(
18 'value' => '0000f0', 18 'value' => '0000f0',
19); 19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Conntrack entries'; 20$obj->rrd_title = 'Conntrack entries';
23$obj->rrd_vertical = '#'; 21$obj->rrd_vertical = '#';
24$obj->rrd_format = '%.1lf'; 22$obj->rrd_format = '%.1lf';
diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php
index 701a3a7..45b5f30 100644
--- a/plugin/contextswitch.php
+++ b/plugin/contextswitch.php
@@ -17,8 +17,6 @@ $obj->ds_names = array(
17$obj->colors = array( 17$obj->colors = array(
18 'value' => '0000f0', 18 'value' => '0000f0',
19); 19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Context switches'; 20$obj->rrd_title = 'Context switches';
23$obj->rrd_vertical = 'switch per second Bits'; 21$obj->rrd_vertical = 'switch per second Bits';
24$obj->rrd_format = '%4.0lf'; 22$obj->rrd_format = '%4.0lf';
diff --git a/plugin/cpu.php b/plugin/cpu.php
index a0a19fc..a886f97 100644
--- a/plugin/cpu.php
+++ b/plugin/cpu.php
@@ -40,8 +40,6 @@ $obj->colors = array(
40 'interrupt' => 'a000a0', 40 'interrupt' => 'a000a0',
41 'steal' => '000000', 41 'steal' => '000000',
42); 42);
43$obj->width = $width;
44$obj->heigth = $heigth;
45 43
46$obj->rrd_title = sprintf('CPU-%s usage', $obj->args['pinstance']); 44$obj->rrd_title = sprintf('CPU-%s usage', $obj->args['pinstance']);
47$obj->rrd_vertical = 'Jiffies'; 45$obj->rrd_vertical = 'Jiffies';
diff --git a/plugin/cpufreq.php b/plugin/cpufreq.php
index fd18dc8..99f51c6 100644
--- a/plugin/cpufreq.php
+++ b/plugin/cpufreq.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11 11
12$obj = new Type_Default($CONFIG); 12$obj = new Type_Default($CONFIG);
13$obj->data_sources = array('value'); 13$obj->data_sources = array('value');
14$obj->width = $width;
15$obj->heigth = $heigth;
16$obj->rrd_title = 'CPU frequency scaling'; 14$obj->rrd_title = 'CPU frequency scaling';
17$obj->rrd_vertical = 'Hz'; 15$obj->rrd_vertical = 'Hz';
18$obj->rrd_format = '%5.1lf%s'; 16$obj->rrd_format = '%5.1lf%s';
diff --git a/plugin/df.php b/plugin/df.php
index b5c7e73..16f5749 100644
--- a/plugin/df.php
+++ b/plugin/df.php
@@ -25,8 +25,6 @@ $obj->colors = array(
25 'free' => '00ff00', 25 'free' => '00ff00',
26 'used' => 'ff0000', 26 'used' => 'ff0000',
27); 27);
28$obj->width = $width;
29$obj->heigth = $heigth;
30 28
31$obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); 29$obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']);
32$obj->rrd_vertical = 'Bytes'; 30$obj->rrd_vertical = 'Bytes';
diff --git a/plugin/disk.php b/plugin/disk.php
index e3a5f3d..763ae10 100644
--- a/plugin/disk.php
+++ b/plugin/disk.php
@@ -23,8 +23,6 @@ $obj->colors = array(
23 'read' => '0000ff', 23 'read' => '0000ff',
24 'write' => '00b000', 24 'write' => '00b000',
25); 25);
26$obj->width = $width;
27$obj->heigth = $heigth;
28switch($obj->args['type']) { 26switch($obj->args['type']) {
29 case 'disk_merged': 27 case 'disk_merged':
30 $obj->rrd_title = sprintf('Disk Merged Operations (%s)', $obj->args['pinstance']); 28 $obj->rrd_title = sprintf('Disk Merged Operations (%s)', $obj->args['pinstance']);
diff --git a/plugin/dns.php b/plugin/dns.php
index d0322f1..d9bc759 100644
--- a/plugin/dns.php
+++ b/plugin/dns.php
@@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php';
13# dns/dns_qtype-X.rrd 13# dns/dns_qtype-X.rrd
14 14
15$obj = new Type_GenericStacked($CONFIG); 15$obj = new Type_GenericStacked($CONFIG);
16$obj->width = $width;
17$obj->heigth = $heigth;
18$obj->rrd_format = '%5.1lf%s'; 16$obj->rrd_format = '%5.1lf%s';
19 17
20switch($obj->args['type']) { 18switch($obj->args['type']) {
diff --git a/plugin/entropy.php b/plugin/entropy.php
index bc1c95f..1c7f763 100644
--- a/plugin/entropy.php
+++ b/plugin/entropy.php
@@ -17,8 +17,6 @@ $obj->ds_names = array(
17$obj->colors = array( 17$obj->colors = array(
18 'value' => '0000f0', 18 'value' => '0000f0',
19); 19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Available entropy'; 20$obj->rrd_title = 'Available entropy';
23$obj->rrd_vertical = 'Bits'; 21$obj->rrd_vertical = 'Bits';
24$obj->rrd_format = '%4.0lf'; 22$obj->rrd_format = '%4.0lf';
diff --git a/plugin/filecount.php b/plugin/filecount.php
index 2c318a9..daa9fd9 100644
--- a/plugin/filecount.php
+++ b/plugin/filecount.php
@@ -13,8 +13,6 @@ require_once 'inc/collectd.inc.php';
13 13
14$obj = new Type_GenericStacked($CONFIG); 14$obj = new Type_GenericStacked($CONFIG);
15 15
16$obj->width = $width;
17$obj->heigth = $heigth;
18$obj->rrd_format = '%5.1lf%s'; 16$obj->rrd_format = '%5.1lf%s';
19$obj->data_sources = array('value'); 17$obj->data_sources = array('value');
20 18
diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php
index 1c90b78..2df7f35 100644
--- a/plugin/hddtemp.php
+++ b/plugin/hddtemp.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11 11
12$obj = new Type_Default($CONFIG); 12$obj = new Type_Default($CONFIG);
13$obj->ds_names = array('temperature' => 'Temperature'); 13$obj->ds_names = array('temperature' => 'Temperature');
14$obj->width = $width;
15$obj->heigth = $heigth;
16$obj->rrd_title = 'HDD Temperature'; 14$obj->rrd_title = 'HDD Temperature';
17$obj->rrd_vertical = '°C'; 15$obj->rrd_vertical = '°C';
18$obj->rrd_format = '%.1lf'; 16$obj->rrd_format = '%.1lf';
diff --git a/plugin/interface.php b/plugin/interface.php
index 777f953..c8828b2 100644
--- a/plugin/interface.php
+++ b/plugin/interface.php
@@ -27,8 +27,6 @@ $obj->colors = array(
27 'rx' => '0000ff', 27 'rx' => '0000ff',
28 'tx' => '00b000', 28 'tx' => '00b000',
29); 29);
30$obj->width = $width;
31$obj->heigth = $heigth;
32$obj->rrd_format = '%5.1lf%s'; 30$obj->rrd_format = '%5.1lf%s';
33 31
34$instance = $CONFIG['version'] < 5 ? 'tinstance' : 'pinstance'; 32$instance = $CONFIG['version'] < 5 ? 'tinstance' : 'pinstance';
diff --git a/plugin/ip6tables.php b/plugin/ip6tables.php
index 1f0d631..6d0304b 100644
--- a/plugin/ip6tables.php
+++ b/plugin/ip6tables.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11# ip6tables/ipt_packets-XXX.rrd 11# ip6tables/ipt_packets-XXX.rrd
12 12
13$obj = new Type_GenericStacked($CONFIG); 13$obj = new Type_GenericStacked($CONFIG);
14$obj->width = $width;
15$obj->heigth = $heigth;
16 14
17$obj->data_sources = array('value'); 15$obj->data_sources = array('value');
18switch($_GET['t']) { 16switch($_GET['t']) {
diff --git a/plugin/iptables.php b/plugin/iptables.php
index 8e5fa89..7b12f51 100644
--- a/plugin/iptables.php
+++ b/plugin/iptables.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11# iptables/ipt_packets-XXX.rrd 11# iptables/ipt_packets-XXX.rrd
12 12
13$obj = new Type_GenericStacked($CONFIG); 13$obj = new Type_GenericStacked($CONFIG);
14$obj->width = $width;
15$obj->heigth = $heigth;
16 14
17$obj->data_sources = array('value'); 15$obj->data_sources = array('value');
18switch($_GET['t']) { 16switch($_GET['t']) {
diff --git a/plugin/irq.php b/plugin/irq.php
index 406b707..e4e32f6 100644
--- a/plugin/irq.php
+++ b/plugin/irq.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11# irq/irq-XX.rrd 11# irq/irq-XX.rrd
12 12
13$obj = new Type_GenericStacked($CONFIG); 13$obj = new Type_GenericStacked($CONFIG);
14$obj->width = $width;
15$obj->heigth = $heigth;
16 14
17$obj->rrd_title = 'Interrupts'; 15$obj->rrd_title = 'Interrupts';
18$obj->rrd_vertical = 'IRQs/s'; 16$obj->rrd_vertical = 'IRQs/s';
diff --git a/plugin/libvirt.php b/plugin/libvirt.php
index 004eb26..1cc05c2 100644
--- a/plugin/libvirt.php
+++ b/plugin/libvirt.php
@@ -130,8 +130,6 @@ switch($obj->args['type']) {
130 break; 130 break;
131} 131}
132 132
133$obj->width = $width;
134$obj->heigth = $heigth;
135$obj->rrd_format = '%5.1lf%s'; 133$obj->rrd_format = '%5.1lf%s';
136 134
137if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) { 135if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) {
diff --git a/plugin/load.php b/plugin/load.php
index a8cc678..fe2305c 100644
--- a/plugin/load.php
+++ b/plugin/load.php
@@ -21,8 +21,6 @@ $obj->colors = array(
21 'midterm' => '0000ff', 21 'midterm' => '0000ff',
22 'longterm' => 'ff0000', 22 'longterm' => 'ff0000',
23); 23);
24$obj->width = $width;
25$obj->heigth = $heigth;
26$obj->rrd_title = 'System load'; 24$obj->rrd_title = 'System load';
27$obj->rrd_vertical = 'System load'; 25$obj->rrd_vertical = 'System load';
28$obj->rrd_format = '%.2lf'; 26$obj->rrd_format = '%.2lf';
diff --git a/plugin/md.php b/plugin/md.php
index abbf963..56df8a3 100644
--- a/plugin/md.php
+++ b/plugin/md.php
@@ -14,8 +14,6 @@ $obj = new Type_Default($CONFIG);
14$obj->ds_names = array( 14$obj->ds_names = array(
15 'value' => 'Value', 15 'value' => 'Value',
16); 16);
17$obj->width = $width;
18$obj->heigth = $heigth;
19$obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); 17$obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']);
20$obj->rrd_vertical = '#'; 18$obj->rrd_vertical = '#';
21$obj->rrd_format = '%2.0lf'; 19$obj->rrd_format = '%2.0lf';
diff --git a/plugin/memcached.php b/plugin/memcached.php
index 60887bc..ee80caf 100644
--- a/plugin/memcached.php
+++ b/plugin/memcached.php
@@ -175,8 +175,6 @@ switch(GET('t')) {
175 break; 175 break;
176} 176}
177 177
178$obj->width = $width;
179$obj->heigth = $heigth;
180$obj->rrd_format = '%5.1lf%s'; 178$obj->rrd_format = '%5.1lf%s';
181 179
182collectd_flush($obj->identifiers); 180collectd_flush($obj->identifiers);
diff --git a/plugin/memory.php b/plugin/memory.php
index 14779e2..ce973db 100644
--- a/plugin/memory.php
+++ b/plugin/memory.php
@@ -29,8 +29,6 @@ $obj->colors = array(
29 'locked' => 'ff00ff', 29 'locked' => 'ff00ff',
30 'used' => 'ff0000', 30 'used' => 'ff0000',
31); 31);
32$obj->width = $width;
33$obj->heigth = $heigth;
34 32
35$obj->rrd_title = 'Physical memory utilization'; 33$obj->rrd_title = 'Physical memory utilization';
36$obj->rrd_vertical = 'Bytes'; 34$obj->rrd_vertical = 'Bytes';
diff --git a/plugin/mysql.php b/plugin/mysql.php
index acab7ac..3d8b25b 100644
--- a/plugin/mysql.php
+++ b/plugin/mysql.php
@@ -7,8 +7,6 @@ require_once 'type/GenericStacked.class.php';
7require_once 'inc/collectd.inc.php'; 7require_once 'inc/collectd.inc.php';
8 8
9$obj = new Type_GenericStacked($CONFIG); 9$obj = new Type_GenericStacked($CONFIG);
10$obj->width = $width;
11$obj->heigth = $heigth;
12$obj->rrd_format = '%5.1lf%s'; 10$obj->rrd_format = '%5.1lf%s';
13 11
14switch($obj->args['type']) 12switch($obj->args['type'])
diff --git a/plugin/netlink.php b/plugin/netlink.php
index 146545e..df78515 100644
--- a/plugin/netlink.php
+++ b/plugin/netlink.php
@@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php';
8 8
9$obj = new Type_GenericStacked($CONFIG); 9$obj = new Type_GenericStacked($CONFIG);
10 10
11$obj->width = $width;
12$obj->heigth = $heigth;
13$obj->rrd_format = '%5.1lf%s'; 11$obj->rrd_format = '%5.1lf%s';
14 12
15switch($obj->args['type']) { 13switch($obj->args['type']) {
diff --git a/plugin/nfs.php b/plugin/nfs.php
index b9bc78e..9ae9196 100644
--- a/plugin/nfs.php
+++ b/plugin/nfs.php
@@ -24,8 +24,6 @@ switch($obj->args['pinstance']) {
24 break; 24 break;
25} 25}
26 26
27$obj->width = $width;
28$obj->heigth = $heigth;
29 27
30$obj->rrd_title = sprintf('NFS-%s Procedures', $obj->args['pinstance']); 28$obj->rrd_title = sprintf('NFS-%s Procedures', $obj->args['pinstance']);
31$obj->rrd_vertical = 'Procedures'; 29$obj->rrd_vertical = 'Procedures';
diff --git a/plugin/nginx.php b/plugin/nginx.php
index b05cd67..b6723fc 100644
--- a/plugin/nginx.php
+++ b/plugin/nginx.php
@@ -47,8 +47,6 @@ switch($obj->args['type'])
47 break; 47 break;
48} 48}
49 49
50$obj->width = $width;
51$obj->heigth = $heigth;
52$obj->rrd_format = '%5.1lf%s'; 50$obj->rrd_format = '%5.1lf%s';
53 51
54collectd_flush($obj->identifiers); 52collectd_flush($obj->identifiers);
diff --git a/plugin/ntpd.php b/plugin/ntpd.php
index fc38c32..ebd1fa6 100644
--- a/plugin/ntpd.php
+++ b/plugin/ntpd.php
@@ -17,8 +17,6 @@ $obj = new Type_Default($CONFIG);
17$obj->ds_names = array('ping' => 'Ping time', 17$obj->ds_names = array('ping' => 'Ping time',
18 'ping_stddev' => 'Ping stddev', 18 'ping_stddev' => 'Ping stddev',
19 'ping_droprate' => 'Ping droprate'); 19 'ping_droprate' => 'Ping droprate');
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_format = '%5.1lf%s'; 20$obj->rrd_format = '%5.1lf%s';
23 21
24switch($obj->args['type']) { 22switch($obj->args['type']) {
diff --git a/plugin/nut.php b/plugin/nut.php
index e97233c..a1ade0e 100644
--- a/plugin/nut.php
+++ b/plugin/nut.php
@@ -15,8 +15,6 @@ require_once 'inc/collectd.inc.php';
15# nut-XXXX/voltage-XXXX.rrd 15# nut-XXXX/voltage-XXXX.rrd
16 16
17$obj = new Type_Default($CONFIG); 17$obj = new Type_Default($CONFIG);
18$obj->width = $width;
19$obj->heigth = $heigth;
20switch($obj->args['type']) { 18switch($obj->args['type']) {
21 case 'frequency': 19 case 'frequency':
22 $obj->data_sources = array('value'); 20 $obj->data_sources = array('value');
diff --git a/plugin/ping.php b/plugin/ping.php
index f2845f1..042586a 100644
--- a/plugin/ping.php
+++ b/plugin/ping.php
@@ -17,8 +17,6 @@ $obj->data_sources = array('value');
17$obj->ds_names = array('ping' => 'Ping time', 17$obj->ds_names = array('ping' => 'Ping time',
18 'ping_stddev' => 'Ping stddev', 18 'ping_stddev' => 'Ping stddev',
19 'ping_droprate' => 'Ping droprate'); 19 'ping_droprate' => 'Ping droprate');
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_format = '%5.1lf'; 20$obj->rrd_format = '%5.1lf';
23 21
24switch($obj->args['type']) { 22switch($obj->args['type']) {
diff --git a/plugin/postgresql.php b/plugin/postgresql.php
index 1eadc8d..361322d 100644
--- a/plugin/postgresql.php
+++ b/plugin/postgresql.php
@@ -22,8 +22,6 @@ require_once 'inc/collectd.inc.php';
22# postgresql-X/pg_n_tup_c-upd.rrd 22# postgresql-X/pg_n_tup_c-upd.rrd
23 23
24$obj = new Type_GenericStacked($CONFIG); 24$obj = new Type_GenericStacked($CONFIG);
25$obj->width = $width;
26$obj->heigth = $heigth;
27$obj->rrd_format = '%5.1lf%s'; 25$obj->rrd_format = '%5.1lf%s';
28 26
29switch($obj->args['type']) { 27switch($obj->args['type']) {
diff --git a/plugin/powerdns.php b/plugin/powerdns.php
index c8508cc..b62d06d 100644
--- a/plugin/powerdns.php
+++ b/plugin/powerdns.php
@@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php';
8 8
9 9
10$obj = new Type_Default($CONFIG); 10$obj = new Type_Default($CONFIG);
11$obj->width = $width;
12$obj->heigth = $heigth;
13 11
14$obj->rrd_title = sprintf('PowerDNS %s (%s)', $obj->args['type'], $obj->args['pinstance']); 12$obj->rrd_title = sprintf('PowerDNS %s (%s)', $obj->args['type'], $obj->args['pinstance']);
15$obj->rrd_format = '%5.1lf%s'; 13$obj->rrd_format = '%5.1lf%s';
diff --git a/plugin/processes.php b/plugin/processes.php
index dca00b7..96fde2d 100644
--- a/plugin/processes.php
+++ b/plugin/processes.php
@@ -16,8 +16,6 @@ require_once 'inc/collectd.inc.php';
16# processes/ps_state-sleeping.rrd 16# processes/ps_state-sleeping.rrd
17 17
18$obj = new Type_GenericStacked($CONFIG); 18$obj = new Type_GenericStacked($CONFIG);
19$obj->width = $width;
20$obj->heigth = $heigth;
21$obj->rrd_format = '%5.1lf%s'; 19$obj->rrd_format = '%5.1lf%s';
22 20
23switch($obj->args['type']) 21switch($obj->args['type'])
diff --git a/plugin/sensors.php b/plugin/sensors.php
index 3f23e98..9daf662 100644
--- a/plugin/sensors.php
+++ b/plugin/sensors.php
@@ -16,8 +16,6 @@ $obj = new Type_Default($CONFIG);
16$obj->ds_names = array( 16$obj->ds_names = array(
17 'value' => 'Value', 17 'value' => 'Value',
18); 18);
19$obj->width = $width;
20$obj->heigth = $heigth;
21switch($obj->args['type']) { 19switch($obj->args['type']) {
22 case 'fanspeed': 20 case 'fanspeed':
23 $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); 21 $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']);
diff --git a/plugin/snmp.php b/plugin/snmp.php
index 476f4ed..4650dd9 100644
--- a/plugin/snmp.php
+++ b/plugin/snmp.php
@@ -29,8 +29,6 @@ switch(GET('t')) {
29} 29}
30 30
31$obj->rrd_format = '%5.1lf%s'; 31$obj->rrd_format = '%5.1lf%s';
32$obj->width = $width;
33$obj->heigth = $heigth;
34 32
35collectd_flush($obj->identifiers); 33collectd_flush($obj->identifiers);
36$obj->rrd_graph(); 34$obj->rrd_graph();
diff --git a/plugin/swap.php b/plugin/swap.php
index c24d90b..863c600 100644
--- a/plugin/swap.php
+++ b/plugin/swap.php
@@ -46,8 +46,6 @@ switch(GET('t')) {
46 break; 46 break;
47} 47}
48 48
49$obj->width = $width;
50$obj->heigth = $heigth;
51$obj->rrd_format = '%5.1lf%s'; 49$obj->rrd_format = '%5.1lf%s';
52 50
53collectd_flush($obj->identifiers); 51collectd_flush($obj->identifiers);
diff --git a/plugin/tail.php b/plugin/tail.php
index 821aff8..0d3ca46 100644
--- a/plugin/tail.php
+++ b/plugin/tail.php
@@ -8,8 +8,6 @@ require_once 'inc/collectd.inc.php';
8 8
9 9
10$obj = new Type_Default($CONFIG); 10$obj = new Type_Default($CONFIG);
11$obj->width = $width;
12$obj->heigth = $heigth;
13 11
14$obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); 12$obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']);
15$obj->rrd_format = '%5.1lf%s'; 13$obj->rrd_format = '%5.1lf%s';
diff --git a/plugin/tcpconns.php b/plugin/tcpconns.php
index f0d99ae..bd23de7 100644
--- a/plugin/tcpconns.php
+++ b/plugin/tcpconns.php
@@ -11,8 +11,6 @@ require_once 'inc/collectd.inc.php';
11# tcpconns-XXXX/tcp_connections-XXXX.rrd 11# tcpconns-XXXX/tcp_connections-XXXX.rrd
12 12
13$obj = new Type_GenericStacked($CONFIG); 13$obj = new Type_GenericStacked($CONFIG);
14$obj->width = $width;
15$obj->heigth = $heigth;
16$obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']); 14$obj->rrd_title = sprintf('TCP Connections (%s)', $obj->args['pinstance']);
17$obj->rrd_vertical = '#'; 15$obj->rrd_vertical = '#';
18$obj->rrd_format = '%5.1lf'; 16$obj->rrd_format = '%5.1lf';
diff --git a/plugin/uptime.php b/plugin/uptime.php
index 4331ab9..60a106a 100644
--- a/plugin/uptime.php
+++ b/plugin/uptime.php
@@ -17,8 +17,6 @@ $obj->ds_names = array(
17$obj->colors = array( 17$obj->colors = array(
18 'value' => '00e000', 18 'value' => '00e000',
19); 19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Uptime'; 20$obj->rrd_title = 'Uptime';
23$obj->rrd_vertical = 'Days'; 21$obj->rrd_vertical = 'Days';
24$obj->rrd_format = '%.1lf'; 22$obj->rrd_format = '%.1lf';
diff --git a/plugin/users.php b/plugin/users.php
index a948fc1..2cb2427 100644
--- a/plugin/users.php
+++ b/plugin/users.php
@@ -17,8 +17,6 @@ $obj->ds_names = array(
17$obj->colors = array( 17$obj->colors = array(
18 'value' => '0000f0', 18 'value' => '0000f0',
19); 19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Users'; 20$obj->rrd_title = 'Users';
23$obj->rrd_vertical = 'Users'; 21$obj->rrd_vertical = 'Users';
24$obj->rrd_format = '%.1lf'; 22$obj->rrd_format = '%.1lf';
diff --git a/plugin/varnish.php b/plugin/varnish.php
index 8099691..78d33bd 100644
--- a/plugin/varnish.php
+++ b/plugin/varnish.php
@@ -23,8 +23,6 @@ require_once 'inc/collectd.inc.php';
23#varnish-default-connections/connections-received.rrd 23#varnish-default-connections/connections-received.rrd
24 24
25$obj = new Type_Default($CONFIG); 25$obj = new Type_Default($CONFIG);
26$obj->width = $width;
27$obj->heigth = $heigth;
28$obj->rrd_format = '%5.1lf%s'; 26$obj->rrd_format = '%5.1lf%s';
29$obj->rrd_title = sprintf('%s (%s)', ucfirst($obj->args['pinstance']), $obj->args['category']); 27$obj->rrd_title = sprintf('%s (%s)', ucfirst($obj->args['pinstance']), $obj->args['category']);
30$obj->rrd_vertical = 'hits'; 28$obj->rrd_vertical = 'hits';
diff --git a/plugin/vmem.php b/plugin/vmem.php
index fae94f8..9a17ed4 100644
--- a/plugin/vmem.php
+++ b/plugin/vmem.php
@@ -14,8 +14,6 @@ require_once 'inc/collectd.inc.php';
14# vmem/vmpage_number-<type>.rrd 14# vmem/vmpage_number-<type>.rrd
15 15
16$obj = new Type_GenericStacked($CONFIG); 16$obj = new Type_GenericStacked($CONFIG);
17$obj->width = $width;
18$obj->heigth = $heigth;
19$obj->rrd_format = '%5.1lf%s'; 17$obj->rrd_format = '%5.1lf%s';
20 18
21switch($obj->args['type']) { 19switch($obj->args['type']) {
diff --git a/plugin/vserver.php b/plugin/vserver.php
index c727ad9..186166d 100644
--- a/plugin/vserver.php
+++ b/plugin/vserver.php
@@ -47,8 +47,6 @@ switch($obj->args['type']) {
47 'rss' => 'ffb000', 47 'rss' => 'ffb000',
48 'anon' => 'ff00ff', 48 'anon' => 'ff00ff',
49 ); 49 );
50 $obj->width = $width;
51 $obj->heigth = $heigth;
52 50
53 $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); 51 $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']);
54 $obj->rrd_vertical = 'Bytes'; 52 $obj->rrd_vertical = 'Bytes';
@@ -73,8 +71,6 @@ switch($obj->args['type']) {
73 'total' => 'ffb000', 71 'total' => 'ffb000',
74 'uninterruptable' => 'ff00ff', 72 'uninterruptable' => 'ff00ff',
75 ); 73 );
76 $obj->width = $width;
77 $obj->heigth = $heigth;
78 74
79 $obj->rrd_title = sprintf('Threads on Vserver %s', $obj->args['pinstance']); 75 $obj->rrd_title = sprintf('Threads on Vserver %s', $obj->args['pinstance']);
80 $obj->rrd_vertical = 'Numbers'; 76 $obj->rrd_vertical = 'Numbers';
@@ -106,8 +102,6 @@ switch($obj->args['type']) {
106 $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); 102 $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']);
107 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); 103 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize']));
108 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; 104 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
109 $obj->width = $width;
110 $obj->heigth = $heigth;
111 $obj->rrd_format = '%5.1lf%s'; 105 $obj->rrd_format = '%5.1lf%s';
112 106
113 collectd_flush($obj->identifiers); 107 collectd_flush($obj->identifiers);
@@ -121,8 +115,6 @@ switch($obj->args['type']) {
121 $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']); 115 $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']);
122 $obj->rrd_vertical = 'Processes'; 116 $obj->rrd_vertical = 'Processes';
123 117
124 $obj->width = $width;
125 $obj->heigth = $heigth;
126 $obj->rrd_format = '%5.1lf%s'; 118 $obj->rrd_format = '%5.1lf%s';
127 119
128 collectd_flush($obj->identifiers); 120 collectd_flush($obj->identifiers);
diff --git a/plugin/wireless.php b/plugin/wireless.php
index 413ee28..9d391ec 100644
--- a/plugin/wireless.php
+++ b/plugin/wireless.php
@@ -10,8 +10,6 @@ $obj = new Type_GenericStacked($CONFIG);
10$obj->data_sources = array('value'); 10$obj->data_sources = array('value');
11$obj->ds_names = array('value' => 'Value'); 11$obj->ds_names = array('value' => 'Value');
12$obj->colors = array('value' => '0000f0'); 12$obj->colors = array('value' => '0000f0');
13$obj->width = $width;
14$obj->heigth = $heigth;
15$obj->rrd_format = '%6.1lf'; 13$obj->rrd_format = '%6.1lf';
16 14
17switch($obj->args['type']) { 15switch($obj->args['type']) {
diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php
index d40912d..57a3bec 100644
--- a/plugin/zfs_arc.php
+++ b/plugin/zfs_arc.php
@@ -16,8 +16,6 @@ require_once 'inc/collectd.inc.php';
16# zfs_arc/arc_size.rrd 16# zfs_arc/arc_size.rrd
17 17
18$obj = new Type_Default($CONFIG); 18$obj = new Type_Default($CONFIG);
19$obj->width = $width;
20$obj->heigth = $heigth;
21$obj->rrd_format = '%5.1lf%s'; 19$obj->rrd_format = '%5.1lf%s';
22 20
23switch($obj->args['type']) { 21switch($obj->args['type']) {
diff --git a/type/Default.class.php b/type/Default.class.php
index b8fd95e..514d1c1 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -32,6 +32,10 @@ class Type_Default {
32 $this->parse_get(); 32 $this->parse_get();
33 $this->rrd_files(); 33 $this->rrd_files();
34 $this->identifiers = $this->file2identifier($this->files); 34 $this->identifiers = $this->file2identifier($this->files);
35 $this->width = GET('x');
36 if (empty($this->width)) $this->width = $config['width'];
37 $this->heigth = GET('y');
38 if (empty($this->heigth)) $this->heigth = $config['heigth'];
35 } 39 }
36 40
37 function rainbow_colors() { 41 function rainbow_colors() {