aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorƁukasz Kostka2014-08-15 00:13:54 +0200
committerPim van den Berg2014-08-25 23:32:22 +0200
commit2c5c2a62e10d5aadef9908b03908dffe9c26e2ad (patch)
tree78c8e11f470b0f71cc088d151292d72aa62e1f72 /graph.php
parentfix rrd_escape() not escaping colons (diff)
downloadapt-panopticon_cgp-2c5c2a62e10d5aadef9908b03908dffe9c26e2ad.zip
apt-panopticon_cgp-2c5c2a62e10d5aadef9908b03908dffe9c26e2ad.tar.gz
apt-panopticon_cgp-2c5c2a62e10d5aadef9908b03908dffe9c26e2ad.tar.bz2
apt-panopticon_cgp-2c5c2a62e10d5aadef9908b03908dffe9c26e2ad.tar.xz
move " on <HOSTNAME>" suffix in graph title to JSON
Closes #101
Diffstat (limited to 'graph.php')
-rw-r--r--graph.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/graph.php b/graph.php
index 6206d73..8eec2ec 100644
--- a/graph.php
+++ b/graph.php
@@ -83,9 +83,11 @@ if (isset($plugin_json[$type]['legend'])) {
83} 83}
84 84
85if (isset($plugin_json[$type]['title'])) { 85if (isset($plugin_json[$type]['title'])) {
86 $obj->rrd_title = $plugin_json[$type]['title']; 86 $obj->rrd_title = str_replace(
87 $obj->rrd_title = str_replace('{{PI}}', GET('pi'), $obj->rrd_title); 87 array('{{PI}}', '{{TI}}', '{{HOST}}'),
88 $obj->rrd_title = str_replace('{{TI}}', GET('ti'), $obj->rrd_title); 88 array(GET('pi'), GET('ti'), GET('h')),
89 $plugin_json[$type]['title']
90 );
89} 91}
90 92
91if (isset($plugin_json[$type]['vertical'])) { 93if (isset($plugin_json[$type]['vertical'])) {