diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 755f4210..2efa6b1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,27 @@ variables: NEXUS_PATH: 'MP-STATS' APP_NAME: 'MP.Stats' + SOL_NAME: 'MP-STATS' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix - - | - $hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C - if ($hasSource -eq 0) { - C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" - } else { - C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" + - | + echo "esecuzione Nuget FIX steps" + dotnet nuget list source + $hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source "`"Steamware Nexus Proxy`"" } - echo $hasSource + $hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source "`"Steamware Nexus`"" + } + $hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source nexus-proxy-v3 + } + dotnet nuget add source https://nexus.steamware.net/repository/nuget-proxy-v3/index.json -n nexus-proxy-v3 -u nugetUser -p viaDante16 --store-password-in-clear-text + echo "Has Source: $hasSource" # helper creazione hash files x IIS .hashBuild: &hashBuild @@ -49,10 +59,8 @@ variables: } mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html - - -# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip +# Stages previsti stages: - build - test @@ -64,142 +72,267 @@ LAND:build: stage: build tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND before_script: - *nuget-fix - - dotnet restore MP-LAND.sln + - dotnet restore "$env:SOL_NAME.sln" script: - - dotnet build MP.Land/MP.Land.csproj + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj PROG:build: stage: build tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG before_script: - *nuget-fix - - dotnet restore MP-PROG.sln + - dotnet restore "$env:SOL_NAME.sln" script: - - dotnet build MP.Prog/MP.Prog.csproj + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj STAT:build: stage: build tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS before_script: - *nuget-fix - - dotnet restore MP-STATS.sln + - dotnet restore "$env:SOL_NAME.sln" script: - - dotnet build MP.Stats/MP.Stats.csproj + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +MON:build: + stage: build + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj LAND:test: stage: test tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["LAND:build"] script: - - dotnet test MP.Land/MP.Land.csproj + - dotnet test $env:APP_NAME/$env:APP_NAME.csproj PROG:test: stage: test tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["PROG:build"] script: - - dotnet test MP.Prog/MP.Prog.csproj + - dotnet test $env:APP_NAME/$env:APP_NAME.csproj STAT:test: stage: test tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["STAT:build"] script: - - dotnet test MP.Stats/MP.Stats.csproj + - dotnet test $env:APP_NAME/$env:APP_NAME.csproj + +MON:test: + stage: test + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + only: + - develop + needs: ["MON:build"] + script: + - dotnet test $env:APP_NAME/$env:APP_NAME.csproj LAND:IIS01:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["LAND:test"] script: - - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Land/MP.Land.csproj + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj PROG:IIS01:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["PROG:test"] script: - - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj - + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj STAT:IIS01:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop needs: ["STAT:test"] script: - - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + +MON:IIS01:deploy: + stage: deploy + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + only: + - develop + needs: ["MON:test"] + script: + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj LAND:IIS02:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - master needs: ["LAND:build"] script: - - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Land/MP.Land.csproj - - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Land/MP.Land.csproj + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj PROG:IIS02:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - master needs: ["PROG:build"] script: - - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj - - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj STAT:IIS02:deploy: stage: deploy tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - master needs: ["STAT:build"] script: - - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj - - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + +MON:IIS02:deploy: + stage: deploy + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + only: + - master + needs: ["MON:test"] + script: + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj LAND:installer: stage: installer tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND + NEXUS_PATH: MP-LAND + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop - master needs: ["LAND:build"] - variables: - APP_NAME: MP.Land - NEXUS_PATH: MP-LAND - before_script: - # - *nuget-fix - # - dotnet restore script: - - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Land/MP.Land.csproj -o:publish + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish # qui il deploy su nexus... - *hashBuild - *nexusUpload @@ -208,18 +341,19 @@ PROG:installer: stage: installer tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG + NEXUS_PATH: MP-PROG + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop - master needs: ["PROG:build"] - variables: - APP_NAME: MP.Prog - NEXUS_PATH: MP-PROG - before_script: - # - *nuget-fix - # - dotnet restore script: - - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Prog/MP.Prog.csproj -o:publish + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish # qui il deploy su nexus... - *hashBuild - *nexusUpload @@ -228,27 +362,55 @@ STAT:installer: stage: installer tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS + NEXUS_PATH: MP-STATS + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: - develop - master needs: ["STAT:build"] - variables: - APP_NAME: MP.Stats - NEXUS_PATH: MP-STATS - before_script: - # - *nuget-fix - # - dotnet restore script: - - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj -o:publish + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish + # qui il deploy su nexus... + - *hashBuild + - *nexusUpload + +MON:installer: + stage: installer + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + NEXUS_PATH: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + only: + - develop + - master + needs: ["MON:build"] + script: + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish # qui il deploy su nexus... - *hashBuild - *nexusUpload - LAND:release: stage: release tags: - win + variables: + APP_NAME: MP.Land + SOL_NAME: MP-LAND + NEXUS_PATH: MP-LAND + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: #- feature/Deploy_CI_CD # - master @@ -260,13 +422,19 @@ LAND:release: paths: - publish/ script: - - dotnet publish -c Release -o ./publish MP.Land/MP.Land.csproj - + - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj PROG:release: stage: release tags: - win + variables: + APP_NAME: MP.Prog + SOL_NAME: MP-PROG + NEXUS_PATH: MP-PROG + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: #- feature/Deploy_CI_CD # - master @@ -278,13 +446,19 @@ PROG:release: paths: - publish/ script: - - dotnet publish -c Release -o ./publish MP.Prog/MP.Prog.csproj - + - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj STAT:release: stage: release tags: - win + variables: + APP_NAME: MP.Stats + SOL_NAME: MP-STATS + NEXUS_PATH: MP-STATS + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" only: #- feature/Deploy_CI_CD # - master @@ -296,6 +470,28 @@ STAT:release: paths: - publish/ script: - - dotnet publish -c Release -o ./publish MP.Stats/MP.Stats.csproj - + - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj +MON:release: + stage: release + tags: + - win + variables: + APP_NAME: MP.Mon + SOL_NAME: MP-MON + NEXUS_PATH: MP-MON + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + only: + #- feature/Deploy_CI_CD + # - master + - tags + except: + - branches + needs: ["MON:build"] + artifacts: + paths: + - publish/ + script: + - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj diff --git a/MP-MON.sln b/MP-MON.sln index 538dd50f..4e8c2f87 100644 --- a/MP-MON.sln +++ b/MP-MON.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.32126.317 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Mon", "MP.Mon\MP.Mon.csproj", "{7780FA7A-3597-4098-81C1-DC9AD6AE7A98}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/MP.Data/Controllers/MpMonController.cs b/MP.Data/Controllers/MpMonController.cs new file mode 100644 index 00000000..9c2ed87b --- /dev/null +++ b/MP.Data/Controllers/MpMonController.cs @@ -0,0 +1,138 @@ +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace MP.Data.Controllers +{ + public class MpMonController : IDisposable + { + #region Private Fields + + private static IConfiguration _configuration; + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Private Fields + + #region Public Constructors + + public MpMonController(IConfiguration configuration) + { + _configuration = configuration; + Log.Info("Avviata classe MpMonController"); + } + + #endregion Public Constructors + + #region Public Methods + + /// + /// Elenco tabella Articoli da filtro + /// + /// + /// + /// + public List ArticoliGetSearch(int numRecord, string searchVal = "") + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + dbResult = dbCtx + .DbSetArticoli + .Where(x => x.CodArticolo.Contains(searchVal) || x.DescArticolo.Contains(searchVal) || x.Disegno.Contains(searchVal) || string.IsNullOrEmpty(searchVal)) + .OrderBy(x => x.CodArticolo) + .Take(numRecord) + .ToList(); + } + return dbResult; + } + + public void Dispose() + { + } + + /// + /// Elenco da tabella Macchine + /// + /// + public List MacchineGetAll() + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + dbResult = dbCtx + .DbSetMacchine + .OrderBy(x => x.IdxMacchina) + .ToList(); + } + return dbResult; + } + + /// + /// Elenco da tabella Macchine + /// + /// + public List ConfigGetAll() + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + dbResult = dbCtx + .DbSetConfig + .OrderBy(x => x.Chiave) + .ToList(); + } + return dbResult; + } + + /// + /// Elenco da tabella MappaStatoExpl + /// + /// + public List MseGetAll(int maxAge = 2000) + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + var maxAgeSec = new SqlParameter("@maxAgeSec", maxAge); + + dbResult = dbCtx + .DbSetMSE + .FromSqlRaw("EXEC stp_MSE_getData @maxAgeSec", maxAgeSec) + .ToList(); + } + return dbResult; + } + + /// + /// Annulla modifiche su una specifica entity (cancel update) + /// + /// + /// + public bool RollBackEntity(object item) + { + bool answ = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + try + { + if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified) + { + dbCtx.Entry(item).Reload(); + } + } + catch (Exception exc) + { + Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}"); + } + } + return answ; + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP.Data/DatabaseModels/ConfigModel.cs b/MP.Data/DatabaseModels/ConfigModel.cs new file mode 100644 index 00000000..eb4a1ac3 --- /dev/null +++ b/MP.Data/DatabaseModels/ConfigModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace MP.Data.DatabaseModels +{ + [Table("Config")] + public partial class ConfigModel + { + public string Chiave { get; set; } + public string Valore { get; set; } + /// + /// Valore di default/riferimento per la variabile + /// + public string ValoreStd { get; set; } + public string Note { get; set; } + } +} diff --git a/MP.Data/DatabaseModels/MappaStatoExpl.cs b/MP.Data/DatabaseModels/MappaStatoExpl.cs new file mode 100644 index 00000000..5ec09875 --- /dev/null +++ b/MP.Data/DatabaseModels/MappaStatoExpl.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace MP.Data.DatabaseModels +{ + public partial class MappaStatoExpl + { + public int RowNum { get; set; } + public DateTime? LastUpdate { get; set; } + public string IdxMacchina { get; set; } + public string CodMacchina { get; set; } + public string Nome { get; set; } + public string Url { get; set; } + public int? IdxOdl { get; set; } + public string CodArticolo { get; set; } + public string Disegno { get; set; } + public int? NumPezzi { get; set; } + public decimal? TCAssegnato { get; set; } + public DateTime? DataInizioOdl { get; set; } + public string Semaforo { get; set; } + public int? IdxStato { get; set; } + public string DescrizioneStato { get; set; } + public double? Durata { get; set; } + public int? PezziProd { get; set; } + public int? PezziConf { get; set; } + public decimal? TempoOn { get; set; } + public decimal? TempoAuto { get; set; } + public decimal? TempoRun { get; set; } + public decimal? TCMedio { get; set; } + public decimal? TCLav { get; set; } + public decimal? TCEff { get; set; } + public decimal? TCMedioRt { get; set; } + public decimal? TCLavRT { get; set; } + public decimal? TCEffRT { get; set; } + } +} diff --git a/MP.Data/MP.Data.csproj b/MP.Data/MP.Data.csproj index f7007495..41f08fa6 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/MoonProContext.cs b/MP.Data/MoonProContext.cs new file mode 100644 index 00000000..957d91ae --- /dev/null +++ b/MP.Data/MoonProContext.cs @@ -0,0 +1,232 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.Extensions.Configuration; +using MP.Data.DatabaseModels; +using NLog; + +#nullable disable + +namespace MP.Data +{ + public partial class MoonProContext : DbContext + { + #region Private Fields + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + private IConfiguration _configuration; + + #endregion Private Fields + + #region Public Constructors + + public MoonProContext(IConfiguration configuration) + { + _configuration = configuration; + } + + public MoonProContext(DbContextOptions options) : base(options) + { + } + + #endregion Public Constructors + + #region Public Properties + + public virtual DbSet DbSetArticoli { get; set; } + public virtual DbSet DbSetMacchine { get; set; } + public virtual DbSet DbSetMSE { get; set; } + public virtual DbSet DbSetConfig { get; set; } + + #endregion Public Properties + + #region Private Methods + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + + #endregion Private Methods + + #region Protected Methods + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + if (!optionsBuilder.IsConfigured) + { + string connString = _configuration.GetConnectionString("Mp.Mon"); + + optionsBuilder.UseSqlServer(connString); + //optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;"); + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS"); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToView("v_UI_AnagArticoli"); + + entity.Property(e => e.CodArticolo) + .IsRequired() + .HasMaxLength(50); + + entity.Property(e => e.DescArticolo) + .IsRequired() + .HasMaxLength(250); + + entity.Property(e => e.Disegno) + .IsRequired() + .HasMaxLength(50); + + entity.Property(e => e.Tipo) + .IsRequired() + .HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToView("Macchine"); + + entity.Property(e => e.CodMacchina).HasMaxLength(50); + + entity.Property(e => e.Descrizione).HasMaxLength(50); + + entity.Property(e => e.IdxMacchina) + .IsRequired() + .HasMaxLength(50); + + entity.Property(e => e.Nome).HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.RowNum); + + entity.ToTable("MappaStatoExpl"); + + entity.Property(e => e.CodArticolo) + .HasMaxLength(50) + .HasDefaultValueSql("('-')"); + + entity.Property(e => e.CodMacchina).HasMaxLength(50); + + entity.Property(e => e.DataInizioOdl) + .HasColumnType("datetime") + .HasColumnName("DataInizioODL"); + + entity.Property(e => e.DescrizioneStato) + .HasMaxLength(50) + .HasDefaultValueSql("('n.d.')"); + + entity.Property(e => e.Disegno) + .HasMaxLength(50) + .HasDefaultValueSql("('')"); + + entity.Property(e => e.Durata) + .HasColumnName("durata") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.IdxMacchina).HasMaxLength(50); + + entity.Property(e => e.IdxOdl).HasColumnName("idxODL"); + + entity.Property(e => e.IdxStato) + .HasColumnName("idxStato") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.LastUpdate) + .HasColumnType("datetime") + .HasColumnName("lastUpdate"); + + entity.Property(e => e.Nome).HasMaxLength(50); + + entity.Property(e => e.PezziConf).HasDefaultValueSql("((0))"); + + entity.Property(e => e.PezziProd).HasDefaultValueSql("((0))"); + + entity.Property(e => e.Semaforo) + .HasMaxLength(50) + .HasDefaultValueSql("('')"); + + entity.Property(e => e.TCAssegnato) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCAssegnato") + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.TCEff) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCEff") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TCEffRT) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCEffRT") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TCLav) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCLav") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TCLavRT) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCLavRT") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TCMedio) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCMedio") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TCMedioRt) + .HasColumnType("decimal(18, 8)") + .HasColumnName("TCMedioRT") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TempoAuto) + .HasColumnType("decimal(18, 8)") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TempoOn) + .HasColumnType("decimal(18, 8)") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TempoRun) + .HasColumnType("decimal(18, 8)") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Url) + .HasMaxLength(250) + .HasColumnName("url"); + }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Chiave); + + entity.ToTable("Config"); + + entity.Property(e => e.Chiave) + .HasMaxLength(50) + .HasColumnName("chiave"); + + entity.Property(e => e.Note).HasColumnName("note"); + + entity.Property(e => e.Valore).HasColumnName("valore"); + + entity.Property(e => e.ValoreStd) + .HasColumnName("valoreStd") + .HasComment("Valore di default/riferimento per la variabile"); + }); + + OnModelCreatingPartial(modelBuilder); + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.Mon/.config/dotnet-tools.json b/MP.Mon/.config/dotnet-tools.json new file mode 100644 index 00000000..b0e38abd --- /dev/null +++ b/MP.Mon/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file diff --git a/MP.Mon/Components/CmpFooter.razor b/MP.Mon/Components/CmpFooter.razor index 74a64b8b..507af4e6 100644 --- a/MP.Mon/Components/CmpFooter.razor +++ b/MP.Mon/Components/CmpFooter.razor @@ -3,13 +3,45 @@ Mapo MON @(DateTime.Today.Year) | v.@version
- @adesso | Egalware + @($"{DateTime.Now:HH:mm:ss}") | Egalware
@code { - protected DateTime adesso = DateTime.Now; Version version = typeof(Program).Assembly.GetName().Version; + protected override async Task OnInitializedAsync() + { + StartTimer(); + } + + public void Dispose() + { + aTimer.Stop(); + aTimer.Dispose(); + } + + private static System.Timers.Timer aTimer; + + public void StartTimer() + { + int tOutPeriod = 1000; + //int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod); + aTimer = new System.Timers.Timer(tOutPeriod); + aTimer.Elapsed += ElapsedTimer; + aTimer.Enabled = true; + aTimer.Start(); + } + + public void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e) + { + var pUpd = Task.Run(async () => + { + //await ReloadData(); + await Task.Delay(1); + await InvokeAsync(StateHasChanged); + }); + pUpd.Wait(); + } } \ No newline at end of file diff --git a/MP.Mon/Components/CmpHeader.razor b/MP.Mon/Components/CmpHeader.razor new file mode 100644 index 00000000..1c2ae42d --- /dev/null +++ b/MP.Mon/Components/CmpHeader.razor @@ -0,0 +1,49 @@ +
+ + MP MONitor +
+
+ + @($"{DateTime.Now:dddd dd MMMM yyyy}") + + + EgalWare +
+ +@code { + + //protected override async Task OnInitializedAsync() + //{ + // StartTimer(); + //} + + //public void Dispose() + //{ + // aTimer.Stop(); + // aTimer.Dispose(); + //} + + //private static System.Timers.Timer aTimer; + + //public void StartTimer() + //{ + // int tOutPeriod = 60000; + // //int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod); + // aTimer = new System.Timers.Timer(tOutPeriod); + // aTimer.Elapsed += ElapsedTimer; + // aTimer.Enabled = true; + // aTimer.Start(); + //} + + //public void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e) + //{ + // var pUpd = Task.Run(async () => + // { + // //await ReloadData(); + // await Task.Delay(1); + // await InvokeAsync(StateHasChanged); + // }); + // pUpd.Wait(); + //} + +} \ No newline at end of file diff --git a/MP.Mon/Components/DetailMSE.razor b/MP.Mon/Components/DetailMSE.razor new file mode 100644 index 00000000..b51ef88c --- /dev/null +++ b/MP.Mon/Components/DetailMSE.razor @@ -0,0 +1,71 @@ +
+ @if (CurrRecord == null || !dataLoaded) + { + + } + else + { +
+
+ @CurrRecord.Nome +
+
+
Art
+
+ @if (showArt == "CodArticolo") + { + @CurrRecord.CodArticolo + } + else + { + if (string.IsNullOrEmpty(CurrRecord.Disegno)) + { + [@CurrRecord.CodArticolo] + } + else + { + @CurrRecord.Disegno + } + } +
+
+
+
@CurrRecord.DescrizioneStato
+
@getMinSec((decimal)CurrRecord.Durata)
+
+
+ @*
OEE
+
xx%
*@ +
TCiclo
+
std: @getMinSec(@CurrRecord.TCAssegnato)
+
act: @getMinSec(@CurrRecord.TCLavRT)
+
+
+ @*
Pezzi
+
prod: @CurrRecord.PezziProd
+
ord: @CurrRecord.NumPezzi
*@ +
Pezzi(prod/ord)
+
@CurrRecord.PezziProd / @CurrRecord.NumPezzi
+
+
+
+
+
+ +
+
+
+ } +
\ No newline at end of file diff --git a/MP.Mon/Components/DetailMSE.razor.cs b/MP.Mon/Components/DetailMSE.razor.cs new file mode 100644 index 00000000..dcc63554 --- /dev/null +++ b/MP.Mon/Components/DetailMSE.razor.cs @@ -0,0 +1,139 @@ +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.Mon; +using MP.Mon.Shared; +using MP.Mon.Components; +using MP.Data.DatabaseModels; + +namespace MP.Mon.Components +{ + public partial class DetailMSE + { + + protected string baseCss = "sem"; + protected bool dataLoaded { get; set; } = false; + protected int kaFactor = 60 / 2; + + [Parameter] + public bool doAnimate { get; set; } = true; + + [Parameter] + public string showArt { get; set; } = ""; + + [Parameter] + public int keepAliveMin { get; set; } = 5; + [Parameter] + public MappaStatoExpl? CurrRecord { get; set; } = null; + + private string cssStatus(string codSemaforo) + { + string codColore = codSemaforo.Substring(1, 2); + string answ = $"{baseCss}{codColore}"; + if (doAnimate && codColore != "Ve") + { + // blink se secondo pari... + DateTime adesso = DateTime.Now; + int resto = 0; + Math.DivRem(adesso.Second, 2, out resto); + if (resto == 0) + { + answ += "_b"; + } + } + return answ; + } + + private string cssComStatus(string semaforo, DateTime? lastUpdateN) + { + DateTime lastUpdate = lastUpdateN.HasValue ? (DateTime)lastUpdateN : DateTime.Now.AddHours(-1); + string answ = cssStatus(semaforo); + if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (keepAliveMin * kaFactor)) + { + answ = $"{baseCss}Ro"; + // blink se secondo pari... + DateTime adesso = DateTime.Now; + int resto = 0; + Math.DivRem(adesso.Second, 2, out resto); + if (resto == 0) + { + answ += "_b"; + } + } + return answ; + } + protected override async Task OnInitializedAsync() + { + StartTimer(); + Random rnd = new Random(); + //await Task.Delay(rnd.Next(500)); + dataLoaded = true; + setupConf(); + } + private void setupConf() + { + //baseCss = doAnimate ? "semBlink" : "sem"; + } + private bool showComErr(DateTime? lastUpdateN) + { + DateTime lastUpdate = lastUpdateN.HasValue ? (DateTime)lastUpdateN : DateTime.Now.AddHours(-1); + bool answ = false; + if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (keepAliveMin * kaFactor)) + { + answ = true; + } + return answ; + } + + private string getMinSec(decimal? currTimeMin) + { + string answ = "nd"; + TimeSpan tSpan = new TimeSpan(0); + try + { + tSpan = TimeSpan.FromMinutes((double)currTimeMin); + answ = $"{tSpan:mm}:{tSpan:ss}"; + } + catch + { } + return answ; + } + public void Dispose() + { + aTimer.Stop(); + aTimer.Dispose(); + } + + private static System.Timers.Timer aTimer = new System.Timers.Timer(60 * 1000); + + public void StartTimer() + { + int tOutPeriod = 1000; + //int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod); + aTimer = new System.Timers.Timer(tOutPeriod); + aTimer.Elapsed += ElapsedTimer; + aTimer.Enabled = true; + aTimer.Start(); + } + + public void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e) + { + var pUpd = Task.Run(async () => + { + await Task.Delay(1); + await InvokeAsync(StateHasChanged); + }); + pUpd.Wait(); + } + } +} \ No newline at end of file diff --git a/MP.Mon/Components/LoadingData.razor b/MP.Mon/Components/LoadingData.razor new file mode 100644 index 00000000..db79a629 --- /dev/null +++ b/MP.Mon/Components/LoadingData.razor @@ -0,0 +1,6 @@ +
+
+

loading data

+ +
+
\ No newline at end of file diff --git a/MP.Mon/Components/LoadingDataSmall.razor b/MP.Mon/Components/LoadingDataSmall.razor new file mode 100644 index 00000000..196dafc7 --- /dev/null +++ b/MP.Mon/Components/LoadingDataSmall.razor @@ -0,0 +1,6 @@ +
+
+ loading data + +
+
\ No newline at end of file diff --git a/MP.Mon/Data/MpDataService.cs b/MP.Mon/Data/MpDataService.cs new file mode 100644 index 00000000..f29f056b --- /dev/null +++ b/MP.Mon/Data/MpDataService.cs @@ -0,0 +1,75 @@ +using MP.Data.DatabaseModels; +using System.Text; + +namespace MP.Mon.Data +{ + public class MpDataService : IDisposable + { + #region Private Fields + + private static IConfiguration _configuration; + private static ILogger _logger; + + #endregion Private Fields + + #region Public Fields + + public static MP.Data.Controllers.MpMonController dbController; + + #endregion Public Fields + + #region Public Constructors + + public MpDataService(IConfiguration configuration, ILogger logger) + { + _logger = logger; + _configuration = configuration; + // conf DB + string connStr = _configuration.GetConnectionString("Mp.Mon"); + if (string.IsNullOrEmpty(connStr)) + { + _logger.LogError("ConnString empty!"); + } + else + { + dbController = new MP.Data.Controllers.MpMonController(configuration); + StringBuilder sb = new StringBuilder(); + sb.AppendLine($"DbController OK"); + //sb.AppendLine($"CST: {dbController.CustomersCount()} | CNT: {dbController.CountersCount()} | BSK: {dbController.BasketsCount()} | NGT: {dbController.NegotiationsCount()} | DOC: {dbController.DocsCount()} | ITM: {dbController.ItemsCount()} | RES: {dbController.ResourcesCount()}"); + _logger.LogInformation(sb.ToString()); + } + } + + #endregion Public Constructors + + #region Public Methods + + public Task> ConfigGetAll() + { + return Task.FromResult(dbController.ConfigGetAll().ToList()); + } + + public void Dispose() + { + // Clear database controller + dbController.Dispose(); + } + + public Task> MacchineGetAll() + { + return Task.FromResult(dbController.MacchineGetAll().ToList()); + } + + public Task> MseGetAll() + { + var dbResult = dbController.MseGetAll(); + if (dbResult == null) + { + dbResult = new List(); + } + return Task.FromResult(dbResult); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP.Mon/Data/WeatherForecast.cs b/MP.Mon/Data/WeatherForecast.cs deleted file mode 100644 index c0004e5e..00000000 --- a/MP.Mon/Data/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace MP.Mon.Data -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} \ No newline at end of file diff --git a/MP.Mon/Data/WeatherForecastService.cs b/MP.Mon/Data/WeatherForecastService.cs deleted file mode 100644 index 6b8e22db..00000000 --- a/MP.Mon/Data/WeatherForecastService.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace MP.Mon.Data -{ - public class WeatherForecastService - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateTime startDate) - { - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }).ToArray()); - } - } -} \ No newline at end of file diff --git a/MP.Mon/MP.Mon.csproj b/MP.Mon/MP.Mon.csproj index d7d012c0..50826210 100644 --- a/MP.Mon/MP.Mon.csproj +++ b/MP.Mon/MP.Mon.csproj @@ -7,6 +7,29 @@ + + + + + <_WebToolingArtifacts Remove="Properties\PublishProfiles\FolderProfile.pubxml" /> + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" /> + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" /> + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" /> + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" /> + + + + + + + + + + + + + + diff --git a/MP.Mon/NLog.config b/MP.Mon/NLog.config new file mode 100644 index 00000000..bd414080 --- /dev/null +++ b/MP.Mon/NLog.config @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MP.Mon/Pages/Counter.razor b/MP.Mon/Pages/Counter.razor deleted file mode 100644 index ef23cb31..00000000 --- a/MP.Mon/Pages/Counter.razor +++ /dev/null @@ -1,18 +0,0 @@ -@page "/counter" - -Counter - -

Counter

- -

Current count: @currentCount

- - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } -} diff --git a/MP.Mon/Pages/FetchData.razor b/MP.Mon/Pages/FetchData.razor deleted file mode 100644 index b5ba00c3..00000000 --- a/MP.Mon/Pages/FetchData.razor +++ /dev/null @@ -1,48 +0,0 @@ -@page "/fetchdata" - -Weather forecast - -@using MP.Mon.Data -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[]? forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateTime.Now); - } -} diff --git a/MP.Mon/Pages/Index.razor b/MP.Mon/Pages/Index.razor index 6085c4aa..c3e49606 100644 --- a/MP.Mon/Pages/Index.razor +++ b/MP.Mon/Pages/Index.razor @@ -1,9 +1,48 @@ @page "/" + + Index -

Hello, world!

-Welcome to your new app. - +
+ @if (ListMSE == null) + { +
+ +
+ } + else if (ListMSE.Count == 0) + { +
+
+ No data found +
+
+ } + else + { + int currIdx = 0; + foreach (var macchina in ListMSE) + { + + currIdx++; + if (currIdx >= maxCol) + { + currIdx = 0; + @((MarkupString)"
") + ; + } + } + // controllo se devo "chiudere riga... + int currNum = (currIdx % maxCol); + while (currNum < (maxCol)) + { + @((MarkupString)"
 
") + ; + currNum++; + + } + } +
diff --git a/MP.Mon/Pages/Index.razor.cs b/MP.Mon/Pages/Index.razor.cs new file mode 100644 index 00000000..5c9f9033 --- /dev/null +++ b/MP.Mon/Pages/Index.razor.cs @@ -0,0 +1,177 @@ +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.Mon; +using MP.Mon.Shared; +using MP.Mon.Components; +using MP.Data.DatabaseModels; +using MP.Mon.Components; +using MP.Mon.Data; +using NLog; + +namespace MP.Mon.Pages +{ + public partial class Index : IDisposable + { + protected List? ListMSE = null; + List? CurrConfig = null; + + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + protected int keepAliveMin = 1; + + protected int maxCol = 4; + + protected bool doAnimate = true; + + protected string showArt = ""; + + protected int slowRefreshSec = 300; + protected int fastRefreshSec = 10; + + + protected int slowRefreshMs + { + get => 1000 * slowRefreshSec; + } + protected int fastRefreshMs + { + get => 1000 * fastRefreshSec; + } + + protected override async Task OnInitializedAsync() + { + await setupConf(); + await ReloadData(); + StartTimer(); + } + + + [Inject] + protected MpDataService MMDataService { get; set; } = null!; + + [Inject] + protected NavigationManager NavManager { get; set; } = null!; + + private async Task setupConf() + { + CurrConfig = await MMDataService.ConfigGetAll(); + if (CurrConfig != null && CurrConfig.Count > 0) + { + // sistemo i parametri opzionali... + + getConfValInt("keepAliveMin", ref keepAliveMin); + getConfValInt("MON_maxCol", ref maxCol); + int intDoAnim = 0; + getConfValInt("doAnimate", ref intDoAnim); + doAnimate = intDoAnim == 1; + getConfValInt("pageRefreshSec", ref slowRefreshSec); + getConfValInt("MSE_cacheDuration", ref fastRefreshSec); + getConfVal("sART", ref showArt); + + Log.Info($"Effettuato setup parametri | keepAlive: {keepAliveMin} | MaxCol: {maxCol} | doAnimate: {doAnimate} | slowRefreshSec: {slowRefreshSec} | fastRefreshSec: {fastRefreshSec}"); + } + } + + /// + /// Recupera il valore e se trovato aggiorna + /// + /// Valore da cercare + /// Int in cui salvare il valore se trovato + /// + protected bool getConfValInt(string chiave, ref int varObj) + { + bool answ = false; + if (CurrConfig != null && CurrConfig.Count > 0) + { + // sistemo i parametri opzionali... + ConfigModel? risultato = CurrConfig.FirstOrDefault(x => x.Chiave == chiave); + if (risultato != null) + { + answ = int.TryParse(risultato.Valore, out varObj); + } + } + return answ; + } + + /// + /// Recupera il valore e se trovato aggiorna + /// + /// Valore da cercare + /// String in cui salvare il valore se trovato + /// + protected bool getConfVal(string chiave, ref string varObj) + { + bool answ = false; + if (CurrConfig != null && CurrConfig.Count > 0) + { + // sistemo i parametri opzionali... + ConfigModel? risultato = CurrConfig.FirstOrDefault(x => x.Chiave == chiave); + if (risultato != null) + { + varObj = risultato.Valore; + answ = !string.IsNullOrEmpty(risultato.Valore); + } + } + return answ; + } + + private async Task ReloadData() + { + ListMSE = await MMDataService.MseGetAll(); + } + + public void Dispose() + { + fastTimer.Stop(); + fastTimer.Dispose(); + slowTimer.Stop(); + slowTimer.Dispose(); + } + + private static System.Timers.Timer fastTimer = new System.Timers.Timer(4000); + private static System.Timers.Timer slowTimer = new System.Timers.Timer(300000); + + public void StartTimer() + { + // timer veloce + fastTimer = new System.Timers.Timer(fastRefreshMs); + fastTimer.Elapsed += ElapsedFastTimer; + fastTimer.Enabled = true; + fastTimer.Start(); + // timer lento + slowTimer = new System.Timers.Timer(slowRefreshMs); + slowTimer.Elapsed += ElapsedSlowTimer; + slowTimer.Enabled = true; + slowTimer.Start(); + } + + public void ElapsedFastTimer(Object source, System.Timers.ElapsedEventArgs e) + { + var pUpd = Task.Run(async () => + { + await ReloadData(); + //await Task.Delay(1); + await InvokeAsync(StateHasChanged); + }); + pUpd.Wait(); + } + + public async void ElapsedSlowTimer(Object source, System.Timers.ElapsedEventArgs e) + { + ListMSE = null; + NavManager.NavigateTo(NavManager.Uri); + } + } +} \ No newline at end of file diff --git a/MP.Mon/Program.cs b/MP.Mon/Program.cs index ff6ffc88..5d1efe06 100644 --- a/MP.Mon/Program.cs +++ b/MP.Mon/Program.cs @@ -26,7 +26,8 @@ var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis); builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); builder.Services.AddSingleton(redisMultiplexer); -builder.Services.AddSingleton(); +builder.Services.AddSingleton(); +//builder.Services.AddScoped(); var app = builder.Build(); diff --git a/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml b/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..62a4ee10 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,16 @@ + + + + + False + False + True + Release + Any CPU + FileSystem + bin\publish\net6.0\ + FileSystem + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml.user b/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 00000000..c4b7871e --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,10 @@ + + + + + <_PublishTargetUrl>C:\Users\samuele\source\repos\MAPO-CORE\MP.Mon\bin\publish\net6.0\ + True|2021-05-25T06:38:44.6280246Z; + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS01.pubxml b/MP.Mon/Properties/PublishProfiles/IIS01.pubxml new file mode 100644 index 00000000..94b80775 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS01.pubxml @@ -0,0 +1,28 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://iis01.egalware.com:8172/MsDeploy.axd + Default Web Site/MP/MON + + False + WMSVC + True + jenkins + <_SavePWD>True + net6.0 + True + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS01.pubxml.user b/MP.Mon/Properties/PublishProfiles/IIS01.pubxml.user new file mode 100644 index 00000000..148b0929 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS01.pubxml.user @@ -0,0 +1,12 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAACFCXZ0UR7Czo59aaRCHU5QAAAAAASAAACgAAAAEAAAACYlKt9E6s77uEikpKwyhdQYAAAAUwae989LovFbsfjRp69HCVpyUQZbqLyYFAAAAMW8mLSAxWmKaOvB4nkDgUpS27/b + True|2022-04-14T07:37:09.1341280Z;True|2022-02-26T18:24:32.0833123+01:00;False|2022-02-26T18:24:15.3994092+01:00;False|2022-02-26T18:23:44.8358586+01:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS02.pubxml b/MP.Mon/Properties/PublishProfiles/IIS02.pubxml new file mode 100644 index 00000000..679f87f6 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS02.pubxml @@ -0,0 +1,28 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://iis02.egalware.com:8172/MsDeploy.axd + Default Web Site/MP/MON + + False + WMSVC + True + jenkins + <_SavePWD>True + net6.0 + True + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS02.pubxml.user b/MP.Mon/Properties/PublishProfiles/IIS02.pubxml.user new file mode 100644 index 00000000..cccd5396 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS02.pubxml.user @@ -0,0 +1,12 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAAB3zVMW24A4himhWJ5CNqgeAAAAAASAAACgAAAAEAAAAA7IL1n8zHn2/ljDNL4/zlsYAAAAgAEg9RYKHV0xl3wnafZiN9Q954GOBAvdFAAAACSBJkwDndNTiIrUuk7zJls84fN1 + True|2022-02-26T17:24:42.6534875Z;True|2021-05-26T19:49:44.3836006+02:00; + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS03.pubxml b/MP.Mon/Properties/PublishProfiles/IIS03.pubxml new file mode 100644 index 00000000..4eda79b9 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS03.pubxml @@ -0,0 +1,28 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://iis03.egalware.com:8172/MsDeploy.axd + Default Web Site/MP/MON + + False + WMSVC + True + jenkins + <_SavePWD>True + net6.0 + True + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IIS03.pubxml.user b/MP.Mon/Properties/PublishProfiles/IIS03.pubxml.user new file mode 100644 index 00000000..d5ad4521 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IIS03.pubxml.user @@ -0,0 +1,12 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAADHiGtCyOetOyeT2xaFL+NDAAAAAASAAACgAAAAEAAAAAuYw1PbVDVdZhloQ7eVuTsYAAAAfA8iFmY49U48HUeRwWwQNsvZg5FRMf9SFAAAACB+0njgnTZ+1teEqoJcNV16idHL + True|2022-02-26T17:27:10.4709417Z;True|2021-05-26T19:49:56.4831784+02:00;True|2021-05-25T16:56:57.0194126+02:00;True|2021-05-24T18:44:45.5388713+02:00;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml b/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml new file mode 100644 index 00000000..5e8fb7c3 --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml @@ -0,0 +1,21 @@ + + + + + Package + Release + Any CPU + + True + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + bin\publish\MP.Mon.zip + true + Default Web Site/MP/MON + net6.0 + false + + \ No newline at end of file diff --git a/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml.user b/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml.user new file mode 100644 index 00000000..105ac0ab --- /dev/null +++ b/MP.Mon/Properties/PublishProfiles/IISProfile.pubxml.user @@ -0,0 +1,11 @@ + + + + + + True|2021-05-27T09:13:55.8234781Z;True|2021-05-26T19:51:13.5051479+02:00;True|2021-05-26T19:51:04.9283608+02:00;True|2021-05-25T16:38:26.4142377+02:00; + + \ No newline at end of file diff --git a/MP.Mon/Resources/ChangeLog-original.html b/MP.Mon/Resources/ChangeLog-original.html new file mode 100644 index 00000000..04abd704 --- /dev/null +++ b/MP.Mon/Resources/ChangeLog-original.html @@ -0,0 +1,25 @@ + + Modulo MON MAPO +

Versione: {{CURRENT-REL}}

+
Note di rilascio: +
    +
  • + Ultime modifiche: +
      {{LAST-CHANGES}}
    +
  • +
  • + v.6.15.* → +
      +
    • Prima release dotnet6
    • +
    +
  • +
+
+
+ +
+ +
+ \ No newline at end of file diff --git a/MP.Mon/Resources/ChangeLog.html b/MP.Mon/Resources/ChangeLog.html new file mode 100644 index 00000000..6bff319c --- /dev/null +++ b/MP.Mon/Resources/ChangeLog.html @@ -0,0 +1,27 @@ + + Modulo statistiche MAPO +

Versione: 6.15.2204.1414

+
+ Note di rilascio: +
    +
  • + Ultime modifiche: +
      {{LAST-CHANGES}}
    +
  • +
  • + v.1.* → +
      +
    • Prima release dotnet5
    • +
    • Integrazione EFCore
    • +
    +
  • +
+
+
+ +
+ +
+ diff --git a/MP.Mon/Resources/VersNum.txt b/MP.Mon/Resources/VersNum.txt new file mode 100644 index 00000000..6cce0e03 --- /dev/null +++ b/MP.Mon/Resources/VersNum.txt @@ -0,0 +1 @@ +6.15.2204.1414 diff --git a/MP.Mon/Resources/logoSteamware.png b/MP.Mon/Resources/logoSteamware.png new file mode 100644 index 00000000..0958b50a Binary files /dev/null and b/MP.Mon/Resources/logoSteamware.png differ diff --git a/MP.Mon/Resources/manifest-original.xml b/MP.Mon/Resources/manifest-original.xml new file mode 100644 index 00000000..f95e0763 --- /dev/null +++ b/MP.Mon/Resources/manifest-original.xml @@ -0,0 +1,7 @@ + + + 1.0.0.0 + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip + https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html + false + diff --git a/MP.Mon/Resources/manifest.xml b/MP.Mon/Resources/manifest.xml new file mode 100644 index 00000000..0455729b --- /dev/null +++ b/MP.Mon/Resources/manifest.xml @@ -0,0 +1,7 @@ + + + 6.15.2204.1414 + https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip + https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html + false + diff --git a/MP.Mon/Shared/MainLayout.razor b/MP.Mon/Shared/MainLayout.razor index 7da4e90a..8d4876e5 100644 --- a/MP.Mon/Shared/MainLayout.razor +++ b/MP.Mon/Shared/MainLayout.razor @@ -3,21 +3,30 @@ MP.Mon
- -
-
- About + @*
+
+ + MP MONitor +
+
+ + @($"{DateTime.Now:dddd dd MMMM yyyy, HH:mm}") + + + EgalWare +
+
*@ +
+
-
+
@Body
-
+
diff --git a/MP.Mon/Shared/MainLayout.razor.css b/MP.Mon/Shared/MainLayout.razor.css index 495fb804..f46e7c65 100644 --- a/MP.Mon/Shared/MainLayout.razor.css +++ b/MP.Mon/Shared/MainLayout.razor.css @@ -8,19 +8,19 @@ main { flex: 1; } -.sidebar,.sidebarSmall { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%); -} - .top-row { - background-color: #f7f7f7; - border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; - height: 3.5rem; + background-color: #000000; + /*border-bottom: 1px solid #696969;*/ + color: #696969; + font-size: 1.4em; + height: 3rem; display: flex; align-items: center; - /*justify-content: space-evenly; - display: flex;*/ + justify-content: space-evenly; +} + +.mainHead{ + font-size: 1.7rem; } .top-row ::deep a, diff --git a/MP.Mon/appsettings.json b/MP.Mon/appsettings.json index 5d591d56..f83e95f8 100644 --- a/MP.Mon/appsettings.json +++ b/MP.Mon/appsettings.json @@ -6,9 +6,10 @@ } }, "AllowedHosts": "*", - "CodApp": "BlazorServerApp-2022", + "CodApp": "MP.MON", "ConnectionStrings": { - "GPW.DB": "Server=SQL2016DEV;Database=MonPro_Anagrafica; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=Blazor.ServerApp;", + "MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=Blazor.ServerApp;", + "MP.Stats": "Server=SQL2016DEV;Database=MoonPro_STATS; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=Blazor.ServerApp;", "Redis": "localhost:6379,DefaultDatabase=13,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false" } } diff --git a/MP.Mon/compilerconfig.json b/MP.Mon/compilerconfig.json new file mode 100644 index 00000000..caa3f6ec --- /dev/null +++ b/MP.Mon/compilerconfig.json @@ -0,0 +1,10 @@ +[ + { + "outputFile": "wwwroot/css/site.css", + "inputFile": "wwwroot/css/site.less" + }, + { + "outputFile": "wwwroot/css/fonts.css", + "inputFile": "wwwroot/css/fonts.less" + } +] \ No newline at end of file diff --git a/MP.Mon/compilerconfig.json.defaults b/MP.Mon/compilerconfig.json.defaults new file mode 100644 index 00000000..41870cc5 --- /dev/null +++ b/MP.Mon/compilerconfig.json.defaults @@ -0,0 +1,71 @@ +{ + "compilers": { + "less": { + "autoPrefix": "", + "cssComb": "none", + "ieCompat": true, + "math": null, + "strictMath": false, + "strictUnits": false, + "relativeUrls": true, + "rootPath": "", + "sourceMapRoot": "", + "sourceMapBasePath": "", + "sourceMap": false + }, + "sass": { + "autoPrefix": "", + "loadPaths": "", + "style": "expanded", + "relativeUrls": true, + "sourceMap": false + }, + "nodesass": { + "autoPrefix": "", + "includePath": "", + "indentType": "space", + "indentWidth": 2, + "outputStyle": "nested", + "precision": 5, + "relativeUrls": true, + "sourceMapRoot": "", + "lineFeed": "", + "sourceMap": false + }, + "stylus": { + "sourceMap": false + }, + "babel": { + "sourceMap": false + }, + "coffeescript": { + "bare": false, + "runtimeMode": "node", + "sourceMap": false + }, + "handlebars": { + "root": "", + "noBOM": false, + "name": "", + "namespace": "", + "knownHelpersOnly": false, + "forcePartial": false, + "knownHelpers": [], + "commonjs": "", + "amd": false, + "sourceMap": false + } + }, + "minifiers": { + "css": { + "enabled": true, + "termSemicolons": true, + "gzip": false + }, + "javascript": { + "enabled": true, + "termSemicolons": true, + "gzip": false + } + } +} \ No newline at end of file diff --git a/MP.Mon/wwwroot/css/site.css b/MP.Mon/wwwroot/css/site.css index 4a8ba847..77ec9693 100644 --- a/MP.Mon/wwwroot/css/site.css +++ b/MP.Mon/wwwroot/css/site.css @@ -15,10 +15,17 @@ display-4 { font-family: 'Lato', sans-serif; } html, +body { + height: 100%; +} +html, body { /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/ font-family: 'Roboto Condensed', sans-serif; - line-height: 1.3; + line-height: 1.25; + background-image: linear-gradient(180deg, #010816 20%, #3aa6ff 90%); + background-size: auto 100%; + background-repeat: no-repeat; } h1:focus { outline: none; @@ -53,89 +60,6 @@ a, .striked { text-decoration: line-through; } -/* Gestione dropdown menu x week planner */ -.dropdown { - position: relative; - display: inline-block; -} -.dropdown:hover .dropdown-content, -.dropdown:hover .dropdown-content-top, -.dropdown:hover .dropdown-content-left, -.dropdown:hover .dropdown-content-top-left { - display: block; -} -.dropdown-content { - display: none; - position: absolute; - left: -10em; - min-width: 8em; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; -} -.dropdown-content .a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} -.dropdown-content .a:hover { - background-color: #ddd; -} -.dropdown-content-top { - display: none; - position: absolute; - min-width: 8em; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; - top: -13.5em; - left: -10em; -} -.dropdown-content-top .a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} -.dropdown-content-top .a:hover { - background-color: #ddd; -} -.dropdown-content-left { - display: none; - position: absolute; - left: -10em; - min-width: 8em; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; - left: -24em; -} -.dropdown-content-left .a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} -.dropdown-content-left .a:hover { - background-color: #ddd; -} -.dropdown-content-top-left { - display: none; - position: absolute; - left: -10em; - min-width: 8em; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1; - top: -13.5em; - left: -24em; -} -.dropdown-content-top-left .a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} -.dropdown-content-top-left .a:hover { - background-color: #ddd; -} .textTrim { white-space: nowrap; overflow: hidden; @@ -216,109 +140,235 @@ a, .blazor-error-boundary::after { content: "An error has occurred."; } -/*------------------------------------------------------------------ -[ Shortcuts / .shortcuts ] -*/ -.shortcuts { - text-align: center; +/* Gestione specifica oggetti MON*/ +/* MAIN: gestione layout dinamico mappa... */ +.fontSmall { + font-size: 0.75em; } -.shortcuts .shortcut-icon { - font-size: 2rem; +.fontSmaller { + font-size: 0.6em; } -.shortcuts .shortcut { - min-width: 9rem; - min-height: 5rem; - display: inline-block; - padding: 2rem/3 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: 1rem/2; +.statusMap { + /*background: rgba(0,0,0,0.3);*/ } -.shortcuts .shortcut-sm { - min-width: 4.5rem; - min-height: 3rem; - display: inline-block; - padding: 1rem/4 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: 1rem/2; -} -.shortcuts .shortcut .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: 2rem; - color: #333; -} -.shortcuts .shortcut-sm .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: 2rem; - color: #333; -} -.shortcuts .shortcut:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); -} -.shortcuts .shortcut-sm:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); -} -.shortcuts .shortcut:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.shortcuts .shortcut-sm:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.shortcuts .shortcut:hover .shortcut-icon { - color: #C93; -} -.shortcuts .shortcut-sm:hover .shortcut-icon { - color: #666; -} -.shortcuts .shortcut-label { - display: block; - margin-top: 0.75em; +.statusMap .ui-title, +.statusMap .ui-li-aside { font-weight: 400; - color: #666; + text-transform: uppercase; + font-size: 2.5em; + line-height: 1.1em; + color: #DEDEDE; + text-shadow: 2px 2px 4px #000; + text-align: center; + background: linear-gradient(270deg, rgba(20, 20, 20, 0.7), rgba(100, 100, 100, 0.7), rgba(20, 20, 20, 0.7)); } -@media (max-width: 640px) { - .shortcuts .shortcut { - min-width: 8rem; - min-height: 4rem; +.statusMap .ui-footer { + color: #CDCDCD; + background: linear-gradient(270deg, rgba(10, 10, 10, 0.7), rgba(80, 80, 80, 0.7), rgba(10, 10, 10, 0.7)); +} +.machBlock { + padding: 0 2px 0 2px; +} +/* END: gestione layout dinamico mappa... */ +/* area semafori*/ +.semBlinkVe, +.semFixVe, +.semFixVe_b, +.semVe, +.semVe_b { + background: #009036; + background: rgba(0, 255, 80, 0.6); + color: #FFFFAA; +} +.semBlinkGr, +.semFixGr, +.semFixGr_b, +.semGr, +.semGr_b { + background-color: #bcbcbc; + background: rgba(180, 180, 180, 0.6); +} +.semGi { + text-align: left; + background: #8a8d27; + background: rgba(230, 210, 0, 0.6); + padding: 0px 4px 0px 4px; + color: #000; +} +.semGi_b, +.semFixGi, +.semFixGi_b { + text-align: left; + background: #f9ff18; + background: rgba(255, 255, 0, 0.8); + padding: 0px 4px 0px 4px; + color: #333; +} +.semBl { + text-align: left; + background: #000E7A; + background: rgba(0, 5, 200, 0.6); + padding: 0px 4px 0px 4px; + color: #959500; +} +.semBl_b, +.semFixBl, +.semFixBl_b { + text-align: left; + background: #243FFF; + background: rgba(60, 80, 255, 0.8); + padding: 0px 4px 0px 4px; + color: #ffff32; +} +.semRo { + text-align: left; + background-color: #7a000e; + background: rgba(200, 0, 5, 0.6); + padding: 0px 4px 0px 4px; + color: #959500; +} +.semRo_b, +.semFixRo, +.semFixRo_b { + text-align: left; + background-color: #ff243f; + background: rgba(255, 60, 80, 0.8); + padding: 0px 4px 0px 4px; + color: #ffff32; +} +/* semafori con animazione blinking */ +.no-cpu { + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} +@-webkit-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} +@-moz-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} +@-o-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} +@keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} +.semBlinkGi { + background: linear-gradient(270deg, #8a8d27, #f9ff18); + background-size: 400% 400%; + -webkit-animation: blinkBack 2s ease infinite; + -moz-animation: blinkBack 2s ease infinite; + -o-animation: blinkBack 2s ease infinite; + animation: blinkBack 2s ease infinite; +} +.semBlinkRo { + background: linear-gradient(270deg, #7a000e, #ff243f); + background-size: 400% 400%; + -webkit-animation: blinkBack 2s ease infinite; + -moz-animation: blinkBack 2s ease infinite; + -o-animation: blinkBack 2s ease infinite; + animation: blinkBack 2s ease infinite; + color: Yellow; +} +/* Gestione size caratteri */ +.mainHead, +.logoImg { + height: 1.6em; +} +@media all and (min-width: 425px) { + .mainHead { + font-size: 1.3em; } body { font-size: 0.8em; } + .logoImg { + height: 30px; + } +} +@media all and (min-width: 768px) { + .mainHead { + font-size: 1.4em; + } + body { + font-size: 1em; + } + .logoImg { + height: 35px; + } +} +@media all and (min-width: 800px) { + body { + font-size: 0.6em; + } +} +@media all and (min-width: 1024px) { + body { + font-size: 0.7em; + } +} +@media all and (min-width: 1280px) { + body { + font-size: 0.8em; + } +} +@media all and (min-width: 1440px) { + body { + font-size: 1em; + } +} +@media all and (min-width: 1680px) { + body { + font-size: 1.1em; + } +} +@media all and (min-width: 1920px) { + body { + font-size: 1.3em; + } +} +@media all and (min-width: 2560px) { + body { + font-size: 3em; + } +} +@media all and (max-width: 425px) { + body { + font-size: 0.7em; + } } \ No newline at end of file diff --git a/MP.Mon/wwwroot/css/site.less b/MP.Mon/wwwroot/css/site.less index bda17c4b..14591c1a 100644 --- a/MP.Mon/wwwroot/css/site.less +++ b/MP.Mon/wwwroot/css/site.less @@ -6,10 +6,17 @@ h1, h2, h3, h4, h5, h6, b, display-1, display-2, display-3, display-4 { font-family: 'Lato', sans-serif; } +html, body { + height: 100%; +} + html, body { /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/ font-family: 'Roboto Condensed', sans-serif; - line-height: 1.3; + line-height: 1.25; + background-image: linear-gradient(180deg, rgb(1, 8, 22) 20%, #3aa6ff 90%); + background-size: auto 100%; + background-repeat: no-repeat; } @@ -55,61 +62,6 @@ a, .btn-link { text-decoration: line-through; } - -/* Gestione dropdown menu x week planner */ - -@dropTop: -13.5em; -@dropLeftL: -10em; -@dropLeftR: -24em; - -.dropdown { - position: relative; - display: inline-block; - - &:hover .dropdown-content, &:hover .dropdown-content-top, &:hover .dropdown-content-left, &:hover .dropdown-content-top-left { - display: block; - } -} - -.dropdown-content { - display: none; - position: absolute; - left: @dropLeftL; - min-width: 8em; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - z-index: 1; - - .a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; - } - - .a:hover { - background-color: #ddd; - } -} - - -.dropdown-content-top { - .dropdown-content(); - top: @dropTop; - left: @dropLeftL; -} - -.dropdown-content-left { - .dropdown-content(); - left: @dropLeftR; -} - -.dropdown-content-top-left { - .dropdown-content(); - top: @dropTop; - left: @dropLeftR; -} - - .textTrim { white-space: nowrap; overflow: hidden; @@ -191,128 +143,279 @@ a, .btn-link { .blazor-error-boundary::after { content: "An error has occurred." } - - -/*------------------------------------------------------------------ -[ Shortcuts / .shortcuts ] -*/ - -@blSCut: 1rem; - -.shortcuts { - text-align: center; +/* Gestione specifica oggetti MON*/ +/* MAIN: gestione layout dinamico mappa... */ +.fontSmall { + font-size: 0.75em; } -.shortcuts .shortcut-icon { - font-size: 2*@blSCut; +.fontSmaller { + font-size: 0.6em; } -.shortcuts .shortcut { - min-width: @blSCut * 9; - min-height: @blSCut * 5; - display: inline-block; - padding: @blSCut*2/3 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: @blSCut/2; +.statusMap { + /*background: rgba(0,0,0,0.3);*/ } -.shortcuts .shortcut-sm { - min-width: @blSCut * 4.5; - min-height: @blSCut * 3; - display: inline-block; - padding: @blSCut/4 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: @blSCut/2; -} - -.shortcuts .shortcut .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: @blSCut*2; - color: #333; -} - -.shortcuts .shortcut-sm .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: @blSCut*2; - color: #333; -} - -.shortcuts .shortcut:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); -} - -.shortcuts .shortcut-sm:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); -} - -.shortcuts .shortcut:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.shortcuts .shortcut-sm:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.shortcuts .shortcut:hover .shortcut-icon { - color: #C93; -} - -.shortcuts .shortcut-sm:hover .shortcut-icon { - color: #666; -} - -.shortcuts .shortcut-label { - display: block; - margin-top: .75em; +.statusMap .ui-title, .statusMap .ui-li-aside { font-weight: 400; - color: #666; + text-transform: uppercase; + font-size: 2.5em; + line-height: 1.1em; + color: #DEDEDE; + text-shadow: 2px 2px 4px #000; + text-align: center; + background: linear-gradient(270deg, rgba(20,20,20,0.7), rgba(100,100,100,0.7), rgba(20,20,20,0.7)); } -@media (max-width: 640px) { - .shortcuts .shortcut { - min-width: @blSCut * 8; - min-height: @blSCut * 4; +.statusMap .ui-art { +} + +.statusMap .ui-footer { + color: #CDCDCD; + background: linear-gradient(270deg, rgba(10,10,10,0.7), rgba(80,80,80,0.7), rgba(10,10,10,0.7)); +} + +.machBlock { + padding: 0 2px 0 2px; +} +/* END: gestione layout dinamico mappa... */ +/* area semafori*/ +.semBlinkVe, +.semFixVe, +.semFixVe_b, +.semVe, +.semVe_b { + background: #009036; + background: rgba(0,255,80,.6); + color: #FFFFAA; +} + +.semBlinkGr, +.semFixGr, +.semFixGr_b, +.semGr, +.semGr_b { + background-color: #bcbcbc; + background: rgba(180,180,180,.6); +} + +.semGi { + text-align: left; + background: #8a8d27; + background: rgba(230,210,0,.6); + padding: 0px 4px 0px 4px; + color: #000; +} + +.semGi_b, +.semFixGi, +.semFixGi_b { + text-align: left; + background: #f9ff18; + background: rgba(255,255,0,.8); + padding: 0px 4px 0px 4px; + color: #333; +} + +.semBl { + text-align: left; + background: #000E7A; + background: rgba(0,5,200,.6); + padding: 0px 4px 0px 4px; + color: #959500; +} + +.semBl_b, +.semFixBl, +.semFixBl_b { + text-align: left; + background: #243FFF; + background: rgba(60,80,255,.8); + padding: 0px 4px 0px 4px; + color: #ffff32; +} + +.semRo { + text-align: left; + background-color: #7a000e; + background: rgba(200,0,5,.6); + padding: 0px 4px 0px 4px; + color: #959500; +} + +.semRo_b, +.semFixRo, +.semFixRo_b { + text-align: left; + background-color: #ff243f; + background: rgba(255,60,80,.8); + padding: 0px 4px 0px 4px; + color: #ffff32; +} +/* semafori con animazione blinking */ +.no-cpu { + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} + +@-webkit-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + + 50% { + background-position: 100% 50%; + } + + 100% { + background-position: 0% 50%; + } +} + +@-moz-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + + 50% { + background-position: 100% 50%; + } + + 100% { + background-position: 0% 50%; + } +} + +@-o-keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + + 50% { + background-position: 100% 50%; + } + + 100% { + background-position: 0% 50%; + } +} + +@keyframes blinkBack { + 0% { + background-position: 0% 50%; + } + + 50% { + background-position: 100% 50%; + } + + 100% { + background-position: 0% 50%; + } +} + +.semBlinkGi { + background: linear-gradient(270deg, #8a8d27, #f9ff18); + background-size: 400% 400%; + -webkit-animation: blinkBack 2s ease infinite; + -moz-animation: blinkBack 2s ease infinite; + -o-animation: blinkBack 2s ease infinite; + animation: blinkBack 2s ease infinite; +} + +.semBlinkRo { + background: linear-gradient(270deg, #7a000e, #ff243f); + background-size: 400% 400%; + -webkit-animation: blinkBack 2s ease infinite; + -moz-animation: blinkBack 2s ease infinite; + -o-animation: blinkBack 2s ease infinite; + animation: blinkBack 2s ease infinite; + color: Yellow; +} + + +/* Gestione size caratteri */ +.mainHead, +.logoImg { + height: 1.6em; +} + +@media all and (min-width: 425px) { + .mainHead { + font-size: 1.3em; } body { font-size: 0.8em; } + + .logoImg { + height: 30px; + } } + +@media all and (min-width: 768px) { + .mainHead { + font-size: 1.4em; + } + + body { + font-size: 1em; + } + + .logoImg { + height: 35px; + } +} + +@media all and (min-width: 800px) { + body { + font-size: 0.6em; + } +} + +@media all and (min-width: 1024px) { + body { + font-size: 0.7em; + } +} + +@media all and (min-width: 1280px) { + body { + font-size: 0.8em; + } +} + +@media all and (min-width: 1440px) { + body { + font-size: 1.0em; + } +} + +@media all and (min-width: 1680px) { + body { + font-size: 1.1em; + } +} + +@media all and (min-width: 1920px) { + body { + font-size: 1.3em; + } +} + +@media all and (min-width: 2560px) { + body { + font-size: 3.0em; + } +} + +@media all and (max-width: 425px) { + body { + font-size: 0.7em; + } +} \ No newline at end of file diff --git a/MP.Mon/wwwroot/css/site.min.css b/MP.Mon/wwwroot/css/site.min.css index ad652924..569615cf 100644 --- a/MP.Mon/wwwroot/css/site.min.css +++ b/MP.Mon/wwwroot/css/site.min.css @@ -1 +1 @@ -@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto Condensed',sans-serif;line-height:1.3;}h1:focus{outline:none;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.regionnotclicked{fill:white;}.regionclicked{fill:red;}.striked{text-decoration:line-through;}.dropdown{position:relative;display:inline-block;}.dropdown:hover .dropdown-content,.dropdown:hover .dropdown-content-top,.dropdown:hover .dropdown-content-left,.dropdown:hover .dropdown-content-top-left{display:block;}.dropdown-content{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;}.dropdown-content .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content .a:hover{background-color:#ddd;}.dropdown-content-top{display:none;position:absolute;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13.5em;left:-10em;}.dropdown-content-top .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top .a:hover{background-color:#ddd;}.dropdown-content-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;left:-24em;}.dropdown-content-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-left .a:hover{background-color:#ddd;}.dropdown-content-top-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13.5em;left:-24em;}.dropdown-content-top-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top-left .a:hover{background-color:#ddd;}.textTrim{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.maxChar{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.max5Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:5rem;}.max10Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10rem;}.max20Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:20rem;}.max30Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:30rem;}.max40Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:40rem;}.max50Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50rem;}.max100Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100rem;}.footer{line-height:1.8em;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;}} \ No newline at end of file +@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{height:100%;}html,body{font-family:'Roboto Condensed',sans-serif;line-height:1.25;background-image:linear-gradient(180deg,#010816 20%,#3aa6ff 90%);background-size:auto 100%;background-repeat:no-repeat;}h1:focus{outline:none;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.regionnotclicked{fill:white;}.regionclicked{fill:red;}.striked{text-decoration:line-through;}.textTrim{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.maxChar{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.max5Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:5rem;}.max10Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10rem;}.max20Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:20rem;}.max30Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:30rem;}.max40Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:40rem;}.max50Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50rem;}.max100Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100rem;}.footer{line-height:1.8em;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.fontSmall{font-size:.75em;}.fontSmaller{font-size:.6em;}.statusMap .ui-title,.statusMap .ui-li-aside{font-weight:400;text-transform:uppercase;font-size:2.5em;line-height:1.1em;color:#dedede;text-shadow:2px 2px 4px #000;text-align:center;background:linear-gradient(270deg,rgba(20,20,20,.7),rgba(100,100,100,.7),rgba(20,20,20,.7));}.statusMap .ui-footer{color:#cdcdcd;background:linear-gradient(270deg,rgba(10,10,10,.7),rgba(80,80,80,.7),rgba(10,10,10,.7));}.machBlock{padding:0 2px 0 2px;}.semBlinkVe,.semFixVe,.semFixVe_b,.semVe,.semVe_b{background:#009036;background:rgba(0,255,80,.6);color:#ffa;}.semBlinkGr,.semFixGr,.semFixGr_b,.semGr,.semGr_b{background-color:#bcbcbc;background:rgba(180,180,180,.6);}.semGi{text-align:left;background:#8a8d27;background:rgba(230,210,0,.6);padding:0 4px 0 4px;color:#000;}.semGi_b,.semFixGi,.semFixGi_b{text-align:left;background:#f9ff18;background:rgba(255,255,0,.8);padding:0 4px 0 4px;color:#333;}.semBl{text-align:left;background:#000e7a;background:rgba(0,5,200,.6);padding:0 4px 0 4px;color:#959500;}.semBl_b,.semFixBl,.semFixBl_b{text-align:left;background:#243fff;background:rgba(60,80,255,.8);padding:0 4px 0 4px;color:#ffff32;}.semRo{text-align:left;background-color:#7a000e;background:rgba(200,0,5,.6);padding:0 4px 0 4px;color:#959500;}.semRo_b,.semFixRo,.semFixRo_b{text-align:left;background-color:#ff243f;background:rgba(255,60,80,.8);padding:0 4px 0 4px;color:#ffff32;}.no-cpu{-moz-transform:translateZ(0);-o-transform:translateZ(0);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);}@-webkit-keyframes blinkBack{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}@-moz-keyframes blinkBack{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}@-o-keyframes blinkBack{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}@keyframes blinkBack{0%{background-position:0% 50%;}50%{background-position:100% 50%;}100%{background-position:0% 50%;}}.semBlinkGi{background:linear-gradient(270deg,#8a8d27,#f9ff18);background-size:400% 400%;-webkit-animation:blinkBack 2s ease infinite;-moz-animation:blinkBack 2s ease infinite;-o-animation:blinkBack 2s ease infinite;animation:blinkBack 2s ease infinite;}.semBlinkRo{background:linear-gradient(270deg,#7a000e,#ff243f);background-size:400% 400%;-webkit-animation:blinkBack 2s ease infinite;-moz-animation:blinkBack 2s ease infinite;-o-animation:blinkBack 2s ease infinite;animation:blinkBack 2s ease infinite;color:#ff0;}.mainHead,.logoImg{height:1.6em;}@media all and (min-width:425px){.mainHead{font-size:1.3em;}body{font-size:.8em;}.logoImg{height:30px;}}@media all and (min-width:768px){.mainHead{font-size:1.4em;}body{font-size:1em;}.logoImg{height:35px;}}@media all and (min-width:800px){body{font-size:.6em;}}@media all and (min-width:1024px){body{font-size:.7em;}}@media all and (min-width:1280px){body{font-size:.8em;}}@media all and (min-width:1440px){body{font-size:1em;}}@media all and (min-width:1680px){body{font-size:1.1em;}}@media all and (min-width:1920px){body{font-size:1.3em;}}@media all and (min-width:2560px){body{font-size:3em;}}@media all and (max-width:425px){body{font-size:.7em;}} \ No newline at end of file diff --git a/MP.Mon/wwwroot/images/LogoCliente.png b/MP.Mon/wwwroot/images/LogoCliente.png new file mode 100644 index 00000000..8d5a7c1f Binary files /dev/null and b/MP.Mon/wwwroot/images/LogoCliente.png differ diff --git a/MP.Mon/wwwroot/images/LogoMapo.png b/MP.Mon/wwwroot/images/LogoMapo.png new file mode 100644 index 00000000..579e0fe3 Binary files /dev/null and b/MP.Mon/wwwroot/images/LogoMapo.png differ diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index 30be0f97..229cb1f7 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net6.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 6.15.2204.1216 + 6.15.2204.1414 @@ -188,7 +188,7 @@ - + diff --git a/MP.Stats/Resources/ChangeLog.html b/MP.Stats/Resources/ChangeLog.html index 3421c587..6bff319c 100644 --- a/MP.Stats/Resources/ChangeLog.html +++ b/MP.Stats/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

Versione: 6.15.2204.1216

+

Versione: 6.15.2204.1414


Note di rilascio:
    diff --git a/MP.Stats/Resources/VersNum.txt b/MP.Stats/Resources/VersNum.txt index f474a27a..6cce0e03 100644 --- a/MP.Stats/Resources/VersNum.txt +++ b/MP.Stats/Resources/VersNum.txt @@ -1 +1 @@ -6.15.2204.1216 +6.15.2204.1414 diff --git a/MP.Stats/Resources/manifest.xml b/MP.Stats/Resources/manifest.xml index a09dd34d..0455729b 100644 --- a/MP.Stats/Resources/manifest.xml +++ b/MP.Stats/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.15.2204.1216 + 6.15.2204.1414 https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html false