Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernise project relationship page #9461

Merged
merged 4 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
import hudson.triggers.TriggerDescriptor;
import hudson.util.AdministrativeError;
import hudson.util.ClockDifference;
import hudson.util.ComboBoxModel;
import hudson.util.CopyOnWriteList;
import hudson.util.CopyOnWriteMap;
import hudson.util.DaemonThreadFactory;
Expand Down Expand Up @@ -1908,6 +1909,11 @@
return names;
}

@Restricted(NoExternalUse.class)
public ComboBoxModel doFillJobNameItems() {
timja marked this conversation as resolved.
Show resolved Hide resolved
return new ComboBoxModel(getJobNames());

Check warning on line 1914 in core/src/main/java/jenkins/model/Jenkins.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 1914 is not covered by tests
}

@Override
public List<Action> getViewActions() {
return getActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,73 +26,67 @@ THE SOFTWARE.
Displays two projects side by side and show their relationship
-->
<?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">
<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="${%Project Relationship}">
<st:include page="sidepanel.jelly" />
<l:breadcrumb title="${%Project Relationship}" />
<st:include page="sidepanel.jelly"/>
<l:breadcrumb title="${%Project Relationship}"/>

<l:main-panel>
<l:app-bar title="${%Project Relationship}">
<t:help href="projectRelationship-help" />
<t:help href="projectRelationship-help"/>
</l:app-bar>

<p>
${%body}
</p>

<form action="projectRelationship" method="get">
<table width="100%">
<tr>
<j:set var="names" value="${app.jobNames}" />
<td style="text-align:right;">
${%upstream project}:
<f:editableComboBox id="lhs" name="lhs" value="${request.getParameter('lhs')}" items="${names}" />
</td>
<td style="width:32px; text-align:center;"><l:icon class="icon-next icon-md"/></td>
<td>
${%downstream project}:
<f:editableComboBox id="rhs" name="rhs" value="${request.getParameter('rhs')}" items="${names}" />
</td>
</tr>
<tr>
<td colspan="3" style="text-align:right">
<f:submit value="${%Compare}" />
</td>
</tr>
<div class="jenkins-form-item">
<label class="jenkins-form-label" for="lhs">${%upstream project}:</label>
<f:combobox id="lhs" fillUrl="fillJobNameItems" name="lhs" value="${request.getParameter('lhs')}"/>
</div>

<div class="jenkins-form-item">
<label class="jenkins-form-label" for="rhs">${%downstream project}:</label>
<f:combobox id="rhs" fillUrl="fillJobNameItems" name="rhs" value="${request.getParameter('rhs')}"/>
</div>
<f:submit value="${%Compare}"/>

<j:if test="${!empty(request.getParameter('lhs')) and !empty(request.getParameter('rhs'))}">
<j:set var="jl" value="${app.getItemByFullName(request.getParameter('lhs'))}" />
<j:set var="jr" value="${app.getItemByFullName(request.getParameter('rhs'))}" />
<j:if test="${!empty(request.getParameter('lhs')) and !empty(request.getParameter('rhs'))}">
<j:set var="jl" value="${app.getItemByFullName(request.getParameter('lhs'))}"/>
<j:set var="jr" value="${app.getItemByFullName(request.getParameter('rhs'))}"/>

<j:choose>
<j:when test="${jl==null}">
<tr><td colspan="3" class="error">
No such project '${request.getParameter('lhs')}'
</td></tr>
</j:when>
<j:when test="${jr==null}">
<tr><td colspan="3" class="error">
No such project '${request.getParameter('rhs')}'
</td></tr>
</j:when>
<j:otherwise>
<j:choose>
<j:when test="${jl==null}">
<p class="error">No such project '${request.getParameter('lhs')}'</p>
</j:when>
<j:when test="${jr==null}">
<p class="error">No such project '${request.getParameter('rhs')}'</p>
</j:when>
<j:otherwise>
<table width="100%">
<j:set var="relation" value="${jl.getRelationship(jr)}"/>
<j:if test="${empty(relation)}">
<tr><td colspan="3" class="error">
${%There are no fingerprint records that connect these two projects.}
</td></tr>
<p class="error">${%There are no fingerprint records that connect these two projects.}</p>
</j:if>
<j:forEach var="e" items="${relation}">
<tr>
<td style="text-align:right">
<t:buildLink job="${jl}" number="${e.key}"/>
</td>
<td><st:nbsp/></td>
<td>
<st:nbsp/>
</td>
<td>
<t:buildRangeLink job="${jr}" range="${e.value}"/>
</td>
</tr>
</j:forEach>
</j:otherwise>
</j:choose>
</j:if>
</table>
</table>
</j:otherwise>
</j:choose>
</j:if>
</form>
</l:main-panel>
</l:layout>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# The MIT License
#
# Copyright (c) 2024, Tim Jacomb
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

body=\
When you have projects that depend on each other, Jenkins can track which build of \
the upstream project is used by which build of the downstream project, by using \
the records created by \
<a href="https://www.jenkins.io/redirect/fingerprint">the fingerprint support</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ downstream\ project=\
Последващ проект
upstream\ project=\
Предхождащ проект
body=\
Когато проекти зависят един от друг, Jenkins може да следи коя версия на\
предшестващ проект се ползва от следващ проект и обратно като създава база от\
данни от\
<a href="https://www.jenkins.io/redirect/fingerprint">цифровите\
отпечатъци</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ Project\ Relationship=Projektforhold
Compare=Sammenlign
downstream\ project=downstreamprojekt
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=Ingen opslag i filfingeraftryksdatabasen forbinder disse to projekter.
body=\
Har du projekter der er afhængige af hinanden kan Jenkins følge hvilket byg af upstreamprojektet \
der bruges af hvilket byg af downstream projektet ved at bruge filfingeraftyrk
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ downstream\ project=Nachgelagertes Projekt
Compare=Vergleichen
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=\
Es existieren keine Fingerabdrücke, welche diese beiden Projekte miteinander verbinden.
body=\
Wenn Sie voneinander abhängige Projekte entwickeln, kann Jenkins für Sie herausfinden, welcher Build \
eines vorgelagerten Projektes für welchen Build eines nachgelagerten Projektes verwendet wurde. Dies geschieht über \
gespeicherte "Fingerabdrücke", die mit Hilfe der <a href="https://www.jenkins.io/redirect/fingerprint">Fingerabdruck-Funktion</a> erzeugt wurden.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ upstream\ project=Proyecto padre
downstream\ project=Proyecto hijo
Compare=Comparar
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=No hay marcas que relacionen estos dos proyectos

body=Cuando hay proyectos que dependen unos de otros, Jenkins puede hacer un seguimiento de qué proyectos padres están siendo utilizado por otros proyectos hijos usando un registro de firmas de los ficheros generados. Echa un vistazo a esta pagina: <a href="https://www.jenkins.io/redirect/fingerprint">the fingerprint support</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Compare=Võrdle
Project\ Relationship=Projektide seosed
downstream\ project=allavoolu projekt
upstream\ project=ülesvoolu projekt
body=Kui teil on kaks projekti mis sõltuvad üksteisest, siis suudab Jenkins jälgida seda millist ülesvoolu projekti järku kasutatakse mingi allavoolu projekti järgu jaoks, kasutades <a href="https://www.jenkins.io/redirect/fingerprint">sõrmejälje toe</a> poolt loodud kirjeid.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ Project\ Relationship=Relations entre les projets
upstream\ project=Projet en amont
downstream\ project=Projet en aval
Compare=Comparer
body=\
Lorsque vous avez des projets qui dépendent les uns des autres, Jenkins peut tracer quel build \
de projet en amont est utilisé par quel build de projet en aval, en utilisant \
les enregistrements créés par \
<a href="https://www.jenkins.io/redirect/fingerprint">le support de l''empreinte numérique</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ Project\ Relationship=Relazioni progetto
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=\
Non ci sono record di impronte digitali che colleghino questi due progetti.
upstream\ project=progetto upstream
body=Quando si hanno dei progetti dipendenti fra loro, Jenkins può tener \
traccia della compilazione del progetto upstream che è stata utilizzata in \
una precisa compilazione del progetto downstream utilizzando i record \
creati dal <a href="https://www.jenkins.io/redirect/fingerprint">supporto per \
le impronte digitali</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ downstream\ project=下流プロジェクト
Compare=比較
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=\
2つのプロジェクトを関連付けるファイル指紋の記録がありません。
body=\
互いに依存するプロジェクトがある場合、 Jenkinsはどの上流プロジェクトがどの下流プロジェクトに使用されているかを、\
<a href="https://www.jenkins.io/redirect/fingerprint">指紋サポート</a>\
によって作成された記録を使用することで追跡することができます。
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ Project\ Relationship=Projektų ryšys
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=Nėra antspaudų, siejančių šiuos du projektus.
downstream\ project=vėlesnis projektas
upstream\ project=ankstesnis projektas
body=\
Kai turite projektus, kurie priklauso vienas nuo kito, naudodamas įrašus, sukurtus \
<a href="https://www.jenkins.io/redirect/fingerprint">pirštų antspaudų palaikymo</a> Jenkinsas gali sekti, kuris ankstesnio projekto vykdymas \
naudojamas kuriame žemesnio projekto vykdyme.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ Project\ Relationship=Relaties tussen projecten
upstream\ project=bovenliggende projecten
downstream\ project=onderliggende projecten
Compare=Vergelijk
body=\
Wanneer je projecten ontwikkelt die van elkaar afhankelijk zijn, kan Jenkins voor jou uitzoeken welke \
bouwpoging van een bovenliggend project gebruikt wordt door een onderliggend project. Dit gebeurt aan \
de hand van de geregistreerd <a href="https://www.jenkins.io/redirect/fingerprint">elektronische vingerafdrukken</a> van \
de door een bouwpoging opgeleverde artefacten.
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ upstream\ project=Projeto pai
downstream\ project=Projeto filho
Compare=Comparar
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=Não existe identificador conectando esses dois projetos.
body=Quando você tem projetos que dependem um do outro, o Jenkins pode rastrear qual construção é hierarquicamente \
superior, usando os registros criados pelo <a href="https://www.jenkins.io/redirect/fingerprint">suporte de \
impressão digital</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ upstream\ project=восходящий проект
downstream\ project=нисходящий проект
Compare=Сравнить
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=Нет отпечатков (fingerprints), соединяющих эти два проекта.
body=\
Когда у вас есть проекты, один из которых зависит от другого, Jenkins может отслеживать, \
какая сборка восходящего проекта использована в какой сборке нисходящего, используя \
сохраненные записи <a href="https://www.jenkins.io/redirect/fingerprint"> отпечатков</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ downstream\ project=downstream пројекат
Compare=Упореди
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=
Project\ Relationship=Однос пројеката
body=Jenkins може пратити изградњу пројекте који зависе један од другог користећи <a href="https://www.jenkins.io/redirect/fingerprint">дигитални отисак</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Project\ Relationship=Projektrelation
downstream\ project=nedströmsprojekt
upstream\ project=uppströmsprojekt
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=Det finns inga registrerade fingeravtryck som kopplar samman dessa två projekt.
body=\
När du har projekt som är beroende av varandra kan Jenkins spåra vilket bygge \
av uppströmsprojektet som används av vilket bygge av nedströmsprojektet \
genom att använda de poster som skapats av <a href="https://www.jenkins.io/ redirect/fingerprint">fingeravtrycksstödet</a>.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ Project\ Relationship=Projelerin İlişkisi
upstream\ project=upstream proje
downstream\ project=downstream proje
Compare=Karşılaştır
body=\
Eğer birbirine bağlı projeleriniz varsa, Jenkins <a href="https://www.jenkins.io/redirect/fingerprint">parmakizi desteği</a>\
ile oluşturulan kayıtları kullanarak hangi upstream projenin hangi downstream proje tarafından\
kullanıldığını takip edebilir.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ downstream\ project=下游專案
Compare=比較
There\ are\ no\ fingerprint\ records\ that\ connect\ these\ two\ projects.=\
沒有連結這兩個專案的指紋記錄。
body=如果您的專案間彼此有關聯,Jenkins 就能追蹤下游專案到底是使用到上游專案的哪一版進行建置。這個功能是利用<a href\="https\://www.jenkins.io/redirect/fingerprint">檔案指紋功能</a>所產生的記錄來達成。
Loading