提交 a85a593e 编写于 作者: K kohsuke

Fixed in 1.287.

    Custom widgets were not rendered.
    (<a href="https://hudson.dev.java.net/issues/show_bug.cgi?id=3161">issue 3161</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15841 71c3de6d-444a-0410-be80-ed276b4c234a
上级 91baac6b
......@@ -27,6 +27,8 @@ import hudson.ExtensionPoint;
import hudson.Util;
import hudson.Extension;
import hudson.DescriptorExtensionList;
import hudson.Plugin;
import hudson.widgets.Widget;
import hudson.model.Descriptor.FormException;
import static hudson.model.Hudson.checkGoodName;
import hudson.scm.ChangeLogSet.Entry;
......@@ -168,6 +170,16 @@ public abstract class View extends AbstractModelObject implements AccessControll
return getViewName();
}
/**
* Gets the {@link Widget}s registered on this object.
*
* <p>
* For now, this just returns the widgets registered to Hudson.
*/
public List<Widget> getWidgets() {
return Collections.unmodifiableList(Hudson.getInstance().getWidgets());
}
/**
* If true, this is a view that renders the top page of Hudson.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册