blob: 546a6f866e27c4b62ee64d073bf37959a18ea122 [file] [log] [blame]
<%--
Copyright (c) 2020 Eclipse contributors and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
--%>
<%@jet package="org.eclipse.justj.p2" class="UpdateSiteIndex" imports="java.io.* java.util.* org.eclipse.justj.codegen.model.util.Indexer.Property"%>
<%UpdateSiteIndexGenerator parent = (UpdateSiteIndexGenerator)argument;
List<UpdateSiteIndexGenerator> children = parent.getChildren();
String title = parent.getTitle();
String toggleExpand = "<span style=\"font-size: 100%;\" class=\"orange toggle-state-on\">&#x25E2;</span>";
String toggleCollapse = "<span style=\"font-size: 100%;\" class=\"orange toggle-state-off\">&#x25B7;</span>";
int toggleCounter = 0;%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title><%=title%></title>
<meta name="keywords" content="eclipse,<%=title.toLowerCase()%>"/>
<meta name="description" content="<%=title%> p2 Update Sites"/>
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,700,300,600,100" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/styles.min.css"/>
<link rel="icon" type="image/ico" href="<%=parent.getFavicon()%>"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body id="body_solstice">
<%if (parent.getChildren().isEmpty() || !parent.getSuperCompositeChildren().isEmpty()) {%>
<style>
.toggle {
display: none;
}
.toggle-label {
font-size: 100%;
margin-bottom: 0px;
font-weight: normal;
}
.toggle + .toggle-label + .toggle-content {
max-height: 0;
opacity: 0;
overflow: hidden;
transition: all .4s ease-in-out;
}
.toggle + .toggle-label > .toggle-state-on {
display: none;
}
.toggle + .toggle-label > .toggle-state-off {
display: inherit;
}
.toggle:checked + .toggle-label > .toggle-state-on {
display: inherit;
}
.toggle:checked + .toggle-label > .toggle-state-off {
display: none;
}
.toggle:checked + .toggle-label + .toggle-content {
max-height: none;
opacity: 1;
}
.toggle-content {
padding-left: 2em;
}
.toggle-label:hover, .toggle-label:hover * {
cursor: pointer;
}
</style>
<%}%>
<script>
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
function toggle(id) {
var e = document.getElementById(id);
if (e.title == 'Expand All') {
e.title= 'Collapse All';
e.innerHTML = '&#x25E2;';
} else {
e.title= 'Expand All';
e.innerHTML = '&#x25B7;';
}
}
function expand(id, all_id) {
var t = document.getElementById(all_id);
var e = document.getElementById(id);
var f = document.getElementById(id+"_arrows");
if (t.title == 'Collapse All'){
e.style.display = 'block';
f.innerHTML = '&#x25E2;';
} else {
e.style.display = 'none';
f.innerHTML = '&#x25B7;';
}
}
function expand_collapse(id) {
var e = document.getElementById(id);
var f = document.getElementById(id+"_arrows");
if (e.style.display == 'none'){
e.style.display = 'block';
f.innerHTML = '&#x25E2;';
} else {
e.style.display = 'none';
f.innerHTML = '&#x25B7;';
}
}
</script>
<header role="banner" id="header-wrapper">
<div class="container">
<div class="row" id="header-row">
<div class="hidden-xs col-sm-8 col-md-6 col-lg-5" id="header-left">
<div class="wrapper-logo-default">
<a href="<%=parent.getTitleURL()%>">
<img class="logo-eclipse-default img-responsive hidden-xs" style="height: 50px; space: nowrap; display: inline-block;" alt="Project Logo" src="<%=parent.getTitleImage()%>"/>
</a>
</div>
</div>
</div>
</div>
</header>
<section class="hidden-print default-breadcrumbs" id="breadcrumb">
<div class="container">
<h3 class="sr-only">Breadcrumbs</h3>
<div class="row">
<div class="col-sm-16 padding-left-30">
<ol class="breadcrumb">
<li><a href="https://www.eclipse.org/">Home</a></li>
<li><a href="https://www.eclipse.org/projects/">Projects</a></li>
<%for (Map.Entry<String, String> entry : parent.getBreadcrumbs().entrySet()) {%>
<%if (entry.getValue() == null) {%>
<li class="active"><%=entry.getKey()%></li>
<%} else if (entry.getValue().trim().isEmpty()) {%>
<li><%=entry.getKey()%></li>
<%} else {%>
<li><a href="<%=entry.getValue()%>"><%=entry.getKey()%></a></li>
<%}%>
<%}%>
</ol>
</div>
<div class="col-sm-8 margin-top-15"></div>
</div>
</div>
</section>
<main class="no-promo">
<div class="novaContent container" id="novaContent">
<!-- navigation sidebar -->
<aside id="leftcol" class="col-md-4">
<ul id="leftnav" class="ul-left-nav fa-ul hidden-print">
<%for (Map.Entry<String, String> entry : parent.getNavigation().entrySet()) {
String label = entry.getValue();
boolean isTopLevel = !label.startsWith("-");
if (!isTopLevel)
label = label.substring(1);
int index = label.indexOf('@');
if (index != -1)
label = label.substring(0, label.length() - 1);%>
<li<%if (isTopLevel) {%> class="separator"<%}%>>
<%if (!isTopLevel) {%>
<tt class="orange">&#xbb;</tt>
<%}%>
<a class="separator" href="<%=entry.getKey()%><%if (!entry.getKey().startsWith("http")) {%>/index.html<%}%>"><%=label%></a>
<%if (index != -1) {%>
<div style="float: right;"><tt class="orange">&#xab;</tt></div>
<%}%>
</li>
<%}%>
</ul>
</aside>
<div id="maincontent">
<div id="midcolumn">
<h2 style="text-align: center;"><%=parent.getTitle()%></h2>
<%if (children.isEmpty()) {
String date = parent.getDate();
if (date != null) {%>
<p style="font-size: 125%; text-align: center;">
<b>Built: <%=date%></b>
</p>
<%}%>
<%}%>
<%if (!parent.isRoot()) {
String mainID = "main-list";
Map<String, String> repositories = parent.getRepositoryChildren();
boolean hasTwisty = repositories != null && repositories.size() > 1;%>
<p style="text-align: center;">
<%if (hasTwisty) {%>
<button id="<%=mainID%>_arrows" class="orange" style="background-color: white; margin-left: 1em; border: none; padding: 0px 0px;" onclick="expand_collapse('<%=mainID%>');">&#x25B7;</button>
<%}%>
<button title="Copy to Clipboard" class="orange" style="font-size: 150%; background-color: white; border: none; padding: 0px 0px;" onclick="copyToClipboard('#p1')">&#x270e;</button>
<span id="p1" style="font-size: 125%"><%=parent.getSiteURL()%></span>
<span <%if (hasTwisty) {%>style="display: none;" <%}%>id="<%=mainID%>">
<%if (repositories != null) {
int count = 0;
for (Map.Entry<String, String> entry : repositories.entrySet()) {
String repository = entry.getKey();
String relativeURL = entry.getValue();
String id = parent.getFolderID(repository);%>
<%if (count++ != 0 || !hasTwisty) {%>
<br/>
<%}%>
<button title="Copy to Clipboard" class="orange" style="font-size: 125%; margin-left: 1em; background-color: white; border: none; padding: 0px 0px;" onclick="copyToClipboard('#<%=id%>')">&#x270e;</button>
<a href="<%=relativeURL%>/index.html" id="<%=id%>" style="font-size: 100%; font-weight: normal;"><%=repository%></a>
<%}%>
<%}%>
</span>
</p>
<%}%>
<%if (parent.getBodyImage() != null) {%>
<br/>
<img style="float: right; height: 96pt;" src="<%=parent.getBodyImage()%>" alt=""/>
<%}%>
<%if (parent.isRoot()) {%>
<p>This is the root folder for <%=parent.getProjectLabel()%> p2 update sites.</p>
<%if (parent.getBuildURL() != null) {%>
<p>These update sites are produced by <a href="<%=parent.getBuildURL()%>" target="_blank"><%=parent.getBuildURL()%></a>.</p>
<%}%>
<%} else {%>
<p>
This is a p2 update site for the <%=parent.getProjectLabel()%>.
Use the <button title="Copy to Clipboard" class="orange" style="background-color: white; border: none; padding: 0px 0px;" onclick="copyToClipboard('#p1')">&#x270e;</button> glyph to copy the update site URL to the system clipboard.
<%if (parent.hasArchive()) {%>
Alternatively, you can download the archive of this repository from the download sidebar on the right.
<%}%>
</p>
<%{
String buildType = parent.getBuildType();
boolean isLatest = parent.isLatest();
Map<String, String> repositoryChildren = parent.getRepositoryChildren();
int repositoryChildrenSize = repositoryChildren == null ? 0 : repositoryChildren.size();
if ("nightly".equals(buildType)) {%>
<%if (isLatest) {%>
<p>
This composite update site references the most recent successful nightly build.
</p>
<%} else if (repositoryChildren != null) {%>
<p>
This composite update site references the <%=repositoryChildrenSize%> most recent successful nightly build<%if (repositoryChildrenSize != 1) {%>s<%}%>.
</p>
<%} else {%>
<p>
This simple update site will be retained <b>only</b> until it is no longer one of the <%=parent.getRetainedNightlyBuilds()%> most recent successful nightly builds.
</p>
<%}%>
<%} else if ("milestone".equals(buildType)) {%>
<%if (isLatest) {%>
<p>
This composite update site references the most recent successful milestone build.
</p>
<%} else if (repositoryChildren != null) {%>
<p>
This composite update site references <%=repositoryChildrenSize%> successful milestone build<%if (repositoryChildrenSize != 1) {%>s<%}%>.
These sites will be retained <b>only</b> until the first successful milestone build of the next <%=parent.getProjectLabel()%> release.
</p>
<%} else {%>
<p>
This simple update site will be retained <b>only</b> until the first successful milestone build of the next <%=parent.getProjectLabel()%> release.
</p>
<%}%>
<%} else if ("release".equals(buildType)) {%>
<%if (isLatest) {%>
<p>
This composite update site references the most recent release of <%=parent.getProjectLabel()%>.
</p>
<%} else if (repositoryChildren != null) {%>
<p>
This composite update site references <%=repositoryChildrenSize%> release<%if (repositoryChildrenSize != 1) {%>s<%}%>.
These sites will be retained <b>permanently</b>.
</p>
<%} else {%>
<p>
This simple update site will be retained <b>permanently</b>.
</p>
<%}%>
<%} else {%>
<%if (isLatest) {%>
<p>
This composite update site references the most recent release of <%=parent.getProjectLabel()%>.
</p>
<%} else if (repositoryChildren != null) {
int mainID = ++toggleCounter;%>
<div>
This composite update site references <%=repositoryChildrenSize%> releases from the following location<%if (repositoryChildrenSize != 1) {%>s<%}%>:
<input type="checkbox" id="toggle-id-<%=mainID%>" class="toggle"/>
<label for="toggle-id-<%=mainID%>" class="toggle-label" style="font-size: 100%;"><%=toggleExpand%><%=toggleCollapse%></label>
<ul class="toggle-content" style="margin-top: 2px; white-space: normal; list-style-type: none;">
<%for (UpdateSiteIndexGenerator child : parent.getSuperCompositeChildren()) {%>
<li><a href="<%=child.getSiteURL()%>/index.html"><%=child.getLabel()%></a></li>
<%}%>
</ul>
</div>
<%} else {%>
<p>
This type of repo should not exist.
</p>
<%}%>
<%}%>
<%}%>
<%}%>
<%if (!children.isEmpty()) {%>
<%List<String> sdks = parent.getSDKs();
if (!sdks.isEmpty()) {%>
<p>This update site provides access to the following features:</p>
<ul>
<%for (String sdk : sdks) {%>
<li style="font-size: 90%;"><%=sdk%></li>
<%}%>
</ul>
<%}%>
<p>
The update sites listed below provide access to specific versions of the features listed above.
<%if (parent.isRoot()) {%>
Use the <button title="Copy to Clipboard" class="orange" style="background-color: white; border: none; padding: 0px 0px;">&#x270e;</button> glyph to copy the update site URL to the system clipboard.
<%}%>
</p>
<%for (UpdateSiteIndexGenerator child : children) {
String id = parent.getFolderID(child.getFolderName());%>
<h3><a href="<%=child.getRelativeIndexURL()%>" style="font-weight: normal;"><%=child.getTitle()%></a></h3>
<p>The following is the p2 update site URL for this repository:</p>
<p style="margin-left: 1em">
<button title="Copy to Clipboard" class="orange" style="font-size: 125%; background-color: white; border: none; padding: 0px 0px;" onclick="copyToClipboard('#<%=id%>')">&#x270e;</button>
<a href="<%=child.getRelativeIndexURL()%>" id="<%=id%>" style="font-weight: normal;"><%=child.getSiteURL()%></a>
</p>
<p>Click the header link or the update site link for more details.</p>
<%}%>
<%} else {
String resourceURL = parent.getResourceURL();%>
<%if (resourceURL != null) {%>
<p>
This update site's source code is generated from
<a href="<%=resourceURL%>" target="model"><%if (resourceURL.startsWith("justj.")) {%><img style="height: 2ex; space: nowrap; display: inline-block;" alt="justj" src="https://www.eclipse.org/justj/justj_title.svg"/><%=resourceURL.substring(5)%><%} else {%><%=resourceURL%><%}%></a>.
</p>
<%}%>
<%Map<String, List<String>> features = parent.getFeatures();
if (!features.isEmpty()) {%>
<p>
This update site provides access to the following features.
Each section is expandable via
<%{
StringBuilder onClick = new StringBuilder();
for (String feature : features.keySet()) {
onClick.append("expand('").append(parent.getFolderID(feature) + "_feature").append("', 'all_features');");
}%>
<span style="white-space: nowrap;">the&nbsp;<button id="all_features" title="Expand All" class="orange" style="background-color: white; border: none; padding: 0px 0px;" onclick="toggle('all_features');<%=onClick%>">&#x25B7;</button>&nbsp;glyph</span>
<%}%>
to provide detailed information about the requirements of each feature.
</p>
<ul style="margin-left: -1em; list-style-type: none; padding: 0; margin: 0;">
<%for (Map.Entry<String, List<String>> entry : features.entrySet()) {
String feature = entry.getKey();
String id = parent.getFolderID(feature) + "_feature";%>
<li style="font-size: 90%;">
<button id="<%=id%>_arrows" class="orange" style="background-color: white; margin-left: 1em; border: none; padding: 0px 0px;" onclick="expand_collapse('<%=id%>');">&#x25B7;</button>
<span style="font-size:100%;"><%if (parent.isSDK(feature)) {%><b><%}%><%=feature.replace(" ", "&nbsp;")%><%if (parent.isSDK(feature)) {%></b><%}%></span>
<div id="<%=id%>" style="display:none; margin-left: 2em; white-space: nowrap;">
<%for (String line : entry.getValue()) {%>
<%=line%><br/>
<%}%>
</div>
</li>
<%}%>
</ul>
<%}%>
<%Map<String, List<String>> bundles = parent.getBundles();
if (!bundles.isEmpty()) {%>
<h3><%=parent.getProjectLabel()%> Bundles</h3>
<p>
This update site provides access to the bundles listed below.
Each section is expandable via
<%{
StringBuilder onClick = new StringBuilder();
for (String bundle : bundles.keySet()) {
onClick.append("expand('").append(parent.getFolderID(bundle)).append("', 'all');");
}%>
<span style="white-space: nowrap;">the&nbsp;<button id="all" title="Expand All" class="orange" style="background-color: white; border: none; padding: 0px 0px;" onclick="toggle('all');<%=onClick%>">&#x25B7;</button>&nbsp;glyph</span>
<%}%>
to provide detailed information about the exports and imports of each bundle.
</p>
<ul>
<li>
The &#x21D6; glyph denotes the exported bundle identifier along with its full version.
</li>
<li>
The &#x2196; glyph denotes an exported java package along with its full version, if specified.
</li>
<li>
The &#x21D8; glyph denotes a required bundle along with its version range, if specified, as well as information about whether the requirement is optional and if so, whether it's greedy.
</li>
<li>
The &#x2198; glyph denotes a required package along with its version range, if specified.
</li>
</ul>
<ul style="margin-left: -1em; list-style-type: none; padding: 0; margin: 0;">
<%for (Map.Entry<String, List<String>> entry : bundles.entrySet()) {
String bundle = entry.getKey();
String bundleSize = parent.getBundleSize(bundle);
String xmlTag = bundleSize.endsWith("MB") ? "b" : "span";
String id = parent.getFolderID(bundle);
List<Property> properties = parent.getProperties(bundle);%>
<li style="font-size: 90%;">
<button id="<%=id%>_arrows" class="orange" style="background-color: white; margin-left: 1em; border: none; padding: 0px 0px;" onclick="expand_collapse('<%=id%>');">&#x25B7;</button>
<span style="font-size:100%;"><%=bundle.replace(" ", "&nbsp;")%><%if (!bundleSize.isEmpty()) {%>&nbsp;&nbsp;<<%=xmlTag%> style="color: SteelBlue;"><%=bundleSize%></<%=xmlTag%>><%}%></span>
<div id="<%=id%>" style="display:none; margin-left: 2em; white-space: nowrap;">
<%if (!properties.isEmpty()) {
int mainID = ++toggleCounter;%>
<input type="checkbox" id="toggle-id-<%=mainID%>" class="toggle"/>
<label for="toggle-id-<%=mainID%>" class="toggle-label" style="font-size: 100%;"><%=toggleExpand%><%=toggleCollapse%> Properties</label>
<ul class="toggle-content" style="margin-top: 0px; white-space: normal;">
<%for (Property property : properties) {
List<String> propertyChildren = property.getChildren();
if (propertyChildren.isEmpty()) {%>
<li>
<%=property.getKey()%> = <%=property.getValue()%>
</li>
<%} else {
int valueID = ++toggleCounter;%>
<li>
<input type="checkbox" id="toggle-id-<%=valueID%>" class="toggle"/>
<label for="toggle-id-<%=valueID%>" class="toggle-label"><%=toggleExpand%><%=toggleCollapse%> <%=property.getKey()%></label>
<ul class="toggle-content" style="margin-top: 0px;">
<%for (String value : propertyChildren) {
valueID = ++toggleCounter;%>
<li>
<%=value%>
</li>
<%}%>
</ul>
</li>
<%}%>
<%}%>
</ul>
<%}%>
<%for (String line : entry.getValue()) {%>
<%=line%><br/>
<%}%>
</div>
</li>
<%}%>
</ul>
<%}%>
<%}%>
</div>
<%if (parent.hasArchive()) {
String archiveName = new File(parent.getArchive()).getName();
String sha256Name = new File(parent.getDigest("SHA-256")).getName();
String sha512Name = new File(parent.getDigest("SHA-512")).getName();%>
<div style="padding-top: 100;" id="rightcolumn">
<div class="sideitem">
<h6>Downloads</h6>
<p>
<a style="font-size: 75%; font-weight: bold;" href="<%=parent.getArchiveDownloadURL()%>" target="_blank"><%=archiveName%></a>
<br/>
<a class="btn btn-warning" style="margin-top: 5pt; font-size: 90%;" href="<%=parent.getArchiveDownloadURL()%>" target="_blank" title="Download <%=archiveName%>">Download</a>
<a class="btn btn-warning" style="margin-top: 5pt; border-color: DarkGreen; background-color: OliveDrab; font-size: 90%; padding-left: 0.2em; padding-right: 0.2em;" href="<%=sha256Name%>" target="_blank" title="Download <%=sha256Name%>">sha256</a>
<a class="btn btn-warning" style="margin-top: 5pt; border-color: DarkGreen; background-color: OliveDrab; font-size: 90%; padding-left: 0.2em; padding-right: 0.2em;" href="<%=sha512Name%>" target="_blank" title="Download <%=sha512Name%>">sha512</a>
</p>
</div>
<%{
Map<String, String> commits = parent.getCommits();
if (!commits.isEmpty()) {%>
<div class="sideitem">
<h6>Git Commits</h6>
<%for (Map.Entry<String, String> entry : commits.entrySet()) {
String label = entry.getKey();
String url = entry.getValue();
String gitRepoURL = url.substring(0, url.indexOf("commit")) + "log/";
String id = url.substring(url.indexOf('=') + 1);%>
<p>
<button title="Copy Commit ID <%=id%> to Clipboard" class="orange" style="font-size: 150%; background-color: transparent; border: none; padding: 0px 0px;" onclick="copyToClipboard('#<%=label.toLowerCase()%>_commit_id')">&#x270e;</button>
<a style="font-size: 100%;" href="<%=gitRepoURL%>" target="<%=label.toLowerCase()%>_git"><%=label%></a>
<br/>
<tt><a id="<%=label.toLowerCase()%>_commit_id" class="btn btn-warning" style="text-transform: none; margin-top: 5pt; border-color: DarkGreen; background-color: OliveDrab; font-size: 70%; padding-top: 0.2ex; padding-bottom: 0.2ex; padding-left: 0.2em; padding-right: 0.2em;" href="<%=url%>" target="<%=label.toLowerCase()%>_git_commit" title="<%=label%> Git Commit ID"><%=id%></a></tt>
</p>
<%}%>
</div>
<%}
}%>
</div>
<%}%>
</div>
</div>
</main>
</body>
</html>