From 793cc2e085dc67097d1521d58052033cfdcbfef3 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sun, 7 Apr 2002 18:21:22 +0000 Subject: Better support for non-numeric values. git-svn-id: svn://svn.zabbix.com/trunk@346 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/latest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'frontends/php/latest.php') diff --git a/frontends/php/latest.php b/frontends/php/latest.php index 175959a1..9ec4a8ec 100644 --- a/frontends/php/latest.php +++ b/frontends/php/latest.php @@ -138,10 +138,17 @@ { if(round($row["lastvalue"])==$row["lastvalue"]) { - echo ""; printf("%.0f",$row["lastvalue"]); echo ""; + if($row["value_type"] == 0 ) + { + echo ""; printf("%.0f",$row["lastvalue"]); echo ""; + } + else + { + echo ""; echo substr($row["lastvalue"],0,20)," ..."; echo ""; + } } else - { + { echo ""; printf("%.2f",$row["lastvalue"]); echo ""; } } @@ -151,7 +158,7 @@ } if( isset($row["lastvalue"]) && isset($row["prevvalue"]) && $row["lastvalue"]-$row["prevvalue"] != 0 ) { - echo "".($row["lastvalue"]-$row["prevvalue"]).""; + echo ""; echo $row["lastvalue"]-$row["prevvalue"]; echo ""; } else { -- cgit