diff options
| author | Vincent Brillault | 2013-12-16 22:58:01 +0100 |
|---|---|---|
| committer | Pim van den Berg | 2014-02-10 21:46:06 +0100 |
| commit | 0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c (patch) | |
| tree | 1a43e00751bcbd617caaea01120dcfdc52b3b4ec /plugin/df.php | |
| parent | add graph_type "hybrid" to show canvas on detail page, png on the others (diff) | |
| download | apt-panopticon_cgp-0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c.zip apt-panopticon_cgp-0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c.tar.gz apt-panopticon_cgp-0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c.tar.bz2 apt-panopticon_cgp-0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c.tar.xz | |
Plugin/df: Add support for inode graphs
Diffstat (limited to 'plugin/df.php')
| -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) { |
