diff --git a/MP.Data/Services/Utils/StatsAggrService.cs b/MP.Data/Services/Utils/StatsAggrService.cs
index e99a1e72..c9646966 100644
--- a/MP.Data/Services/Utils/StatsAggrService.cs
+++ b/MP.Data/Services/Utils/StatsAggrService.cs
@@ -108,7 +108,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Dest.Request", pDestRequest);
+ result.Add("Dest.Request (#)", pDestRequest);
var pDestDuration = rawData.GroupBy(x => x.Destination)
.Select(g => new StatDataDTO
@@ -118,7 +118,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Dest.Duration", pDestDuration);
+ result.Add("Dest.Duration (ms)", pDestDuration);
return result;
}
diff --git a/MP.Data/Services/Utils/StatsDetailService.cs b/MP.Data/Services/Utils/StatsDetailService.cs
index 4c4d8444..52af5707 100644
--- a/MP.Data/Services/Utils/StatsDetailService.cs
+++ b/MP.Data/Services/Utils/StatsDetailService.cs
@@ -101,7 +101,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Dest.Request", pDestRequest);
+ result.Add("Dest.Request (#)", pDestRequest);
var pDestDuration = rawData.GroupBy(x => x.Destination)
.Select(g => new StatDataDTO
{
@@ -110,7 +110,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Dest.Duration", pDestRequest);
+ result.Add("Dest.Duration (ms)", pDestDuration);
var pTypeRequest = rawData.GroupBy(x => x.Type)
.Select(g => new StatDataDTO
@@ -120,8 +120,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Type.Request", pTypeRequest);
-
+ result.Add("Type.Request (#)", pTypeRequest);
var pTypeDuration = rawData.GroupBy(x => x.Type)
.Select(g => new StatDataDTO
{
@@ -130,7 +129,27 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
- result.Add("Type.Duration", pTypeDuration);
+ result.Add("Type.Duration (ms)", pTypeDuration);
+
+ // calcolo le varie statistiche COMPOSTE...
+ var pDestTypeRequest = rawData.GroupBy(x => new { x.Destination, x.Type })
+ .Select(g => new StatDataDTO
+ {
+ Label = $"{g.Key.Destination}.{g.Key.Type}",
+ Value = g.Sum(x => x.RequestCount)
+ })
+ .OrderByDescending(x => x.Value)
+ .ToList();
+ result.Add("DestType.Request (#)", pDestTypeRequest);
+ var pDestTypeDuration = rawData.GroupBy(x => new { x.Destination, x.Type })
+ .Select(g => new StatDataDTO
+ {
+ Label = $"{g.Key.Destination}.{g.Key.Type}",
+ Value = g.Sum(x => x.RequestCount * x.AvgDuration)
+ })
+ .OrderByDescending(x => x.Value)
+ .ToList();
+ result.Add("DestType.Duration (ms)", pDestTypeDuration);
return result;
}
diff --git a/MP.IOC/Components/Layout/NavMenu.razor b/MP.IOC/Components/Layout/NavMenu.razor
index 2dc559fa..74f53187 100644
--- a/MP.IOC/Components/Layout/NavMenu.razor
+++ b/MP.IOC/Components/Layout/NavMenu.razor
@@ -40,12 +40,12 @@
}
- @*
-
+
+
@if (showText)
{
- IOB List
+ Route Conf
}
@@ -57,7 +57,7 @@
Update Manager
}
-
*@
+
diff --git a/MP.IOC/Components/Pages/CallStats.razor b/MP.IOC/Components/Pages/CallStats.razor
index 14561711..a85042e8 100644
--- a/MP.IOC/Components/Pages/CallStats.razor
+++ b/MP.IOC/Components/Pages/CallStats.razor
@@ -1,6 +1,32 @@
@page "/callstats"
-CallStats
-@code {
-
-}
+
+
+
+
+ @foreach (var item in ParetoDay)
+ {
+
+ }
+
+
+
diff --git a/MP.IOC/Components/Pages/CallStats.razor.cs b/MP.IOC/Components/Pages/CallStats.razor.cs
new file mode 100644
index 00000000..042973ea
--- /dev/null
+++ b/MP.IOC/Components/Pages/CallStats.razor.cs
@@ -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> 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
+ }
+}
\ No newline at end of file
diff --git a/MP.IOC/Components/Pages/Index.razor b/MP.IOC/Components/Pages/Index.razor
index 986611c6..5f20d779 100644
--- a/MP.IOC/Components/Pages/Index.razor
+++ b/MP.IOC/Components/Pages/Index.razor
@@ -110,7 +110,29 @@
IOC Conversion rate
-
+
+ @foreach (var item in paretoWeek)
+ {
+
+ }
+
diff --git a/MP.IOC/Components/Pages/Index.razor.cs b/MP.IOC/Components/Pages/Index.razor.cs
index 879677ee..e5e74dec 100644
--- a/MP.IOC/Components/Pages/Index.razor.cs
+++ b/MP.IOC/Components/Pages/Index.razor.cs
@@ -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 ListGlobalCall = new();
+
+ private List ListParetoCall = new();
+
+ private Dictionary> 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 ListGlobalCall = new();
- private List ListParetoCall = new();
-
-
- [Inject]
- private IStatsAggrService StatsAggrService { get; set; } = null!;
- [Inject]
- private IStatsDetailService StatsDetService { get; set; } = null!;
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj
index 5b8d07d4..4b572469 100644
--- a/MP.IOC/MP.IOC.csproj
+++ b/MP.IOC/MP.IOC.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 6.16.2604.917
+ 6.16.2604.918
diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html
index 2ca21f57..04c1be17 100644
--- a/MP.IOC/Resources/ChangeLog.html
+++ b/MP.IOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-IOC
- Versione: 6.16.2604.917
+ Versione: 6.16.2604.918
Note di rilascio:
-
diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt
index fad813ba..186d3ceb 100644
--- a/MP.IOC/Resources/VersNum.txt
+++ b/MP.IOC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2604.917
+6.16.2604.918
diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml
index 53987ec9..9fa8d0a5 100644
--- a/MP.IOC/Resources/manifest.xml
+++ b/MP.IOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2604.917
+ 6.16.2604.918
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.IOC/Services/RouteManager.cs b/MP.IOC/Services/RouteManager.cs
index da8be532..0df30063 100644
--- a/MP.IOC/Services/RouteManager.cs
+++ b/MP.IOC/Services/RouteManager.cs
@@ -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 /...