blob: 243cc3c64f6b8cfd0ce127e5afe894ae06469d1c [file] [log] [blame]
require_once $_SERVER['DOCUMENT_ROOT'] . "/";
require_once $_SERVER['DOCUMENT_ROOT'] . "/";
require_once $_SERVER['DOCUMENT_ROOT'] . "/";
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
$pageTitle = "Project Dashboards";
$pageKeywords = "dashboard";
$pageAuthor = "Bjorn Freeman-Benson Nov 20/05";
<div id="maincontent">
<div id="midcolumn">
<h1><?= $pageTitle ?></h1>
<div style="border: solid thin red; padding: 4px 4px 4px 4px; ">
Please note that the dashboard is currently being repaired and refactored, and is not currently providing useful information.
Please add yourself to the cc list of <a href="">bug 120332</a>
if you want to follow the fun.
<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.
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="">bugzilla</a>.
Or better yet, send us some php fragments that display the information.
For more information about how dashboard works and the legend for the metrics
please visit the <a href="descriptions.php">descriptions</a> page.
<table border=0>
<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>
<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 align="center" valign="top"><a href="descriptions.php">News</a></td>
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/dashboard/utils.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/dashboard/constants.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/stats/hostname.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/stats/common_queries.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/common/projects-info.class.php");
$dbc_cache = new DBConnectionDashboard();
$db_handle = $dbc_cache->connect();
// Load projects
$projects = New ProjectsInfo();
// Determine row sorting
if (isset($_GET['sort']) && ($_GET['sort'] == "project"))
$sortby = "project_id";
$sortby = "liveness DESC";
// 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) or die("MySQL Error: ".mysql_error());
$i = 0;
$elements = array();
$descriptions = array();
while($row = mysql_fetch_assoc($result)){
$project = $row['project_id'];
$tmpp = $projects->getProject($i);
if ($tmpp->getProjectID() == $project){
if ($tmpp->exclude_from_dashboard()) // Don't process projects with
$description = "00000"; // this XML tag
$description = $tmpp->getName();
if ($description != "00000"){
$elements[$description] = $row;
if ($sortby == "project_id") // In the case of "liveness" sorting
sort($descriptions); // the data is sorted by MySQL
$description = $descriptions[$i];
$row = $elements[$description];
$project = $row['project_id'];
$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";
if( $liveness == -1000 ) {
echo "<td colspan=\"4\"><em>Missing or incomplete <a href=\"\">project-info.xml</a></em></td>\n";
} else {
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";
<td colspan=5>&nbsp;</td>
<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>
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/common/top_ten_voted.class.php");
$the_bugs = new TopTen();
include $_SERVER['DOCUMENT_ROOT'] . "/projects/common/top_ten.php";
<font color="grey">Statistics collected on <?= $mysql_date ?> </font>
# Paste your HTML content between the EOHTML markers!
$html = ob_get_contents();
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);