protected void render(Block html) { String loggedIn = ""; if (this.request().getRemoteUser() != null) { loggedIn = "Logged in as: " + this.request().getRemoteUser(); } ((DIV) ((DIV) html.div("#header.ui-widget").div("#user")._(new Object[]{loggedIn})._()).div("#logo").img("/static/xlWebApp/logo.png")._()).h1(this.$("title"))._(); } }
protected void render(Block html) { String loggedIn = ""; if (this.request().getRemoteUser() != null) { loggedIn = "Logged in as: " + this.request().getRemoteUser(); } ((DIV) ((DIV) html.div("#header.ui-widget").div("#user")._(new Object[]{loggedIn})._()).div("#logo").img("/proxy/" + $(APP_ID) + "/static/xlWebApp/logo.png")._()).h1(this.$("title"))._(); } }
.div().$class("ui-progressbar ui-widget ui-widget-content ui-corner-all").$title($(CONTAINER_REPORTER_PROGRESS + i)) .div().$class("ui-progressbar-value ui-widget-header ui-corner-left").$style("width:" + $(CONTAINER_REPORTER_PROGRESS + i)) ._()._()._()._(); tbody._()._().div().$style("margin:20px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). _()._()._(); } else { tbody._()._().div().$style("margin:20px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). html.div().$style("margin:20px 2px;")._(" ")._(); int saveModelTotal = Integer.parseInt($(SAVE_MODEL_TOTAL)); int saveModelSize = Integer.parseInt($(OUTPUT_TOTAL)); if ((saveModelTotal > 0) && (saveModelSize > 0)) { if (!Boolean.valueOf($(SAVE_MODEL))) { html.div().button().$id("saveModel").$onclick("savedModel()").b("Save Model")._()._(); StringBuilder script = new StringBuilder(); script.append("function savedModel(){") html.script().$type("text/javascript")._(script.toString())._(); if (!Boolean.valueOf($(LAST_SAVE_STATUS))) { html.div().$style("margin:20px 2px;")._(" ")._(); } else { html.div().$style("margin:20px 2px;")._("saved the model completed!")._();
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())._()._(); }
@Override protected void render(Block html) { html. div("#footer.ui-widget")._(); } }
@Override protected void render(Block html) { html. div("#footer.ui-widget")._(); } }
@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() +"]"); }
@Override protected void render(Block html) { html .div("#nav") .h3()._("Logs")._() // ._(); } }
@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() +"]"); }
@Override protected void render(Block html) { html .div("#nav") .h3()._("Logs")._() // ._(); } }
@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() +"]"); }
.div().$class("ui-progressbar ui-widget ui-widget-content ui-corner-all").$title($(CONTAINER_REPORTER_PROGRESS + i)) .div().$class("ui-progressbar-value ui-widget-header ui-corner-left").$style("width:" + $(CONTAINER_REPORTER_PROGRESS + i)) ._()._()._()._(); tbody._()._().div().$style("margin:20px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). _()._()._(); } else { tbody._()._().div().$style("margin:20px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). html.div().$style("margin:20px 2px;")._(" ")._(); int saveModelTotal = Integer.parseInt($(SAVE_MODEL_TOTAL)); int saveModelSize = Integer.parseInt($(OUTPUT_TOTAL)); if ((saveModelTotal > 0) && (saveModelSize > 0)) { if (!Boolean.valueOf($(SAVE_MODEL))) { html.div().button().$id("saveModel").$onclick("savedModel()").b("Save Model")._()._(); StringBuilder script = new StringBuilder(); script.append("function savedModel(){") html.script().$type("text/javascript")._(script.toString())._(); if (!Boolean.valueOf($(LAST_SAVE_STATUS))) { html.div().$style("margin:20px 2px;")._(" ")._(); } else { html.div().$style("margin:20px 2px;")._("saved the model completed!")._();
.div().$class("ui-progressbar ui-widget ui-widget-content ui-corner-all").$title($(CONTAINER_REPORTER_PROGRESS + i)) .div().$class("ui-progressbar-value ui-widget-header ui-corner-left").$style("width:" + $(CONTAINER_REPORTER_PROGRESS + i)) ._()._()._()._(); tbody._()._().div().$style("margin:40px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). int outputSize = Integer.parseInt($(OUTPUT_TOTAL)); if (timestampSize > 0) { html.div().$style("margin:20px 2px;")._(" ")._(); Hamlet.TBODY<TABLE<Hamlet>> tbodySave = html. h2("Saved Model"). int numWorkers = Integer.parseInt($(WORKER_NUMBER)); int numPS = Integer.parseInt($(PS_NUMBER)); html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); Hamlet.TBODY<TABLE<Hamlet>> psCPUUsage = html. h2("PS Containers CPU Usage Info:"). html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); if (Boolean.parseBoolean($(CONTAINER_CPU_METRICS_ENABLE))) { int numPS = Integer.parseInt($(PS_NUMBER));
.div().$class("ui-progressbar ui-widget ui-widget-content ui-corner-all").$title($(CONTAINER_REPORTER_PROGRESS + i)) .div().$class("ui-progressbar-value ui-widget-header ui-corner-left").$style("width:" + $(CONTAINER_REPORTER_PROGRESS + i)) ._()._()._()._(); tbody._()._().div().$style("margin:40px 2px;")._(" ")._(). h2("View Board:"). table("#Board"). int outputSize = Integer.parseInt($(OUTPUT_TOTAL)); if (timestampSize > 0) { html.div().$style("margin:20px 2px;")._(" ")._(); Hamlet.TBODY<TABLE<Hamlet>> tbodySave = html. h2("Saved Model"). html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); html.div().$style("margin:20px 2px;")._(" ")._(); if (Boolean.parseBoolean($(CONTAINER_CPU_METRICS_ENABLE))) { int numWorkers = Integer.parseInt($(WORKER_NUMBER)); for (int i = 0; i < numWorkers; i++) { if (!$("workerCpuMemMetrics" + i).equals("") && $("workerCpuMemMetrics" + i) != null) { html.div().$style("margin:20px 2px;font-weight:bold;font-size:12px")._(String.format($(CONTAINER_ID + i)) + " metrics:")._(); if (!$("workerCpuUtilMetrics" + i).equals("") && $("workerCpuUtilMetrics" + i) != null) { html.div()
@Override protected void render(Block html) { html. div("#nav"). h3("Tools"). ul(). li().a("/conf", "Configuration")._(). li().a("/stacks", "Thread dump")._(). li().a("/logs", "Logs")._(). li().a("/jmx?qry=Hadoop:*", "Metrics")._()._()._(); } }