List of usage examples for org.apache.hadoop.yarn.webapp.hamlet Hamlet div
@Override
public DIV<Hamlet> div(String selector)
From source file:org.apache.hoya.yarn.appmaster.web.view.ClusterSpecificationBlock.java
License:Apache License
protected void doRender(Hamlet html) { html.div("cluster_json").h2("JSON Cluster Specification").pre()._(getJson())._()._(); }
From source file:org.apache.hoya.yarn.appmaster.web.view.IndexBlock.java
License:Apache License
protected void doIndex(Hamlet html, String providerName) { DIV<Hamlet> div = html.div("general_info").h1("index_header", providerName + " cluster: '" + appState.getClusterStatus().name + "'"); UL<DIV<Hamlet>> ul = div.ul(); ul.li("Total number of containers for cluster: " + appState.getNumActiveContainers()); ul.li("Cluster created: " + getInfoAvoidingNulls(StatusKeys.INFO_CREATE_TIME_HUMAN)); ul.li("Cluster last flexed: " + getInfoAvoidingNulls(StatusKeys.INFO_FLEX_TIME_HUMAN)); ul.li("Cluster running since: " + getInfoAvoidingNulls(StatusKeys.INFO_LIVE_TIME_HUMAN)); ul.li("Cluster HDFS storage path: " + appState.getClusterStatus().dataPath); ul.li("Cluster configuration path: " + appState.getClusterStatus().originConfigurationPath); ul._()._();//www. ja v a 2s. c o m html.div("provider_info").h3(providerName + " specific information"); ul = div.ul(); addProviderServiceOptions(providerService, ul); ul._()._(); }
From source file:org.apache.slider.server.appmaster.web.view.IndexBlock.java
License:Apache License
@VisibleForTesting protected void doIndex(Hamlet html, String providerName) { ClusterDescription clusterStatus = appView.getClusterStatus(); DIV<Hamlet> div = html.div("general_info").h1("index_header", "Application: '" + clusterStatus.name + "'"); UL<DIV<Hamlet>> ul = div.ul(); ul.li("Total number of containers for application: " + appView.getNumOwnedContainers()); ul.li("Application created: " + getInfoAvoidingNulls(StatusKeys.INFO_CREATE_TIME_HUMAN)); ul.li("Application last flexed: " + getInfoAvoidingNulls(StatusKeys.INFO_FLEX_TIME_HUMAN)); ul.li("Application running since: " + getInfoAvoidingNulls(StatusKeys.INFO_LIVE_TIME_HUMAN)); ul.li("Application HDFS storage path: " + clusterStatus.dataPath); ul.li("Application configuration path: " + clusterStatus.originConfigurationPath); ul._()._();//from w w w .j a v a 2 s .c o m html.div("provider_info").h3(providerName + " specific information"); ul = div.ul(); addProviderServiceOptions(providerService, ul, clusterStatus); ul._()._(); html.div("container_instances").h3("Component Instances"); Hamlet.TABLE<DIV<Hamlet>> table = div.table(); table.tr().th("Component").th("Desired").th("Actual").th("Outstanding Requests").th("Failed") .th("Failed to start")._(); List<RoleStatus> roleStatuses = appView.cloneRoleStatusList(); Collections.sort(roleStatuses, new RoleStatus.CompareByName()); for (RoleStatus status : roleStatuses) { table.tr().td(status.getName()).th(String.format("%d", status.getDesired())) .th(String.format("%d", status.getActual())).th(String.format("%d", status.getRequested())) .th(String.format("%d", status.getFailed())).th(String.format("%d", status.getStartFailed())) ._(); } table._()._(); }