未验证 提交 bedd4fe1 编写于 作者: J Jesse Glick 提交者: GitHub

[JENKINS-62332] Remove plugin update GUI “A newer version than being offered...

[JENKINS-62332] Remove plugin update GUI “A newer version than being offered for installation exists…” (#7362)
Co-authored-by: NAlexander Brandes <mc.cache@web.de>
上级 5e50ee0e
......@@ -1506,9 +1506,6 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
releaseTimestamp.put("displayValue", Messages.PluginManager_ago(Functions.getTimeSpanString(plugin.releaseTimestamp)));
jsonObject.put("releaseTimestamp", releaseTimestamp);
}
if (hasLatestVersionNewerThanOffered(plugin)) {
jsonObject.put("newerVersionAvailableNotOffered", Messages.PluginManager_newerVersionExists(plugin.latest, plugin.wiki));
}
return jsonObject;
})
.collect(toList());
......@@ -2592,14 +2589,6 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
return plugin.hasCategory("adopt-this-plugin");
}
@Restricted(DoNotUse.class) // Used from table.jelly
public boolean hasLatestVersionNewerThanOffered(UpdateSite.Plugin plugin) {
if (plugin.latest == null) {
return false;
}
return !plugin.latest.equalsIgnoreCase(plugin.version); // we can assume that any defined 'latest' will be newer than the actual offered version
}
@Restricted(DoNotUse.class) // Used from table.jelly
public boolean hasAdoptThisPluginLabel(PluginWrapper plugin) {
final UpdateSite.Plugin pluginMeta = Jenkins.get().getUpdateCenter().getPlugin(plugin.getShortName());
......
......@@ -1071,28 +1071,6 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
return getUpdates().stream().anyMatch(plugin -> !plugin.isCompatible(cache));
}
@Restricted(NoExternalUse.class)
public List<Plugin> getPluginsWithUnavailableUpdates() {
Map<String, Plugin> pluginMap = new LinkedHashMap<>();
for (PluginWrapper wrapper : Jenkins.get().getPluginManager().getPlugins()) {
for (UpdateSite site : sites) {
UpdateSite.Plugin plugin = site.getPlugin(wrapper.getShortName());
if (plugin == null) {
// Plugin not distributed by this update site
continue;
}
final Plugin existing = pluginMap.get(plugin.name);
if (existing == null) { // TODO better support for overlapping update sites
if (plugin.latest != null && !plugin.latest.equalsIgnoreCase(plugin.version) && !plugin.latest.equalsIgnoreCase(wrapper.getVersion())) {
pluginMap.put(plugin.name, plugin);
}
}
}
}
final ArrayList<Plugin> unavailable = new ArrayList<>(pluginMap.values());
return unavailable;
}
/**
* Ensure that all UpdateSites are up to date, without requiring a user to
* browse to the instance.
......
......@@ -1211,13 +1211,6 @@ public class UpdateSite {
@Restricted(NoExternalUse.class)
public final Double popularity;
/**
* The latest existing version of this plugin. May be different from the version being offered by the
* update site, which will result in a notice on the UI.
*/
@Restricted(NoExternalUse.class)
public String latest;
/**
* Issue trackers associated with this plugin.
* This list is sorted by preference in descending order, meaning a UI
......@@ -1234,7 +1227,6 @@ public class UpdateSite {
this.title = get(o, "title");
this.excerpt = get(o, "excerpt");
this.compatibleSinceVersion = Util.intern(get(o, "compatibleSinceVersion"));
this.latest = get(o, "latest");
this.requiredCore = Util.intern(get(o, "requiredCore"));
final String releaseTimestamp = get(o, "releaseTimestamp");
Date date = null;
......
......@@ -90,12 +90,6 @@ PluginManager.ago={0} ago
PluginManager.adoptThisPlugin=\
<strong>This plugin is up for adoption!</strong> We are looking for new maintainers. \
Visit our <a href="https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel="noopener noreferrer" target="_blank">Adopt a Plugin</a> initiative for more information.
PluginManager.newerVersionExists=\
A newer version than being offered for installation exists (version {0}), so the latest bug fixes or features are not available to you. \
This is typically the case when plugin requirements, e.g. a recent version of Jenkins, are not satisfied. \
If you are using the latest version of Jenkins offered to you, this plugin release may not be available to your release line yet. \
See the <a href="{1}" rel="noopener noreferrer" target="_blank">plugin documentation</a> for information about its requirements.
PluginManager.unavailable=Unavailable
PluginManager.deprecationWarning=<strong>This plugin is deprecated.</strong> In general, this means that it is either obsolete, no longer being developed, or may no longer work. <a href="{0}" rel="noopener noreferrer" target="_blank">Learn more.</a>
PluginManager.insecureUrl=\
You are using an insecure URL to download the plugin, use at your own risk!
......
......@@ -91,7 +91,6 @@ PluginManager.ago=Hace {0}
PluginManager.adoptThisPlugin=\
<strong>¡Este plugin está en adopción!</strong> Buscamos nuevos mantenedores. \
Visita nuestro sitio de la iniciativa <a href="https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel="noopener noreferrer" target="_blank">Adopte un plugin</a> para obtener más información.
PluginManager.unavailable=No disponible
PluginManager.deprecationWarning=<strong>Este plugin está obsoleto.</strong> En general, esto significa que ya no se desarrolla o que puede dejar de funcionar. <a href="{0}" rel="noopener noreferrer" target="_blank">Más información</a>
AboutJenkins.DisplayName=Acerca de Jenkins
......
......@@ -99,11 +99,6 @@ PluginManager.depCoreWarning= \
portanto o carregamento desta extensão irá falhar.
PluginManager.securityWarning= \
Aviso: esta versão de extensão pode não ser segura para usar. Por favor revise as seguintes notas de segurança:
PluginManager.unavailable=Indisponível
PluginManager.newerVersionExists= \
Uma versão mais recente que a oferecida para instalação está disponível (versão {0}). \
Isto é um caso típico de quando os requisitos de uma extensão, como uma versão mais recente do Jenkins, não estão \
satisfeitos.
PluginManager.adoptThisPlugin= \
<strong>Esta extensão está disponível para adoção!</strong>Nós estamos procurando por novos mantenedores. \
Visite nossa iniciativa \
......
......@@ -69,9 +69,6 @@ PluginManager.depCoreWarning=警告\: 這個外掛的相依性外掛需要 Jenki
PluginManager.securityWarning=警告\: 這個版本的外掛用起來可能不安全。請查看下列安全性須知\:
PluginManager.ago={0}前
PluginManager.adoptThisPlugin=<strong>此外掛開放認養!</strong>我們正在尋找新的維護者,請造訪 <a href\="https\://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel\="noopener noreferrer" target\="_blank">Adopt a Plugin</a> 取得更多資訊。
PluginManager.newerVersionExists=已提供更新版本 (版本 {0})。這通常是外掛的要求,例如\: 不相容於最近的 Jenkins 版本。
PluginManager.newerVersionEntry=已有此版本的外掛但不作為更新提供。這通常是外掛的要求,例如\: 不相容於最近的 Jenkins 版本。詳情請查看<a href\="{0}" rel\="noopener noreferrer" target\="_blank">外掛文件</a>以了解此要求。
PluginManager.unavailable=無法使用
PluginManager.deprecationWarning=<strong>此外掛已棄用。</strong>這通常表示它可能已過時、不再繼續開發、不再正常運作等。<a href\="{0}" rel\="noopener noreferrer" target\="_blank">了解更多。</a>
PluginManager.insecureUrl=您正在使用不安全的 URL 下載該外掛,風險請自負!
PluginManager.invalidUrl=您正在使用無效的 URL 下載該外掛,只支援 https、http (不建議) 和 file。
......
......@@ -84,9 +84,8 @@ THE SOFTWARE.
</j:if>
</tr>
</thead>
<j:set var="unavailableList" value="${app.updateCenter.pluginsWithUnavailableUpdates}"/>
<j:choose>
<j:when test="${!empty(list) or (isUpdates and !empty(unavailableList))}">
<j:when test="${!empty(list)}">
<j:if test="${filtered == 'true'}">
<tr id="hidden-by-default-instructions">
<td colspan="5" align="center" id="hidden-by-default-instructions-td"
......@@ -213,11 +212,6 @@ THE SOFTWARE.
${%adoptThisPlugin}
</div>
</j:if>
<j:if test="${it.hasLatestVersionNewerThanOffered(p)}">
<div class="alert alert-info">
${%newerVersionExists(p.latest, p.wiki)}
</div>
</j:if>
</td>
<td data="${p.releaseTimestamp.time}" class="jenkins-table__cell--no-wrap">
<j:if test="${p.releaseTimestamp != null}">
......@@ -243,68 +237,6 @@ THE SOFTWARE.
</j:if>
</tr>
</j:forEach>
<j:if test="${isUpdates}">
<!-- TODO this might be nicer by going through the root list element and populating it in index.jelly -->
<j:forEach var="p" items="${unavailableList}">
<j:if
test="${!list.contains(p)}"><!-- only show entries for plugins not already in the real updates list -->
<tr class="unavailable">
<l:isAdmin>
<td><!-- install --></td>
</l:isAdmin>
<td class="details"
data="${h.xmlEscape(p.displayName)}"
data-id="${h.xmlEscape(p.name+':'+p.version)}">
<div>
<a href="${p.wiki}" rel="noopener noreferrer" target="_blank">
<st:out value="${p.displayName}"/>
<span class="jenkins-label jenkins-label--tertiary" style="margin-left: 1ch;">
<span class="jenkins-visually-hidden">${%Version}</span>
${p.latest}
</span>
</a>
<span class="unavailable-label">${%unavailable}</span>
</div>
<j:if test="${!p.categories.isEmpty()}">
<div class="app-plugin-manager__categories">
<j:forEach var="label" items="${p.categories}">
<j:if test="${!it.isMetaLabel(label)}">
<a href="?filter=${app.updateCenter.getCategoryDisplayName(label)}"
class="jenkins-table__link jenkins-table__badge">
${app.updateCenter.getCategoryDisplayName(label)}
</a>
</j:if>
</j:forEach>
</div>
</j:if>
<j:if test="${p.excerpt!=null}">
<div>
<j:out value="${p.excerpt}"/>
</div>
</j:if>
<j:if test="${it.hasLatestVersionNewerThanOffered(p)}">
<div class="alert alert-info">
${%newerVersionEntry(p.wiki)}
</div>
</j:if>
</td>
<td><!-- timestamp --></td>
<td>
<j:choose>
<j:when test="${p.installed.active}">
<st:out value="${p.installed.version}"/>
</j:when>
<j:otherwise>
<span title="${%Inactive}">
(<st:out value="${p.installed.version}"/>)
</span>
</j:otherwise>
</j:choose>
</td>
</tr>
</j:if>
</j:forEach>
</j:if>
</j:when>
<j:otherwise>
<tr>
......
......@@ -44,17 +44,6 @@ ago={0} ago
adoptThisPlugin=\
<strong>This plugin is up for adoption!</strong> We are looking for new maintainers. \
Visit our <a href="https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel="noopener noreferrer" target="_blank">Adopt a Plugin</a> initiative for more information.
newerVersionExists=\
A newer version than being offered for installation exists (version {0}), so the latest bug fixes or features are not available to you. \
This is typically the case when plugin requirements, e.g. a recent version of Jenkins, are not satisfied. \
If you are using the latest version of Jenkins offered to you, this plugin release may not be available to your release line yet. \
See the <a href="{1}" rel="noopener noreferrer" target="_blank">plugin documentation</a> for information about its requirements.
newerVersionEntry=\
This version of the plugin exists but it is not being offered for installation, so the latest bug fixes or features are not available to you. \
This is typically the case when plugin requirements, e.g. a recent version of Jenkins, are not satisfied. \
If you are using the latest version of Jenkins offered to you, newer plugin releases may not be available to your release line yet. \
See the <a href="{0}" rel="noopener noreferrer" target="_blank">plugin documentation</a> for information about its requirements.
unavailable=Unavailable
deprecationWarning=<strong>This plugin is deprecated.</strong> In general, this means that it is either obsolete, no longer being developed, or may no longer work. <a href="{0}" rel="noopener noreferrer" target="_blank">Learn more.</a>
loading=Loading
......
......@@ -78,6 +78,5 @@ Released=Rilasciato il
search=Cerca
securityWarning=Avviso: potrebbe non essere sicuro utilizzare questa versione \
del componente aggiuntivo. Rivedere i seguenti bollettini di sicurezza:
unavailable=Non disponibile
Update\ Center=Centro aggiornamenti
Version=Versione
......@@ -40,5 +40,4 @@ ago={0} temu
adoptThisPlugin=\
<strong>Ta wtyczka czeka na adopcje!</strong> Szukamy osób chętnych rozwijać tę wtyczkę. \
Przeczytaj naszą inicjatywę <a href="https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel="noopener noreferrer" target="_blank">Adopt a Plugin</a>, aby uzyskać więcej informacji.
unavailable=Niedostępna
Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=Zainstalowanie tej aktualizacji usunie podatności występujące w aktualnie zainstalowanej wersji.
......@@ -42,20 +42,6 @@ depCompatWarning= \
compatíveis com a versão instalada atualmente. Tarefas usando essas extensões podem precisar ser reconfiguradas.
Updates=Central de Atualizações
loading=carregando
newerVersionExists= \
Existe uma versão mais nova (versão {0}) que a oferecida para instalação portanto as últimas correções e \
funcionalidades não estarão disponíveis para você. Isto é tipicamente o caso quando requisitos para uma extensão, \
como por exemplo uma versão mais recente do Jenkins, não estão satisfeitos. Se você estiver usando a última versão \
do Jenkins oferecida esta versão de extensão talvez não esteja disponível para ainda para você. Veja a \
<a href="{0}" rel="noopener noreferrer" target="_blank">documentação da extensão</a> para mais informalões sobre seus\
requisitos.
newerVersionEntry= \
Esta versão da extensão existe mas não está sendo oferecida para instalação, portanto, as últimas correções ou \
funcionalidades não estão disponíveis para você. Isto é tipicamente o caso quando requisitos para uma extensão, como\
por exemplo, uma versão mais recente do Jenkins, não estão satisfeitos. Se você estiver usando a última versão do \
Jenkins oferecida, esta versão de extensão talvez ainda não esteja disponível para você. Veja a \
<a href="{0}" rel="noopener noreferrer" target="_blank">documentação da extensão</a> para mais informalões sobre \
seus requisitos.
parentDepCompatWarning=As seguintes extensões são incompatíveis:
securityWarning= \
Aviso: esta versão de extensão pode não ser segura para uso. Por favor, revise as seguintes notas de segurança:
......@@ -63,7 +49,6 @@ deprecationWarning=<strong>Esta extensão está descontinuada.</strong>Em geral,
desenvolvimento ativo ou pode não mais funcionar. <a href="{0}" rel="noopener noreferrer" target="_blank">Vide \
maiores detalhes.</a>
Released=Liberada
unavailable=Indisponível
Search\ plugin\ updates=Busca
ago={0} atrás
Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=Aplicar\
......
......@@ -29,9 +29,6 @@ depCoreWarning=警告\: 這個外掛的相依性外掛需要 Jenkins {0} 或更
securityWarning=警告\: 這個版本的外掛用起來可能不安全。請查看下列安全性須知\:
ago={0}前
adoptThisPlugin=<strong>此外掛開放認養!</strong>我們正在尋找新的維護者,請造訪 <a href\="https\://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel\="noopener noreferrer" target\="_blank">Adopt a Plugin</a> 取得更多資訊。
newerVersionExists=已提供比安裝還有更新的版本 (版本 {0}) 因此無法提供您最新的錯誤修復和新功能。這通常是外掛的要求,例如\: 不相容於最近的 Jenkins 版本。\n如果您已經在使用最新版的 Jenkins,新版的外掛可能還沒向您的 Release Line 推出。詳情請查看<a href\="{0}" rel\="noopener noreferrer" target\="_blank">外掛文件</a>以了解此要求。
newerVersionEntry=此版本的外掛存在但不提供安裝,因此無法提供您最新的錯誤修復和新功能。這通常是外掛的要求,例如\: 不相容於最近的 Jenkins 版本。\n如果您已經在使用最新版的 Jenkins,新版的外掛可能還沒向您的 Release Line 推出。詳情請查看<a href\="{0}" rel\="noopener noreferrer" target\="_blank">外掛文件</a>以了解此要求。
unavailable=無法使用
deprecationWarning=<strong>此外掛已棄用。</strong>這通常表示它可能已過時、不再繼續開發、不再正常運作等。<a href\="{0}" rel\="noopener noreferrer" target\="_blank">了解更多。</a>
Update\ Center=更新中心
Filter=篩選
......
......@@ -602,9 +602,6 @@ public class PluginManagerTest {
// ensure data is loaded - probably unnecessary, but closer to reality
Assert.assertSame(FormValidation.Kind.OK, uc.getSite("default").updateDirectlyNow().kind);
// This would throw NPE
uc.getPluginsWithUnavailableUpdates();
}
@Test @Issue("JENKINS-64840")
......
......@@ -59,11 +59,6 @@
{{{ this.adoptMe }}}
</div>
{{/if}}
{{#if this.newerVersionAvailableNotOffered }}
<div class="alert alert-info">
{{{ this.newerVersionAvailableNotOffered }}}
</div>
{{/if}}
</td>
{{#if this.releaseTimestamp }}
<td style="width: 25%" data="{{ this.releaseTimestamp.iso8601 }}">
......
......@@ -289,8 +289,6 @@
--plugin-manager-category-link-border-color--hover: var(--black);
--plugin-manager-category-text-color: var(--text-color);
--plugin-manager-category-link-color--hover: var(--text-color);
--plugin-manager-unavailable-bg-color: #f4f4f4;
--plugin-manager-unavailable-label-color: var(--text-color);
// Auto complete
--auto-complete-bg-color--prehighlight: #b3d4ff;
......
......@@ -12,25 +12,6 @@
background-color: var(--plugin-manager-bg-color-already-upgraded);
}
tr.unavailable {
background-color: var(--plugin-manager-unavailable-bg-color);
}
tr.unavailable span.unavailable-label {
display: inline-block;
border: 1px solid #666;
color: var(--plugin-manager-unavailable-label-color);
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
padding: 0 0.5rem;
margin: 0.25rem 0.5rem;
text-decoration: none;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
}
tr.all-dependents-disabled .enable input,
tr.all-dependents-disabled .enable button,
tr.all-dependents-disabled .enable .jenkins-toggle-switch label {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册