private HtmlBlock.Block Block() { if (block == null) { block = new HtmlBlock.Block(this, Writer(), Context().NestLevel(), Context().WasInline ()); } return(block); }
protected internal override void Render(HtmlBlock.Block html) { string loggedIn = string.Empty; if (Request().GetRemoteUser() != null) { loggedIn = "Logged in as: " + Request().GetRemoteUser(); } html.Div("#header.ui-widget").Div("#user").(loggedIn).().Div("#logo").Img("/static/hadoop-st.png" ).().H1($(Title)).(); }
protected internal override void Render(HtmlBlock.Block html) { html.P().("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "Vivamus eu dui in ipsum tincidunt egestas ac sed nibh." , "Praesent quis nisl lorem, nec interdum urna.", "Duis sagittis dignissim purus sed sollicitudin." , "Morbi quis diam eu enim semper suscipit.", "Nullam pretium faucibus sapien placerat tincidunt." , "Donec eget lorem at quam fermentum vulputate a ac purus.", "Cras ac dui felis, in pulvinar est." , "Praesent tempor est sed neque pulvinar dictum.", "Nullam magna augue, egestas luctus sollicitudin sed," , "venenatis nec turpis.", "Ut ante enim, congue sed laoreet et, accumsan id metus." , "Mauris tincidunt imperdiet est, sed porta arcu vehicula et.", "Etiam in nisi nunc." , "Phasellus vehicula scelerisque quam, ac dignissim felis euismod a.", "Proin eu ante nisl, vel porttitor eros." , "Aliquam gravida luctus augue, at scelerisque enim consectetur vel.", "Donec interdum tempor nisl, quis laoreet enim venenatis eu." , "Quisque elit elit, vulputate eget porta vel, laoreet ac lacus.").(); }
protected internal override void Render(HtmlBlock.Block html) { Hamlet.TABLE <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > table = html .Div(JQueryUI.InfoWrap).Table(JQueryUI.Info).Tr().Th().$class(JQueryUI.CTh).$colspan (2).(info.About()).().(); int i = 0; foreach (ResponseInfo.Item item in info) { Hamlet.TR <Hamlet.TABLE <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet> > > tr = table.Tr((++i % 2 != 0) ? JQueryUI.Odd : JQueryUI.Even).Th(item.key); string value = item.value.ToString(); if (item.url == null) { if (!item.isRaw) { Hamlet.TD <Hamlet.TR <Hamlet.TABLE <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet > > > > td = tr.Td(); if (value.LastIndexOf('\n') > 0) { string[] lines = value.Split("\n"); Hamlet.DIV <Hamlet.TD <Hamlet.TR <Hamlet.TABLE <Hamlet.DIV <Org.Apache.Hadoop.Yarn.Webapp.Hamlet.Hamlet > > > > > singleLineDiv; foreach (string line in lines) { singleLineDiv = td.Div(); singleLineDiv.(line); singleLineDiv.(); } } else { td.(value); } td.(); } else { tr.Td()._r(value).(); } } else { tr.Td().A(Url(item.url), value).(); } tr.(); } table.().(); }
// UI params // common CSS classes protected internal override void Render(HtmlBlock.Block html) { html.Link(Root_url("static/jquery/themes-1.9.1/base/jquery-ui.css")).Link(Root_url ("static/dt-1.9.4/css/jui-dt.css")).Script(Root_url("static/jquery/jquery-1.8.2.min.js" )).Script(Root_url("static/jquery/jquery-ui-1.9.1.custom.min.js")).Script(Root_url ("static/dt-1.9.4/js/jquery.dataTables.min.js")).Script(Root_url("static/yarn.dt.plugins.js" )).Style("#jsnotice { padding: 0.2em; text-align: center; }", ".ui-progressbar { height: 1em; min-width: 5em }" ); // required IList <string> list = Lists.NewArrayList(); InitAccordions(list); InitDataTables(list); InitDialogs(list); InitProgressBars(list); if (!list.IsEmpty()) { html.Script().$type("text/javascript").("$(function() {").(Sharpen.Collections.ToArray (list)).("});").(); } }
protected internal override void Render(HtmlBlock.Block html) { Info("test!"); }
protected internal override void Render(HtmlBlock.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").().().(); }
protected internal override void Render(HtmlBlock.Block html) { html.Div("#footer.ui-widget").(); }
/// <summary>Render a block of html.</summary> /// <remarks>Render a block of html. To be overridden by implementation.</remarks> /// <param name="html">the block to render</param> protected internal abstract void Render(HtmlBlock.Block html);
protected internal override void Render(HtmlBlock.Block html) { html.P().("should throw"); }
protected internal override void Render(HtmlBlock.Block html) { html.P("#testid").("test note").(); }