tbody._()._().div().$style("margin:40px 2px;")._(" ")._(). h2("View Board:"). table("#Board").
tbody._()._().div().$style("margin:40px 2px;")._(" ")._(). h2("View Board:"). table("#Board").
@Override public DIV<Hamlet> div(String selector) { return setSelector(div(), selector); }
@Override public DIV<Hamlet> div(String selector) { return setSelector(div(), selector); }
@Override public DIV<Hamlet> div(String selector) { return setSelector(div(), selector); }
@Test public void testSubViews() { Hamlet h = newHamlet(). title("test sub-views"). div("#view1")._(TestView1.class)._(). div("#view2")._(TestView2.class)._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print("["+ TestView1.class.getName() +"]"); verify(out).print("["+ TestView2.class.getName() +"]"); }
@Test public void testSubViews() { Hamlet h = newHamlet(). title("test sub-views"). div("#view1")._(TestView1.class)._(). div("#view2")._(TestView2.class)._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print("["+ TestView1.class.getName() +"]"); verify(out).print("["+ TestView2.class.getName() +"]"); }
@Test public void testSubViews() { Hamlet h = newHamlet(). title("test sub-views"). div("#view1")._(TestView1.class)._(). div("#view2")._(TestView2.class)._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print("["+ TestView1.class.getName() +"]"); verify(out).print("["+ TestView2.class.getName() +"]"); }
protected void doRender(Hamlet html) { html. div("cluster_json"). h2("JSON Cluster Specification"). pre(). _(getJson())._()._(); }
protected void doRender(Hamlet html) { html. div("cluster_json"). h2("JSON Cluster Specification"). pre(). _(getJson())._()._(); }
@Test public void testEnumAttrs() { Hamlet h = newHamlet(). meta_http("Content-type", "text/html; charset=utf-8"). title("test enum attrs"). link().$rel("stylesheet"). $media(EnumSet.of(Media.screen, Media.print)). $type("text/css").$href("style.css")._(). link().$rel(EnumSet.of(LinkType.index, LinkType.start)). $href("index.html")._(); h.div("#content")._("content")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print(" media=\"screen, print\""); verify(out).print(" rel=\"start index\""); }
@Test public void testEnumAttrs() { Hamlet h = newHamlet(). meta_http("Content-type", "text/html; charset=utf-8"). title("test enum attrs"). link().$rel("stylesheet"). $media(EnumSet.of(Media.screen, Media.print)). $type("text/css").$href("style.css")._(). link().$rel(EnumSet.of(LinkType.index, LinkType.start)). $href("index.html")._(); h.div("#content")._("content")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print(" media=\"screen, print\""); verify(out).print(" rel=\"start index\""); }
@Test public void testEnumAttrs() { Hamlet h = newHamlet(). meta_http("Content-type", "text/html; charset=utf-8"). title("test enum attrs"). link().$rel("stylesheet"). $media(EnumSet.of(Media.screen, Media.print)). $type("text/css").$href("style.css")._(). link().$rel(EnumSet.of(LinkType.index, LinkType.start)). $href("index.html")._(); h.div("#content")._("content")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print(" media=\"screen, print\""); verify(out).print(" rel=\"start index\""); }
@Override protected void createAttemptHeadRoomTable(Block html) { RMAppAttempt attempt = getRMAppAttempt(); if (attempt != null) { if (!isApplicationInFinalState(YarnApplicationAttemptState .valueOf(attempt.getAppAttemptState().toString()))) { RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics(); DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP); info("Application Attempt Overview").clear(); info("Application Attempt Metrics")._( "Application Attempt Headroom : ", metrics == null ? "N/A" : metrics.getApplicationAttemptHeadroom()); pdiv._(); } } }
@Override protected void createAttemptHeadRoomTable(Block html) { RMAppAttempt attempt = getRMAppAttempt(); if (attempt != null) { if (!isApplicationInFinalState(YarnApplicationAttemptState .valueOf(attempt.getAppAttemptState().toString()))) { RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics(); DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP); info("Application Attempt Overview").clear(); info("Application Attempt Metrics")._( "Application Attempt Headroom : ", metrics == null ? "N/A" : metrics.getApplicationAttemptHeadroom()); pdiv._(); } } }
@Test public void testPreformatted() { Hamlet h = newHamlet(). div(). i("inline before pre"). pre(). _("pre text1\npre text2"). i("inline in pre"). _("pre text after inline")._(). i("inline after pre")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(5, h.indents); }
@Test public void testPreformatted() { Hamlet h = newHamlet(). div(). i("inline before pre"). pre(). _("pre text1\npre text2"). i("inline in pre"). _("pre text after inline")._(). i("inline after pre")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(5, h.indents); }
@Test public void testPreformatted() { Hamlet h = newHamlet(). div(). i("inline before pre"). pre(). _("pre text1\npre text2"). i("inline in pre"). _("pre text after inline")._(). i("inline after pre")._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(5, h.indents); }