show some indication when updates are available.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9920 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-06-07 01:39:17 +00:00
1 parent 1f47018c7a
commit 88b39d232c
2 files changed
+17 -1

No files matched your search

@@ -176,6 +176,19 @@ public class UpdateCenter implements ModelObject {
return r;
}
/**
* Does any of the plugin has updates?
*/
public boolean hasUpdates() {
Data data = getData();
if(data==null) return false;
for (PluginWrapper pw : Hudson.getInstance().getPluginManager().getPlugins()) {
if(pw.getUpdateInfo() !=null) return true;
}
return false;
}
public String getDisplayName() {
return "Update center";
}