Skip to content

Commit d2715c9

Browse files
committed
changed matrix
1 parent 6c87fbf commit d2715c9

3 files changed

Lines changed: 74 additions & 48 deletions

File tree

src/NetPackageAnalyzer/NPA.HtmlData/ExtractImages.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ public async Task<bool> GetImagesAsync()
6262
var name = await title.GetAttributeAsync("title");
6363
if (string.IsNullOrWhiteSpace(name))
6464
continue;
65-
var newName = name.Replace("image", "").Trim();
65+
var newName = name
66+
.Replace("image", "")
67+
.Replace(" stay ","")
68+
.Trim();
6669
newName = newName.Replace(" ", "-");
6770
try
6871
{

src/NetPackageAnalyzer/NetPackageAnalyzerExportHTML/HtmlSummary.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@
642642
<img src="images_@(nameFolder + "/" + nameSolution + "_tower_optimal.svg")" />
643643

644644
<br />
645-
<h2 id="matrix-projects">Matrix Projects</h2>
645+
<h2 id="matrix-projects">Number of Projects references</h2>
646646
@(await matrixProjects.RenderAsync())
647647

648648
<h2 id="projects-without-tests"> @nrProjectsNoTests Projects (not counting tests projects!)</h2>

src/NetPackageAnalyzer/NetPackageAnalyzerExportHTML/Templates/MatrixProjects.cshtml

Lines changed: 69 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,86 @@
33
var projects = Model.AlphabeticOrderedProjects;
44
ProjectData[] projects2 = new List<ProjectData>(projects).ToArray();
55
var maxRef = Model.MaxMatrixRef();
6+
var nr = projects.Length;
67
}
78
@{
8-
<div title="image matrix projects">
9+
<div title="image stay matrix projects">
910
<table border="1">
1011
<tr>
11-
<td>Projects</td>
12-
@foreach (var prj in projects)
13-
{
14-
<td>@prj.NameCSproj()</td>
15-
16-
}
12+
<td>Nr</td>
13+
<td>Project</td>
14+
<td>Upstream number</td>
15+
<td>Downstream number</td>
1716
</tr>
18-
@{
19-
int i = 1;
20-
}
21-
@foreach (var prj in projects)
17+
@for(int index=0;index<nr;index++)
2218
{
23-
<tr>
24-
<td>
25-
@(i++) ) @prj.NameCSproj()
26-
<br />
27-
Direct ref: @prj.ProjectsReferences.Count
28-
<br />
29-
Total ref: @prj.TotalReferences()
30-
</td>
31-
32-
@foreach (var prj2 in projects2)
33-
{
34-
if (prj2 == prj)
35-
{
36-
<td style='text-align:center;'>X</td>
37-
}
38-
else
39-
{
40-
string style = "style='text-align:center;'";
41-
int found = prj.FindReferenceRec(prj2);
42-
if (found == 1)
43-
{
44-
style = "style='text-align:center;background-color: yellow;color: red;'";
45-
}
46-
if (found == maxRef)
47-
{
48-
style = "style='text-align:center;background-color: red;color: blue;'";
49-
}
50-
if (found == maxRef - 1)
51-
{
52-
style = "style='text-align:center;background-color: tomato;color: blue;'";
53-
}
54-
<td @style>@(found == 0 ? "&nbsp;" : found)</td>
55-
}
56-
}
57-
19+
var prj = projects[index];
5820

21+
<tr>
22+
<td>@(index+1)</td>
23+
<td>@prj.NameCSproj()</td>
24+
<td>@prj.UpStreamProjectReferences.Count</td>
25+
<td>@prj.AlphabeticalProjectsReferences().Count()</td>
5926

6027
</tr>
6128
}
6229
</table>
6330
</div>
31+
// <div title="image matrix projects">
32+
// <table border="1">
33+
// <tr>
34+
// <td>Projects</td>
35+
// @foreach (var prj in projects)
36+
// {
37+
// <td>@prj.NameCSproj()</td>
38+
39+
// }
40+
// </tr>
41+
// @{
42+
// int i = 1;
43+
// }
44+
// @foreach (var prj in projects)
45+
// {
46+
// <tr>
47+
// <td>
48+
// @(i++) ) @prj.NameCSproj()
49+
// <br />
50+
// Direct ref: @prj.ProjectsReferences.Count
51+
// <br />
52+
// Total ref: @prj.TotalReferences()
53+
// </td>
54+
55+
// @foreach (var prj2 in projects2)
56+
// {
57+
// if (prj2 == prj)
58+
// {
59+
// <td style='text-align:center;'>X</td>
60+
// }
61+
// else
62+
// {
63+
// string style = "style='text-align:center;'";
64+
// int found = prj.FindReferenceRec(prj2);
65+
// if (found == 1)
66+
// {
67+
// style = "style='text-align:center;background-color: yellow;color: red;'";
68+
// }
69+
// if (found == maxRef)
70+
// {
71+
// style = "style='text-align:center;background-color: red;color: blue;'";
72+
// }
73+
// if (found == maxRef - 1)
74+
// {
75+
// style = "style='text-align:center;background-color: tomato;color: blue;'";
76+
// }
77+
// <td @style>@(found == 0 ? "&nbsp;" : found)</td>
78+
// }
79+
// }
80+
81+
82+
83+
// </tr>
84+
// }
85+
// </table>
86+
// </div>
6487
6588
}

0 commit comments

Comments
 (0)