From e67f7b41d0e755f746c2f44c5308df0782e2b77f Mon Sep 17 00:00:00 2001 From: hugetoad Date: Wed, 5 Feb 2003 07:20:08 +0000 Subject: Improvements for report3.php git-svn-id: svn://svn.zabbix.com/trunk@683 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/report3.php | 98 +++++++++-------------------------------------- 1 file changed, 18 insertions(+), 80 deletions(-) (limited to 'frontends/php/report3.php') diff --git a/frontends/php/report3.php b/frontends/php/report3.php index 180a0bcf..b1ca8404 100644 --- a/frontends/php/report3.php +++ b/frontends/php/report3.php @@ -21,11 +21,14 @@ show_footer(); exit; } + $service=get_service_by_serviceid($HTTP_GET_VARS["serviceid"]); ?> "; + echo "",$service["name"],"";; show_table_v_delimiter(); @@ -51,7 +54,6 @@ "; echo ""; @@ -60,7 +62,7 @@ echo ""; echo ""; echo ""; - echo ""; + echo ""; echo ""; echo "\n"; @@ -100,90 +102,26 @@ echo ""; echo ""; echo ""; - echo ""; - - echo ""; - } - } - echo "
TillOKProblemsPercentagePercentageSLA
"; echo "$f_time" ; echo ""; echo "$t_time" ; echo ""; echo "$f/$t" ; echo "
"; - - show_footer(); - exit; -?> - - if(isset($HTTP_GET_VARS["hostid"])&&!isset($HTTP_GET_VARS["triggerid"])) - { - echo "
"; - $result=DBselect("select host from hosts where hostid=".$HTTP_GET_VARS["hostid"]); - $row=DBfetch($result); - show_table_header($row["host"]); - - $result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.value from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.status=0 and t.triggerid=f.triggerid and h.hostid=".$HTTP_GET_VARS["hostid"]." and h.status in (0,2) and i.status=0 order by h.host, t.description"); - echo ""; - echo ""; - echo ""; -// echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $col=0; - while($row=DBfetch($result)) - { - if(!check_right_on_trigger("R",$row["triggerid"])) + if($service["showsla"]==1) { - continue; + if($stat["ok"]>=$service["goodsla"]) + { + echo ""; + } + else + { + echo ""; + } } - $lasthost=$row["host"]; - - if($col++%2 == 1) { echo ""; } - else { echo ""; } - - $description=$row["description"]; - - if( strstr($description,"%s")) + else { - $description=expand_trigger_description($row["triggerid"]); + echo ""; } - echo ""; -// $description=rawurlencode($row["description"]); - -// echo ""; - $availability=calculate_availability($row["triggerid"],0,0); - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; + + echo ""; } - echo "
DescriptionExpressionTrueFalseUnknownGraph
".$service["goodsla"]."%".$service["goodsla"]."%
-$description".explode_exp($row["expression"],1).""; - printf("%.4f%%",$availability["true"]); - echo ""; - printf("%.4f%%",$availability["false"]); - echo ""; - printf("%.4f%%",$availability["unknown"]); - echo ""; - echo "Show"; - echo "
\n"; } -?> - -"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } -?> - + echo ""; - -- cgit