23 using System.Collections.Generic;
31 namespace Ntp.Analyzer.Render.Summary
39 IEnumerable<GraphSetConfiguration> graphs)
44 this.graphs =
new List<GraphSetConfiguration>(graphs);
47 private readonly List<GraphSetConfiguration>
graphs;
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=""");
92 builder.Append(page.GetPeerLink(entry.Id).ToHtmlString());
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();
115 var builder =
new StringBuilder();
117 builder.AppendLine(
@" </div>");
118 builder.AppendLine(
@" </div>");
120 return builder.ToString();
125 var builder =
new StringBuilder();
127 builder.AppendLine(
@" <div class=""container theme-graph"">");
128 builder.AppendLine(
@" <div class=""panel-group"" id=""accordion"">");
130 return builder.ToString();
readonly PeerSummaryPageConfiguration page
readonly List< GraphSetConfiguration > graphs
BootstrapSummaryGraphRender(Uri webPath, int hostId, PeerSummaryPageConfiguration page, IEnumerable< GraphSetConfiguration > graphs)
Singleton facade class used to access memory persistent data.
PeerActivityDatabaseMapper PeerActivities
Gets the peer activity mapper.
override string RenderFooter()
static DataFace Instance
Gets the Singleton instance.
override string RenderHead()