aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-08-15 22:24:20 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-08-15 22:25:14 +0200
commit68bd3d41630c448b47d6ec860fda4a29dbf8dcad (patch)
tree50ac62d488c9f5672831037f0e3ef24b8a9cbca0 /web
parent7340a789e7a2574b46ef08022c0221f2bc972f3c (diff)
downloadbuildroot-test-68bd3d41630c448b47d6ec860fda4a29dbf8dcad.tar.gz
buildroot-test-68bd3d41630c448b47d6ec860fda4a29dbf8dcad.tar.bz2
web/graph.php: drop, as pGraph is not PHP7 compatible
The pchart library that was used to generate the graph is no longer maintained, and not compatible with PHP7, so let's drop support for displaying this graph of build results. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'web')
-rw-r--r--web/graph.php65
-rw-r--r--web/stats.php2
2 files changed, 0 insertions, 67 deletions
diff --git a/web/graph.php b/web/graph.php
deleted file mode 100644
index 46ab12f..0000000
--- a/web/graph.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-include("../externals/pchart/class/pDraw.class.php");
-include("../externals/pchart/class/pImage.class.php");
-include("../externals/pchart/class/pData.class.php");
-
-if (isset($_GET['branch']) && preg_match("/^[a-z0-9_\.]*$/", $_GET['branch']))
- $branch = $_GET['branch'];
-else
- $branch = "master";
-
-include("funcs.inc.php");
-
-$myData = new pData();
-
-$db = new db();
-
-$sql = "select * from (select sum(status=0) as success,sum(status=1) as failures,sum(status=2) as timeouts,count(*) as total,date(builddate) as day from results where branch='$branch' group by date(builddate) order by date(builddate) desc limit 180) as foo order by day;";
-
-$ret = $db->query($sql);
-if ($ret == FALSE) {
- echo "Cannot retrieve statistics<br/>";
- bab_footer();
- exit;
-}
-
-$dates_data = array();
-$success_data = array();
-$failures_data = array();
-$timeouts_data = array();
-$total_data = array();
-
-while($current = mysqli_fetch_object($ret)) {
- array_push($dates_data, $current->day);
- array_push($success_data, $current->success * 100 / $current->total);
- array_push($failures_data, $current->failures * 100 / $current->total);
- array_push($timeouts_data, $current->timeouts * 100 / $current->total);
-}
-
-/* Add data in your dataset */
-$myData->addPoints($success_data, "success %");
-$myData->addPoints($failures_data, "failure %");
-$myData->addPoints($timeouts_data, "timeout %");
-$myData->setAxisName(0,"Percentage of builds");
-
-$myData->addPoints($dates_data, "Labels");
-$myData->setSerieDescription("Labels","Dates");
-$myData->setAbscissa("Labels");
-
-/* Create a pChart object and associate your dataset */
-$myPicture = new pImage(1000,600,$myData);
-
-/* Choose a nice font */
-$myPicture->setFontProperties(array("FontName"=>"../externals/pchart/fonts/verdana.ttf","FontSize"=>8));
-
-/* Define the boundaries of the graph area */
-$myPicture->setGraphArea(70,50,950,500);
-
-$myPicture->drawScale(array("LabelRotation" => 90, "LabelSkip" => 10));
-
-$myPicture->drawLegend(20,20,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
-
-$myPicture->drawLineChart();
-
-$myPicture->Stroke();
-?> \ No newline at end of file
diff --git a/web/stats.php b/web/stats.php
index 378f56a..fd2192b 100644
--- a/web/stats.php
+++ b/web/stats.php
@@ -118,7 +118,5 @@ echo " </tr>\n";
echo "</table>\n";
echo "<p></p>";
-echo "<center><img src=\"graph.php?branch=$branch\"/></center>";
-
bab_footer();
?>