| <html> | 
 | <head> | 
 | 	<title>Simultaneous Summary Matrix</title> | 
 | </head> | 
 | <?php   | 
 | require('/home/data/httpd/eclipse-php-classes/system/dbconnection_portal_ro.class.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('SimultaneousReleaseFunctions.php'); | 
 |  | 
 | class ReleaseData { | 
 | 	var $projects = array();	 | 
 | 	 | 
 | 	function &getProjectReleaseData($id) { | 
 | 		return $projects[$id]; | 
 | 	} | 
 | } | 
 |  | 
 | class ProjectReleaseData { | 
 | 	var $id; | 
 | 	var $data = array(); | 
 | 	 | 
 | 	function getStatus($key) { | 
 | 		return $data[$key]; | 
 | 	} | 
 | } | 
 |  | 
 | function getReleaseData() { | 
 | 	global $App; | 
 | 	 | 
 | 	$query = "select  | 
 | 				distinct ProjectID  | 
 | 			  from  | 
 | 			  	ProjectInfo,  | 
 | 			  	ProjectInfoValues  | 
 | 			  where  | 
 | 			  	MainKey = 'simultaneousrelease'  | 
 | 			  and  | 
 | 			  	Subkey = 'indigo'  | 
 | 			  and  | 
 | 			  	Value = 1  | 
 | 			  and  | 
 | 			  	ProjectInfo.ProjectInfoID = ProjectInfoValues.ProjectInfoID | 
 | 			  order by ProjectID | 
 | 			  	"; | 
 | 	$results = $App->eclipse_sql($query); | 
 | 	 | 
 | 	$releaseData = new ReleaseData(); | 
 | 	while($row = mysql_fetch_assoc($results)){ | 
 | 		$id = $row['ProjectID']; | 
 | 		$projectReleaseData =  new ProjectReleaseData(); | 
 | 		$projectReleaseData->id = $id; | 
 | 		$releaseData->projects[$id] = $projectReleaseData; | 
 | 	} | 
 | 	 | 
 | 	$dbhc = new DBConnectionPortalRO();  | 
 | 	$dbh = $dbhc->connect(); | 
 | 	 | 
 | 	$query = "select projectid, track_key, track_value, exception, therelease from simultaneous_release_tracker"; | 
 | 	$results = mysql_query($query,$dbh);	 | 
 | 	while ($row = mysql_fetch_assoc($results)) { | 
 | 		$id = $row['projectid']; | 
 | 		$key = $row['track_key']; | 
 | 		$releaseData->projects[$id]->data[$key] = $row; | 
 | 	} | 
 | 	 | 
 | //	Array | 
 | //( | 
 | //    [projectid] => modeling.emf.transaction | 
 | //    [track_key] => unit_tests | 
 | //    [track_value] => on | 
 | //    [exception] =>  | 
 | //    [therelease] =>  | 
 | //) | 
 |  | 
 | 	return $releaseData; | 
 | } | 
 |  | 
 | $releaseData = getReleaseData(); | 
 | $all_fields = get_fields(); | 
 |  | 
 | print_r($all_fields); | 
 |  | 
 | ob_start(); | 
 | ?> | 
 | <!-- include empty lef nav col for now --> | 
 |  | 
 | <div id="maincontent"> | 
 | 	<div id="midcolumn"> | 
 | 		<div style='float: left; margin-left: 50px; margin-right: 50px;'> | 
 | 			<a href="http://eclipse.org/indigo/planning/SimultaneousRleaseOverview.php">Back to Project List</a> | 
 | 			<br> | 
 | 			<?php | 
 | 				if(isset($_GET['showallprojects'])){ | 
 | 					?><a href="?">Top Level Overview Grid</a><?php | 
 | 				}else{ | 
 | 					?><a href="?showallprojects=true">All Projects Overview Grid</a><?php | 
 | 				} | 
 | 			?> | 
 | 		</div> | 
 | 		<div> | 
 | 			<h1><?= $pageTitle ?></h1> | 
 | 			<h2>Simultaneous Release Compliance Grid</h2> | 
 | 			<p style='width: 60%; margin-left: 50px;'>  | 
 | 			This page is to summarize progress towards the yearly <a target="_blank" href="http://wiki.eclipse.org/Indigo/Simultaneous_Release_Plan">Simultaneous Release</a> as the data has been provided by the projects, at the <a target="_blank" href="https://dev.eclipse.org/portal/myfoundation/portal/portal.php">Eclipse Foundations Portal Tracking Tool</a>. For details on the requirements see <a target="_blank" href="http://www.eclipse.org/indigo/planning/EclipseSimultaneousRelease.php">requirements for the Simultaneous Release</a>. | 
 | 			<br> | 
 | 			If questions please see <a target="_blank" href="http://wiki.eclipse.org/SimRel/Simultaneous_Release_Tracker_FAQ">Simultaneous Release Tracker FAQ</a> or ask the question on <a href="mailto:cross-project-issues-dev@eclipse.org">cross-project dev list</a>.  | 
 | 			</p> | 
 | 		</div>		 | 
 | 		 | 
 | 		<table BORDER=2> | 
 | 		<tr> | 
 | 			<td> </td> | 
 | 			<?php | 
 | 			/* | 
 | 			 * show the projects along the top | 
 | 			 */ | 
 | 			foreach($releaseData->projects as $id => $project) { | 
 | 				$pretty_id = str_replace(".","<br>",$id); | 
 | 				echo "<td ALIGN=\"center\">"; | 
 | 				echo "<a href=\"http://eclipse.org/indigo/planning/SimultaneousReleaseOverview.php?action=project&projectid=$id\">$pretty_id</a>"; | 
 | 			} | 
 | 			 | 
 | 			foreach($all_fields as $fieldlabel => $fields) { | 
 | 		    	if(empty($fields['fields'])) continue; | 
 | 				echo "<tr>"; | 
 | 				echo "<td ALIGN=\"center\">". str_replace("-"," ",$fields['name']) . "</td>"; | 
 | 				 | 
 | 				foreach($releaseData->projects as $project) { | 
 | 					$status = $project->getStatus($fields['fields'][0]['key']); | 
 | 					echo "<td>" . $status . "</td>"; | 
 | 				} | 
 | 				echo "</tr>"; | 
 | 			} | 
 | 		 | 
 | 			/* | 
 | 			 * Due to some restrictions on database access, this script cannot connect to | 
 | 			 * the Foundation database to get the IP Log and Release Documentation information. | 
 | 			 * Instead, we have to connect via Ajax call from the browser and do a little | 
 | 			 * JavaScript magic. At this point, we just insert a row into the table to | 
 | 			 * act as a placeholder for this information. The script at the bottom of this | 
 | 			 * file takes care of population. | 
 | 			 */ | 
 | 			echo "<tr><td align=\"centre\">IP Log</td>"; | 
 | 			foreach($releaseData as $id => $project) { | 
 | 				echo "<td align=\"center\"><div id=\"$id-iplog\"><span style='color:yellow; font-size: 150%;'>♦</span></div></td>"; | 
 | 			} | 
 | 			echo "</tr>"; | 
 | 			 | 
 | 			echo "<tr><td align=\"centre\">Release Docuware</td>"; | 
 | 			foreach($releaseData as $id => $projectid) { | 
 | 				echo "<td align=\"center\"><div id=\"$id-docuware\"><span style='color:yellow; font-size: 150%;'>♦</span></div></td>"; | 
 | 			} | 
 | 			echo "</tr>"; | 
 | 			 | 
 | 		?> | 
 | 		</table> | 
 | 		 | 
 | <?php include('SimultaneousReleaseKey.php');?> | 
 | 		 | 
 | 	</div> | 
 | </div> | 
 | <?php | 
 | $html = ob_get_contents(); | 
 | ob_end_clean(); | 
 |  | 
 | print $html; | 
 |  | 
 | ?> | 
 |  | 
 | 	<script src="http://yui.yahooapis.com/2.8.0r4/build/yahoo/yahoo.js"></script>  | 
 | 	<script src="http://yui.yahooapis.com/2.8.0r4/build/event/event.js"></script> | 
 | 	<script src="http://yui.yahooapis.com/2.8.0r4/build/connection/connection.js"></script> | 
 | 	<script> | 
 | 		function successHandler(o){		  | 
 | 			var root = o.responseXML.documentElement; | 
 | 			var reviews = root.getElementsByTagName('review'); | 
 | 			var index = 0; | 
 | 			for(index=0;index<reviews.length;index++) { | 
 | 				var review = reviews[index]; | 
 | 				var name = review.getAttribute("name"); | 
 | 				var id = review.getAttribute("projectid"); | 
 | 				var iplog = review.getAttribute("iplog"); | 
 | 				var iplog_date = review.getAttribute("iplog-date"); | 
 | 				var docuware = review.getAttribute("docuware"); | 
 | 				var docuware_date = review.getAttribute("docuware-date"); | 
 |  | 
 | 				var iplog_div = document.getElementById(id + '-iplog'); | 
 | 				if (iplog_div) { | 
 | 					var status = "<span style='color:green; font-size: 150%;'>♦</span>"; | 
 | 					if (!iplog) status = "<span style='color:lightgreen; font-size: 150%;'>♦</span>"; | 
 | 					if (!iplog_date) status = "<span style='color:red; font-size: 150%;'>♦</span>"; | 
 |  | 
 | 					iplog_div.innerHTML = status; | 
 | 				} | 
 | 				 | 
 | 				var docuware_div = document.getElementById(id + '-docuware'); | 
 | 				if (docuware_div) { | 
 | 					var status = "<span style='color:green; font-size: 150%;'>♦</span>"; | 
 | 					if (!docuware) status = "<span style='color:lightgreen; font-size: 150%;'>♦</span>"; | 
 | 					if (!docuware_date) status = "<span style='color:red; font-size: 150%;'>♦</span>"; | 
 |  | 
 | 					docuware_div.innerHTML = status; | 
 | 				} | 
 | 			}		  | 
 | 		} | 
 | 		YAHOO.util.Connect.asyncRequest('GET', 'http://<?= $_SERVER['SERVER_NAME'] ?>/projects/xml/review_status.php?name=Indigo', { success:successHandler }); | 
 | 	</script> | 
 |  | 
 | </html> |