提交 c8b26e6a 编写于 作者: K kohsuke

Plugins that are already installed shouldn't show up in the "available" list.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10019 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e04266ab
......@@ -135,6 +135,21 @@ public class UpdateCenter implements ModelObject {
}
}
/**
* Returns a list of plugins that should be shown in the "available" tab.
* These are "all plugins - installed plugins".
*/
public List<Plugin> getAvailables() {
List<Plugin> r = new ArrayList<Plugin>();
Data data = getData();
if(data ==null) return Collections.emptyList();
for (Plugin p : data.plugins.values()) {
if(p.getInstalled()==null)
r.add(p);
}
return r;
}
/**
* Gets the information about a specific plugin.
*
......
......@@ -2,5 +2,5 @@
List of available new plugins
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<local:table page="available" list="${app.updateCenter.data.plugins.values()}" xmlns:local="/hudson/PluginManager" />
<local:table page="available" list="${app.updateCenter.availables}" xmlns:local="/hudson/PluginManager" />
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册