mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
[JENKINS-62332] Remove plugin update GUI “A newer version than being offered for installation exists…” (#7362)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
1 parent
5e50ee0ed5
commit
bedd4fe1ca
17 files changed
+1
-185
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user