From 819e6e02f7b6f06261f416e5c5c8f21682010a9d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 10 Apr 2026 08:17:34 +0200 Subject: [PATCH] Update stats page --- MP.IOC/Components/Compo/ParetoDetail.razor | 30 ++++++++ MP.IOC/Components/Compo/ParetoDetail.razor.cs | 70 +++++++++++++++++++ MP.IOC/Components/Pages/CallStats.razor | 29 +++----- MP.IOC/Components/Pages/RouteConf.razor | 5 ++ MP.IOC/Components/Pages/RouteConf.razor.cs | 7 ++ MP.IOC/MP.IOC.csproj | 2 +- MP.IOC/Resources/ChangeLog.html | 2 +- MP.IOC/Resources/VersNum.txt | 2 +- MP.IOC/Resources/manifest.xml | 2 +- 9 files changed, 127 insertions(+), 22 deletions(-) create mode 100644 MP.IOC/Components/Compo/ParetoDetail.razor create mode 100644 MP.IOC/Components/Compo/ParetoDetail.razor.cs create mode 100644 MP.IOC/Components/Pages/RouteConf.razor create mode 100644 MP.IOC/Components/Pages/RouteConf.razor.cs diff --git a/MP.IOC/Components/Compo/ParetoDetail.razor b/MP.IOC/Components/Compo/ParetoDetail.razor new file mode 100644 index 00000000..e98eb733 --- /dev/null +++ b/MP.IOC/Components/Compo/ParetoDetail.razor @@ -0,0 +1,30 @@ + +
+
+ @Title +
+
+ + +
    + @*
  • +
  • *@ + @foreach (var itemDet in ListPaged) + { +
  • +
    + @itemDet.Label +
    +
    + @($"{itemDet.Value:N0}") +
    +
  • + } + @*
  • +
  • *@ +
+
+ +
diff --git a/MP.IOC/Components/Compo/ParetoDetail.razor.cs b/MP.IOC/Components/Compo/ParetoDetail.razor.cs new file mode 100644 index 00000000..9df075b8 --- /dev/null +++ b/MP.IOC/Components/Compo/ParetoDetail.razor.cs @@ -0,0 +1,70 @@ +using Microsoft.AspNetCore.Components; +using MP.Core.DTO; + +namespace MP.IOC.Components.Compo +{ + public partial class ParetoDetail + { + #region Public Properties + + [Parameter] + public List ParetoList { get; set; } = null!; + + [Parameter] + public string Title { get; set; } = null!; + + #endregion Public Properties + + #region Protected Methods + + protected override void OnParametersSet() + { + //base.OnParametersSet(); + totalCount = ParetoList.Count(); + UpdateTable(); + } + + #endregion Protected Methods + + #region Private Fields + + private List ListPaged = new(); + + private int numRecPage = 10; + + private int pageNum = 1; + + private int totalCount = 0; + + #endregion Private Fields + + #region Private Methods + + private void SaveNumRec(int newNum) + { + numRecPage = newNum; + UpdateTable(); + } + + private void SavePage(int newNum) + { + pageNum = newNum; + UpdateTable(); + } + + private void UpdateTable() + { + // esegue paginazione + if (totalCount > numRecPage) + { + ListPaged = ParetoList.Skip((pageNum - 1) * numRecPage).Take(numRecPage).ToList(); + } + else + { + ListPaged = ParetoList; + } + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP.IOC/Components/Pages/CallStats.razor b/MP.IOC/Components/Pages/CallStats.razor index 2fdaf05b..5d1c3ed1 100644 --- a/MP.IOC/Components/Pages/CallStats.razor +++ b/MP.IOC/Components/Pages/CallStats.razor @@ -2,7 +2,7 @@
-

Current Call Stats

+

Current Call Stats

(24h)
@@ -29,26 +29,19 @@ Pie chart
+
+
+ lista dettaglio (5/10 pag) +
+
+ timeserie selezionata x num call/tempo +
+
@foreach (var item in ParetoDay) { -
-
    -
  • - @item.Key -
  • - @foreach (var itemDet in item.Value) - { -
  • -
    - @itemDet.Label -
    -
    - @($"{itemDet.Value:N0}") -
    -
  • - } -
+
+
}
diff --git a/MP.IOC/Components/Pages/RouteConf.razor b/MP.IOC/Components/Pages/RouteConf.razor new file mode 100644 index 00000000..b268f61b --- /dev/null +++ b/MP.IOC/Components/Pages/RouteConf.razor @@ -0,0 +1,5 @@ +@page "/RouteConf" + +

RouteConf

+ + diff --git a/MP.IOC/Components/Pages/RouteConf.razor.cs b/MP.IOC/Components/Pages/RouteConf.razor.cs new file mode 100644 index 00000000..2c925cda --- /dev/null +++ b/MP.IOC/Components/Pages/RouteConf.razor.cs @@ -0,0 +1,7 @@ +namespace MP.IOC.Components.Pages +{ + public partial class RouteConf + { + + } +} \ No newline at end of file diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj index 4b572469..016342de 100644 --- a/MP.IOC/MP.IOC.csproj +++ b/MP.IOC/MP.IOC.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 6.16.2604.918 + 6.16.2604.1008 diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html index 04c1be17..dbb2f036 100644 --- a/MP.IOC/Resources/ChangeLog.html +++ b/MP.IOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-IOC -

Versione: 6.16.2604.918

+

Versione: 6.16.2604.1008


Note di rilascio:
  • diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt index 186d3ceb..47191719 100644 --- a/MP.IOC/Resources/VersNum.txt +++ b/MP.IOC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2604.918 +6.16.2604.1008 diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml index 9fa8d0a5..25f29414 100644 --- a/MP.IOC/Resources/manifest.xml +++ b/MP.IOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2604.918 + 6.16.2604.1008 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