NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Render.Host.DefaultHostTableRender Class Reference
Inheritance diagram for Ntp.Analyzer.Render.Host.DefaultHostTableRender:
Collaboration diagram for Ntp.Analyzer.Render.Host.DefaultHostTableRender:

Public Member Functions

 DefaultHostTableRender (HostPageConfiguration page)
 
override string Render ()
 
override string RenderFooter ()
 
override string RenderHead ()
 
- Public Member Functions inherited from Ntp.Analyzer.Render.HtmlObjectRender
void Add (IHtmlObject child)
 

Private Member Functions

string MakeSpacer ()
 

Private Attributes

readonly string[] columns
 

Additional Inherited Members

- Public Attributes inherited from Ntp.Analyzer.Render.HtmlObjectRender
IEnumerable< IHtmlObjectChildren => children.ToArray()
 
- Protected Member Functions inherited from Ntp.Analyzer.Render.HtmlObjectRender
 HtmlObjectRender (Uri webPath)
 
- Properties inherited from Ntp.Analyzer.Render.HtmlObjectRender
Uri WebPath [get]
 
- Properties inherited from Ntp.Analyzer.Render.IHtmlObject
IEnumerable< IHtmlObjectChildren [get]
 
Uri WebPath [get]
 

Detailed Description

Definition at line 29 of file DefaultHostTableRender.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Render.Host.DefaultHostTableRender.DefaultHostTableRender ( HostPageConfiguration  page)
inline

Definition at line 31 of file DefaultHostTableRender.cs.

References Ntp.Analyzer.Config.Node.HostSubConfiguration.ServerType.

32  : base(page.WebPath)
33  {
34  columns = new List<string>
35  {
36  "&nbsp;",
37  "Name",
38  "st",
39  "when",
40  "poll",
41  page.ServerType == ServerType.Ntpctl ? "trust" : "reach",
42  "&nbsp;delay",
43  "offset",
44  "jitter",
45  "iso&nbsp;",
46  "location"
47  }.ToArray();
48  }
Uri WebPath
Gets the web path in the HostSubConfiguration.
ServerType ServerType
Gets the type of the server in the HostSubConfiguration.

Member Function Documentation

string Ntp.Analyzer.Render.Host.DefaultHostTableRender.MakeSpacer ( )
inlineprivate

Definition at line 94 of file DefaultHostTableRender.cs.

95  {
96  var builder = new StringBuilder();
97 
98  builder.Append("<tr>");
99 
100  for (int index = 0; index < columns.Length; index++)
101  {
102  builder.Append(@"<td class=""spc"">&nbsp;</td>");
103  }
104 
105  builder.AppendLine("</tr>");
106 
107  return builder.ToString();
108  }
override string Ntp.Analyzer.Render.Host.DefaultHostTableRender.Render ( )
inline

Implements Ntp.Analyzer.Render.IHtmlObject.

Definition at line 52 of file DefaultHostTableRender.cs.

53  {
54  return string.Empty;
55  }
override string Ntp.Analyzer.Render.Host.DefaultHostTableRender.RenderFooter ( )
inlinevirtual

Implements Ntp.Analyzer.Render.HtmlObjectRender.

Definition at line 57 of file DefaultHostTableRender.cs.

58  {
59  var builder = new StringBuilder();
60 
61  builder.Append(MakeSpacer());
62  builder.Append("<tr>");
63 
64  for (int index = 0; index < columns.Length; index++)
65  {
66  builder.Append(@"<td class=""but"">&nbsp;</td>");
67  }
68 
69  builder.AppendLine("</tr>");
70  builder.AppendLine("</table>");
71 
72  return builder.ToString();
73  }
override string Ntp.Analyzer.Render.Host.DefaultHostTableRender.RenderHead ( )
inlinevirtual

Implements Ntp.Analyzer.Render.HtmlObjectRender.

Definition at line 75 of file DefaultHostTableRender.cs.

76  {
77  var builder = new StringBuilder();
78 
79  builder.Append("<table><tr>");
80 
81  foreach (string column in columns)
82  {
83  builder.Append("<th>");
84  builder.Append(column);
85  builder.Append("</th>");
86  }
87 
88  builder.AppendLine("</tr>");
89  builder.Append(MakeSpacer());
90 
91  return builder.ToString();
92  }

Member Data Documentation

readonly string [] Ntp.Analyzer.Render.Host.DefaultHostTableRender.columns
private

Definition at line 50 of file DefaultHostTableRender.cs.


The documentation for this class was generated from the following file: