diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-26 14:30:27 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-26 14:30:27 +0000 |
| commit | b09b9afef4f9b1e1d29f5b759832554dab0c9cc8 (patch) | |
| tree | 117d36c0c45cfb286c43d7b0ee1881f867a1a5cd /frontends/php/include | |
| parent | fca93a0754ca3124185dbebbc2431c6c5f4d774b (diff) | |
| download | zabbix-b09b9afef4f9b1e1d29f5b759832554dab0c9cc8.tar.gz zabbix-b09b9afef4f9b1e1d29f5b759832554dab0c9cc8.tar.xz zabbix-b09b9afef4f9b1e1d29f5b759832554dab0c9cc8.zip | |
- added units to "Pie graphs" (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5538 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/classes/pie.inc.php | 7 | ||||
| -rw-r--r-- | frontends/php/include/page_header.php | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/frontends/php/include/classes/pie.inc.php b/frontends/php/include/classes/pie.inc.php index 4eae1894..dadc4bc4 100644 --- a/frontends/php/include/classes/pie.inc.php +++ b/frontends/php/include/classes/pie.inc.php @@ -173,7 +173,7 @@ function selectData(){ } $this->sum += $item_value; - $strvaluelength = max($strvaluelength,strlen($item_value)); + $strvaluelength = max($strvaluelength,strlen(convert_units($item_value,$this->items[$i]['unit']))); } if(isset($graph_sum)) $this->sum = $graph_sum; @@ -303,9 +303,10 @@ function drawLegend(){ } $proc = ($datavalue * 100)/ $this->sum; - +// convert_units($datavalue,$this->items[$i]["units"]), if(isset($data) && isset($datavalue)){ - $strvalue = sprintf(S_VALUE.': '.((round($datavalue)!=$datavalue)?'%0.4f':'%s').' ('.((round($proc)!=$proc)?'%0.2f':'%s')."%s)",$datavalue,$proc,'%'); + $strvalue = sprintf(S_VALUE.': %s ('.((round($proc)!=$proc)?'%0.2f':'%s')."%s)",convert_units($datavalue,$this->items[$i]["units"]),$proc,'%'); + $str = sprintf('%s: %s [%s] ', str_pad($this->items[$i]['host'],$max_host_len,' '), str_pad($this->items[$i]['description'],$max_desc_len,' '), diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php index c65c29f0..e023441b 100644 --- a/frontends/php/include/page_header.php +++ b/frontends/php/include/page_header.php @@ -105,7 +105,7 @@ COpt::profiling_start("page"); array( "url"=>"dashboard.php", "label"=>S_DASHBOARD, - "sub_pages"=>array("chart2.php","charts.php","screens.php","maps.php","map.php") + "sub_pages"=>array("chart2.php","chart6.php","charts.php","screens.php","maps.php","map.php") ), array("url"=>"overview.php" ,"label"=>S_OVERVIEW ), array( @@ -139,7 +139,7 @@ COpt::profiling_start("page"); "url"=>"srv_status.php", "label"=>S_IT_SERVICES, 'forse_disable_subnodes' => true, - "sub_pages"=>array("report3.php","chart_sla.php","chart5.php") + "sub_pages"=>array("report3.php","report7.php","chart_sla.php","chart5.php") ), array("url"=>"vtext.php"), array("url"=>"chart3.php") |
