summaryrefslogtreecommitdiffstats
path: root/frontends/php
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
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')
-rw-r--r--frontends/php/include/classes/pie.inc.php8
-rw-r--r--frontends/php/include/locales/en_gb.inc.php7
2 files changed, 8 insertions, 7 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,' '));
}
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index 6394397a..6f1cb3af 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -148,10 +148,11 @@
'S_EXPORT_FILE'=> 'Export file',
'S_EXPORT_BIG'=> 'EXPORT',
'S_PREVIEW'=> 'Preview',
- 'S_BACK'=> 'Back',
+ 'S_BACK'=> 'Back',
'S_NO_DATA_FOR_EXPORT'=> 'No data for export',
- 'S_RULES'=> 'Rules',
- 'S_SKIP'=> 'Skip',
+ 'S_NO_DATA_SMALL'=> 'no data',
+ 'S_RULES'=> 'Rules',
+ 'S_SKIP'=> 'Skip',
'S_EXISTING'=> 'Existing',
'S_MISSING'=> 'Missing',
'S_REFRESH'=> 'Refresh',