| <?php |
| |
| require_once $_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"; |
| require_once $_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"; |
| require_once $_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"; |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| include($App->getProjectCommon()); |
| |
| $pageTitle = "Project Dashboards"; |
| $pageKeywords = "dashboard"; |
| $pageAuthor = "Bjorn Freeman-Benson Nov 20/05"; |
| |
| ob_start(); |
| ?> |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <h1><?= $pageTitle ?></h1> |
| |
| <h2>Introduction</h2> |
| |
| <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="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120332">bug 120332</a> |
| if you want to follow the fun. |
| </div> |
| |
| <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><p> |
| For more information about how dashboard works and the legend for the metrics |
| please visit the <a href="descriptions.php">descriptions</a> page. |
| </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> <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($_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"; |
| else |
| $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']; |
| for($i=0;$i<$projects->hasProjects();$i++){ |
| $tmpp = $projects->getProject($i); |
| if ($tmpp->getProjectID() == $project){ |
| if ($tmpp->exclude_from_dashboard()) // Don't process projects with |
| $description = "00000"; // this XML tag |
| else |
| $description = $tmpp->getName(); |
| break; |
| } |
| } |
| if ($description != "00000"){ |
| $elements[$description] = $row; |
| array_push($descriptions,$description); |
| } |
| } |
| |
| if ($sortby == "project_id") // 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_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=\"http://www.eclipse.org/projects/dev_process/project-status-infrastructure.php\">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> </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> </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> |
| |
| <?php |
| |
| 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> |
| |
| </div></div> |
| |
| <?php |
| # Paste your HTML content between the EOHTML markers! |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| |
| # Generate the web page |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |