summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/web/networkResult.php
diff options
context:
space:
mode:
authorRefik Hadzialic2011-09-08 20:15:25 +0200
committerRefik Hadzialic2011-09-08 20:15:25 +0200
commitfba1f1c862b3823097ffe4708d50b212580eb790 (patch)
tree6f1c180da3163674f91ee7d5ffc3a33ef57c7053 /notFinishedCode/web/networkResult.php
parentAdded displaying of the image on the page! (diff)
downloadgsm-selftest-fba1f1c862b3823097ffe4708d50b212580eb790.tar.gz
gsm-selftest-fba1f1c862b3823097ffe4708d50b212580eb790.tar.xz
gsm-selftest-fba1f1c862b3823097ffe4708d50b212580eb790.zip
Added another indicator on the display image! Does the connection exist, ping!
Diffstat (limited to 'notFinishedCode/web/networkResult.php')
-rw-r--r--notFinishedCode/web/networkResult.php28
1 files changed, 26 insertions, 2 deletions
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);
-
+ //###########################################################