Definition at line 30 of file BootstrapHostTableRender.cs.
Ntp.Analyzer.Render.Host.BootstrapHostTableRender.BootstrapHostTableRender |
( |
HostPageConfiguration |
page, |
|
|
string |
ip, |
|
|
DateTime |
now, |
|
|
DateTime |
next |
|
) |
| |
|
inline |
Definition at line 32 of file BootstrapHostTableRender.cs.
References Ntp.Analyzer.Config.Node.HostSubConfiguration.ServerType.
44 columns =
new List<BootstrapTableColumn>
46 new BootstrapTableColumn(),
47 new BootstrapTableColumn(
"Name"),
48 new BootstrapTableColumn(
"st",
"aright"),
49 new BootstrapTableColumn(
"when",
"aright"),
50 new BootstrapTableColumn(
"poll",
"aright2"),
52 ?
new BootstrapTableColumn(
"trust",
"aright2")
53 : new BootstrapTableColumn(
"reach",
"aright2"),
54 new BootstrapTableColumn(
"delay",
"aright"),
55 new BootstrapTableColumn(
"offset",
"aright"),
56 new BootstrapTableColumn(
"jitter",
"aright"),
57 new BootstrapTableColumn(
"iso "),
58 new BootstrapTableColumn(
"location")
Uri WebPath
Gets the web path in the HostSubConfiguration.
readonly HostPageConfiguration page
readonly BootstrapTableColumn[] columns
ServerType ServerType
Gets the type of the server in the HostSubConfiguration.
string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.GetPoolMemberLink |
( |
| ) |
|
|
inlineprivate |
string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.MakeSpacer |
( |
| ) |
|
|
inlineprivate |
Definition at line 150 of file BootstrapHostTableRender.cs.
152 var builder =
new StringBuilder();
154 builder.Append(
"<tr>");
156 foreach (var column
in columns)
158 builder.Append(column.SpacerString);
161 builder.AppendLine(
"</tr>");
163 return builder.ToString();
readonly BootstrapTableColumn[] columns
override string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.Render |
( |
| ) |
|
|
inline |
override string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.RenderFooter |
( |
| ) |
|
|
inlinevirtual |
Implements Ntp.Analyzer.Render.HtmlObjectRender.
Definition at line 73 of file BootstrapHostTableRender.cs.
75 var builder =
new StringBuilder();
79 builder.Append(
"<tr>");
83 builder.Append(column.FooterString);
86 builder.AppendLine(
"</tr>");
87 builder.AppendLine(
"</table>");
88 builder.AppendLine(
"</div>");
92 builder.Append(
@"<p class=""pool""><a class=""btn btn-lg btn-primary"" ");
93 builder.Append($
@"href=""{GetPoolMemberLink()}"">View info on pool.ntp.org »</a></p>");
97 builder.AppendLine(
"</div>");
98 builder.AppendLine(
"</div>");
100 return builder.ToString();
readonly HostPageConfiguration page
readonly BootstrapTableColumn[] columns
override string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.RenderHead |
( |
| ) |
|
|
inlinevirtual |
Implements Ntp.Analyzer.Render.HtmlObjectRender.
Definition at line 103 of file BootstrapHostTableRender.cs.
105 var builder =
new StringBuilder();
107 builder.AppendLine(
@"<div class=""container theme-showcase"">");
108 builder.AppendLine(
@"<div class=""jumbotron"">");
109 builder.Append(
"<h1>");
111 builder.AppendLine(
"</h1>");
113 builder.Append(
"<p>");
114 builder.Append(
now.ToLongDateString() +
" ");
117 builder.Append(TimeZoneInfo.Utc.StandardName);
121 builder.Append(TimeZoneInfo.Local.IsDaylightSavingTime(
now)
122 ? TimeZoneInfo.Local.DaylightName
123 : TimeZoneInfo.Local.StandardName);
125 builder.Append(
" " +
now.ToShortTimeString() +
". ");
126 builder.Append(
"Next refresh scheduled at ");
127 builder.Append(
next.ToShortTimeString());
128 builder.AppendLine(
".</p>");
130 builder.AppendLine(
@"<div class=""table-responsive"">");
131 builder.Append(
"<table><tr>");
133 foreach (var column
in columns)
135 builder.Append(column);
138 builder.AppendLine(
"</tr>");
142 return builder.ToString();
readonly HostPageConfiguration page
readonly BootstrapTableColumn[] columns
readonly string Ntp.Analyzer.Render.Host.BootstrapHostTableRender.ip |
|
private |
readonly DateTime Ntp.Analyzer.Render.Host.BootstrapHostTableRender.next |
|
private |
readonly DateTime Ntp.Analyzer.Render.Host.BootstrapHostTableRender.now |
|
private |
The documentation for this class was generated from the following file: