static CommandTab() { _layout = TabLayout.Create() .Cell( "SQL Statistics", TabLayout.Create().Row(row => { row.Cell(0).WithTitle("Queries"); row.Cell(1).WithTitle("Duplications"); row.Cell(2).Suffix(" ms").WithTitle("Total Query Duration"); }) ) .Cell( "Queries", TabLayout.Create().Row(row => { row.Cell(0).WithTitle("Ordinal"); row.Cell(1).WithTitle("Database"); row.Cell(2).AsCode(CodeType.Sql).WithTitle("Command"); row.Cell(3).DisablePreview().WithTitle("Parameters"); row.Cell(4).WithTitle("CommandType"); row.Cell(5).WithTitle("With Transaction"); row.Cell(6).WithTitle("Records"); row.Cell(7).WithTitle("IsError"); row.Cell(8).Suffix(" ms").WithTitle("Duration"); row.Cell(9).Prefix("T+ ").Suffix(" ms").WithTitle("Offset"); }) ) .Build(); }
static TransactionTab() { _layout = TabLayout.Create() .Cell( "Transaction Statistics", TabLayout.Create().Row(row => { row.Cell(0).WithTitle("Database"); row.Cell(1).WithTitle("Queries"); row.Cell(2).Suffix(" ms").WithTitle("Total Transaction Duration"); }) ) .Cell( "Transaction Events", TabLayout.Create().Row(row => { row.Cell(0).WithTitle("Database"); row.Cell(1).DisablePreview().WithTitle("Events").SetLayout( TabLayout.Create().Row(r => { r.Cell(0).WithTitle("Event Type"); r.Cell(1).AsCode(CodeType.Sql).WithTitle("Event Name"); r.Cell(2).Suffix(" ms").WithTitle("Duration"); r.Cell(3).Prefix("T+ ").Suffix(" ms").WithTitle("Offset"); }) ); row.Cell(2).WithTitle("Queries"); row.Cell(3).WithTitle("Commited"); row.Cell(4).Suffix(" ms").WithTitle("Total Duration"); }) ) .Build(); }
public void ConstructWithNoRows() { var layout = TabLayout.Create(); var rows = layout.Rows.Count(); Assert.Equal(0, rows); }
public void AddTwoRows() { var layout = TabLayout.Create().Row(r => { }).Row(r => { }); var rows = layout.Rows; Assert.Equal(2, rows.Count()); }
public void AddSingleRow() { var layout = TabLayout.Create().Row(r => {}); var rows = layout.Rows; Assert.Equal(1, rows.Count()); }
public void ConstructWithSingleRow() { var layout = TabLayout.Create(l => l.Row(r => {})); var rows = layout.Rows; Assert.Equal(1, rows.Count()); }
public void SetStructureToRows() { var layout = TabLayout.Create(); layout.Row(r => { }).Row(r => {}); Cell.SetLayout(layout); Assert.NotEqual(layout.Rows, Cell.Layout); }
static EventStoreTab() { Layout = TabLayout.Create().Row(delegate(TabLayoutRow r) { r.Cell(0).WidthInPixels(100); r.Cell(1).WidthInPixels(100); r.Cell(2).WidthInPixels(70).AlignRight(); r.Cell(3); }).Build(); }
static Json() { Layout = TabLayout.Create().Row(delegate(TabLayoutRow r) { r.Cell(0).WidthInPercent(20).AsKey(); r.Cell(1); r.Cell(2); r.Cell(3).WidthInPixels(100).Class("mono").AlignRight(); }).Build(); }
public virtual void Process(GlimpsePipelineArgs <TDataModel> args) { Assert.ArgumentNotNull(args, "args"); Assert.ArgumentNotNull(args.SectionHandlers, "args.SectionHandlers"); var layout = TabLayout.Create(); foreach (var name in args.SectionHandlers.Keys) { layout.Cell(name, TabLayout.Create().Row(args.SectionHandlers[name])); } args.TabLayout = layout; }
public void ConstructWithTwoRows() { var layout = TabLayout.Create(l => { l.Row(r => { }); l.Row(r => { }); }); var rows = layout.Rows; Assert.Equal(2, rows.Count()); }
private static object CreateLayout() { var result = TabLayout.Create(); result.Cell(SECTION_KEY_STATISTICS, TabLayout.Create().Row(r => { r.Cell(0).WithTitle("Name").WidthInPixels(150).AlignRight(); r.Cell(1).WithTitle("Value"); })); result.Cell(SECTION_KEY_QUERIES, TabLayout.Create().Row(r => { r.Cell(0).WidthInPixels(50).AlignRight(); // Ordinal r.Cell(1).WidthInPixels(150).DisablePreview(); // Information r.Cell(2).AsCode(CodeType.Sql).DisablePreview(); // Text r.Cell(3).WidthInPixels(80); // Result r.Cell(4).WidthInPixels(60).AlignRight().DisablePreview(); // Received r.Cell(5).WidthInPixels(60).AlignRight().DisablePreview(); // Sent r.Cell(6).WidthInPixels(60).AlignRight().DisablePreview(); // Duration r.Cell(7).WidthInPixels(150); // Stack trace })); return(result.Build()); }
public object GetLayout() { return(TabLayout.Create()); }