@Override protected void render(Block html) { TBODY<TABLE<BODY<Hamlet>>> tableBody = html.body() .table("#containers") .thead() .tr() .td().__("ContainerId").__() .td().__("ExecutionType").__() .td().__("ContainerState").__() .td().__("logs").__() .__() .__().tbody(); for (Entry<ContainerId, Container> entry : this.nmContext .getContainers().entrySet()) { ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue()); tableBody .tr() .td().a(url("container", info.getId()), info.getId()) .__() .td().__(info.getExecutionType()).__() .td().__(info.getState()).__() .td() .a(url(info.getShortLogLink()), "logs").__() .__(); } tableBody.__().__().__(); }
@Override protected void render(Block html) { TBODY<TABLE<BODY<Hamlet>>> tableBody = html .body() .table("#applications") .thead() .tr() .td().__("ApplicationId").__() .td().__("ApplicationState").__() .__() .__() .tbody(); for (Entry<ApplicationId, Application> entry : this.nmContext .getApplications().entrySet()) { AppInfo info = new AppInfo(entry.getValue()); tableBody .tr() .td().a(url("application", info.getId()), info.getId()).__() .td().__(info.getState()) .__() .__(); } tableBody.__().__().__(); } }
private <T extends __> BODY<T> body_(T e, boolean inline) { return new BODY<T>("body", e, opt(true, inline, false)); }
@Override public TABLE<BODY<T>> table(String selector) { return setSelector(table(), selector); }
@Override public BODY<T> h1(String cdata) { return h1().__(cdata).__(); }
@Override public BODY<T> address(String cdata) { return address().__(cdata).__(); }
@Override public BODY<T> h1(String selector, String cdata) { return setSelector(h1(), selector).__(cdata).__(); }
@Override public DIV<BODY<T>> div(String selector) { return setSelector(div(), selector); }
@Override public INS<BODY<T>> ins() { closeAttrs(); return ins_(this, false); }
@Override public FIELDSET<BODY<T>> fieldset() { closeAttrs(); return fieldset_(this, false); }
@Override public FORM<BODY<T>> form() { closeAttrs(); return form_(this, false); }
@Override public PRE<BODY<T>> pre() { closeAttrs(); return pre_(this, false); }
@Override public H2<BODY<T>> h2() { closeAttrs(); return h2_(this, false); }
@Override public H1<BODY<T>> h1() { closeAttrs(); return h1_(this, false); }
@Override public BODY<T> $lang(String value) { addAttr("lang", value); return this; }
@Override public BODY<T> $class(String value) { addAttr("class", value); return this; }
@Override public UL<BODY<T>> ul() { closeAttrs(); return ul_(this, false); }
@Override public H6<BODY<T>> h6() { closeAttrs(); return h6_(this, false); }
@Override public H3<BODY<T>> h3() { closeAttrs(); return h3_(this, false); }