Modifica con dettaglio statistiche aggregate + cambio metodo undek a "/" come default

This commit is contained in:
Samuele Locatelli
2026-04-09 18:39:15 +02:00
parent 09204750c9
commit bb4d10daa0
12 changed files with 156 additions and 29 deletions
+4 -4
View File
@@ -40,12 +40,12 @@
}
</NavLink>
</div>
@* <div class="nav-item px-2">
<NavLink class="nav-link py-0 px-2 mb-0" href="IobList">
<div class="nav-item px-2">
<NavLink class="nav-link py-0 px-2 mb-0" href="RouteConf">
<span class="fas fa-computer fs-4 pe-2" aria-hidden="true"></span>
@if (showText)
{
<span class="@hideText">IOB List</span>
<span class="@hideText">Route Conf</span>
}
</NavLink>
</div>
@@ -57,7 +57,7 @@
<span class="@hideText">Update Manager</span>
}
</NavLink>
</div> *@
</div>
<div class="nav-item px-2">
<NavLink class="nav-link py-0 px-2 mb-0" href="about">
<span class="fas fa-info-circle fs-4 pe-2" aria-hidden="true"></span>
+30 -4
View File
@@ -1,6 +1,32 @@
@page "/callstats"
<h3>CallStats</h3>
@code {
}
<div class="card shadow">
<div class="card-header">
<h3>Current Call Stats</h3>
</div>
<div class="card-body">
<div class="row">
@foreach (var item in ParetoDay)
{
<div class="col-6">
<ul class="list-group">
<li class="list-group-item active d-flex justify-content-between align-items-start">
<b>@item.Key</b>
</li>
@foreach (var itemDet in item.Value)
{
<li class="list-group-item d-flex justify-content-between align-items-start small py-1">
<div>
<b>@itemDet.Label</b>
</div>
<div class="">
<b>@($"{itemDet.Value:N0}")</b>
</div>
</li>
}
</ul>
</div>
}
</div>
</div>
</div>
@@ -0,0 +1,40 @@
using Microsoft.AspNetCore.Components;
using MP.Core.DTO;
using MP.Data.Services.Utils;
namespace MP.IOC.Components.Pages
{
public partial class CallStats
{
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
#endregion Protected Methods
#region Private Fields
private Dictionary<string, List<StatDataDTO>> ParetoDay = new();
#endregion Private Fields
#region Private Properties
[Inject]
private IStatsDetailService StatsDetService { get; set; } = null!;
#endregion Private Properties
#region Private Methods
private async Task ReloadData()
{
ParetoDay = await StatsDetService.GetParetoStatsDayAsync();
}
#endregion Private Methods
}
}
+23 -1
View File
@@ -110,7 +110,29 @@
</div>
<div class="col-6 text-center">
<div class="fs-3">IOC Conversion rate</div>
<div class="row">
@foreach (var item in paretoWeek)
{
<div class="col-6">
<ul class="list-group">
<li class="list-group-item active d-flex justify-content-between align-items-start">
<b>@item.Key</b>
</li>
@foreach (var itemDet in item.Value)
{
<li class="list-group-item d-flex justify-content-between align-items-start small py-1">
<div>
<b>@itemDet.Label</b>
</div>
<div class="">
<b>@($"{itemDet.Value:N0}")</b>
</div>
</li>
}
</ul>
</div>
}
</div>
</div>
<div class="col-3">
<ul class="list-group">
+28 -8
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
using MP.Core.DTO;
using MP.Data.DbModels.Utils;
using MP.Data.Services.Utils;
@@ -6,12 +7,37 @@ namespace MP.IOC.Components.Pages
{
public partial class Index
{
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
#endregion Protected Methods
#region Private Fields
private List<StatsAggregatedModel> ListGlobalCall = new();
private List<StatsDetailModel> ListParetoCall = new();
private Dictionary<string, List<StatDataDTO>> paretoWeek = new();
#endregion Private Fields
#region Private Properties
[Inject]
private IStatsAggrService StatsAggrService { get; set; } = null!;
[Inject]
private IStatsDetailService StatsDetService { get; set; } = null!;
#endregion Private Properties
#region Private Methods
private async Task ReloadData()
{
DateTime oggi = DateTime.Today;
@@ -19,15 +45,9 @@ namespace MP.IOC.Components.Pages
var rawData = await StatsAggrService.GetFiltAsync(oggi.AddDays(-5), oggi);
ListGlobalCall = rawData.OrderByDescending(x => x.Hour).ToList();
ListParetoCall = await StatsDetService.GetParetoAsync(adesso.AddHours(-1), adesso, 5);
paretoWeek = await StatsAggrService.GetParetoStatsWeekAsync();
}
private List<StatsAggregatedModel> ListGlobalCall = new();
private List<StatsDetailModel> ListParetoCall = new();
[Inject]
private IStatsAggrService StatsAggrService { get; set; } = null!;
[Inject]
private IStatsDetailService StatsDetService { get; set; } = null!;
#endregion Private Methods
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>6.16.2604.917</Version>
<Version>6.16.2604.918</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 6.16.2604.917</h4>
<h4>Versione: 6.16.2604.918</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2604.917
6.16.2604.918
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2604.917</version>
<version>6.16.2604.918</version>
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -64,7 +64,7 @@ namespace MP.IOC.Services
Log.Debug($"PathBase={context.Request.PathBase} | Path={context.Request.Path} | relativePath={relativePath}");
// da calcolare metodo...
string metodo = "undef";
string metodo = "/";
if (!string.IsNullOrEmpty(relativePath))
{
// splitto se ho /...