protected void enumeratePublishedExports(PublishedExportsSet exports, UL<Hamlet> ul) { for(String key : exports.keys()) { PublishedExports export = exports.get(key); LI<UL<Hamlet>> item = ul.li(); item.span().$class("bold")._(export.description)._(); UL sublist = item.ul(); for (Entry<String, List<ExportEntry>> entry : export.entries.entrySet()) { LI sublistItem = sublist.li()._(entry.getKey()); for (ExportEntry exportEntry : entry.getValue()) { sublistItem._(exportEntry.getValue()); } sublistItem._(); } sublist._(); item._(); } } }
protected void enumeratePublishedExports(PublishedExportsSet exports, UL<Hamlet> ul) { for(String key : exports.keys()) { PublishedExports export = exports.get(key); LI<UL<Hamlet>> item = ul.li(); item.span().$class("bold")._(export.description)._(); UL sublist = item.ul(); for (Entry<String, List<ExportEntry>> entry : export.entries.entrySet()) { LI sublistItem = sublist.li()._(entry.getKey()); for (ExportEntry exportEntry : entry.getValue()) { sublistItem._(exportEntry.getValue()); } sublistItem._(); } sublist._(); item._(); } } }
protected void addProviderServiceOptions(ProviderService provider, UL ul, ClusterDescription clusterStatus) { Map<String, MonitorDetail> details = provider.buildMonitorDetails( clusterStatus); if (null == details) { return; } // Loop over each entry, placing the text in the UL, adding an anchor when the URL is non-null/empty for (Entry<String, MonitorDetail> entry : details.entrySet()) { MonitorDetail detail = entry.getValue(); if (SliderUtils.isSet(detail.getValue()) ) { LI item = ul.li(); item.span().$class("bold")._(entry.getKey())._(); item._(" - "); if (detail.isUrl()) { // Render an anchor if the value is a URL item.a(detail.getValue(), detail.getValue())._(); } else { item._(detail.getValue())._(); } } else { ul.li(entry.getKey()); } } }
float absUsedCap = info.getAbsoluteUsedCapacity() / 100; LI<UL<Hamlet>> li = ul. li(). a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)). $title(join("Absolute Capacity:", percent(absCap))). li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._(); li.ul("#lq").li()._(QueueUsersInfoBlock.class)._()._(); } else { li._(QueueBlock.class);
@Override protected void render(Block html) { String RMWebAppURL = WebAppUtils.getResolvedRemoteRMWebAppURLWithScheme(this.conf); 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")._()._()._(); }
@Override protected void render(Block html) { html. div("#nav"). h3("Slider"). ul(). li().a(this.prefix(), "Overview")._(). li().a(relPath(CONTAINER_STATS), "Statistics")._(). li().a(relPath(CLUSTER_SPEC), "Specification")._(). li().a(rootPath(SYSTEM_METRICS_JSON), "Metrics")._(). li().a(rootPath(SYSTEM_HEALTHCHECK), "Health")._(). li().a(rootPath(SYSTEM_THREADS), "Threads")._(). _() .h3("REST API"). ul(). li().a(apiPath(MODEL_DESIRED), "Specified")._(). li().a(apiPath(MODEL_RESOLVED), "Resolved")._(). li().a(apiPath(LIVE_RESOURCES), "Resources")._(). li().a(apiPath(LIVE_COMPONENTS), "Components")._(). li().a(apiPath(LIVE_CONTAINERS), "Containers")._(). li().a(apiPath(LIVE_NODES), "Nodes")._(). li().a(apiPath(LIVE_STATISTICS), "Statistics")._(). li().a(apiPath(LIVE_LIVENESS), "Liveness")._(). li().a(apiPath(LIVE_DIAGNOSTICS), "Diagnostics")._() ._() ._(); }
protected void addProviderServiceOptions(ProviderService provider, UL ul, ClusterDescription clusterStatus) { Map<String, MonitorDetail> details = provider.buildMonitorDetails( clusterStatus); if (null == details) { return; } // Loop over each entry, placing the text in the UL, adding an anchor when the URL is non-null/empty for (Entry<String, MonitorDetail> entry : details.entrySet()) { MonitorDetail detail = entry.getValue(); if (SliderUtils.isSet(detail.getValue()) ) { LI item = ul.li(); item.span().$class("bold")._(entry.getKey())._(); item._(" - "); if (detail.isUrl()) { // Render an anchor if the value is a URL item.a(detail.getValue(), detail.getValue())._(); } else { item._(detail.getValue())._(); } } else { ul.li(entry.getKey()); } } }
@Override public void render(Block html) { UL<DIV<Hamlet>> mainList = html. div("#nav"). h3("Cluster"). ul(). li().a(url("cluster"), "About")._(). li().a(url("nodes"), "Nodes")._(). li().a(url("nodelabels"), "Node Labels")._(); UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList. li().a(url("apps"), "Applications"). ul(); subAppsList.li()._(); for (YarnApplicationState state : YarnApplicationState.values()) { subAppsList. li().a(url("apps", state.toString()), state.toString())._(); } subAppsList._()._(); mainList. li().a(url("scheduler"), "Scheduler")._()._(). h3("Tools"). ul(). li().a("/conf", "Configuration")._(). li().a("/logs", "Local logs")._(). li().a("/stacks", "Server stacks")._(). li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._(); } }
@Override public void render(Block html) { UL<DIV<Hamlet>> mainList = html. div("#nav"). h3("Cluster"). ul(). li().a(url("cluster"), "About")._(). li().a(url("nodes"), "Nodes")._(). li().a(url("nodelabels"), "Node Labels")._(); UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList. li().a(url("apps"), "Applications"). ul(); subAppsList.li()._(); for (YarnApplicationState state : YarnApplicationState.values()) { subAppsList. li().a(url("apps", state.toString()), state.toString())._(); } subAppsList._()._(); mainList. li().a(url("scheduler"), "Scheduler")._()._(). h3("Tools"). ul(). li().a("/conf", "Configuration")._(). li().a("/logs", "Local logs")._(). li().a("/stacks", "Server stacks")._(). li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._(); } }
@Override protected void render(Block html) { html. div("#nav"). h3("Slider"). ul(). li().a(this.prefix(), "Overview")._(). li().a(relPath(CONTAINER_STATS), "Statistics")._(). li().a(relPath(CLUSTER_SPEC), "Specification")._(). li().a(rootPath(SYSTEM_METRICS_JSON), "Metrics")._(). li().a(rootPath(SYSTEM_HEALTHCHECK), "Health")._(). li().a(rootPath(SYSTEM_THREADS), "Threads")._(). _() .h3("REST API"). ul(). li().a(apiPath(MODEL_DESIRED), "Specified")._(). li().a(apiPath(MODEL_RESOLVED), "Resolved")._(). li().a(apiPath(LIVE_RESOURCES), "Resources")._(). li().a(apiPath(LIVE_COMPONENTS), "Components")._(). li().a(apiPath(LIVE_CONTAINERS), "Containers")._(). li().a(apiPath(LIVE_NODES), "Nodes")._(). li().a(apiPath(LIVE_STATISTICS), "Statistics")._(). li().a(apiPath(LIVE_LIVENESS), "Liveness")._(). li().a(apiPath(LIVE_DIAGNOSTICS), "Diagnostics")._() ._() ._(); }
@Override public void render(Block html) { html. div("#nav"). h3("Application History"). ul(). 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()). _(). _(). _(). _(). _(); } }
@Override protected void render(Block html) { String RMWebAppURL = WebAppUtils.getResolvedRemoteRMWebAppURLWithScheme(this.conf); 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")._()._()._(); }
@Override public void render(Block html) { html. div("#nav"). h3("Application History"). ul(). 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()). _(). _(). _(). _(). _(); } }
@Override protected void render(Block html) { html. div("#nav"). h3("Heading1"). ul(). li("Item 1"). li("Item 2"). li("...")._(). h3("Tools"). ul(). li().a("/conf", "Configuration")._(). li().a("/stacks", "Thread dump")._(). li().a("/logs", "Logs")._(). li().a("/jmx?qry=Hadoop:*", "Metrics")._()._()._(); } }
@Override protected void render(Block html) { html. div("#nav"). h3("Heading1"). ul(). li("Item 1"). li("Item 2"). li("...")._(). h3("Tools"). ul(). li().a("/conf", "Configuration")._(). li().a("/stacks", "Thread dump")._(). li().a("/logs", "Logs")._(). li().a("/jmx?qry=Hadoop:*", "Metrics")._()._()._(); } }
@Override public UL<T> li(String cdata) { return li()._(cdata)._(); } }
@Override public UL<T> li(String cdata) { return li()._(cdata)._(); } }
@Override public UL<T> li(String cdata) { return li()._(cdata)._(); } }