Skip to content

Commit 4251eb2

Browse files
reviews comment - change the property name - Done
1 parent 564e24f commit 4251eb2

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/GitHubCostVisualizer.Web/Models/UsageReportViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ public class UsageReportViewModel
4040

4141
public class ActionMinutesItem
4242
{
43-
public string Repository { get; set; }
43+
public string Label { get; set; }
4444
public decimal Minutes { get; set; }
4545
public decimal TotalCost { get; set; }
46-
public string Workflow { get; set; }
4746
}
4847

49-
5048
}

src/GitHubCostVisualizer.Web/Processor/GithubUsageProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ group x by x.Repository
3737
into grp
3838
select new ActionMinutesItem
3939
{
40-
Repository = grp.Key,
40+
Label = grp.Key,
4141
Minutes = grp.Sum(i => (int)i.Quantity),
4242
TotalCost = grp.Sum(i => i.Quantity.GetValueOrDefault() * i.Multiplier.GetValueOrDefault() * i.PricePer.GetValueOrDefault())
4343
}).ToList();
@@ -49,7 +49,7 @@ into grp
4949
select new ActionMinutesItem
5050
{
5151
Minutes = grp.Sum(i => (int)i.Quantity),
52-
Workflow = ($"{grp.Key.Repository} - {grp.Key.TrimmedWorkflow}").ToString(),
52+
Label = ($"{grp.Key.Repository} - {grp.Key.TrimmedWorkflow}").ToString(),
5353
TotalCost = grp.Sum(i => i.Quantity.GetValueOrDefault() * i.Multiplier.GetValueOrDefault() * i.PricePer.GetValueOrDefault())
5454

5555
}).ToList();

src/GitHubCostVisualizer.Web/Views/Home/_ActionDetail.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
@foreach (var item in Model.ActionMinutesByRepository)
6969
{
7070
<tr>
71-
<td>@item.Repository</td>
71+
<td>@item.Label</td>
7272
<td data-sort="@item.Minutes">@item.Minutes minutes</td>
7373
<td data-sort="@item.TotalCost">$@item.TotalCost</td>
7474
</tr>
@@ -90,7 +90,7 @@
9090
backgroundColor: getColors(@Model.ActionMinutesByRepository.Count, 'primary', 'dark', 'secondary', 'light')
9191
}
9292
],
93-
labels: [@Html.Raw(String.Join(", ", Model.ActionMinutesByRepository.Select(m => $"'{m.Repository}'")))]
93+
labels: [@Html.Raw(String.Join(", ", Model.ActionMinutesByRepository.Select(m => $"'{m.Label}'")))]
9494
},
9595
options: {
9696
tooltips: {
@@ -121,7 +121,7 @@
121121
@foreach (var item in Model.ActionMinutesByWorkflow)
122122
{
123123
<tr>
124-
<td>@item.Workflow</td>
124+
<td>@item.Label</td>
125125
<td data-sort="@item.Minutes">@item.Minutes minutes</td>
126126
<td data-sort="@item.TotalCost">$@item.TotalCost</td>
127127
</tr>

0 commit comments

Comments
 (0)