| <html> |
| <head> |
| <title>Simultaneous Release 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'); |
| |
| 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/Indigo/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> |
| |
| <?php |
| $projects_tracking_with_parent = get_projects_tracking_by_parent($App); |
| $tracking_projects = get_projects_tracking($App); |
| |
| |
| $all_the_fields = get_fields($App,'indigo'); |
| $projects = array(); |
| foreach($tracking_projects as $projectid){ |
| $projects[$projectid] = get_project_tracking($App,$projectid); |
| } |
| |
| |
| |
| if(!isset($_GET['projectid']) and !isset($_GET['showallprojects']) ){ |
| /* |
| * roll up all sub projects with their parent |
| */ |
| foreach($projects as $projectid => $project){ |
| $project_id_parts = explode(".",$projectid); |
| /* |
| * if a sub proejct |
| */ |
| if(count($project_id_parts) > 1){ |
| $parent_project_id = $project_id_parts[0]; |
| if (isset($_GET['debug']) && $parent_project_id == 'eclipse') echo "!!!!Eclipse Project rollup: $projectid !!!!"; |
| $top_level_already_exists = true; |
| if(!isset($projects[$parent_project_id])){ |
| $top_level_already_exists = false;; |
| } |
| |
| /* |
| * combine the release fields into the parent |
| */ |
| $parent_project = $projects[$parent_project_id]; |
| foreach($all_the_fields as $fieldlabel => $fields){ |
| if(empty($fields['fields'])){ |
| $group_type = $shown_field; |
| continue; |
| } |
| foreach($fields['fields'] as $afield){ |
| if($top_level_already_exists != true){ |
| $parent_project[$afield['key']] = $project[$afield['key']]; |
| }elseif(!isset($project[$afield['key']]) and isset($parent_project[$afield['key']])){ |
| unset($parent_project[$afield['key']]); |
| } |
| } |
| } |
| /* |
| * remove the old child project |
| */ |
| $key = array_search($projectid,$tracking_projects); |
| unset($tracking_projects[$key]); |
| /* |
| * add the parent project to the list of tracking project if not already there |
| */ |
| if(!in_array($parent_project_id,$tracking_projects)){ |
| $tracking_projects[] = $parent_project_id; |
| } |
| /* |
| * udpate the project values |
| */ |
| $parent_project['parent_projectid'] = $parent_project_id; |
| $projects[$parent_project_id]= $parent_project; |
| } |
| } |
| sort($tracking_projects); |
| }elseif(isset($_GET['projectid'])){ |
| $parent_projectid = $_GET['projectid']; |
| foreach($tracking_projects as $k => $projectid){ |
| if(!preg_match("/^$parent_projectid*/i",$projectid)){ |
| unset($tracking_projects[$k]); |
| } |
| } |
| } |
| ?> |
| <table BORDER=2> |
| <tr> |
| <td width="<?= (((count($tracking_projects)+1)/100.0))*100 ?>%"> </td> |
| <?php |
| /* |
| * show the project along the top |
| */ |
| foreach($tracking_projects as $projectid){ |
| $project_tracking = $projects[$projectid]; |
| $project_id_cleaned = str_replace(".","<br>",$projectid); |
| ?> |
| <td ALIGN="center" width="<?= (((count($tracking_projects)+1)/100.0))*100 ?>%"> |
| <?php |
| if(isset($project_tracking['parent_projectid']) and $project_tracking['parent_projectid'] != ""){ |
| ?> |
| <a href="http://eclipse.org/indigo/planning/SimultaneousReleaseGrid.php?projectid=<?=$project_tracking['parent_projectid']?>"><?= $project_id_cleaned?></a> |
| <? |
| }else{ |
| ?> |
| <a href="http://eclipse.org/indigo/planning/SimultaneousReleaseOverview.php?action=project&projectid=<?=$projectid?>"><?= $project_id_cleaned?></a> |
| <? |
| } |
| ?> |
| </td> |
| <?php |
| } |
| ?> |
| </tr> |
| <?php |
| foreach($all_the_fields as $fieldlabel => $fields){ |
| if(empty($fields['fields'])){ |
| $group_type = $shown_field; |
| continue; |
| } |
| ?> |
| <tr> |
| <td ALIGN="center"><?=(str_replace("-"," ",$fields['name']))?></td> |
| <?php |
| $group_type =""; |
| foreach($tracking_projects as $projectid){ |
| $project_tracking = $projects[$projectid]; |
| ?> |
| <td ALIGN="center"> |
| <?php |
| if(count($fields['fields']) == 1){ |
| show_line($group_type,$project_tracking,$fields['fields'][0]['key'],false); |
| }else{ |
| $all_completed = true; |
| foreach($fields['fields'] as $afield){ |
| // show_line($group_type,$project_tracking,$afield['key'],false); |
| if(!$project_tracking[$afield['key']]){ |
| $all_completed = false; |
| $key = $afield['key']; |
| }else{ |
| if($key == ""){ |
| $key = $afield['key']; |
| } |
| } |
| } |
| show_line($group_type,$project_tracking,$key,false); |
| } |
| ?> |
| </td> |
| <?php |
| } |
| ?> |
| </tr> |
| <?php |
| } |
| |
| /* |
| * 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($tracking_projects as $projectid) { |
| echo "<td align=\"center\"><div id=\"$projectid-iplog\"><span style='color:yellow; font-size: 150%;'>♦</span></div></td>"; |
| } |
| echo "</tr>"; |
| |
| echo "<tr><td align=\"centre\">Release Docuware</td>"; |
| foreach($tracking_projects as $projectid) { |
| echo "<td align=\"center\"><div id=\"$projectid-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; |
| |
| # Generate the web page |
| //$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| |
| function show_line($group_type,$project_tracking,$key,$show_more_than_diamond = true){ |
| $color = 'yellow'; |
| $value = ""; |
| |
| /* |
| * check if before M7 and in group baisc/commonrepo |
| */ |
| if(($group_type == 'basics' or $group_type == 'commonrepo') and strtotime('now') > strtotime('2010-05-06')){ |
| $color = 'red'; |
| } |
| |
| /* |
| * check if data is prensent |
| */ |
| if(isset($project_tracking[$key])){ |
| $color = 'green'; |
| $value = $project_tracking[$key]; |
| } |
| |
| /* |
| * check for an excpetion |
| */ |
| if(isset($project_tracking[$key.'_exception']) and $project_tracking[$key.'_exception'] != ""){ |
| $color = 'lightgreen'; |
| $value = $project_tracking[$key.'_exception']; |
| } |
| |
| /* |
| * swap out new and noteworthy |
| */ |
| $sub_field = str_replace("_"," ",$key); |
| if(preg_match("/New And Noteworthy/i",$sub_field)){ |
| $sub_field = "Link to Supporting Documentation"; |
| } |
| |
| /* |
| * display colored diamond |
| */ |
| if($show_more_than_diamond){ |
| print " "; |
| } |
| print "<span style='color:$color; font-size: 150%;'>♦</span>"; |
| /* |
| * check value |
| */ |
| if($value != ""){ |
| /* |
| * if the value is a link |
| */ |
| if(preg_match("/http:\/\/|https:\/\//i",$value)){ |
| /* |
| * then make the label a link |
| */ |
| if($show_more_than_diamond){ |
| echo "<a href='$value'>".ucwords($sub_field)."</a>"; |
| } |
| }else{ |
| if($show_more_than_diamond){ |
| print ucwords($sub_field); |
| } |
| /* |
| * display value if not keyword 'on' |
| */ |
| if(!preg_match("/^on$/i",trim($value)) and $show_more_than_diamond){ |
| echo ": ".$value; |
| } |
| } |
| }else{ |
| /* |
| * show the field |
| */ |
| if($show_more_than_diamond){ |
| print ucwords($sub_field); |
| } |
| } |
| if($show_more_than_diamond){ |
| print "<br>"; |
| } |
| } |
| |
| ?> |
| |
| <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> |