Update modalità display statistiche chiamate

This commit is contained in:
Samuele Locatelli
2026-04-18 11:40:17 +02:00
parent 9e0cfefce9
commit 9e2ed83a7a
6 changed files with 35 additions and 43 deletions
+23 -15
View File
@@ -41,18 +41,26 @@
}
else
{
<div class="col-6">
<BarPlot Id="@currHistId" AspRatio="2" Data="@DatiPareto" Labels="@LabelPareto" Legenda="@currTitle" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
</div>
<div class="col-3">
<PieChart Id="@currPieId" AspRatio="1" LegendPos="none" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="@currTitle"></PieChart>
<div class="col-9">
<div class="card shadow">
<div class="card-body">
<div class="row">
<div class="col-9">
<BarPlot Id="@currHistId" AspRatio="3" Data="@DatiPareto" Labels="@LabelPareto" Legenda="@currTitle" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
</div>
<div class="col-3">
<PieChart Id="@currPieId" AspRatio="1" LegendPos="none" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="@currTitle"></PieChart>
</div>
</div>
</div>
</div>
</div>
}
</div>
@if (!string.IsNullOrEmpty(currHistId))
{
<div class="row mb-2">
<div class="col-3">
<div class="col-3 small">
<ParetoDetail Title="@currHistId" ParetoList="@currData" EC_Selected="ShowDetail"></ParetoDetail>
</div>
<div class="col-9">
@@ -71,23 +79,23 @@
<div class="card shadow">
<div class="card-header d-flex justify-content-between">
<div class="px-0">
<b>@currDetail</b>
Andamento chiamate <b>@currDetail</b>
</div>
<div class="px-0">
<div class="input-group">
<span class="input-group-text"># giorni</span>
<input type="number" class="form-control form-control-sm" @bind="numDays" @bind:after="OnDaysChangedAsync">
</div>
</div>
</div>
<div class="card-body">
<MultiLine Id="@currTsId" AspRatio="2.5" DataTSList="@TSDataMulti" Labels="@LabelPlot" lineColor="@lineColorsMLine" backColor="@bgColorsMLine" lTens="0" Titles="@lineTitles" Stepped="false" yScale="logarithmic"></MultiLine>
</div>
</div>
<div class="card-body">
<MultiLine Id="@currTsId" AspRatio="2.5" DataTSList="@TSDataMulti" Labels="@LabelPlot" lineColor="@lineColorsMLine" backColor="@bgColorsMLine" lTens="0" Titles="@lineTitles" Stepped="false" yScale="logarithmic"></MultiLine>
</div>
</div>
}
}
}
</div>
</div>
</div>
}
}
</div>
</div>
</div>
+8 -24
View File
@@ -9,28 +9,6 @@ namespace MP.IOC.Components.Pages
{
public partial class CallStats
{
#region Protected Properties
private int numDays
{
get => _numDays;
set
{
if (_numDays != value)
{
_numDays = value;
//_ = ShowDetail(currDetail);
}
}
}
private async Task OnDaysChangedAsync()
{
// Questo metodo viene invocato automaticamente dopo che numDays è stato aggiornato
await ShowDetail(currDetail);
// Non serve chiamare StateHasChanged(), Blazor lo fa al termine del Task
}
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
@@ -42,7 +20,6 @@ namespace MP.IOC.Components.Pages
#region Private Fields
private int _numDays = 5;
private List<StatDataDTO> currData = new();
private string currDetail = "";
@@ -59,6 +36,8 @@ namespace MP.IOC.Components.Pages
private List<string> lineTitles = new List<string>();
private int numDays = 5;
private Dictionary<string, List<StatDataDTO>> ParetoDay = new();
private List<chartJsData.chartJsTSerie> tsData = new List<chartJsData.chartJsTSerie>();
@@ -116,7 +95,7 @@ namespace MP.IOC.Components.Pages
private int ParetoTake
{
get => currData.Count() <= 30 ? currData.Count() : 30;
get => currData.Count() <= 25 ? currData.Count() : 25;
}
[Inject]
@@ -227,6 +206,11 @@ namespace MP.IOC.Components.Pages
return colors;
}
private async Task OnDaysChangedAsync()
{
await ShowDetail(currDetail);
}
private async Task ReloadData()
{
ParetoDay = await SDetService.GetParetoStatsDayAsync();
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>6.16.2604.1810</Version>
<Version>6.16.2604.1811</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 6.16.2604.1810</h4>
<h4>Versione: 6.16.2604.1811</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2604.1810
6.16.2604.1811
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2604.1810</version>
<version>6.16.2604.1811</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>