blob: 5278c4e5216e8ef05dcbfabb416ab831dc782674 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2013-2015 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Denis Roy (Eclipse Foundation)- initial API and implementation
* Christopher Guindon (Eclipse Foundation) - Bug 432355 - Update l&f of the Eclipse site login
*******************************************************************************/
# Build HIPP Control UI
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectList.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/hipp.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/session.class.php");
$ProjectList = new ProjectList();
$ProjectList->selectCommitterProjectList($var_welcomeback['friend']['uid']);
$Session = $App->useSession(true);
$Friend = $Session->getFriend();
$str = "";
$help_link = "<li><a href='https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community&component=Hudson&short_desc=HIPP%20for%20MyProject'>Request a HIPP instance</a></li>";
if($ProjectList->getCount() > 0) {
$help_link = "<li><a href='https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community&component=Hudson&short_desc=HIPP%20Help'>Request Webmaster support for a HIPP instance</a></li>";
$str .= '<div class="block-padding"><h4><img alt="Hudson" src="images/icon_hudson.png" width="30" class="float-right"/> Instances</h4>';
for($i = 0; $i < $ProjectList->getCount(); $i++) {
# Add some spacing
if($i > 0) {
$str .= "<hr />";
}
$Project = $ProjectList->getItemAt($i);
$Hipp = new Hipp();
$Hipp->selectHipp($Project->getProjectID());
# Not all HIPP instances are on hudson.eclipse.org
# $hippurl = "https://hudson.eclipse.org/" . $Project->getProjectShortName();
preg_match("/(\w+)\.org/", $Hipp->getServerHost(), $matches); # server running the instance must match the domain serving the instance
$hippurl = "https://hudson." . $matches[0] . "/" . $Project->getProjectShortName();
$str .= "<div class=\"hipp-control-item\"><a href='$hippurl'>" . $Project->getName() . "</a>: <br/> ";
if ($Hipp->getID() > 0) {
$str .= $Hipp->getControlLink($Project->getProjectID(), $Project->getProjectShortName());
}
else {
$str .= "No HIPP instance found for this project. <a href='https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community&component=Hudson&short_desc=HIPP%20for%20" . $Project->getProjectShortName() . "'>Request one.</a>";
}
$str .= "</div>";
}
$str .= "</div>";
}
?>
<?php if ($var_welcomeback['friend']['is_committer']) :?>
<div class="sideitem background-white">
<h3> Hudson HIPP Control</h3>
<?php print $str; ?>
<div class="block-padding">
<h4>Links</h4>
<ul>
<?php print $help_link;?>
<li><a href='http://wiki.eclipse.org/Hudson'>About Hudson and HIPP</a></li>
</ul>
</div>
</div>
<?php endif;?>
<?php if ($var_welcomeback['friend']['is_committer']) :?>
<div class="sideitem background-white">
<h3>Committer Tools</h3>
<ul>
<li><a href="../committers/bugs/bugz_manager.php">Bugzilla Manager: components, targets, milestones</a></li>
<li><a href="https://dev.eclipse.org/mailman/listinfo/eclipse.org-committers">Committer mailing list</a></li>
<li><a href="../committers/committertools/stats.php">Download stats</a></li>
<li><a href="https://dev.eclipse.org/committers/help/status.php">Eclipse infras status</a></li>
<li><a href="../committers/committertools/ip_test.php">IP address / DNS test tool</a></li>
<li><a href="https://dev.eclipse.org/ipzilla/">IPZilla</a></li>
<li><a href="https://projects.eclipse.org/">PMI - Project management infrastructure</a></li>
<li><a href="../committers/webstats/webstats.php">Website stats</a></li>
</ul>
</div>
<?php endif;?>
<?php if ($Friend->checkUserIsWebmaster()): ?>
<?php include $_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/webmaster/tpl/sidebar.tpl.php" ?>
<?php endif; ?>
<div class="sideitem background-white">
<h3>Development Tools</h3>
<ul>
<?php if($Friend->checkUserIsFoundationStaff()): ?>
<li><a href="../committers/committertools/adReports.php">Ads Report</a></li>
<?php endif; ?>
<li><a href="https://bugs.eclipse.org/">Bugzilla</a></li>
<?php if($Friend->checkUserIsFoundationStaff()): ?>
<li><a href="../committers/committertools/campaignManager.php">Campaign Manager</a></li>
<?php endif; ?>
<li><a href="http://marketplace.eclipse.org/">Eclipse Marketplace</a></li>
<li><a href="http://git.eclipse.org/r/">Gerrit code review</a></li>
<li><a href="http://git.eclipse.org/c/">Git source repositories</a></li>
<li><a href="http://www.eclipse.org/forums/">Forums</a></li>
<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community&component=Git">Request Webmaster Support</a></li>
</ul>
</div>
<style>
hr {
margin-bottom: 6px;
margin-top: 6px;
}
</style>