YARN-1868. YARN status web ui does not show correctly in IE 11. Contributed by Chuan Liu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1598686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e4c06854b4
commit
d599adcc6a
@ -171,6 +171,9 @@ Release 2.5.0 - UNRELEASED
|
||||
that both Timeline Server and client can access them. (Zhijie Shen via
|
||||
vinodkv)
|
||||
|
||||
YARN-1868. YARN status web ui does not show correctly in IE 11.
|
||||
(Chuan Liu via cnauroth)
|
||||
|
||||
Release 2.4.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -79,7 +79,8 @@ protected HtmlPage(ViewContext ctx) {
|
||||
@Override
|
||||
public void render() {
|
||||
puts(DOCTYPE);
|
||||
render(page().html().meta_http("Content-type", MimeType.HTML));
|
||||
render(page().html().meta_http("X-UA-Compatible", "IE=8")
|
||||
.meta_http("Content-type", MimeType.HTML));
|
||||
if (page().nestLevel() != 0) {
|
||||
throw new WebAppException("Error rendering page: nestLevel="+
|
||||
page().nestLevel());
|
||||
|
@ -70,6 +70,6 @@ public void render(Block html) {
|
||||
out.flush();
|
||||
verify(out).print("sub1 text");
|
||||
verify(out).print("sub2 text");
|
||||
verify(out, times(15)).println(); // test inline transition across views
|
||||
verify(out, times(16)).println(); // test inline transition across views
|
||||
}
|
||||
}
|
||||
|
@ -22,11 +22,12 @@
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import org.apache.hadoop.yarn.webapp.MimeType;
|
||||
import org.apache.hadoop.yarn.webapp.WebAppException;
|
||||
import org.apache.hadoop.yarn.webapp.test.WebAppTests;
|
||||
import org.apache.hadoop.yarn.webapp.view.HtmlPage;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
public class TestHtmlPage {
|
||||
@ -53,6 +54,12 @@ public void render(Page.HTML<_> html) {
|
||||
Injector injector = WebAppTests.testPage(TestView.class);
|
||||
PrintWriter out = injector.getInstance(PrintWriter.class);
|
||||
|
||||
// Verify the HTML page has correct meta tags in the header
|
||||
verify(out).print(" http-equiv=\"X-UA-Compatible\"");
|
||||
verify(out).print(" content=\"IE=8\"");
|
||||
verify(out).print(" http-equiv=\"Content-type\"");
|
||||
verify(out).print(String.format(" content=\"%s\"", MimeType.HTML));
|
||||
|
||||
verify(out).print("test");
|
||||
verify(out).print(" id=\"testid\"");
|
||||
verify(out).print("test note");
|
||||
|
Loading…
Reference in New Issue
Block a user