mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-30 21:15:23 +00:00
Do not block rendering of Manage Jenkins while waiting for UC data (#4881)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
This commit is contained in:
1 parent
d9aab689f5
commit
3ea9dc6b3a
4 files changed
+25
-5
No files matched your search
@@ -1306,10 +1306,16 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
public List<UpdateSite.Deprecation> getDeprecations() {
|
||||
/* Would be much nicer to go through getInfoFromAllSites but that only works for currently published plugins */
|
||||
List<UpdateSite.Deprecation> deprecations = new ArrayList<>();
|
||||
for (UpdateSite site : Jenkins.get().getUpdateCenter().getSites()) {
|
||||
for (Map.Entry<String, UpdateSite.Deprecation> entry : site.getData().getDeprecations().entrySet()) {
|
||||
if (entry.getKey().equals(this.shortName)) {
|
||||
deprecations.add(entry.getValue());
|
||||
final UpdateCenter updateCenter = Jenkins.get().getUpdateCenter();
|
||||
if (updateCenter.isSiteDataReady()) {
|
||||
for (UpdateSite site : updateCenter.getSites()) {
|
||||
final UpdateSite.Data data = site.getData();
|
||||
if (data != null) {
|
||||
for (Map.Entry<String, UpdateSite.Deprecation> entry : data.getDeprecations().entrySet()) {
|
||||
if (entry.getKey().equals(this.shortName)) {
|
||||
deprecations.add(entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user