提交 8d231c49 编写于 作者: A Andrew Bayer

Support global.groovy as well as config.groovy

上级 4434ed77
...@@ -660,9 +660,16 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable { ...@@ -660,9 +660,16 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
} }
public String getGlobalConfigPage() { public String getGlobalConfigPage() {
return getViewPage(clazz, "global.jelly",null); List<String> names = new ArrayList<String>();
for (Facet f : WebApp.get(Hudson.getInstance().servletContext).facets) {
if (f instanceof JellyCompatibleFacet) {
JellyCompatibleFacet jcf = (JellyCompatibleFacet) f;
names.add("global"+jcf.getDefaultScriptExtension());
}
}
return getViewPage(clazz,names,null);
} }
private String getViewPage(Class<?> clazz, String pageName, String defaultValue) { private String getViewPage(Class<?> clazz, String pageName, String defaultValue) {
return getViewPage(clazz,Collections.singleton(pageName),defaultValue); return getViewPage(clazz,Collections.singleton(pageName),defaultValue);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册