[JENKINS-62332] Show when a plugin version newer than offered exists (#4742)

* [JENKINS-62332] Show when a plugin version newer than offered exists

* Add more obvious label/tag to entries that cannot be installed

Also link to plugin documentation from the detail message

* Also show the list if there are any unavailable updates

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
This commit is contained in:
Daniel BeckandDaniel Beck authored and GitHub committed 2020-06-07 10:51:16 +02:00
1 parent 5608616289
commit 2776f4dc77
6 files changed
+118 -1

No files matched your search

@@ -2266,6 +2266,14 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
return Arrays.asList(categories).contains("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());