summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-18 11:03:14 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-18 11:03:14 +0000
commit68285fb56347e83ce36fc611482a09c84754f488 (patch)
tree61e7e4c79239594c92dd2694726eb6d0777aef9a /frontends/php/include/classes
parentf66a127799e435c95c35b01750e358caf960db0e (diff)
downloadzabbix-68285fb56347e83ce36fc611482a09c84754f488.tar.gz
zabbix-68285fb56347e83ce36fc611482a09c84754f488.tar.xz
zabbix-68285fb56347e83ce36fc611482a09c84754f488.zip
- [DEV-14] improved viewing values in pie graphs (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4873 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
-rw-r--r--frontends/php/include/classes/pie.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontends/php/include/classes/pie.inc.php b/frontends/php/include/classes/pie.inc.php
index e31f4769..6657b765 100644
--- a/frontends/php/include/classes/pie.inc.php
+++ b/frontends/php/include/classes/pie.inc.php
@@ -307,15 +307,15 @@ function drawLegend(){
$proc = ($datavalue * 100)/ $this->sum;
if(isset($data) && isset($datavalue)){
- $strvalue = sprintf("Value: %0.4f (%0.2f%s)",$datavalue,$proc,'%');
- $str = sprintf("%s: %s [%s] ",
+ $strvalue = sprintf(S_VALUE.': '.((round($datavalue)!=$datavalue)?'%0.4f':'%s').' ('.((round($proc)!=$proc)?'%0.2f':'%s')."%s)",$datavalue,$proc,'%');
+ $str = sprintf('%s: %s [%s] ',
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '),
$fnc_name);
}
else{
- $strvalue = sprintf("Value: no data");
- $str=sprintf("%s: %s [ no data ]",
+ $strvalue = sprintf(S_VALUE.': '.S_NO_DATA_SMALL);
+ $str=sprintf('%s: %s [ '.S_NO_DATA_SMALL.' ]',
str_pad($this->items[$i]['host'],$max_host_len,' '),
str_pad($this->items[$i]['description'],$max_desc_len,' '));
}