From 9959d0392ab423caba5d0189ab845f2b43b326b9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 9 May 2024 13:06:06 +0200 Subject: [PATCH 1/2] Cleanup commenti --- MP.Prog/Startup.cs | 84 ---------------------------------------------- 1 file changed, 84 deletions(-) diff --git a/MP.Prog/Startup.cs b/MP.Prog/Startup.cs index 02178eb0..88d0719c 100644 --- a/MP.Prog/Startup.cs +++ b/MP.Prog/Startup.cs @@ -100,68 +100,6 @@ namespace MP.Prog // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { -#if false - // init info x DB - string dbServerAddr = Configuration["DbConfig:Server"]; - string nKey = Configuration["DbConfig:nKey"]; - string sKey = Configuration["DbConfig:sKey"]; - DbConfig.InitDb(dbServerAddr, nKey, sKey); - // inizializzo il DB e creo (se necessario) l'utente - DbConfig.CheckUser(nKey, sKey); - // verifico se serve applicazione migrazioni - //DbConfig.ExecMigrationMain(); - //DbConfig.ExecMigrationIdentity(); - - // altri parametri per check vari - string connStringDB = DbConfig.CONNECTION_STRING; - string connStringRedis = Configuration.GetConnectionString("Redis"); - string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":")); - //var qrCodeUri = new Uri(Configuration["ZCodeUrl"]); - //string qrCodeAddr = qrCodeUri.Host; -#endif - -#if false - // healthchecks - services.AddHealthChecks() - .AddMySql(connStringDB, "MySql instance") - .AddAsyncCheck($"DB PING ({dbServerAddr})", () => Health.Checks.PingCheck(dbServerAddr)) - .AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => Health.Checks.PingCheck(redisSrvAddr)) - //.AddAsyncCheck($"QrCode PING ({qrCodeAddr})", () => Health.Checks.PingCheck(qrCodeAddr)) - .AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded) // 512 MB max allocated memory - .AddRedis(Configuration.GetConnectionString("Redis"), "Redis", failureStatus: HealthStatus.Degraded) - //.AddUrlGroup(new Uri(Configuration["ZCodeUrl"]), name: $"QrCode Gen ({Configuration["ZCodeUrl"]})", failureStatus: HealthStatus.Degraded) - .AddAsyncCheck($"MySql Root User", () => Health.Checks.DbUserRoot("MySql")) - .AddAsyncCheck($"MySql App Users", () => Health.Checks.DbUserApp(DbConfig.DATABASE_NAME)) - .AddAsyncCheck($"MySql Identity", () => Health.Checks.DbIdentity(DbConfig.DATABASE_NAME)) - .AddAsyncCheck($"MySql PlantLog", () => Health.Checks.DbPlantLogTable(DbConfig.DATABASE_NAME)) - ; - //.AddDiskStorageHealthCheck(s => s.AddDrive("C:\\", 1024)) // 1024 MB (1 GB) free minimum - //.AddProcessHealthCheck("ProcessName", p => p.Length > 0) // check if process is running - //.AddWindowsServiceHealthCheck("someservice", s => s.Status == ServiceControllerStatus.Running); - - services - .AddHealthChecksUI(s => - { - s.AddHealthCheckEndpoint("GWMS_Services", "health"); - s.SetEvaluationTimeInSeconds(60); - s.SetMinimumSecondsBetweenFailureNotifications(120); - s.SetApiMaxActiveRequests(5); - s.SetHeaderText("GWMS Health Check Status"); - }) - .AddInMemoryStorage(); - - // abilitazione x email management con MailKit - services.AddTransient(); - services.Configure(options => - { - options.Host_Address = Configuration["ExternalProviders:MailKit:SMTP:Address"]; - options.Host_Port = Convert.ToInt32(Configuration["ExternalProviders:MailKit:SMTP:Port"]); - options.Host_Username = Configuration["ExternalProviders:MailKit:SMTP:Account"]; - options.Host_Password = Configuration["ExternalProviders:MailKit:SMTP:Password"]; - options.Sender_EMail = Configuration["ExternalProviders:MailKit:SMTP:SenderEmail"]; - options.Sender_Name = Configuration["ExternalProviders:MailKit:SMTP:SenderName"]; - }); -#endif // cookie applicazione da 14 gg (defaul) a 30 services.ConfigureApplicationCookie(o => @@ -169,24 +107,6 @@ namespace MP.Prog o.ExpireTimeSpan = TimeSpan.FromDays(30); o.SlidingExpiration = true; }); -#if false - // token di sicurezza dati a 3h - services.Configure(o => - o.TokenLifespan = TimeSpan.FromHours(3)); -#endif - -#if false - // setup MySql - //string connString = Configuration.GetConnectionString("AdminConnection"); - var serverVersion = DbConfig.MysqlServerVersion(connStringDB); - services.AddDbContext(options => - options.UseMySql(connStringDB, serverVersion)); - - // identity management - services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) - .AddRoles() - .AddEntityFrameworkStores(); -#endif //// Elmah //services.AddElmah(); @@ -208,10 +128,6 @@ namespace MP.Prog services.AddRazorPages(); services.AddServerSideBlazor(); -#if false - services.AddScoped>(); - services.AddDatabaseDeveloperPageExceptionFilter(); -#endif services.AddSingleton(Configuration); //services.AddTransient(); From cb4085e28e8a158563486d67b75ec73d91b316a9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 17 May 2024 19:00:45 +0200 Subject: [PATCH 2/2] MON: - fix display titolo (scroll) - num pezzi prod/ord - stato text-truncate TAB: - fix ordinamento fermate --- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Pages/ProdStop.razor.cs | 3 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- MP.Mon/Components/DetailMSE.razor | 10 +++--- MP.Mon/Components/DetailMSE.razor.cs | 34 +++++++++--------- MP.Mon/Components/DetailMSE.razor.css | 42 +++++++++++++++++++++++ MP.Mon/Components/DetailMSE.razor.less | 31 ++++++++++------- MP.Mon/Components/DetailMSE.razor.min.css | 1 + MP.Mon/MP.Mon.csproj | 2 +- MP.Mon/Resources/ChangeLog.html | 2 +- MP.Mon/Resources/VersNum.txt | 2 +- MP.Mon/Resources/manifest.xml | 2 +- MP.Mon/appsettings.Production.json | 3 +- MP.Mon/appsettings.json | 3 +- MP.Mon/compilerconfig.json | 4 +++ 17 files changed, 102 insertions(+), 45 deletions(-) create mode 100644 MP.Mon/Components/DetailMSE.razor.css create mode 100644 MP.Mon/Components/DetailMSE.razor.min.css diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 11d43632..4c5f1216 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2405.909 + 6.16.2405.1717 enable MP_TAB3 diff --git a/MP-TAB3/Pages/ProdStop.razor.cs b/MP-TAB3/Pages/ProdStop.razor.cs index 82bf43aa..ee4a41c0 100644 --- a/MP-TAB3/Pages/ProdStop.razor.cs +++ b/MP-TAB3/Pages/ProdStop.razor.cs @@ -241,7 +241,8 @@ namespace MP_TAB3.Pages var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc); if (eventsAll != null) { - events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList(); + events2show = eventsAll.Where(x => x.EventoTablet).ToList(); + //events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList(); } } catch (Exception exc) diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index de3800de..4dcd01aa 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2405.909

+

Versione: 6.16.2405.1717


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index d36c84d8..a84c9343 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2405.909 +6.16.2405.1717 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 38257034..b4436bfe 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2405.909 + 6.16.2405.1717 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false diff --git a/MP.Mon/Components/DetailMSE.razor b/MP.Mon/Components/DetailMSE.razor index 74a435d1..8a655bf8 100644 --- a/MP.Mon/Components/DetailMSE.razor +++ b/MP.Mon/Components/DetailMSE.razor @@ -7,7 +7,7 @@ {
    -
    +
    @CurrRecord.Nome
    @@ -70,9 +70,9 @@ } else { -
    -
    @CurrRecord.DescrizioneStato
    -
    @getMinSec(getDecimal(@CurrRecord.Durata))
    +
    +
    @CurrRecord.DescrizioneStato
    +
    @getMinSec(getDecimal(@CurrRecord.Durata))
    } @if (hasRow(4)) @@ -104,7 +104,7 @@ else {
    -
    Pezzi(prod/ord)
    +
    Pezzip/o
    @CurrRecord.PezziProd / @CurrRecord.NumPezzi
    } diff --git a/MP.Mon/Components/DetailMSE.razor.cs b/MP.Mon/Components/DetailMSE.razor.cs index d0a99243..85b79107 100644 --- a/MP.Mon/Components/DetailMSE.razor.cs +++ b/MP.Mon/Components/DetailMSE.razor.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.FileSystemGlobbing; using MP.Data.Conf; using MP.Data.DatabaseModels; using NLog; @@ -75,21 +76,6 @@ namespace MP.Mon.Components pUpd.Wait(); } - ///// - ///// CSS class x testo (se descr lunga scorre...) - ///// - //protected string textDescrCss - //{ - // get - // { - // string answ = "text-nowrap"; - // if (CurrRecord != null && CurrRecord.DescrizioneStato.Length > 7) - // { - // answ = " scroll-left"; - // } - // return answ; - // } - //} public void StartTimer() { int tOutPeriod = 1000; @@ -108,8 +94,6 @@ namespace MP.Mon.Components protected int kaFactor = 60 / 2; - protected string textDescrCss = ""; - #endregion Protected Fields #region Protected Properties @@ -127,6 +111,20 @@ namespace MP.Mon.Components } } + + /// + /// CSS class x testo (se descr lunga scorre...) + /// + protected string textDescrCss(string currText) + { + string answ = "text-nowrap"; + if (currText.Length > maxChar4Scroll) + { + answ = " scroll-left"; + } + return answ; + } + protected bool dataLoaded { get; set; } = false; /// @@ -192,11 +190,13 @@ namespace MP.Mon.Components Random rnd = new Random(); await Task.Delay(rnd.Next(5)); cssOverlayOff = config.GetValue("ServerConf:cssOverlayOff"); + maxChar4Scroll = config.GetValue("ServerConf:maxChar4Scroll"); setupConf(); dataLoaded = true; } private string cssOverlayOff = "bg-dark text-light opacity-100"; + private int maxChar4Scroll = 20; /// /// Restituisce (se presenti) valori di override per la riga indicata diff --git a/MP.Mon/Components/DetailMSE.razor.css b/MP.Mon/Components/DetailMSE.razor.css new file mode 100644 index 00000000..04f76376 --- /dev/null +++ b/MP.Mon/Components/DetailMSE.razor.css @@ -0,0 +1,42 @@ +/* gestione scroll testo */ +.scroll-left { + height: 1.5em; + overflow: hidden; + position: relative; + width: 100%; + white-space: nowrap; +} +.scroll-left span { + /*display: inline-block;*/ + position: absolute; + width: 100%; + height: 100%; + margin: 0; + line-height: 1.5em; + /* Starting position */ + -moz-transform: translateX(-50%); + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + /* Apply animation to this element */ + -moz-animation: scroll-left 20s ease infinite; + -webkit-animation: scroll-left 20s ease infinite; + animation: scroll-left 20s ease infinite; +} +/* Move it (define the animation) */ +@keyframes scroll-left { + 0% { + transform: translateX(-50%); + } + 25% { + transform: translateX(-30%); + } + 50% { + transform: translateX(-50%); + } + 75% { + transform: translateX(-70%); + } + 100% { + transform: translateX(-50%); + } +} \ No newline at end of file diff --git a/MP.Mon/Components/DetailMSE.razor.less b/MP.Mon/Components/DetailMSE.razor.less index a631b140..9ef253fc 100644 --- a/MP.Mon/Components/DetailMSE.razor.less +++ b/MP.Mon/Components/DetailMSE.razor.less @@ -4,9 +4,8 @@ height: 1.5em; overflow: hidden; position: relative; - width: 70%; + width: 100%; white-space: nowrap; - /*display: inline-block;*/ } .scroll-left span { @@ -17,25 +16,33 @@ margin: 0; line-height: 1.5em; /* Starting position */ - -moz-transform: translateX(0%); - -webkit-transform: translateX(0%); - transform: translateX(0%); + -moz-transform: translateX(-50%); + -webkit-transform: translateX(-50%); + transform: translateX(-50%); /* Apply animation to this element */ - -moz-animation: scroll-left 8s ease infinite; - -webkit-animation: scroll-left 8s ease infinite; - animation: scroll-left 8s ease infinite; + -moz-animation: scroll-left 20s ease infinite; + -webkit-animation: scroll-left 20s ease infinite; + animation: scroll-left 20s ease infinite; } /* Move it (define the animation) */ @keyframes scroll-left { 0% { - transform: translateX(0%); + transform: translateX(-50%); } - 30% { - transform: translateX(0%); + 25% { + transform: translateX(-30%); } - 80% { + 50% { + transform: translateX(-50%); + } + + 75% { + transform: translateX(-70%); + } + + 100% { transform: translateX(-50%); } } diff --git a/MP.Mon/Components/DetailMSE.razor.min.css b/MP.Mon/Components/DetailMSE.razor.min.css new file mode 100644 index 00000000..c469600b --- /dev/null +++ b/MP.Mon/Components/DetailMSE.razor.min.css @@ -0,0 +1 @@ +.scroll-left{height:1.5em;overflow:hidden;position:relative;width:100%;white-space:nowrap;}.scroll-left span{position:absolute;width:100%;height:100%;margin:0;line-height:1.5em;-moz-transform:translateX(-50%);-webkit-transform:translateX(-50%);transform:translateX(-50%);-moz-animation:scroll-left 20s ease infinite;-webkit-animation:scroll-left 20s ease infinite;animation:scroll-left 20s ease infinite;}@keyframes scroll-left{0%{transform:translateX(-50%);}25%{transform:translateX(-30%);}50%{transform:translateX(-50%);}75%{transform:translateX(-70%);}100%{transform:translateX(-50%);}} \ No newline at end of file diff --git a/MP.Mon/MP.Mon.csproj b/MP.Mon/MP.Mon.csproj index 1218efa6..bee37567 100644 --- a/MP.Mon/MP.Mon.csproj +++ b/MP.Mon/MP.Mon.csproj @@ -4,7 +4,7 @@ net6.0 enable enable - 6.16.2403.417 + 6.16.2405.1719 diff --git a/MP.Mon/Resources/ChangeLog.html b/MP.Mon/Resources/ChangeLog.html index be6fc273..cdebf4c7 100644 --- a/MP.Mon/Resources/ChangeLog.html +++ b/MP.Mon/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MON MAPO -

    Versione: 6.16.2403.417

    +

    Versione: 6.16.2405.1719


    Note di rilascio:
    • diff --git a/MP.Mon/Resources/VersNum.txt b/MP.Mon/Resources/VersNum.txt index 598c2025..0678146b 100644 --- a/MP.Mon/Resources/VersNum.txt +++ b/MP.Mon/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2403.417 +6.16.2405.1719 diff --git a/MP.Mon/Resources/manifest.xml b/MP.Mon/Resources/manifest.xml index 3800737a..e6c55cc4 100644 --- a/MP.Mon/Resources/manifest.xml +++ b/MP.Mon/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2403.417 + 6.16.2405.1719 https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.Mon.zip https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html false diff --git a/MP.Mon/appsettings.Production.json b/MP.Mon/appsettings.Production.json index 83f72695..1e7ffaa9 100644 --- a/MP.Mon/appsettings.Production.json +++ b/MP.Mon/appsettings.Production.json @@ -16,6 +16,7 @@ }, "ServerConf": { "maxAge": "2000", - "cssOverlayOff": "bg-dark text-light bg-opacity-50" + "cssOverlayOff": "bg-dark text-light bg-opacity-50", + "maxChar4Scroll": 20 } } diff --git a/MP.Mon/appsettings.json b/MP.Mon/appsettings.json index 2c39e694..52783bef 100644 --- a/MP.Mon/appsettings.json +++ b/MP.Mon/appsettings.json @@ -14,6 +14,7 @@ }, "ServerConf": { "maxAge": "2000", - "cssOverlayOff": "bg-dark text-light bg-opacity-50" + "cssOverlayOff": "bg-dark text-light bg-opacity-50", + "maxChar4Scroll": 20 } } diff --git a/MP.Mon/compilerconfig.json b/MP.Mon/compilerconfig.json index caa3f6ec..16f25062 100644 --- a/MP.Mon/compilerconfig.json +++ b/MP.Mon/compilerconfig.json @@ -6,5 +6,9 @@ { "outputFile": "wwwroot/css/fonts.css", "inputFile": "wwwroot/css/fonts.less" + }, + { + "outputFile": "Components/DetailMSE.razor.css", + "inputFile": "Components/DetailMSE.razor.less" } ] \ No newline at end of file