/** * Warn the user that the link may not be safe! * @param resp the http response * @param link the link to point to * @param user the user that owns the link. * @throws IOException on any error. */ private static void warnUserPage(HttpServletResponse resp, String link, String user, ApplicationId id) throws IOException { //Set the cookie when we warn which overrides the query parameter //This is so that if a user passes in the approved query parameter without //having first visited this page then this page will still be displayed resp.addCookie(makeCheckCookie(id, false)); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1("WARNING: The following page may not be safe!"). h3(). _("click ").a(link, "here"). _(" to continue to an Application Master web interface owned by ", user). _(). _(); }
/** * Warn the user that the link may not be safe! * @param resp the http response * @param link the link to point to * @param user the user that owns the link. * @throws IOException on any error. */ private static void warnUserPage(HttpServletResponse resp, String link, String user, ApplicationId id) throws IOException { //Set the cookie when we warn which overrides the query parameter //This is so that if a user passes in the approved query parameter without //having first visited this page then this page will still be displayed resp.addCookie(makeCheckCookie(id, false)); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1("WARNING: The following page may not be safe!"). h3(). _("click ").a(link, "here"). _(" to continue to an Application Master web interface owned by ", user). _(). _(); }
/** * Warn the user that the link may not be safe! * @param resp the http response * @param link the link to point to * @param user the user that owns the link. * @throws IOException on any error. */ private static void warnUserPage(HttpServletResponse resp, String link, String user, ApplicationId id) throws IOException { //Set the cookie when we warn which overrides the query parameter //This is so that if a user passes in the approved query parameter without //having first visited this page then this page will still be displayed resp.addCookie(makeCheckCookie(id, false)); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1("WARNING: The following page may not be safe!"). h3(). _("click ").a(link, "here"). _(" to continue to an Application Master web interface owned by ", user). _(). _(); }
@Override public A<H3<T>> a(String selector) { return setSelector(a(), selector); }
@Override public A<H3<T>> a(String selector) { return setSelector(a(), selector); }
@Override public H3<T> a(String selector, String href, String anchorText) { return setSelector(a(), selector).$href(href)._(anchorText)._(); }
@Override public H3<T> a(String href, String anchorText) { return a().$href(href)._(anchorText)._(); }
@Override public H3<T> a(String selector, String href, String anchorText) { return setSelector(a(), selector).$href(href)._(anchorText)._(); }
@Override public H3<T> a(String href, String anchorText) { return a().$href(href)._(anchorText)._(); }
@Override public H3<T> a(String selector, String href, String anchorText) { return setSelector(a(), selector).$href(href)._(anchorText)._(); }
@Override public A<H3<T>> a(String selector) { return setSelector(a(), selector); }
@Override public H3<T> a(String href, String anchorText) { return a().$href(href)._(anchorText)._(); }