本文整理汇总了Java中org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV属性的典型用法代码示例。如果您正苦于以下问题:Java Hamlet.DIV属性的具体用法?Java Hamlet.DIV怎么用?Java Hamlet.DIV使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.yarn.webapp.hamlet.Hamlet
的用法示例。
在下文中一共展示了Hamlet.DIV属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
@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._();
}
}
示例2: render
@Override
protected void render(Block html) {
boolean addErrorsAndWarningsLink = false;
Log log = LogFactory.getLog(NMErrorsAndWarningsPage.class);
if (log instanceof Log4JLogger) {
Log4jWarningErrorMetricsAppender appender = Log4jWarningErrorMetricsAppender.findAppender();
if (appender != null) {
addErrorsAndWarningsLink = true;
}
}
String RMWebAppURL =
WebAppUtils.getResolvedRMWebAppURLWithScheme(this.conf);
Hamlet.UL<Hamlet.DIV<Hamlet>> ul = html
.div("#nav")
.h3()._("ResourceManager")._()
.ul()
.li().a(RMWebAppURL, "RM Home")._()._()
.h3()._("NodeManager")._() // TODO: Problem if no header like this
.ul()
.li()
.a(url("node"), "Node Information")._()
.li()
.a(url("allApplications"), "List of Applications")
._()
.li()
.a(url("allContainers"), "List of Containers")._()
._()
.h3("Tools")
.ul()
.li().a("/conf", "Configuration")._()
.li().a("/logs", "Local logs")._()
.li().a("/stacks", "Server stacks")._()
.li().a("/jmx?qry=Hadoop:*", "Server metrics")._();
if (addErrorsAndWarningsLink) {
ul.li().a(url("errors-and-warnings"), "Errors/Warnings")._();
}
ul._()._();
}
示例3: render
@Override
public void render(Block html) {
boolean addErrorsAndWarningsLink = false;
Log log = LogFactory.getLog(NavBlock.class);
if (log instanceof Log4JLogger) {
Log4jWarningErrorMetricsAppender appender =
Log4jWarningErrorMetricsAppender.findAppender();
if (appender != null) {
addErrorsAndWarningsLink = true;
}
}
Hamlet.DIV<Hamlet> nav = html.
div("#nav").
h3("Application History").
ul().
li().a(url("about"), "About").
_().
li().a(url("apps"), "Applications").
ul().
li().a(url("apps",
YarnApplicationState.FINISHED.toString()),
YarnApplicationState.FINISHED.toString()).
_().
li().a(url("apps",
YarnApplicationState.FAILED.toString()),
YarnApplicationState.FAILED.toString()).
_().
li().a(url("apps",
YarnApplicationState.KILLED.toString()),
YarnApplicationState.KILLED.toString()).
_().
_().
_().
_();
Hamlet.UL<Hamlet.DIV<Hamlet>> tools = nav.h3("Tools").ul();
tools.li().a("/conf", "Configuration")._()
.li().a("/logs", "Local logs")._()
.li().a("/stacks", "Server stacks")._()
.li().a("/jmx?qry=Hadoop:*", "Server metrics")._();
if (addErrorsAndWarningsLink) {
tools.li().a(url("errors-and-warnings"), "Errors/Warnings")._();
}
tools._()._();
}