From fba1f1c862b3823097ffe4708d50b212580eb790 Mon Sep 17 00:00:00 2001 From: Refik Hadzialic Date: Thu, 8 Sep 2011 20:15:25 +0200 Subject: Added another indicator on the display image! Does the connection exist, ping! --- notFinishedCode/web/networkResult.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'notFinishedCode/web/networkResult.php') diff --git a/notFinishedCode/web/networkResult.php b/notFinishedCode/web/networkResult.php index 3d44263..2f46044 100644 --- a/notFinishedCode/web/networkResult.php +++ b/notFinishedCode/web/networkResult.php @@ -7,6 +7,7 @@ include("class/pDraw.class.php"); include("class/pImage.class.php"); + include("class/pSurface.class.php"); //test case php defined for defining the colors and what's OK and what's wrong! include 'testCase.php'; @@ -29,7 +30,6 @@ $MyData->setAbscissa("Networks"); - /* Create the pChart object */ $myPicture = new pImage(700,430,$MyData); @@ -239,6 +239,29 @@ $myPicture->drawText(399,256,"SIP",$TextSettings); //############################### + //PING RESULTS + //START ############################################ + $myPicture->setGraphArea(530,280,660,290); + + // Create the surface object + $mySurface = new pSurface($myPicture); + + // Set the grid size + $mySurface->setGrid(4,0); + + $mySurface->writeXLabels(array("Angle"=>45,"Labels"=>array("SIP Server","SIP Gate","UNI SIP","nanoBTS 1","nanoBTS 2"))); + $mySurface->writeYLabels(array("Labels"=>array("Ping"))); + + $Palette = array(0=>array("R"=>0,"G"=>255,"B"=>0, "Alpha"=>40), + 1=>array("R"=>255,"G"=>0,"B"=>1, "Alpha"=>40)); + // Add random values + for($i=0; $i<=5; $i++) + { + $mySurface->addPoint($i,0,rand(0,1)); + } + + // Draw the surface chart + $mySurface->drawSurface(array("Border"=>TRUE,"Surrounding"=>40,"Palette"=>$Palette)); //A BIT OF STATISTICS @@ -260,13 +283,14 @@ /* Draw the chart */ $myPicture->drawBarChart(array("DisplayPos"=>LABEL_POS_INSIDE,"DisplayValues"=>TRUE,"Rounded"=>TRUE,"Surrounding"=>30,"OverrideColors"=>$Palette)); + //############################################STATISTICS //DATE AND TEST NUMBER /* Write some text */ $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); $TextSettings = array("BoxRounded"=>TRUE,"R"=>255,"G"=>255,"B"=>255,"Angle"=>0,"FontSize"=>9); $myPicture->drawText(460,425,"Task #:32432 07.09.2011 21:19:00",$TextSettings); - + //########################################################### -- cgit v1.2.3-55-g7522