diff options
| author | Pim van den Berg | 2014-05-10 17:09:11 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2014-05-12 21:02:11 +0200 |
| commit | dfd4ecb78450b3c580ce06fccc86e40c7fbf9646 (patch) | |
| tree | 0ca5eb9b309bfbb2c444d9af4c67eb185515882f /type | |
| parent | type/base: always use rainbow_colors and overwrite them afterwards (diff) | |
| download | apt-panopticon_cgp-dfd4ecb78450b3c580ce06fccc86e40c7fbf9646.zip apt-panopticon_cgp-dfd4ecb78450b3c580ce06fccc86e40c7fbf9646.tar.gz apt-panopticon_cgp-dfd4ecb78450b3c580ce06fccc86e40c7fbf9646.tar.bz2 apt-panopticon_cgp-dfd4ecb78450b3c580ce06fccc86e40c7fbf9646.tar.xz | |
type/base: set default title to "Plugin Type (PluginInstance) (Category)"
Diffstat (limited to 'type')
| -rw-r--r-- | type/Base.class.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/type/Base.class.php b/type/Base.class.php index 5de381e..4cb9e18 100644 --- a/type/Base.class.php +++ b/type/Base.class.php | |||
| @@ -36,7 +36,19 @@ class Type_Base { | |||
| 36 | $this->rrdtool_opts = $config['rrdtool_opts']; | 36 | $this->rrdtool_opts = $config['rrdtool_opts']; |
| 37 | $this->cache = $config['cache']; | 37 | $this->cache = $config['cache']; |
| 38 | $this->parse_get($_get); | 38 | $this->parse_get($_get); |
| 39 | $this->rrd_title = $this->args['plugin']; | 39 | $this->rrd_title = sprintf( |
| 40 | '%s%s%s%s', | ||
| 41 | $this->args['plugin'], | ||
| 42 | $this->args['type'] != $this->args['plugin'] | ||
| 43 | ? sprintf(' %s', $this->args['type']) | ||
| 44 | : '', | ||
| 45 | (isset($this->args['pinstance']) and $this->args['pinstance'] != '') | ||
| 46 | ? sprintf(' (%s)', $this->args['pinstance']) | ||
| 47 | : '', | ||
| 48 | (isset($this->args['category']) and $this->args['category'] != '') | ||
| 49 | ? sprintf(' (%s)', $this->args['category']) | ||
| 50 | : '' | ||
| 51 | ); | ||
| 40 | $this->rrd_files(); | 52 | $this->rrd_files(); |
| 41 | $this->width = isset($_get['x']) ? $_get['x'] : $config['width']; | 53 | $this->width = isset($_get['x']) ? $_get['x'] : $config['width']; |
| 42 | $this->height = isset($_get['y']) ? $_get['y'] : $config['height']; | 54 | $this->height = isset($_get['y']) ? $_get['y'] : $config['height']; |
