Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 11, 2023
1 parent f9a777b commit 1f29fbc
Show file tree
Hide file tree
Showing 611 changed files with 5,256 additions and 7,601 deletions.
12 changes: 11 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"endOfLine": "auto",
"htmlWhitespaceSensitivity": "ignore"
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
"files": "*.jelly",
"options": {
"parser": "html",
"printWidth": 250,
"htmlWhitespaceSensitivity": "strict"
}
}
]
}
22 changes: 7 additions & 15 deletions core/src/main/resources/hudson/AboutJenkins/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
<l:header>
<script src="${resURL}/jsbundles/section-to-tabs.js" type="text/javascript" defer="true" />
</l:header>

<l:main-panel>
<div class="app-about-branding">
<div class="app-about-branding__aurora"></div>
Expand All @@ -39,9 +39,7 @@ THE SOFTWARE.
<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
<h1 class="app-about-heading">Jenkins</h1>
<p class="app-about-version">
${%Version} ${app.VERSION}
</p>
<p class="app-about-version"> ${%Version} ${app.VERSION} </p>
</div>
<div class="jenkins-app-bar__controls">
<a href="https://www.jenkins.io/participate/" class="jenkins-button" target="_blank">
Expand All @@ -55,11 +53,11 @@ THE SOFTWARE.

<div class="jenkins-tab-pane">
<h2 class="jenkins-tab-pane__title">${%maven.dependencies}</h2>
<j:set var="uri" value="${it.licensesURL}"/>
<j:set var="uri" value="${it.licensesURL}" />
<j:choose>
<j:when test="${uri != null}">
<t:thirdPartyLicenses>
<j:include uri="${uri}"/>
<j:include uri="${uri}" />
</t:thirdPartyLicenses>
</j:when>
<j:otherwise>
Expand All @@ -81,9 +79,7 @@ THE SOFTWARE.
<tbody>
<tr>
<td>
<a class="jenkins-table__link" href="https://github.com/jenkins-contrib-themes/jenkins-core-theme">
Jenkins Contrib Themes
</a>
<a class="jenkins-table__link" href="https://github.com/jenkins-contrib-themes/jenkins-core-theme"> Jenkins Contrib Themes </a>
</td>
<td>
<a class="jenkins-table__link" href="https://github.com/afonsof">Afonso Franca</a>
Expand All @@ -100,9 +96,7 @@ THE SOFTWARE.
<a class="jenkins-table__link" href="https://github.com/ionic-team">Ionic</a>
</td>
<td>
<a class="jenkins-table__link" href="https://github.com/ionic-team/ionicons/blob/master/LICENSE">MIT
License
</a>
<a class="jenkins-table__link" href="https://github.com/ionic-team/ionicons/blob/master/LICENSE">MIT License </a>
</td>
</tr>
</tbody>
Expand All @@ -123,9 +117,7 @@ THE SOFTWARE.
<td>
<a class="jenkins-table__link" href="${rootURL}/plugin/${p.shortName}/wrapper/thirdPartyLicenses">
<j:choose>
<j:when test="${p.active}">
${p.displayName}
</j:when>
<j:when test="${p.active}"> ${p.displayName} </j:when>
<j:otherwise>
<strike>${p.displayName}</strike>
</j:otherwise>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler">
${%blurb}
</j:jelly>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler"> ${%blurb} </j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<div class="alert alert-danger">
<dl>
<dt>${%PluginCycles}</dt>
<j:forEach var="p" items="${it.pluginsWithCycle}">
<dd><j:out value="${p.longName} v${p.version}"/></dd>
</j:forEach>
<dt>${%PluginCycles}</dt>
<j:forEach var="p" items="${it.pluginsWithCycle}">
<dd><j:out value="${p.longName} v${p.version}" /></dd>
</j:forEach>
</dl>
</div>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler">
${%blurb}
</j:jelly>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler"> ${%blurb} </j:jelly>
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler">
${%blurb}
</j:jelly>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:st="jelly:stapler"> ${%blurb} </j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<div class="alert alert-danger">
<dl>
<dt>${%RequiredPluginUpdates}</dt>
<j:forEach var="p" items="${it.pluginsToBeUpdated}">
<dd><j:out value="${p.pluginName}"/> — <j:out value="${p.message}"/></dd>
<dt>${%RequiredPluginUpdates}</dt>
<j:forEach var="p" items="${it.pluginsToBeUpdated}">
<dd><j:out value="${p.pluginName}" /> — <j:out value="${p.message}" /></dd>
</j:forEach>
</dl>
</div>
Expand Down
38 changes: 16 additions & 22 deletions core/src/main/resources/hudson/PluginManager/_api.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,19 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<h2>Uploading a plugin</h2>
<p>Permission required: <code>Overall/Administer</code></p>
<p>
You can upload a plugin from HTTP client by POST to <a href="../uploadPlugin">this URL</a> with <a href="https://datatracker.ietf.org/doc/html/rfc2388">multipart/form-data</a> MIME type.
</p>
<p> You can upload a plugin from HTTP client by POST to <a href="../uploadPlugin">this URL</a> with <a href="https://datatracker.ietf.org/doc/html/rfc2388">multipart/form-data</a> MIME type. </p>

<h2>Making sure all the needed plugins are installed</h2>
<p>Permission required: <code>Overall/Administer</code></p>
<p>
Jenkins uses an XML format for representing most of complex objects internally (such as agents, views, jobs, and builds.)
As such, it has various APIs that send/receive those XMLs. For example, you can create a new job by POSTing its XML representation.
Starting 1.482, Jenkins annotates these XMLs with additional information indicating what plugins have been used in them.
This improves the portability of those XML files.
</p><p>
By POSTing such XML to <a href="../prevalidateConfig">this URL</a>, you can find out if any plugins are missing or too old.
This method responds with a JSON array that contains one entry for every missing/outdated plugin. If this method
returns an empty array, then you know that this Jenkins has every plugin needed to accept the submitted XML.
Jenkins uses an XML format for representing most of complex objects internally (such as agents, views, jobs, and builds.) As such, it has various APIs that send/receive those XMLs. For example, you can create a new job by POSTing its XML
representation. Starting 1.482, Jenkins annotates these XMLs with additional information indicating what plugins have been used in them. This improves the portability of those XML files. </p
><p>
By POSTing such XML to <a href="../prevalidateConfig">this URL</a>, you can find out if any plugins are missing or too old. This method responds with a JSON array that contains one entry for every missing/outdated plugin. If this method returns
an empty array, then you know that this Jenkins has every plugin needed to accept the submitted XML.
</p>
<blockquote><pre>
<blockquote>
<pre>
Sample response:

Content-Type: application/javascript; charset=UTF-8
Expand All @@ -51,16 +47,14 @@ Content-Type: application/javascript; charset=UTF-8
{ name: "findbugs", version: "1.5", mode:"missing" },
{ name: "checkstyle", version: "1.3", mode:"old" }
]
</pre></blockquote>
</pre
>
</blockquote>
<p>
Whereas <a href="../prevalidateConfig">prevalidateConfig</a> call runs without any side-effect, you can also
submit the same XML to <a href="../installNecessaryPlugins">installNecessaryPlugins</a> endpoint to
install missing plugins and updating old ones.
This calls returns immediately after initiating plugin installation process, without waiting for the completion
of those.
</p><p>
To wait for the completion of the plugin installations/updates, use <a href="../../updateCenter/api">update center REST API</a>.
In some cases, Jenkins would have to be restarted before newly installed/updated plugins take effect.
See <a href="../../api">restart API</a> for how to do this over the REST API.
Whereas <a href="../prevalidateConfig">prevalidateConfig</a> call runs without any side-effect, you can also submit the same XML to <a href="../installNecessaryPlugins">installNecessaryPlugins</a> endpoint to install missing plugins and updating
old ones. This calls returns immediately after initiating plugin installation process, without waiting for the completion of those. </p
><p>
To wait for the completion of the plugin installations/updates, use <a href="../../updateCenter/api">update center REST API</a>. In some cases, Jenkins would have to be restarted before newly installed/updated plugins take effect. See
<a href="../../api">restart API</a> for how to do this over the REST API.
</p>
</j:jelly>
134 changes: 63 additions & 71 deletions core/src/main/resources/hudson/PluginManager/advanced.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,83 +26,75 @@ THE SOFTWARE.
Advanced settings for plugin manager
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout title="${%Advanced settings} - ${%Plugins}" permission="${app.SYSTEM_READ}">
<j:set var="readOnlyMode" value="${!app.hasPermission(app.ADMINISTER)}"/>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout title="${%Advanced settings} - ${%Plugins}" permission="${app.SYSTEM_READ}">
<j:set var="readOnlyMode" value="${!app.hasPermission(app.ADMINISTER)}" />

<st:include page="sidepanel.jelly"/>
<!-- no need for additional breadcrumb here as the side panel offers enough functionality to browse between different pages -->
<st:include page="sidepanel.jelly" />
<!-- no need for additional breadcrumb here as the side panel offers enough functionality to browse between different pages -->

<l:main-panel>
<l:app-bar title="${%Advanced settings}"/>
<l:main-panel>
<l:app-bar title="${%Advanced settings}" />

<div class="alert alert-info">
<strong>${%proxyMovedBlurb(rootURL+"/manage/configure")}</strong>
</div>
<div class="alert alert-info">
<strong>${%proxyMovedBlurb(rootURL+"/manage/configure")}</strong>
</div>

<div class="jenkins-form">
<div class="jenkins-form">
<l:isAdmin>
<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Deploy Plugin}</h2>
<f:form method="post" action="uploadPlugin" name="uploadPlugin" enctype="multipart/form-data">
<div style="margin-bottom: 1em"> ${%deploytext} </div>
<f:entry title="${%File}" field="name">
<f:file accept=".hpi,.jpi" />
</f:entry>
<p>${%Or}</p>
<f:entry title="${%URL}">
<f:textbox name="pluginUrl" class="jenkins-input validated" checkUrl="checkPluginUrl" checkDependsOn="" />
</f:entry>
<f:submit value="${%Deploy}" />
</f:form>
</section>
</l:isAdmin>

<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Update Site}</h2>
<f:form method="post" action="siteConfigure" name="siteConfigure">
<f:entry title="${%URL}">
<j:if test="${app.updateCenter.ID_DEFAULT.equals(app.updateCenter.PREDEFINED_UPDATE_SITE_ID)}">
<a id="reset-to-default" href="#">${%Reset to default}</a>
</j:if>
<f:textbox name="site" id="update-site-url" value="${app.updateCenter.getSite(app.updateCenter.ID_DEFAULT).url}" checkUrl="checkUpdateSiteUrl" checkDependsOn="" />
</f:entry>
<st:adjunct includes="hudson.PluginManager._updateSite" />
<l:isAdmin>
<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Deploy Plugin}</h2>
<f:form method="post" action="uploadPlugin" name="uploadPlugin" enctype="multipart/form-data">
<div style="margin-bottom: 1em;">
${%deploytext}
</div>
<f:entry title="${%File}" field="name">
<f:file accept=".hpi,.jpi" />
</f:entry>
<p>${%Or}</p>
<f:entry title="${%URL}">
<f:textbox name="pluginUrl"
class="jenkins-input validated" checkUrl="checkPluginUrl" checkDependsOn="" />
</f:entry>
<f:submit value="${%Deploy}"/>
</f:form>
</section>
<f:block>
<f:submit />
</f:block>
</l:isAdmin>

<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Update Site}</h2>
<f:form method="post" action="siteConfigure" name="siteConfigure">
<f:entry title="${%URL}">
<j:if test="${app.updateCenter.ID_DEFAULT.equals(app.updateCenter.PREDEFINED_UPDATE_SITE_ID)}">
<a id="reset-to-default" href="#">${%Reset to default}</a>
</j:if>
<f:textbox name="site"
id="update-site-url"
value="${app.updateCenter.getSite(app.updateCenter.ID_DEFAULT).url}"
checkUrl="checkUpdateSiteUrl" checkDependsOn=""/>
</f:entry>
<st:adjunct includes="hudson.PluginManager._updateSite"/>
<l:isAdmin>
<f:block>
<f:submit/>
</f:block>
</l:isAdmin>
</f:form>
<j:set var="hasNonDefault" value="${false}"/>
<j:forEach var="site" items="${app.updateCenter.sites}">
<j:if test="${site.id != app.updateCenter.ID_DEFAULT}">
<j:set var="hasNonDefault" value="${true}"/>
</j:if>
</j:forEach>
</section>

<j:if test="${hasNonDefault}">
<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Other Sites}</h2>
<ul>
<j:forEach var="site" items="${app.updateCenter.sites}">
<j:if test="${site.id != app.updateCenter.ID_DEFAULT}">
<li>${site.url}</li>
</j:if>
</j:forEach>
</ul>
</section>
</f:form>
<j:set var="hasNonDefault" value="${false}" />
<j:forEach var="site" items="${app.updateCenter.sites}">
<j:if test="${site.id != app.updateCenter.ID_DEFAULT}">
<j:set var="hasNonDefault" value="${true}" />
</j:if>
</div>
</l:main-panel>
</l:layout>
</j:forEach>
</section>

<j:if test="${hasNonDefault}">
<section class="jenkins-section jenkins-!-margin-bottom-5">
<h2 class="jenkins-section__title">${%Other Sites}</h2>
<ul>
<j:forEach var="site" items="${app.updateCenter.sites}">
<j:if test="${site.id != app.updateCenter.ID_DEFAULT}">
<li>${site.url}</li>
</j:if>
</j:forEach>
</ul>
</section>
</j:if>
</div>
</l:main-panel>
</l:layout>
</j:jelly>
Loading

0 comments on commit 1f29fbc

Please sign in to comment.