/** * 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). _(). _(); }
private <T extends _> H3<T> h3_(T e, boolean inline) { return new H3<T>("h3", e, opt(true, inline, false)); }
private <T extends _> H3<T> h3_(T e, boolean inline) { return new H3<T>("h3", e, opt(true, inline, false)); }
private <T extends _> H3<T> h3_(T e, boolean inline) { return new H3<T>("h3", e, opt(true, inline, false)); }
@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> abbr(String cdata) { return abbr()._(cdata)._(); }
@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> b(String selector, String cdata) { return setSelector(b(), selector)._(cdata)._(); }
@Override public H3<T> abbr(String cdata) { return abbr()._(cdata)._(); }
@Override public H3<T> br(String selector) { return setSelector(br(), selector)._(); }
@Override public H3<T> b(String selector, String cdata) { return setSelector(b(), selector)._(cdata)._(); }
@Override public H3<T> b(String cdata) { return b()._(cdata)._(); }
@Override public H3<T> b(String selector, String cdata) { return setSelector(b(), selector)._(cdata)._(); }
@Override public H3<T> br(String selector) { return setSelector(br(), selector)._(); }
@Override public H3<T> bdo(Dir dir, String cdata) { return bdo().$dir(dir)._(cdata)._(); }
@Override public H3<T> a(String selector, String href, String anchorText) { return setSelector(a(), selector).$href(href)._(anchorText)._(); }