protected override void Render(HtmlBlock.Block html) { html.(typeof(MetricsOverviewTable)); Hamlet.UL <Hamlet.DIV <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > > ul = html.Div("#cs-wrapper.ui-widget").Div(".ui-widget-header.ui-corner-top").("Application Queues" ).().Div("#cs.ui-widget-content.ui-corner-bottom").Ul(); if (cs == null) { ul.Li().A(Q).$style(Width(QMaxWidth)).Span().$style(QEnd).("100% ").().Span(".q", "default").().(); } else { CSQueue root = cs.GetRootQueue(); CapacitySchedulerInfo sinfo = new CapacitySchedulerInfo(root); csqinfo.csinfo = sinfo; csqinfo.qinfo = null; float used = sinfo.GetUsedCapacity() / 100; ul.Li().$style("margin-bottom: 1em").Span().$style("font-weight: bold").("Legend:" ).().Span().$class("qlegend ui-corner-all").$style(QGiven).("Capacity").().Span( ).$class("qlegend ui-corner-all").$style(QUnder).("Used").().Span().$class("qlegend ui-corner-all" ).$style(QOver).("Used (over capacity)").().Span().$class("qlegend ui-corner-all ui-state-default" ).("Max Capacity").().().Li().A(Q).$style(Width(QMaxWidth)).Span().$style(StringHelper.Join (Width(used), ";left:0%;", used > 1 ? QOver : QUnder)).(".").().Span(".q", "root" ).().Span().$class("qstats").$style(Left(QStatsPos)).(StringHelper.Join(Percent( used), " used")).().(typeof(CapacitySchedulerPage.QueueBlock)).(); } ul.().().Script().$type("text/javascript").("$('#cs').hide();").().().(typeof(RMAppsBlock )); }