aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPim van den Berg2011-04-10 19:44:54 +0200
committerPim van den Berg2011-04-10 19:44:54 +0200
commit6fe237a0beaab01d86a17216316bff0a64bf8b61 (patch)
treec9adda52ccbf3b45d2a36c9030a7188ffbbffe9d /type
parentplugin/disk: SI magnitude units in legend for disk_merged and disk_ops (diff)
downloadapt-panopticon_cgp-6fe237a0beaab01d86a17216316bff0a64bf8b61.zip
apt-panopticon_cgp-6fe237a0beaab01d86a17216316bff0a64bf8b61.tar.gz
apt-panopticon_cgp-6fe237a0beaab01d86a17216316bff0a64bf8b61.tar.bz2
apt-panopticon_cgp-6fe237a0beaab01d86a17216316bff0a64bf8b61.tar.xz
use tinstance for legend label when data_sources is not set by plugin
Diffstat (limited to 'type')
-rw-r--r--type/Default.class.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/type/Default.class.php b/type/Default.class.php
index 0930fe3..45c4458 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -195,8 +195,13 @@ class Type_Default {
195 } 195 }
196 # or one file with multiple data_sources 196 # or one file with multiple data_sources
197 else { 197 else {
198 # use data_sources as sources 198 if(is_array($this->data_sources) && count($this->data_sources)==1 && in_array('value', $this->data_sources)) {
199 $sources = $this->data_sources; 199 # use tinstances as sources
200 $sources = $this->tinstances;
201 } else {
202 # use data_sources as sources
203 $sources = $this->data_sources;
204 }
200 } 205 }
201 $this->parse_ds_names($sources); 206 $this->parse_ds_names($sources);
202 return $sources; 207 return $sources;