提交 469bfbf4 编写于 作者: K kohsuke

Made the landing page configurable.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13953 71c3de6d-444a-0410-be80-ed276b4c234a
上级 37ea99ca
......@@ -1900,7 +1900,7 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
save();
// redirect to the config screen
rsp.sendRedirect2("./"+v.getUrl()+"configure");
rsp.sendRedirect2("./"+v.getUrl()+v.getPostConstructLandingPage());
} catch (FormException e) {
sendError(e,req,rsp);
}
......
......@@ -75,6 +75,11 @@ public class MyView extends View {
return "view/" + getViewName() + "/";
}
@Override
public String getPostConstructLandingPage() {
return ""; // there's no configuration page
}
@Override
public void onJobChange(Item item, String oldName, String newName) {
// noop
......
......@@ -106,6 +106,16 @@ public abstract class View extends AbstractModelObject implements AccessControll
return new Api(this);
}
/**
* Returns the page to redirect the user to, after the view is created.
*
* The returned string is appended to "/view/foobar/", so for example
* to direct the user to the top page of the view, return "", etc.
*/
public String getPostConstructLandingPage() {
return "configure";
}
/**
* Returns the {@link ACL} for this object.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册