blob: 19b757da7a31ff2bc7156be62b7a10f9ce7bfdab [file] [log] [blame]
<?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()); # All on the same line to unclutter the user's desktop'
/* 221934 - this page to remain on eclipse.org */
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");
require_once("/home/data/httpd/eclipse-php-classes/system/dbconnection_projectinfo_ro.class.php");
$dbc = new DBConnectionProjectInfo();
$dbh = $dbc->connect();
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
$pageTitle = "Master Timeline";
$pageKeywords = "timeline";
$pageAuthor = "Karl Matthias -- Sept 11 2007";
// Take a project ID parameter if specified.
preg_match('/^([a-z.0-9\-_]+)$/', $_REQUEST['projectid'], $matches);
$projectid = $matches[1];
$filter = '';
if($projectid != '') {
$filter = "?projectid=$projectid";
}
ob_start();
?>
<div id="maincontent">
<div id="midcolumn">
<h1><?= $pageTitle ?></h1>
<?php
$extraHtmlHeaders = "
<script src=\"http://dev.eclipse.org/timeline/api/timeline-api.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
var tl;
var eventSource = new Timeline.DefaultEventSource();
function onLoad() {
var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSource,
date: \"" . date("D, j M Y H:i:s T") . "\",
width: \"90%\",
intervalUnit: Timeline.DateTime.QUARTER,
intervalPixels: 225
}),
Timeline.createBandInfo({
showEventText: false,
eventSource: eventSource,
date: \"" . date("D, j M Y H:i:s T") . "\",
width: \"10%\",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
tl = Timeline.create(document.getElementById(\"timeline\"), bandInfos);
Timeline.loadXML(\"timeline-data.php$filter\", function(xml, url) { eventSource.loadXML(xml, url); });
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
function getSelectedProject() {
var list = document.getElementById('projectSelect');
if(!list || list.value == 'All Projects') {
return '';
}
return \"?projectid=\" + list.value;
}
window.onload = onLoad;
window.onresize = onResize;
</script>
";
$App->AddExtraHtmlHeader($extraHtmlHeaders);
?>
<div class="homeitem3col">
<h3>Project Releases</h3>
<div id="timeline" style="height: 400px; border: 1px solid #aaa; font-size: small; font-family: Verdana, Arial, sans-serif; font-size: x-small; font-weight: bold;"></div>
</div>
<br clear="all">
<table>
<tr><td>
<b>Legend</b><br>
<div style="padding-left: 2em">
<font color="#BBBBBB"><b>Grey</b></font> is a tentative release
<br><font color="#666699"><b>Light Purple</b></font> is a planned release
<br><font color="#333366"><b>Purple</b></font> is a completed release
</div>
</td>
<td valign="top"><b>Filter by Project</b><br>
<div style="padding-left: 2em">
<form>
<select id="projectSelect" name="projectid" onchange="eventSource.clear(); Timeline.loadXML('timeline-data.php' + getSelectedProject(), function(xml, url) { eventSource.loadXML(xml, url); }); tl.paint();">
<option value="All Projects" selected>All Projects</option>
<?php
$result2 = mysql_query("
SELECT distinct(ProjectID) FROM ProjectInfo
WHERE MainKey = 'release'
ORDER BY ProjectID", $dbh);
$result3 = mysql_query("
SELECT distinct(ProjectID) FROM v_projectinfo_merged
WHERE MainKey = 'release'
AND SubKey = 'name'
AND Value = 'NORELEASES'", $dbh);
$omit_projects = array();
while($row2 = mysql_fetch_assoc($result3)) {
$omit_projects[] = $row2['ProjectID'];
}
while($row = mysql_fetch_assoc($result2)) {
if(!in_array($row['ProjectID'], $omit_projects)) {
echo "<option value=\"" . $row['ProjectID'] . "\">" . $row['ProjectID'] . "</option>\n";
}
}
?>
</select>
</form>
</div>
</td></tr>
</table>
<br>
<b>Source Data</b><br>
The timeline is generated from the project status infrastructure, specifically the releases information. Projects that do not show up in the timeline are missing that data.
<a href="/projects/dev_process/project-status-infrastructure.php">explain...</a>
</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);
?>