Exemple #1
0
        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)).();
        }
Exemple #2
0
        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.().();
        }
Exemple #3
0
 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").().().();
 }
Exemple #4
0
 protected internal override void Render(HtmlBlock.Block html)
 {
     html.Div("#footer.ui-widget").();
 }