diff --git a/MP.Data/Conf/IobTags.cs b/MP.Data/Conf/IobTags.cs index 500a9684..8cd57341 100644 --- a/MP.Data/Conf/IobTags.cs +++ b/MP.Data/Conf/IobTags.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace MP.Data.Conf { @@ -11,9 +7,13 @@ namespace MP.Data.Conf /// public class IobTags { + #region Public Fields + /// /// Oggetto dizionario di configurazione x IOB /// public Dictionary> IobSetup = new Dictionary>(); + + #endregion Public Fields } -} +} \ No newline at end of file diff --git a/MP.Data/Conf/TagData.cs b/MP.Data/Conf/TagData.cs index 54f16d40..0042948d 100644 --- a/MP.Data/Conf/TagData.cs +++ b/MP.Data/Conf/TagData.cs @@ -1,37 +1,41 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MP.Data.Conf +namespace MP.Data.Conf { /// /// Item da mostrare nei blocchi MON degli impianti come override ai dati MSE /// public class TagData { + #region Public Properties + /// /// Indice della colonna (ordine) del dato /// public int ColNum { get; set; } = 0; + /// /// Indice della riga del dato /// public int RowNum { get; set; } = 0; + /// /// Override CSS (es fontSmall) /// public string TagCss { get; set; } = ""; - /// - /// Etichetta da mostrare - /// - public string TagName { get; set; } = ""; + /// /// Indicazione della chiave REDIS dove recuperare il tag indicato (già in formato string) /// public string TagLocation { get; set; } = ""; + /// + /// Etichetta da mostrare + /// + public string TagName { get; set; } = ""; + + #endregion Public Properties + + #region Public Methods + /// /// Clone dell'oggetto /// @@ -40,5 +44,7 @@ namespace MP.Data.Conf { return (TagData)this.MemberwiseClone(); } + + #endregion Public Methods } -} +} \ No newline at end of file diff --git a/MP.Data/Constants.cs b/MP.Data/Constants.cs index 10d0028c..8308ead4 100644 --- a/MP.Data/Constants.cs +++ b/MP.Data/Constants.cs @@ -1,21 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MP.Data +namespace MP.Data { - public class Constants + public class Constants { + #region Public Fields + + public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink"; + + public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE"; // dati conf REDIS Cache public static readonly string BASE_HASH = "MAPO"; // REDIS KEY Dati correnti public static readonly string CONF_MON_KEY = $"{BASE_HASH}:Conf:MonDispData"; - public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE"; - public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink"; - + + #endregion Public Fields } -} +} \ No newline at end of file diff --git a/MP.Data/Controllers/MpStatsController.cs b/MP.Data/Controllers/MpStatsController.cs index e070696e..8f41290e 100644 --- a/MP.Data/Controllers/MpStatsController.cs +++ b/MP.Data/Controllers/MpStatsController.cs @@ -10,14 +10,6 @@ namespace MP.Data.Controllers { public class MpStatsController : IDisposable { - #region Private Fields - - private static IConfiguration _configuration; - - private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); - - #endregion Private Fields - #region Public Constructors public MpStatsController(IConfiguration configuration) @@ -326,5 +318,13 @@ namespace MP.Data.Controllers } #endregion Public Methods + + #region Private Fields + + private static IConfiguration _configuration; + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Private Fields } } \ No newline at end of file diff --git a/MP.Data/DTO/DossierFluxLogDTO.cs b/MP.Data/DTO/DossierFluxLogDTO.cs index 37cc8819..67cecb73 100644 --- a/MP.Data/DTO/DossierFluxLogDTO.cs +++ b/MP.Data/DTO/DossierFluxLogDTO.cs @@ -5,6 +5,10 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DTO { public class DossierFluxLogDTO diff --git a/MP.Data/DatabaseModels/AnagArticoli.cs b/MP.Data/DatabaseModels/AnagArticoli.cs index a3e6bddd..8b889c73 100644 --- a/MP.Data/DatabaseModels/AnagArticoli.cs +++ b/MP.Data/DatabaseModels/AnagArticoli.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; #nullable disable - +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("AnagArticoli")] diff --git a/MP.Data/DatabaseModels/AnagGruppi.cs b/MP.Data/DatabaseModels/AnagGruppi.cs index bab7168a..ccaff018 100644 --- a/MP.Data/DatabaseModels/AnagGruppi.cs +++ b/MP.Data/DatabaseModels/AnagGruppi.cs @@ -4,7 +4,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; #nullable disable - +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("AnagraficaGruppi")] diff --git a/MP.Data/DatabaseModels/AzioniUL.cs b/MP.Data/DatabaseModels/AzioniUL.cs index ce81115b..38b0b372 100644 --- a/MP.Data/DatabaseModels/AzioniUL.cs +++ b/MP.Data/DatabaseModels/AzioniUL.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; #nullable disable - +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class AzioniUL diff --git a/MP.Data/DatabaseModels/ConfigModel.cs b/MP.Data/DatabaseModels/ConfigModel.cs index eb4a1ac3..e053dc25 100644 --- a/MP.Data/DatabaseModels/ConfigModel.cs +++ b/MP.Data/DatabaseModels/ConfigModel.cs @@ -2,6 +2,10 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("Config")] diff --git a/MP.Data/DatabaseModels/DdbTurni.cs b/MP.Data/DatabaseModels/DdbTurni.cs index acdec7e2..14cd5104 100644 --- a/MP.Data/DatabaseModels/DdbTurni.cs +++ b/MP.Data/DatabaseModels/DdbTurni.cs @@ -4,6 +4,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; #nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { diff --git a/MP.Data/DatabaseModels/Dossiers.cs b/MP.Data/DatabaseModels/Dossiers.cs index 23edff12..a44a47bf 100644 --- a/MP.Data/DatabaseModels/Dossiers.cs +++ b/MP.Data/DatabaseModels/Dossiers.cs @@ -2,8 +2,11 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("Dossiers")] @@ -12,15 +15,14 @@ namespace MP.Data.DatabaseModels #region Public Properties [MaxLength(50)] - public string IdxMacchina { get; set; } + public string DataType { get; set; } public DateTime DtRif { get; set; } - public int IdxODL { get; set; } - [MaxLength(50)] - public string DataType { get; set; } + public string IdxMacchina { get; set; } + public int IdxODL { get; set; } public string Valore { get; set; } #endregion Public Properties diff --git a/MP.Data/DatabaseModels/FluxLog.cs b/MP.Data/DatabaseModels/FluxLog.cs index 52ee8133..42e8426d 100644 --- a/MP.Data/DatabaseModels/FluxLog.cs +++ b/MP.Data/DatabaseModels/FluxLog.cs @@ -2,8 +2,11 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("FluxLog")] diff --git a/MP.Data/DatabaseModels/LinkMenuJQM.cs b/MP.Data/DatabaseModels/LinkMenuJQM.cs index 6f885057..f17daf93 100644 --- a/MP.Data/DatabaseModels/LinkMenuJQM.cs +++ b/MP.Data/DatabaseModels/LinkMenuJQM.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("LinkMenuJQM")] diff --git a/MP.Data/DatabaseModels/ListValues.cs b/MP.Data/DatabaseModels/ListValues.cs index 75a6f12c..7aa9edfd 100644 --- a/MP.Data/DatabaseModels/ListValues.cs +++ b/MP.Data/DatabaseModels/ListValues.cs @@ -1,8 +1,11 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("ListValues")] diff --git a/MP.Data/DatabaseModels/Macchine.cs b/MP.Data/DatabaseModels/Macchine.cs index f9469bb1..80660970 100644 --- a/MP.Data/DatabaseModels/Macchine.cs +++ b/MP.Data/DatabaseModels/Macchine.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class Macchine diff --git a/MP.Data/DatabaseModels/MappaStatoExpl.cs b/MP.Data/DatabaseModels/MappaStatoExpl.cs index 5ec09875..09149dd4 100644 --- a/MP.Data/DatabaseModels/MappaStatoExpl.cs +++ b/MP.Data/DatabaseModels/MappaStatoExpl.cs @@ -1,6 +1,10 @@ using System; using System.Collections.Generic; +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class MappaStatoExpl diff --git a/MP.Data/DatabaseModels/ODLModel.cs b/MP.Data/DatabaseModels/ODLModel.cs index 6e411485..2f31ead6 100644 --- a/MP.Data/DatabaseModels/ODLModel.cs +++ b/MP.Data/DatabaseModels/ODLModel.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("ODL")] diff --git a/MP.Data/DatabaseModels/PODLModel.cs b/MP.Data/DatabaseModels/PODLModel.cs index 3f0dd58b..73b5b19d 100644 --- a/MP.Data/DatabaseModels/PODLModel.cs +++ b/MP.Data/DatabaseModels/PODLModel.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { [Table("PromesseODL")] diff --git a/MP.Data/DatabaseModels/ResControlli.cs b/MP.Data/DatabaseModels/ResControlli.cs index a4d96e77..762ab3d6 100644 --- a/MP.Data/DatabaseModels/ResControlli.cs +++ b/MP.Data/DatabaseModels/ResControlli.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class ResControlli diff --git a/MP.Data/DatabaseModels/ResScarti.cs b/MP.Data/DatabaseModels/ResScarti.cs index 093e00f8..eeb0ac62 100644 --- a/MP.Data/DatabaseModels/ResScarti.cs +++ b/MP.Data/DatabaseModels/ResScarti.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class ResScarti diff --git a/MP.Data/DatabaseModels/StatsAnagArticoli.cs b/MP.Data/DatabaseModels/StatsAnagArticoli.cs index 02b6ad12..a7d7dbc6 100644 --- a/MP.Data/DatabaseModels/StatsAnagArticoli.cs +++ b/MP.Data/DatabaseModels/StatsAnagArticoli.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class StatsAnagArticoli diff --git a/MP.Data/DatabaseModels/StatsODL.cs b/MP.Data/DatabaseModels/StatsODL.cs index b84a6a98..5fa494ed 100644 --- a/MP.Data/DatabaseModels/StatsODL.cs +++ b/MP.Data/DatabaseModels/StatsODL.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class StatsODL diff --git a/MP.Data/DatabaseModels/TurniOee.cs b/MP.Data/DatabaseModels/TurniOee.cs index 0c0279f8..cd54c135 100644 --- a/MP.Data/DatabaseModels/TurniOee.cs +++ b/MP.Data/DatabaseModels/TurniOee.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class TurniOee diff --git a/MP.Data/DatabaseModels/UserActionLog.cs b/MP.Data/DatabaseModels/UserActionLog.cs index d6357f43..28fff76c 100644 --- a/MP.Data/DatabaseModels/UserActionLog.cs +++ b/MP.Data/DatabaseModels/UserActionLog.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; -#nullable disable +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data.DatabaseModels { public partial class UserActionLog diff --git a/MP.Data/MP.Data.csproj b/MP.Data/MP.Data.csproj index 408c12bd..587b0971 100644 --- a/MP.Data/MP.Data.csproj +++ b/MP.Data/MP.Data.csproj @@ -12,14 +12,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + \ No newline at end of file diff --git a/MP.Data/MessagePipe.cs b/MP.Data/MessagePipe.cs index 44988e21..098cdc4e 100644 --- a/MP.Data/MessagePipe.cs +++ b/MP.Data/MessagePipe.cs @@ -1,29 +1,11 @@ using NLog; using StackExchange.Redis; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MP.Data { public class MessagePipe { - #region Private Fields - - private bool enableLog = false; - private IConnectionMultiplexer redis; - private IDatabase? redisDb; - - #endregion Private Fields - - #region Protected Fields - - protected static Logger Log = LogManager.GetCurrentClassLogger(); - - #endregion Protected Fields - #region Public Constructors public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false) @@ -44,37 +26,6 @@ namespace MP.Data #endregion Public Events - #region Private Properties - - /// - /// Canale associato al gestore pipeline messaggi - /// - private string _channel { get; set; } = ""; - - #endregion Private Properties - - #region Private Methods - - private void setupSubscriber() - { - ISubscriber sub = redis.GetSubscriber(); - //Subscribe to the channel named messages - sub.Subscribe(_channel, (channel, message) => - { - Log.Trace($"ch {channel} | {message}"); - // messaggio - PubSubEventArgs mea = new PubSubEventArgs(message); - // se qualcuno ascolta sollevo evento nuovo valore... - if (EA_NewMessage != null) - { - EA_NewMessage(this, mea); - } - }); - Log.Info($"Subscribed {_channel}"); - } - - #endregion Private Methods - #region Public Methods public bool saveAndSendMessage(string memKey, string message) @@ -108,6 +59,51 @@ namespace MP.Data #endregion Public Methods + #region Protected Fields + + protected static Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Protected Fields + + #region Private Fields + + private bool enableLog = false; + private IConnectionMultiplexer redis; + private IDatabase? redisDb; + + #endregion Private Fields + + #region Private Properties + + /// + /// Canale associato al gestore pipeline messaggi + /// + private string _channel { get; set; } = ""; + + #endregion Private Properties + + #region Private Methods + + private void setupSubscriber() + { + ISubscriber sub = redis.GetSubscriber(); + //Subscribe to the channel named messages + sub.Subscribe(_channel, (channel, message) => + { + Log.Trace($"ch {channel} | {message}"); + // messaggio + PubSubEventArgs mea = new PubSubEventArgs(message); + // se qualcuno ascolta sollevo evento nuovo valore... + if (EA_NewMessage != null) + { + EA_NewMessage(this, mea); + } + }); + Log.Info($"Subscribed {_channel}"); + } + + #endregion Private Methods + /// /// Invio messaggio sul canale + salvataggio in cache REDIS /// @@ -132,4 +128,4 @@ namespace MP.Data #endregion Public Properties } -} +} \ No newline at end of file diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs index 168c3c66..221d765b 100644 --- a/MP.Data/MoonProContext.cs +++ b/MP.Data/MoonProContext.cs @@ -6,7 +6,9 @@ using MP.Data.DatabaseModels; using NLog; #nullable disable - +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data { public partial class MoonProContext : DbContext diff --git a/MP.Data/MoonPro_STATSContext.cs b/MP.Data/MoonPro_STATSContext.cs index 3a83c4f8..3dc94775 100644 --- a/MP.Data/MoonPro_STATSContext.cs +++ b/MP.Data/MoonPro_STATSContext.cs @@ -6,7 +6,9 @@ using MP.Data.DatabaseModels; using NLog; #nullable disable - +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MP.Data { public partial class MoonPro_STATSContext : DbContext diff --git a/MP.Data/Utils.cs b/MP.Data/Utils.cs index 5d70ae78..b1d5b6d0 100644 --- a/MP.Data/Utils.cs +++ b/MP.Data/Utils.cs @@ -3,13 +3,26 @@ using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace MP.Data { public class Utils { + #region Public Properties + + public static string redKeyArtUsed + { + get => RedHash($"CACHE:CheckArtUsed"); + } + + public static string redKeyTabCheckArt + { + get => RedHash($"CACHE:TabCheckArt"); + } + + #endregion Public Properties + #region Public Methods public static string ConvMinToTime(double minutes) @@ -28,6 +41,22 @@ namespace MP.Data return answ; } + /// + /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da + /// funzionalita' DbConfig) + keyName richiesto... + /// + public static string RedHash(string keyName) + { + string answ = keyName; + try + { + answ = $"MP:Data:{keyName}"; + } + catch + { } + return answ; + } + public static async Task SaveToCsv(List reportData, string path) { var lines = new List(); @@ -39,30 +68,6 @@ namespace MP.Data await Task.Run(() => File.WriteAllLines(path, lines.ToArray())); } - public static string redKeyArtUsed - { - get => RedHash($"CACHE:CheckArtUsed"); - } - public static string redKeyTabCheckArt - { - get => RedHash($"CACHE:TabCheckArt"); - } - - /// - /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto... - /// - public static string RedHash(string keyName) - { - string answ = keyName; - try - { - answ =$"MP:Data:{keyName}"; - } - catch - { } - return answ; - } - #endregion Public Methods } } \ No newline at end of file diff --git a/MP.SPEC/Components/CmpFooter.razor.cs b/MP.SPEC/Components/CmpFooter.razor.cs index acdc906d..9e72abd9 100644 --- a/MP.SPEC/Components/CmpFooter.razor.cs +++ b/MP.SPEC/Components/CmpFooter.razor.cs @@ -33,15 +33,15 @@ namespace MP.SPEC.Components aTimer.Start(); } + #endregion Public Methods + + #region Protected Methods + protected override void OnInitialized() { version = typeof(Program).Assembly.GetName().Version; } - #endregion Public Methods - - #region Protected Methods - #endregion Protected Methods #region Private Fields diff --git a/MP.SPEC/Components/DataPager.razor.cs b/MP.SPEC/Components/DataPager.razor.cs index d8aefc54..dc625ff6 100644 --- a/MP.SPEC/Components/DataPager.razor.cs +++ b/MP.SPEC/Components/DataPager.razor.cs @@ -23,12 +23,6 @@ namespace MP.SPEC.Components } } } - - public async Task resetCurrPage() - { - await Task.Delay(1); - currPage = 1; - } [Parameter] public EventCallback numPageChanged { get; set; } @@ -82,6 +76,16 @@ namespace MP.SPEC.Components #endregion Public Properties + #region Public Methods + + public async Task resetCurrPage() + { + await Task.Delay(1); + currPage = 1; + } + + #endregion Public Methods + #region Protected Fields protected bool _showLoading = false; diff --git a/MP.SPEC/Components/DossiersFilter.razor b/MP.SPEC/Components/DossiersFilter.razor index 5aae30d9..906f5c56 100644 --- a/MP.SPEC/Components/DossiersFilter.razor +++ b/MP.SPEC/Components/DossiersFilter.razor @@ -5,53 +5,6 @@
- @*@if (showEditPar) - { -
- - - - - -
- } - else - { -
- -
- }*@
@@ -65,8 +18,8 @@ } } - - + +
diff --git a/MP.SPEC/Components/DossiersFilter.razor.cs b/MP.SPEC/Components/DossiersFilter.razor.cs index 12a155a5..eefd1f4f 100644 --- a/MP.SPEC/Components/DossiersFilter.razor.cs +++ b/MP.SPEC/Components/DossiersFilter.razor.cs @@ -1,21 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Components; -using System.Net.Http; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Forms; -using Microsoft.AspNetCore.Components.Routing; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.Web.Virtualization; -using Microsoft.JSInterop; -using MP.SPEC; -using MP.SPEC.Shared; -using MP.SPEC.Components; -using MP.SPEC.Data; using MP.Data.DatabaseModels; +using MP.SPEC.Data; namespace MP.SPEC.Components { @@ -31,15 +16,27 @@ namespace MP.SPEC.Components #endregion Public Properties - #region Protected Fields - - #endregion Protected Fields - #region Protected Properties [Inject] protected MpDataService MDService { get; set; } = null!; + protected DateTime selDtRef + { + get + { + return SelFilterDossier.DtRef; + } + + set + { + if (!SelFilterDossier.DtRef.Equals(value)) + { + SelFilterDossier.DtRef = value; + reportChange(); + } + } + } protected string selMacchina { @@ -60,7 +57,6 @@ namespace MP.SPEC.Components } } - protected int selMaxRecord { get @@ -78,23 +74,6 @@ namespace MP.SPEC.Components } } - protected DateTime selDtRef - { - get - { - return SelFilterDossier.DtRef; - } - - set - { - if (!SelFilterDossier.DtRef.Equals(value)) - { - SelFilterDossier.DtRef = value; - reportChange(); - } - } - } - #endregion Protected Properties #region Protected Methods diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 03ffa350..16e5bcf8 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -22,7 +22,7 @@ else Macchina Data ODL - DATA TYPE + DATA TYPE @@ -64,8 +64,7 @@ else Macchina Data ODL - Valore - @**@ + Valore @@ -84,8 +83,6 @@ else @record.Valore - @* - *@ } diff --git a/MP.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs index 8f7048e2..6b0b346b 100644 --- a/MP.SPEC/Components/ListPARAMS.razor.cs +++ b/MP.SPEC/Components/ListPARAMS.razor.cs @@ -111,10 +111,11 @@ namespace MP.SPEC.Components { get => SelFilter.TempoAgg; } - //protected int RefreshPeriod { get; set; } = 5000; #endregion Protected Properties + //protected int RefreshPeriod { get; set; } = 5000; + #region Protected Methods protected override async Task OnInitializedAsync() diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs index 51023f56..01dd5644 100644 --- a/MP.SPEC/Components/ListPODL.razor.cs +++ b/MP.SPEC/Components/ListPODL.razor.cs @@ -12,7 +12,6 @@ namespace MP.SPEC.Components [Parameter] public EventCallback PagerResetReq { get; set; } - [Parameter] public EventCallback RecordSel { get; set; } @@ -35,38 +34,6 @@ namespace MP.SPEC.Components return answ; } - protected async Task resetSel() - { - await RecordSel.InvokeAsync(null); - } - - protected bool POdlDelEnabled(int idxOdl) - { - return idxOdl == 0; - } - - protected async Task selRecord(PODLModel selRec) - { - await RecordSel.InvokeAsync(selRec); - } - - - /// - /// Eliminazione record selezioanto (previa conferma) - /// - /// - /// - protected async Task deleteRecord(PODLModel selRec) - { - if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Record: sei sicuro di voler procedere?")) - return; - await Task.Delay(1); - var done = await MDService.PODLDeleteRecord(selRec); - currRecord = null; - await reloadData(); - await Task.Delay(1); - } - #endregion Public Methods #region Protected Properties @@ -84,6 +51,22 @@ namespace MP.SPEC.Components #region Protected Methods + /// + /// Eliminazione record selezioanto (previa conferma) + /// + /// + /// + protected async Task deleteRecord(PODLModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Record: sei sicuro di voler procedere?")) + return; + await Task.Delay(1); + var done = await MDService.PODLDeleteRecord(selRec); + currRecord = null; + await reloadData(); + await Task.Delay(1); + } + protected override async Task OnInitializedAsync() { MsgService.EA_PageUpdated += MessageService_EA_PageUpdated; @@ -104,6 +87,21 @@ namespace MP.SPEC.Components }); } + protected bool POdlDelEnabled(int idxOdl) + { + return idxOdl == 0; + } + + protected async Task resetSel() + { + await RecordSel.InvokeAsync(null); + } + + protected async Task selRecord(PODLModel selRec) + { + await RecordSel.InvokeAsync(selRec); + } + protected async Task UpdateData() { currRecord = null; @@ -118,6 +116,7 @@ namespace MP.SPEC.Components private List? ListRecords; + private List? ListStati; private List? SearchRecords; #endregion Private Fields @@ -175,6 +174,17 @@ namespace MP.SPEC.Components }); } + private async Task reloadData() + { + isLoading = true; + SearchRecords = await MDService.ListPODLFilt(SearchVal, StatoSel); + totalCount = SearchRecords.Count; + ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); + await Task.Delay(1); + await InvokeAsync(() => StateHasChanged()); + isLoading = false; + } + private string tradFase(string codFase) { string answ = codFase; @@ -189,20 +199,6 @@ namespace MP.SPEC.Components return answ; } - - private List? ListStati; - - private async Task reloadData() - { - isLoading = true; - SearchRecords = await MDService.ListPODLFilt(SearchVal, StatoSel); - totalCount = SearchRecords.Count; - ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); - await Task.Delay(1); - await InvokeAsync(() => StateHasChanged()); - isLoading = false; - } - #endregion Private Methods } } \ No newline at end of file diff --git a/MP.SPEC/Components/ParamsFilter.razor.cs b/MP.SPEC/Components/ParamsFilter.razor.cs index a715db76..9fbb67ff 100644 --- a/MP.SPEC/Components/ParamsFilter.razor.cs +++ b/MP.SPEC/Components/ParamsFilter.razor.cs @@ -15,7 +15,7 @@ namespace MP.SPEC.Components #endregion Public Properties - #region Protected Fields + #region Protected Properties protected string lastUpdate { @@ -23,10 +23,6 @@ namespace MP.SPEC.Components set => SelFilter.lastUpdate = value; } - #endregion Protected Fields - - #region Protected Properties - protected bool liveUpdate { get => SelFilter.LiveUpdate; @@ -134,6 +130,14 @@ namespace MP.SPEC.Components await FilterChanged.InvokeAsync(SelFilter); } + protected async Task takeSnapshot() + { + // fermo udpate + liveUpdate = false; + await MDService.DossiersTakeParamsSnapshot(selMacchina, 10); + lastUpdate = $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}"; + } + protected void toggleParams() { showEditPar = !showEditPar; @@ -149,14 +153,6 @@ namespace MP.SPEC.Components } } - protected async Task takeSnapshot() - { - // fermo udpate - liveUpdate = false; - await MDService.DossiersTakeParamsSnapshot(selMacchina, 10); - lastUpdate = $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}"; - } - #endregion Protected Methods #region Private Fields diff --git a/MP.SPEC/Data/SelectDossierParams.cs b/MP.SPEC/Data/SelectDossierParams.cs index ebcf3928..9d55bb87 100644 --- a/MP.SPEC/Data/SelectDossierParams.cs +++ b/MP.SPEC/Data/SelectDossierParams.cs @@ -11,13 +11,25 @@ #region Public Properties + public int CurrPage { get; set; } = 1; + + public DateTime DtRef { get; set; } = Init(5); + + public string IdxMacchina { get; set; } = "*"; + + public int MaxRecord { get; set; } = 100; + + #endregion Public Properties + + #region Public Methods + /// -        /// Inizializzazione con periodo e arrotondamento -        /// -        /// -        /// -        /// -        public static DateTime Init(int minRound) +         /// Inizializzazione con periodo e arrotondamento +         /// +         /// +         /// +         /// + public static DateTime Init(int minRound) { TimeSpan DayElapsed = DateTime.Now.Subtract(DateTime.Today); int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound; @@ -25,16 +37,6 @@ return endRounded; } - public string IdxMacchina { get; set; } = "*"; - - public int MaxRecord { get; set; } = 100; - public DateTime DtRef { get; set; } = Init(5); - public int CurrPage { get; set; } = 1; - - #endregion Public Properties - - #region Public Methods - public override bool Equals(object obj) { if (!(obj is SelectDossierParams item)) diff --git a/MP.SPEC/Data/SelectFluxParams.cs b/MP.SPEC/Data/SelectFluxParams.cs index 92559e14..39660b9f 100644 --- a/MP.SPEC/Data/SelectFluxParams.cs +++ b/MP.SPEC/Data/SelectFluxParams.cs @@ -12,13 +12,13 @@ #region Public Properties public string CodFlux { get; set; } = "*"; + public int CurrPage { get; set; } = 1; public string IdxMacchina { get; set; } = "*"; + public string lastUpdate { get; set; } = "-"; public bool LiveUpdate { get; set; } = true; public int MaxRecord { get; set; } = 100; public int TempoAgg { get; set; } = 2000; - public int CurrPage { get; set; } = 1; - public string lastUpdate { get; set; } = "-"; #endregion Public Properties diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 55d5b54d..611c6c43 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2209.2110 + 6.16.2209.2114 @@ -17,8 +17,8 @@ - - + + diff --git a/MP.SPEC/Pages/DOSS.razor b/MP.SPEC/Pages/DOSS.razor index 0b62dd06..ff778773 100644 --- a/MP.SPEC/Pages/DOSS.razor +++ b/MP.SPEC/Pages/DOSS.razor @@ -30,7 +30,7 @@ }
diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 2038917f..65c77aa6 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -26,6 +26,12 @@ namespace MP.SPEC.Pages numRecord = newNum; } + protected void ForceReloadPage(int newNum) + { + currPage = newNum; + StateHasChanged(); + } + protected override async Task OnInitializedAsync() { isLoading = true; diff --git a/MP.SPEC/Pages/Error.cshtml.cs b/MP.SPEC/Pages/Error.cshtml.cs index 655495ec..db2be022 100644 --- a/MP.SPEC/Pages/Error.cshtml.cs +++ b/MP.SPEC/Pages/Error.cshtml.cs @@ -8,20 +8,36 @@ namespace MP.SPEC.Pages [IgnoreAntiforgeryToken] public class ErrorModel : PageModel { - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - private readonly ILogger _logger; + #region Public Constructors public ErrorModel(ILogger logger) { _logger = logger; } + #endregion Public Constructors + + #region Public Properties + + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + #endregion Public Properties + + #region Public Methods + public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; } + + #endregion Public Methods + + #region Private Fields + + private readonly ILogger _logger; + + #endregion Private Fields } } \ No newline at end of file diff --git a/MP.SPEC/Pages/PARAMS.razor.cs b/MP.SPEC/Pages/PARAMS.razor.cs index 999f2bb4..16ba0000 100644 --- a/MP.SPEC/Pages/PARAMS.razor.cs +++ b/MP.SPEC/Pages/PARAMS.razor.cs @@ -29,7 +29,7 @@ namespace MP.SPEC.Pages protected void ForceReloadPage(int newNum) { currPage = newNum; - currFilter.lastUpdate= $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}"; + currFilter.lastUpdate = $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}"; currFilter.LiveUpdate = (currPage == 1); StateHasChanged(); } @@ -66,11 +66,6 @@ namespace MP.SPEC.Pages #endregion Protected Methods - #region Private Fields - - - #endregion Private Fields - #region Private Properties private SelectFluxParams currFilter { get; set; } = new SelectFluxParams(); @@ -81,8 +76,8 @@ namespace MP.SPEC.Pages set => MsgService.currPage = value; } - private bool isLoading { get; set; } = true; private bool isFiltering { get; set; } = false; + private bool isLoading { get; set; } = true; private int numRecord { diff --git a/MP.SPEC/Pages/Utils.razor.cs b/MP.SPEC/Pages/Utils.razor.cs index 99947dcd..b706f3b9 100644 --- a/MP.SPEC/Pages/Utils.razor.cs +++ b/MP.SPEC/Pages/Utils.razor.cs @@ -1,18 +1,25 @@ using Microsoft.AspNetCore.Components; using MP.SPEC.Data; -using System.Reflection; namespace MP.SPEC.Pages { public partial class Utils { - [Inject] - protected MpDataService MDService { get; set; } + #region Public Methods public async Task flushCache() { await Task.Delay(1); await MDService.FlushRedisCache(); } + + #endregion Public Methods + + #region Protected Properties + + [Inject] + protected MpDataService MDService { get; set; } + + #endregion Protected Properties } -} +} \ No newline at end of file diff --git a/MP.SPEC/Properties/launchSettings.json b/MP.SPEC/Properties/launchSettings.json index 0f74370e..07a04c8e 100644 --- a/MP.SPEC/Properties/launchSettings.json +++ b/MP.SPEC/Properties/launchSettings.json @@ -1,28 +1,28 @@ { - "iisSettings": { - "windowsAuthentication": true, - "anonymousAuthentication": false, - "iisExpress": { - "applicationUrl": "http://localhost:46815", - "sslPort": 44370 - } - }, - "profiles": { - "MP.SPEC": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "https://localhost:7212;http://localhost:5212", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } + "iisSettings": { + "windowsAuthentication": true, + "anonymousAuthentication": false, + "iisExpress": { + "applicationUrl": "http://localhost:46815", + "sslPort": 44370 } + }, + "profiles": { + "MP.SPEC": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7212;http://localhost:5212", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } } \ No newline at end of file diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 59ec5ae7..0c240837 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2209.2110

+

Versione: 6.16.2209.2114


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 86a8516f..cdb59656 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2209.2110 +6.16.2209.2114 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 0cdb93c2..1d850cf1 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2209.2110 + 6.16.2209.2114 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false diff --git a/MP.SPEC/Shared/MainLayout.razor.css b/MP.SPEC/Shared/MainLayout.razor.css index b4db48d9..d5884352 100644 --- a/MP.SPEC/Shared/MainLayout.razor.css +++ b/MP.SPEC/Shared/MainLayout.razor.css @@ -24,16 +24,16 @@ main { display: flex;*/ } -.top-row ::deep a, -.top-row .btn-link { - white-space: nowrap; - margin-left: 1.5rem; -} + .top-row ::deep a, + .top-row .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + } -.top-row a:first-child { - overflow: hidden; - text-overflow: ellipsis; -} + .top-row a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } .bottom-row { color: #dedede; @@ -46,9 +46,11 @@ main { .top-row:not(.auth) { display: none; } + .top-row.auth { justify-content: space-between; } + .top-row a, .top-row .btn-link { margin-left: 0; @@ -59,34 +61,40 @@ main { .page { flex-direction: row; } + .sidebar { width: 15rem; height: 100vh; position: sticky; top: 0; } + .sidebarSmall { width: 5rem; height: 100vh; position: sticky; top: 0; } + .top-row { position: sticky; top: 0; z-index: 1; } + .top-row, article { padding-left: 0.5rem !important; padding-right: 0.5rem !important; } + .bottom-row { position: fixed; bottom: 0; z-index: 1; } - .main>div { + + .main > div { padding-left: 0.5rem !important; padding-right: 0.5rem !important; /*padding-left: 2rem !important; diff --git a/MP.SPEC/Shared/NavMenu.razor.css b/MP.SPEC/Shared/NavMenu.razor.css index 75cac5de..e132378a 100644 --- a/MP.SPEC/Shared/NavMenu.razor.css +++ b/MP.SPEC/Shared/NavMenu.razor.css @@ -59,4 +59,4 @@ /* Never collapse the sidebar for wide screens */ display: block; } -} +} \ No newline at end of file