th("ui-state-default", "Finish Time"). th("ui-state-default", "Reporter Progress"). _()._(). tbody(); td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td($(CONTAINER_REPORTER_PROGRESS + i)).td()._()._(); } else if ($(CONTAINER_REPORTER_PROGRESS + i).equals("0.00%")) { td._(). td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td("N/A").td()._()._(); } else { td._(). .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)) ._()._()._()._(); tr(). th("ui-state-default", "Board Info"). _()._(). tbody("ui-widget-content"). tr(). $style("text-align:center;"). td(String.format($(BOARD_INFO))). _()._()._();
th("ui-state-default", "Finish Time"). th("ui-state-default", "Reporter Progress"). _()._(). tbody(); td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td($(CONTAINER_REPORTER_PROGRESS + i))._(); } else if ($(CONTAINER_REPORTER_PROGRESS + i).equals("0.00%")) { td._(). td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td("N/A")._(); } else { td._(). .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)) ._()._()._()._(); tr(). th("ui-state-default", "Board Info"). _()._(). tbody("ui-widget-content"). tr(). $style("text-align:center;"). td($(BOARD_INFO)). _()._()._();
th("ui-state-default", "Finish Time"). th("ui-state-default", "Reporter Progress"). _()._(). tbody(); td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td($(CONTAINER_REPORTER_PROGRESS + i))._(); } else if ($(CONTAINER_REPORTER_PROGRESS + i).equals("0.00%")) { td._(). td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td("N/A")._(); } else { td._(). .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)) ._()._()._()._(); tr(). th("ui-state-default", "Board Info"). _()._(). tbody("ui-widget-content"). tr(). $style("text-align:center;"). td(String.format($(BOARD_INFO))). _()._()._();
@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._()._()._(); } }
@Override protected void render(Block html) { TBODY<TABLE<Hamlet>> tbody = html.table("#userinfo").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default")._("User Name")._().th() .$class("ui-state-default")._("Max Resource")._().th() .$class("ui-state-default")._("Used Resource")._().th() .$class("ui-state-default")._("Max AM Resource")._().th() .$class("ui-state-default")._("Used AM Resource")._().th() .$class("ui-state-default")._("Schedulable Apps")._().th() .$class("ui-state-default")._("Non-Schedulable Apps")._()._()._() .tbody(); ArrayList<UserInfo> users = lqinfo.getUsers().getUsersList(); for (UserInfo userInfo : users) { tbody.tr().td(userInfo.getUsername()) .td(userInfo.getUserResourceLimit().toString()) .td(userInfo.getResourcesUsed().toString()) .td(lqinfo.getUserAMResourceLimit().toString()) .td(userInfo.getAMResourcesUsed().toString()) .td(Integer.toString(userInfo.getNumActiveApplications())) .td(Integer.toString(userInfo.getNumPendingApplications()))._(); } html.div().$class("usersinfo").h5("Active Users Info")._(); tbody._()._(); } }
@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._()._()._(); } }
@Override protected void render(Block html) { TBODY<TABLE<Hamlet>> tbody = html.table("#userinfo").thead().$class("ui-widget-header").tr().th() .$class("ui-state-default")._("User Name")._().th() .$class("ui-state-default")._("Max Resource")._().th() .$class("ui-state-default")._("Used Resource")._().th() .$class("ui-state-default")._("Max AM Resource")._().th() .$class("ui-state-default")._("Used AM Resource")._().th() .$class("ui-state-default")._("Schedulable Apps")._().th() .$class("ui-state-default")._("Non-Schedulable Apps")._()._()._() .tbody(); ArrayList<UserInfo> users = lqinfo.getUsers().getUsersList(); for (UserInfo userInfo : users) { tbody.tr().td(userInfo.getUsername()) .td(userInfo.getUserResourceLimit().toString()) .td(userInfo.getResourcesUsed().toString()) .td(lqinfo.getUserAMResourceLimit().toString()) .td(userInfo.getAMResourcesUsed().toString()) .td(Integer.toString(userInfo.getNumActiveApplications())) .td(Integer.toString(userInfo.getNumPendingApplications()))._(); } html.div().$class("usersinfo").h5("Active Users Info")._(); tbody._()._(); } }
@Override protected void render(Block html) { TBODY<TABLE<BODY<Hamlet>>> tableBody = html.body() .table("#containers") .thead() .tr() .td()._("ContainerId")._() .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.getState())._() .td() .a(url(info.getShortLogLink()), "logs")._() ._(); } tableBody._()._()._(); }
@Override protected void render(Block html) { TBODY<TABLE<BODY<Hamlet>>> tableBody = html.body() .table("#containers") .thead() .tr() .td()._("ContainerId")._() .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.getState())._() .td() .a(url(info.getShortLogLink()), "logs")._() ._(); } tableBody._()._()._(); }
@Override protected void render(Block html) { TBODY<TABLE<BODY<Hamlet>>> tableBody = html.body() .table("#containers") .thead() .tr() .td()._("ContainerId")._() .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.getState())._() .td() .a(url(info.getShortLogLink()), "logs")._() ._(); } tableBody._()._()._(); }
@Override protected void render(Block html) { Log log = LogFactory.getLog(ErrorsAndWarningsBlock.class); if (log instanceof Log4JLogger) { Hamlet.DIV<Hamlet> div = html.div().$class("metrics").$style("padding-bottom: 20px"); div.h3(tableHeading).table("#metricsoverview").thead() .$class("ui-widget-header").tr().th().$class("ui-state-default") ._("Last 1 minute")._().th().$class("ui-state-default") ._("Last 5 minutes")._().th().$class("ui-state-default") ._("Last 15 minutes")._().th().$class("ui-state-default") ._("Last 1 hour")._().th().$class("ui-state-default") ._("Last 6 hours")._().th().$class("ui-state-default") ._("Last 12 hours")._().th().$class("ui-state-default") ._("Last 24 hours")._()._()._().tbody().$class("ui-widget-content") .tr().td(String.valueOf(values.get(0))) .td(String.valueOf(values.get(1))).td(String.valueOf(values.get(2))) .td(String.valueOf(values.get(3))).td(String.valueOf(values.get(4))) .td(String.valueOf(values.get(5))).td(String.valueOf(values.get(6))) ._()._()._(); div._(); } } }
@Override protected void render(Block html) { ApplicationId applicationID = ConverterUtils.toApplicationId(this.recordFactory, $(APPLICATION_ID)); Application app = this.nmContext.getApplications().get(applicationID); AppInfo info = new AppInfo(app); info("Application's information") ._("ApplicationId", info.getId()) ._("ApplicationState", info.getState()) ._("User", info.getUser()); TABLE<Hamlet> containersListBody = html._(InfoBlock.class) .table("#containers"); for (String containerIdStr : info.getContainers()) { containersListBody .tr().td() .a(url("container", containerIdStr), containerIdStr) ._()._(); } containersListBody._(); } }
@Override protected void render(Block html) { ApplicationId applicationID = ConverterUtils.toApplicationId(this.recordFactory, $(APPLICATION_ID)); Application app = this.nmContext.getApplications().get(applicationID); AppInfo info = new AppInfo(app); info("Application's information") ._("ApplicationId", info.getId()) ._("ApplicationState", info.getState()) ._("User", info.getUser()); TABLE<Hamlet> containersListBody = html._(InfoBlock.class) .table("#containers"); for (String containerIdStr : info.getContainers()) { containersListBody .tr().td() .a(url("container", containerIdStr), containerIdStr) ._()._(); } containersListBody._(); } }
@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._()._()._(); } }
@Override protected void render(Block html) { ApplicationId applicationID = ApplicationId.fromString($(APPLICATION_ID)); Application app = this.nmContext.getApplications().get(applicationID); AppInfo info = new AppInfo(app); info("Application's information") ._("ApplicationId", info.getId()) ._("ApplicationState", info.getState()) ._("User", info.getUser()); TABLE<Hamlet> containersListBody = html._(InfoBlock.class) .table("#containers"); for (String containerIdStr : info.getContainers()) { containersListBody .tr().td() .a(url("container", containerIdStr), containerIdStr) ._()._(); } containersListBody._(); } }
th("ui-state-default", "Finish Time"). th("ui-state-default", "Reporter Progress"). _()._(). tbody(); td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td($(CONTAINER_REPORTER_PROGRESS + i))._(); } else if ($(CONTAINER_REPORTER_PROGRESS + i).equals("0.00%")) { td._(). td($(CONTAINER_START_TIME + i)). td($(CONTAINER_FINISH_TIME + i)). td("N/A")._(); } else { td._(). .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)) ._()._()._()._(); tr(). th("ui-state-default", "Board Info"). _()._(). tbody("ui-widget-content"). tr(). $style("text-align:center;"). td($(BOARD_INFO)). _()._()._();