Definition at line 30 of file DefaultHostPageRender.cs.
Ntp.Analyzer.Render.Host.DefaultHostPageRender.DefaultHostPageRender |
( |
HostPageConfiguration |
config, |
|
|
string |
ip, |
|
|
int |
refresh |
|
) |
| |
|
inline |
override string Ntp.Analyzer.Render.Host.DefaultHostPageRender.Render |
( |
| ) |
|
|
inline |
override string Ntp.Analyzer.Render.Host.DefaultHostPageRender.RenderFooter |
( |
| ) |
|
|
inlinevirtual |
Implements Ntp.Analyzer.Render.HtmlObjectRender.
Definition at line 49 of file DefaultHostPageRender.cs.
51 var builder =
new StringBuilder();
52 builder.AppendLine(
string.Empty);
54 DateTime now = DateTime.Now;
56 builder.AppendLine(
"<br>");
60 builder.Append(
"Time is ");
61 builder.Append(now.ToLongDateString() +
" ");
62 builder.Append(TimeZoneInfo.Utc.StandardName);
66 builder.Append(
"Local time is ");
67 builder.Append(now.ToLongDateString() +
" ");
68 builder.Append(TimeZoneInfo.Local.IsDaylightSavingTime(now)
69 ? TimeZoneInfo.Local.DaylightName
70 : TimeZoneInfo.Local.StandardName);
72 builder.Append(
" " + now.ToShortTimeString() +
". ");
74 builder.AppendLine(
"<br><br>");
77 string poolLink =
"http://www.pool.ntp.org/scores/" +
ip;
78 string poolText = $
@"<a href=""{poolLink}"">pool.ntp.org</a>";
79 builder.Append(
"Server is pool member on ");
80 builder.Append(poolText);
85 builder.AppendLine(
"<br><br>");
86 builder.Append(
"Peer graphs are available with ");
87 builder.Append(
@"<a href=""");
89 builder.Append(
@""">");
91 builder.Append(
@"</a> and ");
92 builder.Append(
@"<a href=""");
94 builder.Append(
@""">");
96 builder.Append(
@"</a>.");
99 builder.AppendLine(
"<br><br>");
100 builder.AppendLine(
"Page refreshes every 5 minutes.");
102 builder.AppendLine(
"</body>");
103 builder.AppendLine(
"</html>");
105 return builder.ToString();
SummaryCollection PeerSummaries
Gets the peer summeries to be linked from this page.
override string Ntp.Analyzer.Render.Host.DefaultHostPageRender.RenderHead |
( |
| ) |
|
|
inlinevirtual |
Implements Ntp.Analyzer.Render.HtmlObjectRender.
Definition at line 108 of file DefaultHostPageRender.cs.
110 var builder =
new StringBuilder();
112 builder.AppendLine(
"<!DOCTYPE html>");
113 builder.AppendLine(
"<html><head>");
114 builder.AppendLine(
@"<meta charset=""UTF-8"">");
115 builder.AppendLine(
@"<style type=""text/css"" media=""screen"">");
116 builder.AppendLine(
"body {font-family: monospace; line-height:100%; }");
117 builder.AppendLine(
"table { border-collapse:collapse; border-spacing: 0; width: 940px; }");
119 "th { text-align: left; font-weight: bold; border-bottom: 2px solid; padding: 0px; padding-top: 5px; padding-bottom: 3px;}");
121 "td { padding: 0px; padding-right: 7px; padding-left: 2px; padding-top: 2px; padding-bottom: 2px; }");
122 builder.AppendLine(
"td.aright { text-align: right; padding-right: 17px;}");
123 builder.AppendLine(
"td.spc { padding: 0px; line-height: 5px; }");
124 builder.AppendLine(
"td.but { border-top: 2px solid; padding: 0px; padding-top: 2px; line-height: 7px; }");
125 builder.AppendLine(
"a:link { color:#33348e; text-decoration: none; }");
126 builder.AppendLine(
"a:visited { color:#33348e; text-decoration: none; }");
127 builder.AppendLine(
"a:hover { color:#33348e; text-decoration: underline;; }");
128 builder.AppendLine(
"a:active { color:#7476b4; text-decoration: underline; }");
129 builder.AppendLine(
"</style>");
130 builder.AppendLine(
"<title>");
132 builder.AppendLine(
"</title>");
133 builder.AppendLine($
@"<meta http-equiv=""refresh"" content=""{refresh}"">");
134 builder.AppendLine(
"</head>");
135 return builder.ToString();
string ServerName
Gets the name of the server in the HostSubConfiguration.
readonly string Ntp.Analyzer.Render.Host.DefaultHostPageRender.ip |
|
private |
readonly int Ntp.Analyzer.Render.Host.DefaultHostPageRender.refresh |
|
private |
The documentation for this class was generated from the following file: