blob: b7089d30960f9adf7b0edd9ecba143808aa80fa4 [file] [log] [blame]
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/include-before-definitions.php");
$pageTitle = "Project Dashboards";
$pageKeywords = "dashboard";
$pageAuthor = "Bjorn Freeman-Benson Nov 20/05";
include($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/include-after-definitions.php");
?>
<div id="maincontent">
<div id="midcolumn">
<h1><?= $pageTitle ?></h1>
<h2>Introduction</h2>
<p>These dashboards are for the developers on the open source projects.
The information is designed to provide you with a sense of how well your
project (and other projects) are functioning. Is it making progress? Falling
behind? Does it have an active community? And so on.
</p><p>
Of course, all of this is a noble goal - today the dashboard is fairly primitive.
We are incrementally improving it.
Please submit all suggestions for information you'd like to see
for your (and others) projects via <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community">bugzilla</a>.
Or better yet, send us some php fragments that display the information.
</p>
<h2>Dashboards</h2>
<table border=0>
<tr>
<td colspan="2" align="center" bgcolor="#DDDDDD">Click to sort by these columns</td>
<td colspan="3" align="center">Click on the project name to go to the detail page</td>
</tr>
<tr>
<td align="center" valign="top"><a style="font-weight: bold;" href="index.php?sort=project">Project name</a></td>
<td align="center" valign="top"><a style="font-weight: bold;" href="index.php?sort=liveness">Liveness</a></td>
<td align="center" valign="top"><a href="descriptions.php">Bugs</a></td>
<td>&nbsp;<br></td>
<td align="center" valign="top"><a href="descriptions.php">News</a></td>
</tr>
<?php
require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_dashboard_rw.class.php";
require_once "../stats/groups.class.php";
require_once "utils.php";
require_once "../stats/hostname.php";
require_once "../stats/common_queries.php";
require_once "constants.php";
$dbc_cache = new DBConnectionDashboard();
$db_handle = $dbc_cache->connect();
// Load groups to get descriptions
$groups = new Groups();
$groups->loadGroups();
// Determine row sorting
if (isset($_GET['sort']) && ($_GET['sort'] == "liveness"))
$sortby = "liveness DESC";
else
$sortby = "project";
// Get last date available in DB
$mysql_date = get_last_date($db_handle);
// Get groups
$query = "SELECT * FROM ".stats_table()." WHERE stats_date = \"".$mysql_date."\" ORDER BY ".$sortby;
$result = mysql_query($query,$db_handle);
$i = 0;
$elements = array();
$descriptions = array();
while($row = mysql_fetch_assoc($result)){
$project = $row['project'];
$description = $groups->getDescriptionFromProject($project);
$elements[$description] = $row;
array_push( $descriptions, $description );
}
if ($sortby == "project") // In the case of "liveness" sorting
sort($descriptions); // the data is sorted by MySQL
for($i=0;$i<count($descriptions);$i++){
$description = $descriptions[$i];
$row = $elements[$description];
$project = $row['project'];
$liveness = $row['liveness'];
$bugs = $row['bugs_total'];
$delta7 = $row['bugs_7_delta'];
$delta30 = $row['bugs_30_delta'];
$delta180 = $row['bugs_180_delta'];
$perc7 = $row['bugs_7_percentage'];
$perc30 = $row['bugs_30_percentage'];
$perc180 = $row['bugs_180_percentage'];
$news7 = $row['news_7_number_posts'];
$news30 = $row['news_30_number_posts'];
$answers7 = $row['news_7_answer_average_time'];
$answers30= $row['news_30_answer_average_time'];
echo "<tr>\n";
echo "<td><a href=\"dashboard_detail.php?project=$project\">".$description."</a></td>\n";
echo "<td align=\"center\">".$liveness."</td>\n";
echo "<td align=\"center\"><a href=\"dashboard_detail.php?project=$project\">".light_bugs($bugs, $delta7, $perc7);
echo light_bugs($bugs, $delta30, $perc30);
echo light_bugs($bugs, $delta180, $perc180)."</a></td>\n";
echo "<td>&nbsp;</td>\n";
echo "<td align=\"center\"><a href=\"dashboard_detail.php?project=$project\">".light_news($news7, POSTS_7_RED, POSTS_7_GREEN);
echo light_news_answers($answers7, $news7);
echo light_news($news30, POSTS_30_RED, POSTS_30_GREEN);
echo light_news_answers($answers30, $news30)."</a></td>\n";
echo "</tr>\n";
}
?>
<tr>
<td colspan=5>&nbsp;</td>
</tr>
<tr>
<td colspan=5 align="center">
<a style="text-decoration: none;" href="dashboard_csv_download.php">
<div style="border:1px solid #0080C0; padding:5px; background: #FFFFFF; width:200px;">Download statistics to CSV file</div>
</a>
</td>
</tr>
</table>
<br><br>
<font color="grey">Statistics collected on <?= $mysql_date ?> </font>
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/include-end-of-page.php");
?>