diff options
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/df.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugin/df.php b/plugin/df.php index 16f5749..b0e47ef 100644 --- a/plugin/df.php +++ b/plugin/df.php | |||
| @@ -26,9 +26,18 @@ $obj->colors = array( | |||
| 26 | 'used' => 'ff0000', | 26 | 'used' => 'ff0000', |
| 27 | ); | 27 | ); |
| 28 | 28 | ||
| 29 | $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); | 29 | switch($obj->args['type']) { |
| 30 | $obj->rrd_vertical = 'Bytes'; | 30 | case 'df_complex': |
| 31 | $obj->rrd_format = '%5.1lf%sB'; | 31 | $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); |
| 32 | $obj->rrd_vertical = 'Bytes'; | ||
| 33 | $obj->rrd_format = '%5.1lf%sB'; | ||
| 34 | break; | ||
| 35 | case 'df_inodes': | ||
| 36 | $obj->rrd_title = sprintf('Free inodes (%s)', $obj->args['pinstance']); | ||
| 37 | $obj->rrd_vertical = 'Inodes'; | ||
| 38 | $obj->rrd_format = '%5.1lf%s'; | ||
| 39 | break; | ||
| 40 | } | ||
| 32 | 41 | ||
| 33 | # backwards compatibility | 42 | # backwards compatibility |
| 34 | if ($CONFIG['version'] < 5) { | 43 | if ($CONFIG['version'] < 5) { |
