override string Ntp.Analyzer.Render.Summary.BootstrapSummaryGraphRender.Render |
( |
| ) |
|
|
inline |
Implements Ntp.Analyzer.Render.IHtmlObject.
Definition at line 51 of file BootstrapSummaryGraphRender.cs.
References Ntp.Analyzer.Data.DataFace.Instance, and Ntp.Analyzer.Data.DataFace.PeerActivities.
53 var builder =
new StringBuilder();
56 foreach (var graphSet
in graphs)
58 string open = count == 1 ?
" in" :
string.Empty;
60 builder.AppendLine(
@" <div class=""panel panel-default"">");
61 builder.AppendLine(
@" <div class=""panel-heading"">");
62 builder.AppendLine(
@" <h4 class=""panel-title"">");
65 builder.Append(
@" <a class=""accordion-toggle"" data-toggle=""collapse"" ");
66 builder.Append(
@"data-parent=""#accordion"" href=""#collapse");
67 builder.Append(count);
68 builder.AppendLine(
@""">");
70 builder.AppendLine(
@" " + graphSet.Title);
71 builder.AppendLine(
@" </a>");
72 builder.AppendLine(
@" </h4>");
73 builder.AppendLine(
@" </div>");
76 builder.Append(
@" <div id=""collapse");
77 builder.Append(count);
78 builder.Append($
@""" class=""panel-collapse collapse{open}"">");
80 builder.AppendLine(
@" <div class=""panel-body"">");
84 Where(p => p.Host.Id ==
hostId && p.IsActive);
86 foreach (var entry
in peers)
88 foreach (var graph
in graphSet.Graphs)
90 builder.Append(
@" <div class=""container theme-graph2"">");
91 builder.Append(
@"<a href=""");
93 builder.Append(
@""">");
94 builder.Append(
@"<img class=""img-responsive"" src=""");
95 builder.Append(graph.GetLink(graphSet, entry.Name).ToHtmlString());
96 builder.Append(
@""" alt=""");
97 builder.Append(graph.GetAltName(graphSet, entry.Name));
98 builder.Append(
@""">");
99 builder.AppendLine(
@"</a></div>");
103 builder.AppendLine(
@" </div>");
104 builder.AppendLine(
@" </div>");
105 builder.AppendLine(
@" </div>");
110 return builder.ToString();
readonly PeerSummaryPageConfiguration page
readonly List< GraphSetConfiguration > graphs
Uri GetPeerLink(int peerId)
Gets the link related to specified peer.
Singleton facade class used to access memory persistent data.
PeerActivityDatabaseMapper PeerActivities
Gets the peer activity mapper.
static DataFace Instance
Gets the Singleton instance.
override string Ntp.Analyzer.Render.Summary.BootstrapSummaryGraphRender.RenderFooter |
( |
| ) |
|
|
inlinevirtual |
override string Ntp.Analyzer.Render.Summary.BootstrapSummaryGraphRender.RenderHead |
( |
| ) |
|
|
inlinevirtual |
readonly int Ntp.Analyzer.Render.Summary.BootstrapSummaryGraphRender.hostId |
|
private |
The documentation for this class was generated from the following file: