Bozza aggiunta sel multiplo x macchine
This commit is contained in:
@@ -22,25 +22,51 @@
|
||||
<div class="col">
|
||||
<div class="form-group mb-0">
|
||||
<label for="dtInizio" class="small">inizio:</label>
|
||||
<InputDateTime id="dtInizio" class="form-control form-control-sm" @bind-Value="@DateStart"></InputDateTime>
|
||||
<input id="dtInizio" type="datetime-local" class="form-control form-control-sm" @bind="@DateStart"></input>
|
||||
@* <InputDateTime id="dtInizio" class="form-control form-control-sm" @bind-Value="@DateStart"></InputDateTime> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group mb-0">
|
||||
<label for="dtFine" class="small">fine:</label>
|
||||
<InputDateTime id="dtFine" class="form-control form-control-sm" @bind-Value="@DateEnd"></InputDateTime>
|
||||
<input id="dtFine" type="datetime-local" class="form-control form-control-sm" @bind="@DateEnd"></input>
|
||||
@* <InputDateTime id="dtFine" class="form-control form-control-sm" @bind-Value="@DateEnd"></InputDateTime> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col" style="min-width: 10rem;">
|
||||
<label class="small">macchina:</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@IdxMacchina" class="form-select">
|
||||
@foreach (var item in ddlMacchine)
|
||||
<div class="col text-nowrap" style="min-width: 15rem;">
|
||||
@if (OnlyEnergy)
|
||||
{
|
||||
<label class="small">macchine sel:</label>
|
||||
<div class="input-group input-group-sm text-nowrap">
|
||||
<button class="btn btn-sm btn-primary" @onclick="ShowAdd"><i class="fa-solid fa-plus"></i></button>
|
||||
@if (showAddMacc)
|
||||
{
|
||||
<option value="@item.ValueField">@item.LabelField</option>
|
||||
<select @bind="@IdxMacchina" class="form-select">
|
||||
@foreach (var item in ddlMacchineMult)
|
||||
{
|
||||
<option value="@item.ValueField">@item.LabelField</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
else
|
||||
{
|
||||
<span class="form-control disabled">@listSelected</span>
|
||||
}
|
||||
<button class="btn btn-sm btn-primary" @onclick="ResetSelMacchine"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label class="small">macchina:</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@IdxMacchina" class="form-select">
|
||||
@foreach (var item in ddlMacchine)
|
||||
{
|
||||
<option value="@item.ValueField">@item.LabelField</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (ActionsEnabled)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Stats.Data;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -139,9 +141,73 @@ namespace MP.Stats.Components
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SelFilter.IdxMacchina.Equals(value))
|
||||
// verifico se sia energy --> multiselect
|
||||
if (OnlyEnergy)
|
||||
{
|
||||
SelFilter.IdxMacchina = value;
|
||||
if (!ListIdxMaccSel.Contains(value))
|
||||
{
|
||||
ListIdxMaccSel.Add(value);
|
||||
showAddMacc = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (!SelFilter.IdxMacchina.Equals(value))
|
||||
{
|
||||
SelFilter.IdxMacchina = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void ResetSelMacchine()
|
||||
{
|
||||
ListIdxMaccSel.Clear();
|
||||
showAddMacc = false;
|
||||
}
|
||||
|
||||
protected void ShowAdd()
|
||||
{
|
||||
showAddMacc = true;
|
||||
}
|
||||
private bool showAddMacc = false;
|
||||
|
||||
protected string listSelected
|
||||
{
|
||||
get => ListIdxMaccSel != null && ListIdxMaccSel.Count > 0 ? string.Join(", ", ListIdxMaccSel) : "..selezionare...";
|
||||
}
|
||||
|
||||
protected List<AutocompleteModel> ddlMacchineMult
|
||||
{
|
||||
get
|
||||
{
|
||||
List<AutocompleteModel> answ = new List<AutocompleteModel>();
|
||||
foreach (var item in ddlMacchine)
|
||||
{
|
||||
if (!ListIdxMaccSel.Contains(item.ValueField) && item.ValueField != "*")
|
||||
{
|
||||
answ.Add(item);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected List<string> ListIdxMaccSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.ListIdxMaccSel;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SelFilter.ListIdxMaccSel.SequenceEqual(value))
|
||||
{
|
||||
SelFilter.ListIdxMaccSel = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace MP.Stats.Data
|
||||
}
|
||||
|
||||
public string IdxMacchina { get; set; } = "*";
|
||||
public List<string> ListIdxMaccSel { get; set; } = new List<string>();
|
||||
public int IdxOdl { get; set; } = -999;
|
||||
public string KeyRichiesta { get; set; } = "*";
|
||||
public string Azione { get; set; } = "*";
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>6.16.2507.0408</Version>
|
||||
<Version>6.16.2507.0408</Version>
|
||||
<Version>6.16.2507.0517</Version>
|
||||
<Version>6.16.2507.0517</Version>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
|
||||
@@ -89,6 +89,7 @@ namespace MP.Stats.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
MServ.ShowSearch = false;
|
||||
MServ.PageName = "Trend Analisys";
|
||||
MServ.PageIcon = "fa-solid fa-arrow-trend-up";
|
||||
@@ -96,6 +97,7 @@ namespace MP.Stats.Pages
|
||||
MServ.EA_SearchUpdated += OnSeachUpdated;
|
||||
await LoadConfData();
|
||||
await ReloadData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task ResetFilter(SelectData newFilter)
|
||||
@@ -200,6 +202,8 @@ namespace MP.Stats.Pages
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
private int maxDisplay = 5;
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -224,11 +228,17 @@ namespace MP.Stats.Pages
|
||||
.GroupBy(o => o.IdxMacchina)
|
||||
.ToDictionary(g => g.Key, g => g.ToList());
|
||||
|
||||
// per ogni valore recupero timeserie downsampled
|
||||
// per ogni valore recupero timeserie downsampled fino al num max di quelle ottenibili...
|
||||
int numAdd = 0;
|
||||
foreach (var item in grpDict)
|
||||
{
|
||||
numAdd++;
|
||||
// ora effettuo deduplica valori per tenere un subset minore ed evitare problemi visualizzazione...
|
||||
PlotRecords.AddRange(TimeSeriesUtils.DownsampleFluxModels(item.Value, MaxPoints));
|
||||
if(numAdd >= maxDisplay)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 6.16.2507.0408</h4>
|
||||
<h4>Versione: 6.16.2507.0517</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2507.0408
|
||||
6.16.2507.0517
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2507.0408</version>
|
||||
<version>6.16.2507.0517</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -51,10 +51,12 @@
|
||||
]
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true",
|
||||
"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true",
|
||||
"MP.Stats": "Server=SQL2016DEV;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;",
|
||||
"MP.Voc": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;"
|
||||
//"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true",
|
||||
//"MP.Stats": "Server=SQL2016DEV;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;",
|
||||
"DefaultConnection": "Server=SQL2016DEV;Database=Jetco_MoonPro_STATS_Prod;Trusted_Connection=True;MultipleActiveResultSets=true",
|
||||
"MP.Stats": "Server=SQL2022PROD;Database=Jetco_MoonPro_STATS_Prod;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;",
|
||||
"MP.Voc": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;",
|
||||
"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true"
|
||||
},
|
||||
"FormatDur": "HH:mm.ss.ff",
|
||||
"SpecialConf": {
|
||||
|
||||
Reference in New Issue
Block a user