当前位置: 首页>>代码示例>>Java>>正文


Java Hamlet.UL属性代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL属性的典型用法代码示例。如果您正苦于以下问题:Java Hamlet.UL属性的具体用法?Java Hamlet.UL怎么用?Java Hamlet.UL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.hadoop.yarn.webapp.hamlet.Hamlet的用法示例。


在下文中一共展示了Hamlet.UL属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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._()._();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:40,代码来源:NavBlock.java

示例2: 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._()._();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:46,代码来源:NavBlock.java


注:本文中的org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。