Update ID x fix errori selezione

This commit is contained in:
Samuele Locatelli
2026-04-10 12:34:09 +02:00
parent 2b8a5313cd
commit 98cbf96077
9 changed files with 48 additions and 18 deletions
+9 -2
View File
@@ -1,7 +1,14 @@
<div class="card shadow">
<div class="card-header">
<b>@Title</b>
<div class="d-flex justify-content-between">
<div class="px-0 fw-bold">@Title</div>
<div class="px-0">
<button class="btn btn-sm btn-info" @onclick="() => DoReset()">
<i class="fa-solid fa-arrow-rotate-right"></i>
</button>
</div>
</div>
</div>
<div class="card-body p-1">
<ul class="list-group">
@@ -16,7 +23,7 @@
</div>
<div class="text-end">
<b>@($"{itemDet.Value:N0}")</b>
<div class="small">@($"({valPerc(itemDet.Value):P2})")</div>
<div class="small">@($"({valPerc(itemDet.Value):P2})")</div>
</div>
</li>
}
@@ -65,11 +65,12 @@ namespace MP.IOC.Components.Compo
currSelect = "";
}
private void DoSelect(string reqKey)
private async Task DoSelect(string reqKey)
{
if (ParetoList.Any(x => x.Label == reqKey))
{
currSelect = reqKey;
await EC_Selected.InvokeAsync(reqKey);
}
}
+13 -6
View File
@@ -33,7 +33,7 @@
</div>
</div>
</div>
@if (string.IsNullOrEmpty(@currSelect))
@if (string.IsNullOrEmpty(currHistId))
{
<div class="col-9">
<div class="alert alert-info">selezionare la metrica</div>
@@ -42,21 +42,28 @@
else
{
<div class="col-6">
<BarPlot Id="@currSelect" AspRatio="2" Data="@DatiPareto" Labels="@LabelPareto" Legenda="@currTitle" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
<BarPlot Id="@currHistId" AspRatio="2" Data="@DatiPareto" Labels="@LabelPareto" Legenda="@currTitle" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
</div>
<div class="col-3">
<PieChart Id="PieSelected" AspRatio="1" LegendPos="none" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="@currTitle"></PieChart>
<PieChart Id="@currPieId" AspRatio="1" LegendPos="none" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="@currTitle"></PieChart>
</div>
}
</div>
@if (!string.IsNullOrEmpty(@currSelect))
@if (!string.IsNullOrEmpty(currHistId))
{
<div class="row mb-2">
<div class="col-3">
<ParetoDetail Title="@currSelect" ParetoList="@currData"></ParetoDetail>
<ParetoDetail Title="@currHistId" ParetoList="@currData" EC_Selected="ShowDetail"></ParetoDetail>
</div>
<div class="col-9">
timeserie selezionata x num call/tempo
@if (string.IsNullOrEmpty(currDetail))
{
<div class="alert alert-info">&larr; selezionare valore</div>
}
else
{
<i>timeserie selezionata x num call/tempo</i>
}
</div>
</div>
}
+19 -4
View File
@@ -32,7 +32,8 @@ namespace MP.IOC.Components.Pages
private List<StatDataDTO> currData = new();
private string currSelect = "";
private string currHistId = "";
private string currPieId = "";
private string currTitle = "";
@@ -70,12 +71,13 @@ namespace MP.IOC.Components.Pages
private string CheckSelect(string curKey)
{
return !string.IsNullOrEmpty(currSelect) && currSelect == curKey ? "active" : "";
return !string.IsNullOrEmpty(currHistId) && currHistId == curKey ? "active" : "";
}
private void DoReset()
{
currSelect = "";
currHistId = "";
currPieId = "";
currData = new();
}
@@ -83,7 +85,8 @@ namespace MP.IOC.Components.Pages
{
if (ParetoDay.ContainsKey(reqKey))
{
currSelect = reqKey;
currHistId = $"Bar_{reqKey}";
currPieId = $"Pie_{reqKey}";
currTitle = $"Pareto | {reqKey}";
currData = ParetoDay[reqKey];
}
@@ -122,5 +125,17 @@ namespace MP.IOC.Components.Pages
}
#endregion Private Methods
private string currDetail = "";
/// <summary>
/// abilita visualizzaione grafico dettagli x metodo indicato
/// </summary>
/// <param name="selDetail"></param>
private async Task ShowDetail(string selDetail)
{
await Task.Delay(10);
currDetail = selDetail;
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>6.16.2604.1011</Version>
<Version>6.16.2604.1012</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 6.16.2604.1011</h4>
<h4>Versione: 6.16.2604.1012</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2604.1011
6.16.2604.1012
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2604.1011</version>
<version>6.16.2604.1012</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
@@ -19,7 +19,7 @@ window.setup = (id, config) => {
//var ctx = document.getElementById(id).getContext('2d');
//let currentDate = new Date();
//console.log(currentDate + " - Calling setup...");
console.log(id);
//console.log(id);
if (window['chart-' + id] instanceof Chart) {
//window.myChart.destroy();
window['chart-' + id].destroy();