Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5050878708 | |||
| 528f368a99 | |||
| 7c0c172231 | |||
| 2c7c06058b | |||
| eaa75482e0 | |||
| df6fa1ad77 | |||
| d96c9205fa | |||
| c9a845fc81 | |||
| e5325be058 | |||
| 911e8cbd05 | |||
| 01330d3bb2 | |||
| 1effa123fb | |||
| 921582e436 | |||
| d2c549d471 | |||
| 82d8737157 | |||
| 9bd4b07db7 | |||
| cc559063b3 | |||
| 95e9a8ee8a | |||
| 19986dc38d | |||
| 5f8611bf63 | |||
| 9d6e624a77 | |||
| ed54dafcdb | |||
| 64e574bfba | |||
| 4b3d4a4639 | |||
| 5d6535b85b | |||
| 3d7730aaa9 | |||
| cf787b3c71 | |||
| 76c3fa1ecf | |||
| 99256c0bed | |||
| 9d3e781f0e | |||
| 4f1b6f7861 | |||
| 0ab48fdd99 | |||
| cda14a810b | |||
| 30e4cd863b | |||
| a231f9ac8c | |||
| 4ba86de5c0 | |||
| 768c435943 | |||
| dacbc8a6a6 | |||
| fe4c3e2f93 | |||
| 2a93efc1e3 | |||
| e4bfb2eaa3 | |||
| f59d9b49f5 | |||
| c3afb4140e | |||
| c731932339 | |||
| afb4d5d2cc | |||
| 82d167bfef | |||
| 6755380008 | |||
| 7e5ad0279f | |||
| 4741f98c66 | |||
| 6eb8e8c55d | |||
| ea2d912e05 | |||
| 6bbc8b6fa0 | |||
| 14fb396c00 | |||
| f9068995a8 | |||
| c64efc5aca | |||
| eee32daf4b | |||
| 1d1112cc46 | |||
| 11570f93f8 | |||
| 17f24c9209 | |||
| 3eb27c942a | |||
| e6dcfc2ca2 | |||
| 6c3ea45bea | |||
| 9c729c678f | |||
| 6e0f4b1fed | |||
| 26bf86bcab | |||
| d58e41ba06 | |||
| 227e17aa35 | |||
| 65c7ec3863 | |||
| a086b3cdcd | |||
| 1ca0a4737c | |||
| 46854b969f | |||
| 341029019f | |||
| 82eea1eb0b | |||
| ce5fc70204 | |||
| ead61e3e16 | |||
| bd80c01404 | |||
| fd0356bae4 | |||
| 2655dfcb41 | |||
| 0690754a58 | |||
| 32ab150dda | |||
| 4e3d8f79ef | |||
| 4976afeb8e | |||
| 5e954f6cf6 | |||
| f7b8f394a5 | |||
| 4c1577fa8e | |||
| 3c88852245 |
+17
-8
@@ -6,13 +6,22 @@ variables:
|
||||
# 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-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
||||
echo "Steamware Nexus Source added"
|
||||
|
||||
# helper creazione hash files
|
||||
.hashBuild: &hashBuild
|
||||
@@ -80,8 +89,8 @@ installer:
|
||||
- master
|
||||
needs: ["build"]
|
||||
before_script:
|
||||
# - *nuget-fix
|
||||
# - dotnet restore
|
||||
- *nuget-fix
|
||||
- dotnet restore GWMS.sln
|
||||
script:
|
||||
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release GWMS.UI/GWMS.UI.csproj -o:publish
|
||||
# pubblico solo installer Linux x64: https://docs.microsoft.com/en-us/dotnet/core/deploying/
|
||||
|
||||
@@ -56,8 +56,6 @@ namespace GWMS.Data
|
||||
string connString = DbConfig.ADMIN_CONNECTION_STRING;
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
//connString = _configuration.GetConnectionString("GWMS.Data");
|
||||
//connString = "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;";
|
||||
var serverVersion = ServerVersion.AutoDetect(connString);
|
||||
optionsBuilder.UseMySql(connString, serverVersion);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.Data
|
||||
{
|
||||
public class Constants
|
||||
public class Const
|
||||
{
|
||||
|
||||
// classi utilità x cache REDIS dati DB
|
||||
public const string rKeyConfig = "GWMS";
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace GWMS.Data.Controllers
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace GWMS.Data.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in DbForceMigrate");
|
||||
Log.Error($"Eccezione in DbForceMigrate{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
@@ -242,11 +242,11 @@ namespace GWMS.Data.Controllers
|
||||
using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => (x.PlantId == PlantId || PlantId == 0) && x.DtEvent <= DtMaxDate)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(numRec)
|
||||
.ToList();
|
||||
.DbSetPlantLog
|
||||
.Where(x => (x.PlantId == PlantId || PlantId == 0) && x.DtEvent <= DtMaxDate)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(numRec)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ namespace GWMS.Data.Controllers
|
||||
/// <param name="DtStart">data inizio</param>
|
||||
/// <param name="DtEnd">data fine</param>
|
||||
/// <returns></returns>
|
||||
public List<PlantLevSumDTO> GetPlantLogSummary(int PlantId, DateTime DtStart, DateTime DtEnd)
|
||||
public List<PlantLevSumDTO> GetPlantLevSumDto(int PlantId, DateTime DtStart, DateTime DtEnd)
|
||||
{
|
||||
List<PlantLevSumDTO> dbResult = new List<PlantLevSumDTO>();
|
||||
if (PlantId > 0)
|
||||
@@ -370,12 +370,12 @@ namespace GWMS.Data.Controllers
|
||||
using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
{
|
||||
var plantList = localDbCtx
|
||||
.DbSetPlant
|
||||
.ToList();
|
||||
.DbSetPlant
|
||||
.ToList();
|
||||
|
||||
dbResult = plantList
|
||||
.Select(x => PlantDTO(x.PlantId, maxRecords))
|
||||
.ToList();
|
||||
.Select(x => PlantDTO(x.PlantId, maxRecords))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
return dbResult;
|
||||
@@ -396,10 +396,10 @@ namespace GWMS.Data.Controllers
|
||||
maxNum = localDbCtx.DbRebootLog.Count();
|
||||
}
|
||||
dbResult = localDbCtx
|
||||
.DbRebootLog
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxNum)
|
||||
.ToList();
|
||||
.DbRebootLog
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxNum)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
@@ -805,44 +805,79 @@ namespace GWMS.Data.Controllers
|
||||
List<TSData> OrderTS = new List<TSData>();
|
||||
List<TSData> SoldTS = new List<TSData>();
|
||||
|
||||
// dati raw da recuperare...
|
||||
List<PlantLogModel> rawLevelData = new List<PlantLogModel>();
|
||||
List<PlantLogModel> rawMainPressData = new List<PlantLogModel>();
|
||||
List<PlantLogModel> rawBHPressData = new List<PlantLogModel>();
|
||||
List<PlantLogModel> rawBLPressData = new List<PlantLogModel>();
|
||||
List<OrderModel> rawOpenOrderData = new List<OrderModel>();
|
||||
List<OrderModel> rawDepOrderData = new List<OrderModel>();
|
||||
|
||||
using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
{
|
||||
// recupero dal DB
|
||||
var rawLevelData = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "Level" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
// per prima cosa recupero dati RAW ultime 2 settimane...
|
||||
var rawData = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.DtEvent > DateTime.Today.AddMonths(-1) && x.PlantId == PlantId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
var rawMainPressData = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
// ora recupero i distinct dell'ultima settimana x capire COSA posso poi ricavare...
|
||||
var countData = rawData
|
||||
.Select(e => e.FluxType)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
// recupero dal DB i dati PRESENTI...
|
||||
if (countData.Contains("Level"))
|
||||
{
|
||||
//rawLevelData = localDbCtx
|
||||
// .DbSetPlantLog
|
||||
rawLevelData = rawData
|
||||
.Where(x => x.FluxType == "Level" && x.PlantId == PlantId)
|
||||
//.AsNoTracking()
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
var rawBHPressData = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
if (countData.Contains("MainPress"))
|
||||
{
|
||||
rawMainPressData = rawData
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
//.AsNoTracking()
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
var rawBLPressData = localDbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
if (countData.Contains("PressBH"))
|
||||
{
|
||||
rawBHPressData = rawData
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
//.AsNoTracking()
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
}
|
||||
if (countData.Contains("PressBL"))
|
||||
{
|
||||
rawBLPressData = rawData
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
//.AsNoTracking()
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
var rawOpenOrderData = localDbCtx
|
||||
rawOpenOrderData = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty == 0)
|
||||
.AsNoTracking()
|
||||
.OrderByDescending(x => x.DtOrder)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtOrder)
|
||||
@@ -852,7 +887,7 @@ namespace GWMS.Data.Controllers
|
||||
int numDays = 1;
|
||||
DateTime oggi = DateTime.Today;
|
||||
// recupero ultimi record carichi x numDays gg
|
||||
var rawDepOrderData = localDbCtx
|
||||
rawDepOrderData = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty > 0 && x.DtExecStart >= oggi.AddDays(-numDays))
|
||||
.OrderBy(x => x.DtOrder)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace GWMS.Data.DatabaseModels
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int PlantDataId { get; set; }
|
||||
|
||||
|
||||
public DateTime DtEvent { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -10,13 +12,14 @@ namespace GWMS.Data.DatabaseModels
|
||||
/// <summary>
|
||||
/// Classe fake x il conteggio tabelle e check preliminari
|
||||
/// </summary>
|
||||
[Keyless]
|
||||
[Table("DbSetCounts")]
|
||||
public class TableCount
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int Count { get; set; }
|
||||
public string TableName { get; set; }
|
||||
[Key]
|
||||
public string TableName { get; set; } = "ND";
|
||||
public int Count { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NLog;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.Data
|
||||
@@ -43,17 +44,21 @@ namespace GWMS.Data
|
||||
|
||||
public static bool ExecMigrationIdentity()
|
||||
{
|
||||
Log.Info($"ExecMigrationIdentity: Start");
|
||||
// esecuzione migrazione
|
||||
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbIdentity());
|
||||
migrateTask.Wait();
|
||||
Log.Info($"ExecMigrationIdentity: Completed");
|
||||
return migrateTask.Result;
|
||||
}
|
||||
|
||||
public static bool ExecMigrationMain()
|
||||
{
|
||||
Log.Info($"ExecMigrationMain: Start");
|
||||
// esecuzione migrazione
|
||||
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbMain());
|
||||
migrateTask.Wait();
|
||||
Log.Info($"ExecMigrationMain: Completed");
|
||||
return migrateTask.Result;
|
||||
}
|
||||
|
||||
@@ -74,6 +79,8 @@ namespace GWMS.Data
|
||||
return serverVersion;
|
||||
}
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -24,9 +24,8 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.14" />
|
||||
<PackageReference Include="NLog" Version="5.3.2" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -88,19 +88,13 @@ namespace GWMS.Data
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
// default
|
||||
string connString = "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;";
|
||||
|
||||
// tento setup da config
|
||||
try
|
||||
{
|
||||
// uso conn string calcolata
|
||||
connString = DbConfig.CONNECTION_STRING;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string connString = DbConfig.CONNECTION_STRING;
|
||||
//if (string.IsNullOrEmpty(connString))
|
||||
//{
|
||||
// connString = "Server=localhost;port=3306;database=GWMS_PZZFRR;user=user_PZZFRR;pwd=pwd_M3T@n0;sslmode=None;";
|
||||
//}
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
//connString = "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;";
|
||||
var serverVersion = ServerVersion.AutoDetect(connString);
|
||||
optionsBuilder.UseMySql(connString, serverVersion);
|
||||
}
|
||||
@@ -125,6 +119,9 @@ namespace GWMS.Data
|
||||
|
||||
modelBuilder.Entity<ParamSendModel>().HasKey(c => new { c.PlantId, c.ParamUid });
|
||||
|
||||
modelBuilder.Entity<PlantLogModel>().HasIndex(c => new { c.PlantId }, "IX_PlantLog_PlantId");
|
||||
modelBuilder.Entity<PlantLogModel>().HasIndex(c => new { c.PlantId, c.DtEvent }, "IX_PlantLog_PlantDtEv");
|
||||
|
||||
modelBuilder.Seed();
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GWMS.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.User.Migrations
|
||||
{
|
||||
[DbContext(typeof(UserIdentityDbContext))]
|
||||
[Migration("20240411155438_RemoveTableCount")]
|
||||
partial class RemoveTableCount
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = "315208c3-0fb0-421d-b373-8f4730106dd5",
|
||||
ConcurrencyStamp = "9bd570a3-2012-42a8-bb38-0030e0d45de2",
|
||||
Name = "Undef",
|
||||
NormalizedName = "UNDEF"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "757673aa-ea00-4b6a-8c98-f75b3dcd65b7",
|
||||
ConcurrencyStamp = "55cbb043-dbd6-4018-a834-050c2a15c30f",
|
||||
Name = "ExtUser",
|
||||
NormalizedName = "EXTUSER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "b5083225-0c73-40cb-a7be-db0747b20dca",
|
||||
ConcurrencyStamp = "496441df-9b5b-4df2-bdc2-54a073a4a912",
|
||||
Name = "ExtTransp",
|
||||
NormalizedName = "EXTTRANSP"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "b5136e2c-f9e9-43ae-8cfd-d4b2883b963a",
|
||||
ConcurrencyStamp = "2009b165-9681-4891-934e-020a35e6fc80",
|
||||
Name = "User",
|
||||
NormalizedName = "USER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "0bbf8f56-fcc8-4afd-9865-805881ca4067",
|
||||
ConcurrencyStamp = "759f05b6-3995-4763-b76a-aef212eb17f1",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "55fd587f-bfea-40b2-8e44-3ad95a9a9ee1",
|
||||
ConcurrencyStamp = "8b2b2fbf-ba91-420a-b490-13e02916d8a1",
|
||||
Name = "SuperAdmin",
|
||||
NormalizedName = "SUPERADMIN"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("varchar(256)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasDatabaseName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UserNameIndex");
|
||||
|
||||
b.ToTable("AspNetUsers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ProviderKey")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ProviderDisplayName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.User.Migrations
|
||||
{
|
||||
public partial class RemoveTableCount : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DbSetCounts");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "AspNetUserTokens",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(128)",
|
||||
oldMaxLength: 128)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LoginProvider",
|
||||
table: "AspNetUserTokens",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(128)",
|
||||
oldMaxLength: 128)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ProviderKey",
|
||||
table: "AspNetUserLogins",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(128)",
|
||||
oldMaxLength: 128)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LoginProvider",
|
||||
table: "AspNetUserLogins",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(128)",
|
||||
oldMaxLength: 128)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "AspNetUserTokens",
|
||||
type: "varchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LoginProvider",
|
||||
table: "AspNetUserTokens",
|
||||
type: "varchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ProviderKey",
|
||||
table: "AspNetUserLogins",
|
||||
type: "varchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LoginProvider",
|
||||
table: "AspNetUserLogins",
|
||||
type: "varchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DbSetCounts",
|
||||
columns: table => new
|
||||
{
|
||||
Count = table.Column<int>(type: "int", nullable: false),
|
||||
TableName = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GWMS.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.User.Migrations
|
||||
{
|
||||
[DbContext(typeof(UserIdentityDbContext))]
|
||||
[Migration("20240418104749_ReAddTableCounter4Identity")]
|
||||
partial class ReAddTableCounter4Identity
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.TableCount", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("TableName");
|
||||
|
||||
b.ToTable("DbSetCounts");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.User.Migrations
|
||||
{
|
||||
public partial class ReAddTableCounter4Identity : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DbSetCounts",
|
||||
columns: table => new
|
||||
{
|
||||
TableName = table.Column<string>(type: "varchar(255)", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Count = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DbSetCounts", x => x.TableName);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DbSetCounts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,748 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using GWMS.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(GWMSContext))]
|
||||
[Migration("20240604150033_AddPlantLogDtEvIdx")]
|
||||
partial class AddPlantLogDtEvIdx
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.AlarmLogModel", b =>
|
||||
{
|
||||
b.Property<int>("AlarmLogId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Index")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MemAddress")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<uint>("Status")
|
||||
.HasColumnType("int unsigned");
|
||||
|
||||
b.Property<string>("ValDecoded")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("AlarmLogId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
|
||||
b.ToTable("AlarmLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.AnKeyValModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Descrizione dell'item");
|
||||
|
||||
b.Property<int>("ValFloat")
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<int>("ValInt")
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("AnKeyVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValStd")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ItemModel", b =>
|
||||
{
|
||||
b.Property<int>("ItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("ItemCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ItemDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("ItemType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("UM")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
b.ToTable("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ListValModel", b =>
|
||||
{
|
||||
b.Property<string>("TabName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("TabName")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("FieldName")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("Val")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnName("Descript")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("Ordinal")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.HasKey("TabName", "FieldName", "Val");
|
||||
|
||||
b.ToTable("ListVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtETA")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtOrder")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ExecutionQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelEnd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelStart")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("OrderCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("OrderDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<double>("OrderQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TransporterId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.HasIndex("TransporterId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ParamSendModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ParamUid")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<DateTime>("LastSend")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("VetoSend")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("enabled")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("windEnd")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("windStart")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("PlantId", "ParamUid");
|
||||
|
||||
b.ToTable("ParamSend");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ParamSetModel", b =>
|
||||
{
|
||||
b.Property<int>("ParamSetId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("ParamUid")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<decimal>("TargetVal")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.HasKey("ParamSetId");
|
||||
|
||||
b.ToTable("ParamSet");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantDetailModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("LevelMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelReorder")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("OrderQtyStd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("PlantDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId");
|
||||
|
||||
b.ToTable("PlantDetail");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
PlantId = 1,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 5,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ09",
|
||||
PlantDesc = "Guardamiglio"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantDataId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantDataId");
|
||||
|
||||
b.HasIndex(new[] { "PlantId", "DtEvent" }, "IX_PlantLog_PlantDtEv");
|
||||
|
||||
b.HasIndex(new[] { "PlantId" }, "IX_PlantLog_PlantId");
|
||||
|
||||
b.ToTable("PlantLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId", "FluxType");
|
||||
|
||||
b.ToTable("PlantStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.RebootLogModel", b =>
|
||||
{
|
||||
b.Property<int>("RecordId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Item")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("RecordId");
|
||||
|
||||
b.ToTable("RebootLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.SupplierModel", b =>
|
||||
{
|
||||
b.Property<int>("SupplierId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplierCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("SupplierDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("SupplierId");
|
||||
|
||||
b.ToTable("Supplier");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
SupplierId = 1,
|
||||
SupplierCode = "LIQUIGAS",
|
||||
SupplierDesc = "Liquigas"
|
||||
},
|
||||
new
|
||||
{
|
||||
SupplierId = 2,
|
||||
SupplierCode = "VULKANGAS",
|
||||
SupplierDesc = "Vulkangas"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.TransporterModel", b =>
|
||||
{
|
||||
b.Property<int>("TransporterId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("PositionLatitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PositionLongitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<DateTime>("PositionUpdated")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("TransporterCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("TransporterDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("TransporterId");
|
||||
|
||||
b.ToTable("Transporter");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TransporterId = 1,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
new
|
||||
{
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.WeekPlanModel", b =>
|
||||
{
|
||||
b.Property<int>("WeekPlanId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<int>("DayNum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DeliveryHour")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TransporterId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("WeekPlanId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.HasIndex("TransporterId");
|
||||
|
||||
b.ToTable("WeekPlan");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
WeekPlanId = 1,
|
||||
DayNum = 1,
|
||||
DeliveryHour = 20,
|
||||
Note = "18K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 2,
|
||||
DayNum = 2,
|
||||
DeliveryHour = 20,
|
||||
Note = "18K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 3,
|
||||
DayNum = 3,
|
||||
DeliveryHour = 20,
|
||||
Note = "18K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 2
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 4,
|
||||
DayNum = 4,
|
||||
DeliveryHour = 15,
|
||||
Note = "9K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 5,
|
||||
DayNum = 4,
|
||||
DeliveryHour = 20,
|
||||
Note = "18K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 6,
|
||||
DayNum = 6,
|
||||
DeliveryHour = 20,
|
||||
Note = "18K",
|
||||
PlantId = 2,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 7,
|
||||
DayNum = 2,
|
||||
DeliveryHour = 14,
|
||||
Note = "3K",
|
||||
PlantId = 3,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 8,
|
||||
DayNum = 2,
|
||||
DeliveryHour = 15,
|
||||
Note = "15K",
|
||||
PlantId = 4,
|
||||
SupplierId = 1,
|
||||
TransporterId = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
WeekPlanId = 9,
|
||||
DayNum = 2,
|
||||
DeliveryHour = 17,
|
||||
Note = "18K",
|
||||
PlantId = 1,
|
||||
SupplierId = 2,
|
||||
TransporterId = 2
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.AlarmLogModel", b =>
|
||||
{
|
||||
b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlantId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Plant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlantId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("GWMS.Data.DatabaseModels.SupplierModel", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("GWMS.Data.DatabaseModels.TransporterModel", "Transporter")
|
||||
.WithMany()
|
||||
.HasForeignKey("TransporterId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Plant");
|
||||
|
||||
b.Navigation("Supplier");
|
||||
|
||||
b.Navigation("Transporter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
|
||||
{
|
||||
b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlantId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Plant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
|
||||
{
|
||||
b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlantId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Plant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.WeekPlanModel", b =>
|
||||
{
|
||||
b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlantId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("GWMS.Data.DatabaseModels.SupplierModel", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("GWMS.Data.DatabaseModels.TransporterModel", "Transporter")
|
||||
.WithMany()
|
||||
.HasForeignKey("TransporterId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Plant");
|
||||
|
||||
b.Navigation("Supplier");
|
||||
|
||||
b.Navigation("Transporter");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,541 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
public partial class AddPlantLogDtEvIdx : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "WeekPlanId",
|
||||
table: "WeekPlan",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.Annotation("Relational:ColumnOrder", 0)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Ordinal",
|
||||
table: "ListVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("Relational:ColumnOrder", 4);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Descript",
|
||||
table: "ListVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 3)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Val",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 2)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FieldName",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 1)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TabName",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 0)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UM",
|
||||
table: "Items",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 4)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemType",
|
||||
table: "Items",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 3)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemDesc",
|
||||
table: "Items",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 2)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemCode",
|
||||
table: "Items",
|
||||
type: "varchar(100)",
|
||||
maxLength: 100,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(100)",
|
||||
oldMaxLength: 100,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 1)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ItemId",
|
||||
table: "Items",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.Annotation("Relational:ColumnOrder", 0)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ValStd",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
comment: "Valore di default/riferimento per la variabile",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true,
|
||||
oldComment: "Valore di default/riferimento per la variabile")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 2)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Val",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 1)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Note",
|
||||
table: "Config",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 3)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "KeyName",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 0)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ValString",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 3)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ValInt",
|
||||
table: "AnKeyVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("Relational:ColumnOrder", 1);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ValFloat",
|
||||
table: "AnKeyVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("Relational:ColumnOrder", 2);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Descript",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
comment: "Descrizione dell'item",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true,
|
||||
oldComment: "Descrizione dell'item")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 4)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "KeyName",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 0)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlantLog_PlantDtEv",
|
||||
table: "PlantLog",
|
||||
columns: new[] { "PlantId", "DtEvent" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlantLog_PlantDtEv",
|
||||
table: "PlantLog");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "WeekPlanId",
|
||||
table: "WeekPlan",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Ordinal",
|
||||
table: "ListVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.OldAnnotation("Relational:ColumnOrder", 4);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Descript",
|
||||
table: "ListVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Val",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FieldName",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TabName",
|
||||
table: "ListVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UM",
|
||||
table: "Items",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 4);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemType",
|
||||
table: "Items",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemDesc",
|
||||
table: "Items",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ItemCode",
|
||||
table: "Items",
|
||||
type: "varchar(100)",
|
||||
maxLength: 100,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(100)",
|
||||
oldMaxLength: 100,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ItemId",
|
||||
table: "Items",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ValStd",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
comment: "Valore di default/riferimento per la variabile",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true,
|
||||
oldComment: "Valore di default/riferimento per la variabile")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Val",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Note",
|
||||
table: "Config",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "KeyName",
|
||||
table: "Config",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ValString",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 3);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ValInt",
|
||||
table: "AnKeyVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.OldAnnotation("Relational:ColumnOrder", 1);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ValFloat",
|
||||
table: "AnKeyVal",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.OldAnnotation("Relational:ColumnOrder", 2);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Descript",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
comment: "Descrizione dell'item",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true,
|
||||
oldComment: "Descrizione dell'item")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 4);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "KeyName",
|
||||
table: "AnKeyVal",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(50)",
|
||||
oldMaxLength: 50)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(GWMSContext))]
|
||||
@@ -14,8 +16,8 @@ namespace GWMS.Data.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64)
|
||||
.HasAnnotation("ProductVersion", "5.0.10");
|
||||
.HasAnnotation("ProductVersion", "6.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.AlarmLogModel", b =>
|
||||
{
|
||||
@@ -53,22 +55,27 @@ namespace GWMS.Data.Migrations
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Descrizione dell'item");
|
||||
|
||||
b.Property<int>("ValFloat")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<int>("ValInt")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
@@ -79,19 +86,23 @@ namespace GWMS.Data.Migrations
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ValStd")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("Valore di default/riferimento per la variabile");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
@@ -103,23 +114,28 @@ namespace GWMS.Data.Migrations
|
||||
{
|
||||
b.Property<int>("ItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("ItemCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
.HasColumnType("varchar(100)")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("ItemDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("ItemType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<string>("UM")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
@@ -131,26 +147,31 @@ namespace GWMS.Data.Migrations
|
||||
b.Property<string>("TabName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("TabName");
|
||||
.HasColumnName("TabName")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("FieldName");
|
||||
.HasColumnName("FieldName")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("Val");
|
||||
.HasColumnName("Val")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnName("Descript");
|
||||
.HasColumnName("Descript")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("Ordinal");
|
||||
.HasColumnName("Ordinal")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.HasKey("TabName", "FieldName", "Val");
|
||||
|
||||
@@ -333,6 +354,15 @@ namespace GWMS.Data.Migrations
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 5,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ09",
|
||||
PlantDesc = "Guardamiglio"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -361,7 +391,9 @@ namespace GWMS.Data.Migrations
|
||||
|
||||
b.HasKey("PlantDataId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
b.HasIndex(new[] { "PlantId", "DtEvent" }, "IX_PlantLog_PlantDtEv");
|
||||
|
||||
b.HasIndex(new[] { "PlantId" }, "IX_PlantLog_PlantId");
|
||||
|
||||
b.ToTable("PlantLog");
|
||||
});
|
||||
@@ -497,7 +529,8 @@ namespace GWMS.Data.Migrations
|
||||
{
|
||||
b.Property<int>("WeekPlanId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
b.Property<int>("DayNum")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GWMS.User.Migrations
|
||||
{
|
||||
[DbContext(typeof(UserIdentityDbContext))]
|
||||
@@ -14,16 +16,18 @@ namespace GWMS.User.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64)
|
||||
.HasAnnotation("ProductVersion", "5.0.7");
|
||||
.HasAnnotation("ProductVersion", "6.0.2")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.TableCount", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TableName")
|
||||
.HasColumnType("longtext");
|
||||
b.HasKey("TableName");
|
||||
|
||||
b.ToTable("DbSetCounts");
|
||||
});
|
||||
@@ -51,48 +55,48 @@ namespace GWMS.User.Migrations
|
||||
.IsUnique()
|
||||
.HasDatabaseName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
b.ToTable("AspNetRoles", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = "339a7ac3-4fcd-4baa-bd19-a6a09d1b7c5d",
|
||||
ConcurrencyStamp = "3caf0732-df97-4b81-ba2c-9fb51e34532a",
|
||||
Id = "315208c3-0fb0-421d-b373-8f4730106dd5",
|
||||
ConcurrencyStamp = "9bd570a3-2012-42a8-bb38-0030e0d45de2",
|
||||
Name = "Undef",
|
||||
NormalizedName = "UNDEF"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "47c8d4fb-6925-4ef0-a830-5df33e705d7a",
|
||||
ConcurrencyStamp = "9671ece6-f70a-4ca6-88db-64562e007c72",
|
||||
Id = "757673aa-ea00-4b6a-8c98-f75b3dcd65b7",
|
||||
ConcurrencyStamp = "55cbb043-dbd6-4018-a834-050c2a15c30f",
|
||||
Name = "ExtUser",
|
||||
NormalizedName = "EXTUSER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "2d87821f-5c6d-4d9e-98d7-7ae801030100",
|
||||
ConcurrencyStamp = "9ee56f2f-558f-4579-9ad7-4a6150e3d822",
|
||||
Id = "b5083225-0c73-40cb-a7be-db0747b20dca",
|
||||
ConcurrencyStamp = "496441df-9b5b-4df2-bdc2-54a073a4a912",
|
||||
Name = "ExtTransp",
|
||||
NormalizedName = "EXTTRANSP"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "db1d1ac5-905d-46a5-bcf4-ef8a5f3f715c",
|
||||
ConcurrencyStamp = "3244e9d3-ab0e-45ae-97b6-c8c74f57cf64",
|
||||
Id = "b5136e2c-f9e9-43ae-8cfd-d4b2883b963a",
|
||||
ConcurrencyStamp = "2009b165-9681-4891-934e-020a35e6fc80",
|
||||
Name = "User",
|
||||
NormalizedName = "USER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "7e3dc53b-c152-440f-a49d-6c3a2f6bf6eb",
|
||||
ConcurrencyStamp = "a0a109e5-ab8e-4e20-9aa8-eba3c429fd12",
|
||||
Id = "0bbf8f56-fcc8-4afd-9865-805881ca4067",
|
||||
ConcurrencyStamp = "759f05b6-3995-4763-b76a-aef212eb17f1",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = "2fcd8455-143a-4ebc-b41c-e9bdf6a0315b",
|
||||
ConcurrencyStamp = "549b8a8d-ba83-4b79-be88-fde0bd4cc60f",
|
||||
Id = "55fd587f-bfea-40b2-8e44-3ad95a9a9ee1",
|
||||
ConcurrencyStamp = "8b2b2fbf-ba91-420a-b490-13e02916d8a1",
|
||||
Name = "SuperAdmin",
|
||||
NormalizedName = "SUPERADMIN"
|
||||
});
|
||||
@@ -118,7 +122,7 @@ namespace GWMS.User.Migrations
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
b.ToTable("AspNetRoleClaims", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
||||
@@ -182,7 +186,7 @@ namespace GWMS.User.Migrations
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UserNameIndex");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
b.ToTable("AspNetUsers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
@@ -205,18 +209,16 @@ namespace GWMS.User.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
b.ToTable("AspNetUserClaims", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("varchar(128)");
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ProviderKey")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("varchar(128)");
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("ProviderDisplayName")
|
||||
.HasColumnType("longtext");
|
||||
@@ -229,7 +231,7 @@ namespace GWMS.User.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
b.ToTable("AspNetUserLogins", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
@@ -244,7 +246,7 @@ namespace GWMS.User.Migrations
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
b.ToTable("AspNetUserRoles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
@@ -253,19 +255,17 @@ namespace GWMS.User.Migrations
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("varchar(128)");
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("varchar(128)");
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
b.ToTable("AspNetUserTokens", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NLog;
|
||||
using System;
|
||||
|
||||
namespace GWMS.Data
|
||||
@@ -33,7 +34,9 @@ namespace GWMS.Data
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Eccezione in UserIdentityDbContext{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -64,5 +67,11 @@ namespace GWMS.Data
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
@{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" method="post">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p>Premendo sul pulsante effettuerai il logout dal sistema.</p>
|
||||
|
||||
@@ -15,21 +15,9 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
[AllowAnonymous]
|
||||
public class LoginModel : PageModel
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private IConfiguration _configuration;
|
||||
private readonly ILogger<LoginModel> _logger;
|
||||
private readonly SignInManager<IdentityUser> _signInManager;
|
||||
private readonly UserManager<IdentityUser> _userManager;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public LoginModel(SignInManager<IdentityUser> signInManager,
|
||||
ILogger<LoginModel> logger,
|
||||
UserManager<IdentityUser> userManager,
|
||||
IConfiguration configuration)
|
||||
public LoginModel(SignInManager<IdentityUser> signInManager, ILogger<LoginModel> logger, UserManager<IdentityUser> userManager, IConfiguration configuration)
|
||||
{
|
||||
_userManager = userManager;
|
||||
_signInManager = signInManager;
|
||||
@@ -53,6 +41,103 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public async Task<IActionResult> OnGetAsync(string returnUrl = null)
|
||||
{
|
||||
await CheckSuperAdmin();
|
||||
if (!string.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
ModelState.AddModelError(string.Empty, ErrorMessage);
|
||||
}
|
||||
|
||||
returnUrl ??= Url.Content("~/");
|
||||
|
||||
// Clear the existing external cookie to ensure a clean login process
|
||||
await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
|
||||
|
||||
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
|
||||
|
||||
ReturnUrl = returnUrl;
|
||||
|
||||
var nextPage = await checkJumpLogin();
|
||||
if (!string.IsNullOrEmpty(nextPage))
|
||||
{
|
||||
return LocalRedirect(nextPage);
|
||||
}
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync(string returnUrl = null)
|
||||
{
|
||||
returnUrl ??= Url.Content("~/");
|
||||
|
||||
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
// This doesn't count login failures towards account lockout To enable password
|
||||
// failures to trigger account lockout, set lockoutOnFailure: true
|
||||
var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
_logger.LogInformation("User logged in.");
|
||||
return LocalRedirect(returnUrl);
|
||||
}
|
||||
if (result.RequiresTwoFactor)
|
||||
{
|
||||
return RedirectToPage("./LoginWith2fa", new { ReturnUrl = returnUrl, RememberMe = Input.RememberMe });
|
||||
}
|
||||
if (result.IsLockedOut)
|
||||
{
|
||||
_logger.LogWarning("User account locked out.");
|
||||
return RedirectToPage("./Lockout");
|
||||
}
|
||||
else
|
||||
{
|
||||
ModelState.AddModelError(string.Empty, "Invalid login attempt.");
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return Page();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Public Classes
|
||||
|
||||
public class InputModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private readonly ILogger<LoginModel> _logger;
|
||||
private readonly SignInManager<IdentityUser> _signInManager;
|
||||
private readonly UserManager<IdentityUser> _userManager;
|
||||
private IConfiguration _configuration;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task<string> checkJumpLogin()
|
||||
@@ -61,22 +146,21 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
string uid = getReqPar("uid", "");
|
||||
string uem = getReqPar("uem", "");
|
||||
string pag = getReqPar("pag", "Transporters");
|
||||
string jumpRedir = _configuration["jumpRedir"];
|
||||
string baseAppPath = $"{_configuration["RuntimeOpt:BaseAppPath"]}";
|
||||
|
||||
await Task.Delay(1);
|
||||
if (!string.IsNullOrEmpty(uid) && !string.IsNullOrEmpty(uem))
|
||||
{
|
||||
var user = await _userManager.FindByEmailAsync(uem);
|
||||
//var userById = await _userManager.FindByIdAsync(userId);
|
||||
if (user != null)
|
||||
{
|
||||
if (user.Id == uid)
|
||||
{
|
||||
// se corrispondono --> signini!
|
||||
await _signInManager.SignInAsync(user, false);
|
||||
_logger.LogInformation("Forced User log in via URL token");
|
||||
_logger.LogInformation($"Forced User log in via URL token for {uem}");
|
||||
// salto a pagina target da conf + req
|
||||
nextPage = string.IsNullOrEmpty(pag) ? jumpRedir : $"{jumpRedir}{pag}";
|
||||
nextPage = string.IsNullOrEmpty(pag) ? baseAppPath : $"{baseAppPath}{pag}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,93 +232,5 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public async Task<IActionResult> OnGetAsync(string returnUrl = null)
|
||||
{
|
||||
await CheckSuperAdmin();
|
||||
if (!string.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
ModelState.AddModelError(string.Empty, ErrorMessage);
|
||||
}
|
||||
|
||||
returnUrl ??= Url.Content("~/");
|
||||
|
||||
// Clear the existing external cookie to ensure a clean login process
|
||||
await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
|
||||
|
||||
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
|
||||
|
||||
ReturnUrl = returnUrl;
|
||||
|
||||
var nextPage = await checkJumpLogin();
|
||||
if (!string.IsNullOrEmpty(nextPage))
|
||||
{
|
||||
return LocalRedirect(nextPage);
|
||||
}
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync(string returnUrl = null)
|
||||
{
|
||||
returnUrl ??= Url.Content("~/");
|
||||
|
||||
ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
// This doesn't count login failures towards account lockout
|
||||
// To enable password failures to trigger account lockout, set lockoutOnFailure: true
|
||||
var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
_logger.LogInformation("User logged in.");
|
||||
return LocalRedirect(returnUrl);
|
||||
}
|
||||
if (result.RequiresTwoFactor)
|
||||
{
|
||||
return RedirectToPage("./LoginWith2fa", new { ReturnUrl = returnUrl, RememberMe = Input.RememberMe });
|
||||
}
|
||||
if (result.IsLockedOut)
|
||||
{
|
||||
_logger.LogWarning("User account locked out.");
|
||||
return RedirectToPage("./Lockout");
|
||||
}
|
||||
else
|
||||
{
|
||||
ModelState.AddModelError(string.Empty, "Invalid login attempt.");
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return Page();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Public Classes
|
||||
|
||||
public class InputModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
@@ -17,15 +18,17 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
|
||||
private readonly ILogger<LogoutModel> _logger;
|
||||
private readonly SignInManager<IdentityUser> _signInManager;
|
||||
private IConfiguration _configuration;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public LogoutModel(SignInManager<IdentityUser> signInManager, ILogger<LogoutModel> logger)
|
||||
public LogoutModel(SignInManager<IdentityUser> signInManager, ILogger<LogoutModel> logger, IConfiguration configuration)
|
||||
{
|
||||
_signInManager = signInManager;
|
||||
_logger = logger;
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -36,6 +39,8 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IActionResult> OnPost(string returnUrl = null)
|
||||
{
|
||||
await _signInManager.SignOutAsync();
|
||||
@@ -46,7 +51,8 @@ namespace GWMS.UI.Areas.Identity.Pages.Account
|
||||
}
|
||||
else
|
||||
{
|
||||
return RedirectToPage();
|
||||
string appDir = $"{_configuration["RuntimeOpt:BaseUrl"]}{_configuration["RuntimeOpt:BaseAppPath"]}";
|
||||
return RedirectToPage(appDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,3 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
protected DateTime adesso = DateTime.Now;
|
||||
|
||||
Version version = typeof(Program).Assembly.GetName().Version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.UI.Components
|
||||
{
|
||||
public partial class CmpFooter : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (aTimer != null)
|
||||
{
|
||||
aTimer.Elapsed -= ElapsedTimer;
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
adesso = DateTime.Now;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
public void StartTimer()
|
||||
{
|
||||
if (aTimer != null)
|
||||
{
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
}
|
||||
int tOutPeriod = 1000;
|
||||
aTimer = new System.Timers.Timer(tOutPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
aTimer.Start();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected DateTime adesso = DateTime.Now;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var rawVers = typeof(Program).Assembly.GetName().Version;
|
||||
version = rawVers != null ? rawVers : new Version("0.0.0.0");
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private System.Timers.Timer aTimer = null!;
|
||||
private Version? version = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -299,17 +299,4 @@
|
||||
return q[parmName] ?? "";
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Restituisce URL immagine QRCode
|
||||
///// </summary>
|
||||
///// <param name="QrValue">Parametro da renderizzare con QRCode</param>
|
||||
///// <returns></returns>
|
||||
//protected string getImgUrl(object QrValue)
|
||||
//{
|
||||
// string baseUrl = $"{Configuration["ZCodeUrl"]}/HOME/QR_site/JSON?val=";
|
||||
// string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}";
|
||||
// string answ = $"{baseUrl}{payload}";
|
||||
// return answ;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -151,7 +151,7 @@ namespace GWMS.UI.Components
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
plantsData = await DataService.PlantsGetAll();
|
||||
plantsData = await DataService.PlantDtoGetAll();
|
||||
// recupero dato del plant corrente
|
||||
currPlantData = plantsData.Where(x => x.PlantId == PlantId).FirstOrDefault();
|
||||
// solo se ho valore QR selezionato
|
||||
|
||||
@@ -161,17 +161,4 @@
|
||||
transpList = await DataService.TransportersGetAll();
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Restituisce URL immagine QRCode
|
||||
///// </summary>
|
||||
///// <param name="QrValue">Parametro da renderizzare con QRCode</param>
|
||||
///// <returns></returns>
|
||||
//protected string getImgUrl(object QrValue)
|
||||
//{
|
||||
// string baseUrl = $"{Configuration["ZCodeUrl"]}/HOME/QR_site/JSON?val=";
|
||||
// string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}";
|
||||
// string answ = $"{baseUrl}{payload}";
|
||||
// return answ;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -114,17 +114,4 @@
|
||||
transpList = await DataService.TransportersGetAll();
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Restituisce URL immagine QRCode
|
||||
///// </summary>
|
||||
///// <param name="QrValue">Parametro da renderizzare con QRCode</param>
|
||||
///// <returns></returns>
|
||||
//protected string getImgUrl(object QrValue)
|
||||
//{
|
||||
// string baseUrl = $"{Configuration["ZCodeUrl"]}/HOME/QR_site/JSON?val=";
|
||||
// string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}";
|
||||
// string answ = $"{baseUrl}{payload}";
|
||||
// return answ;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -15,17 +15,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="row py-0">
|
||||
<div class="col-4 col-md-6 col-lg-8 font-weight-bold">
|
||||
<h2 class="mb-0">@currItem.PlantCode</h2>
|
||||
</div>
|
||||
<div class="col-8 col-md-6 col-lg-4 pl-0 text-right align-bottom">
|
||||
<button class="btn btn-primary btn-block" @onclick="() => ShowDetail(currItem.PlantId)">
|
||||
<b>@currItem.PlantDesc <i class="fas fa-angle-double-right"></i></b>
|
||||
</button>
|
||||
</div>
|
||||
</div>*@
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-0 p-md-1 p-lg-2">
|
||||
@@ -94,14 +83,20 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item @headerStatus d-flex justify-content-between align-items-center px-0 py-1 small">
|
||||
<div class="px-1" title="@checkRTime">
|
||||
SERBATOIO <i class="fas fa-play @playStatus"></i>
|
||||
</div>
|
||||
<div class="px-1 text-right">
|
||||
<span><i class="fas fa-database"></i> Livello:</span><span>@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0")</span> | <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</div>
|
||||
</li>
|
||||
@{
|
||||
headerStatus = deviceOnline ? "list-group-item-info" : "text-secondary";
|
||||
playCss = dataIsRT ? "text-success" : "text-danger";
|
||||
checkRTime = dataIsRT ? $"Dati Realtime aggiornati al {_currItem.LastUpdate}" : $"Mancata ricezione: ultimo aggiornamento {_currItem.LastUpdate}";
|
||||
<li class="list-group-item @headerStatus d-flex justify-content-between align-items-center px-0 py-1 small">
|
||||
<div class="px-1" title="@checkRTime">
|
||||
SERBATOIO
|
||||
<i class="fas fa-play @playCss"></i>
|
||||
</div>
|
||||
<div class="px-1 text-right">
|
||||
<span><i class="fas fa-database"></i> Livello:</span><span>@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0")</span> | <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
<li class="list-group-item align-items-center px-1 py-2">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="px-1 py-0 flex-grow-1">
|
||||
@@ -121,32 +116,52 @@
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-1 p-md-2">
|
||||
<div class="col-6">
|
||||
@if (currItem.SoldTS != null && currItem.SoldTS.Count > 0 && currItem.SoldTS[0].ValDouble > 0)
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </div>
|
||||
@if (PlantLevelDto != null && PlantLevelDto.Count > 1)
|
||||
{
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </div>
|
||||
<div style="font-size:1.2em;"><b>@currItem.SoldTS[0].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
@if (PlantLevelDto[1].QtaVenduta > 0)
|
||||
{
|
||||
<div style="font-size:1.2em;"><b>@($"{PlantLevelDto[1].QtaVenduta:N0}")</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
@* <div style="font-size:1.2em;" class="text-secondary"><b>@($"{currItem.SoldTS[0].ValDouble:N0}")</b> <span class="small"> <sub>kg</sub></span></div> *@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="font-size:1.2em;"><b>ND</b> <span class="small"></span></div>
|
||||
<div style="font-size:0.8em;"><span class="small text-danger">(<i>@($"{PlantLevelDto[1].QtaVenduta:N0}")<sub>kg</sub></i>)</span></div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </div>
|
||||
<div style="font-size:1.2em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@if (currItem.SoldTS != null && currItem.SoldTS.Count > 1 && currItem.SoldTS[1].ValDouble > 0)
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </div>
|
||||
@if (PlantLevelDto != null && PlantLevelDto.Count > 0)
|
||||
{
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </div>
|
||||
<div style="font-size:1.2em;"><b>@currItem.SoldTS[1].ValDouble.ToString("N1")</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
@if (PlantLevelDto[0].QtaVenduta > 0)
|
||||
{
|
||||
<div style="font-size:1.2em;"><b>@($"{PlantLevelDto[0].QtaVenduta:N0}")</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
|
||||
@* <div style="font-size:1.2em;" class="text-secondary"><b>@($"{currItem.SoldTS[1].ValDouble:N0}")</b> <span class="small"> <sub>kg</sub></span></div> *@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div style="font-size:1.2em;"><b>ND</b> <span class="small"></span></div>
|
||||
<div style="font-size:0.8em;"><span class="small text-danger">(<i>@($"{PlantLevelDto[0].QtaVenduta:N0}") <sub>kg</sub></i>)</span></div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </div>
|
||||
<div style="font-size:1.2em;"><b>ND</b> <span class="small"> <sub>kg</sub></span></div>
|
||||
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 small text-right">
|
||||
<sup class="px-1">updated: @($"{DateTime.Now:HH:mm:ss}")</sup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -13,66 +14,8 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
public partial class PlantOverview
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected PlantDTO _currItem = new PlantDTO();
|
||||
|
||||
protected List<chartJsData.chartJsTSerie> LevelVal = new List<chartJsData.chartJsTSerie>();
|
||||
|
||||
/// <summary>
|
||||
/// fattore di riduzione x visualizzare meno punti (in base alla numerosità...
|
||||
/// </summary>
|
||||
protected int redFact = 1;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; }
|
||||
|
||||
private int SelPlantId
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.PlantId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.PlantId.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.PlantId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string checkRTime
|
||||
{
|
||||
get => DateTime.Now.Subtract(_currItem.LastUpdate).TotalMinutes > 2 ? $"Mancata ricezione: ultimo aggiornamento {_currItem.LastUpdate}" : $"Dati Realtime aggiornati al {_currItem.LastUpdate}";
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public PlantDTO currItem
|
||||
{
|
||||
@@ -87,54 +30,55 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
var dataReload = Task.Run(async () =>
|
||||
{
|
||||
// legge i valori di plantLog ultimi 2 gg...
|
||||
SelectOrderData plantLevFilt = new SelectOrderData()
|
||||
{
|
||||
PlantId = value.PlantId,
|
||||
DateEnd = DateTime.Today.AddDays(1),
|
||||
DateStart = DateTime.Today.AddDays(-1),
|
||||
ShowClosed = false
|
||||
};
|
||||
PlantLevelDto = await DataService.PlantsAnalisysByFilt(plantLevFilt);
|
||||
|
||||
// aggiunta delay o non riesce a disegnare
|
||||
int ChartWaitDelay = 150;
|
||||
int.TryParse(Configuration["ChartWaitDelay"], out ChartWaitDelay);
|
||||
Thread.Sleep(ChartWaitDelay);
|
||||
await Task.Delay(ChartWaitDelay);
|
||||
await HandleRedraw();
|
||||
});
|
||||
dataReload.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string headerStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
int TimeoutOffline = 5;
|
||||
int.TryParse(Configuration["TimeoutOffline"], out TimeoutOffline);
|
||||
answ = DateTime.Now.Subtract(_currItem.LastUpdate).TotalMinutes > TimeoutOffline ? "text-secondary" : "list-group-item-info";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
public string playStatus
|
||||
{
|
||||
get => DateTime.Now.Subtract(_currItem.LastUpdate).TotalMinutes > 2 ? "text-danger" : "text-success";
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
#region Protected Fields
|
||||
|
||||
private void fixRedFactor()
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
// passo a 2h se > 3 gg
|
||||
if (numCount > 240)
|
||||
answ = 5;
|
||||
// passo a 3h se > 5 gg
|
||||
else if (numCount > 120)
|
||||
answ = 4;
|
||||
// passo a 4h se > 10 gg
|
||||
else if (numCount > 72)
|
||||
answ = 3;
|
||||
redFact = answ;
|
||||
}
|
||||
protected PlantDTO _currItem = new PlantDTO();
|
||||
|
||||
#endregion Private Methods
|
||||
protected string checkRTime;
|
||||
protected string headerStatus;
|
||||
protected List<chartJsData.chartJsTSerie> LevelVal = new List<chartJsData.chartJsTSerie>();
|
||||
|
||||
protected string playCss = "";
|
||||
|
||||
/// <summary>
|
||||
/// fattore di riduzione x visualizzare meno punti (in base alla numerosità...
|
||||
/// </summary>
|
||||
protected int redFact = 1;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -174,11 +118,23 @@ namespace GWMS.UI.Components
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected string getPressData(string valore, string formato)
|
||||
{
|
||||
string answ = "";
|
||||
if (currItem.PressAct.ContainsKey(valore))
|
||||
{
|
||||
answ = currItem.PressAct[valore].ToString(formato);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task HandleRedraw()
|
||||
{
|
||||
checkRt();
|
||||
fixRedFactor();
|
||||
await Task.Delay(1);
|
||||
LevelVal = _currItem.LevelTS.OrderByDescending(x => x.DtEvent).Where((cat, index) => index % redFact == 0).OrderBy(x => x.DtEvent).Select(r => new chartJsData.chartJsTSerie() { x = r.DtEvent, y = r.ValDouble }).ToList();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
@@ -210,18 +166,68 @@ namespace GWMS.UI.Components
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
#region Private Properties
|
||||
|
||||
public string getPressData(string valore, string formato)
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
private bool dataIsRT { get; set; } = false;
|
||||
private bool deviceOnline { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; }
|
||||
|
||||
private List<PlantLevSumDTO>? PlantLevelDto { get; set; } = null;
|
||||
|
||||
private int SelPlantId
|
||||
{
|
||||
string answ = "";
|
||||
if (currItem.PressAct.ContainsKey(valore))
|
||||
get
|
||||
{
|
||||
answ = currItem.PressAct[valore].ToString(formato);
|
||||
int answ = 0;
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.PlantId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.PlantId.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.PlantId = value;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void checkRt()
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
int TimeoutOffline = 5;
|
||||
int.TryParse(Configuration["TimeoutOffline"], out TimeoutOffline);
|
||||
deviceOnline = adesso.Subtract(_currItem.LastUpdate).TotalMinutes <= TimeoutOffline;
|
||||
dataIsRT = adesso.Subtract(_currItem.LastUpdate).TotalMinutes <= 2;
|
||||
}
|
||||
|
||||
private void fixRedFactor()
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
// passo a 2h se > 3 gg
|
||||
if (numCount > 240)
|
||||
answ = 5;
|
||||
// passo a 3h se > 5 gg
|
||||
else if (numCount > 120)
|
||||
answ = 4;
|
||||
// passo a 4h se > 10 gg
|
||||
else if (numCount > 72)
|
||||
answ = 3;
|
||||
redFact = answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,8 @@
|
||||
protected async Task Processing()
|
||||
{
|
||||
processRunning = true;
|
||||
DbConfig.ExecMigrationMain();
|
||||
DbConfig.ExecMigrationIdentity();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
@code {
|
||||
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
private List<SupplierModel> SuppliersList;
|
||||
private List<TransporterModel> TransportersList;
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
SuppliersList = await DataService.SuppliersGetAll();
|
||||
TransportersList = await DataService.TransportersGetAll();
|
||||
}
|
||||
|
||||
@@ -348,14 +348,14 @@ namespace GWMS.UI.Controllers
|
||||
{
|
||||
// conversione dati
|
||||
List<PlantLogModel> plData = rawData.fluxData.Select(jpl => _DataService.convertFluxToPL(currPlant.PlantId, jpl)).ToList();
|
||||
Log.Trace($"flogJson | {id} | Convertiti {plData.Count} record");
|
||||
Log.Debug($"flogJson | {id} | Convertiti {plData.Count} record");
|
||||
// insert!
|
||||
fatto = await _DataService.PlantLogInsert(plData);
|
||||
Log.Trace($"flogJson | {id} | PlantLogInsert --> esito: {fatto}");
|
||||
Log.Debug($"flogJson | {id} | PlantLogInsert --> esito: {fatto}");
|
||||
|
||||
// effettuo SEMPRE verifica per ricalcolo ordini...
|
||||
await _DataService.checkLevels();
|
||||
Log.Trace($"flogJson | {id} | chiamata checkLevels");
|
||||
Log.Debug($"flogJson | {id} | chiamata checkLevels");
|
||||
// leggo parametri correnti...
|
||||
try
|
||||
{
|
||||
|
||||
@@ -47,16 +47,16 @@ namespace GWMS.UI.Controllers
|
||||
[HttpDelete("{id}")]
|
||||
public void Delete(int id)
|
||||
{
|
||||
//Log.Debug($"Chiamata Delete | {id}");
|
||||
Log.Debug($"PlantData: Chiamata Delete | {id} | nothing 2 do");
|
||||
}
|
||||
|
||||
// GET: api/PlantData
|
||||
[HttpGet]
|
||||
public async Task<List<PlantDTO>> Get()
|
||||
{
|
||||
//Log.Debug("Chiamata Get");
|
||||
Log.Debug("PlantData: Chiamata Get");
|
||||
// serializzo i dati di PlantDTO dell'impianto richiesto
|
||||
List<PlantDTO> ListRecords = await _DataService.PlantsGetAll();
|
||||
List<PlantDTO> ListRecords = await _DataService.PlantDtoGetAll();
|
||||
return ListRecords;
|
||||
}
|
||||
|
||||
@@ -64,9 +64,9 @@ namespace GWMS.UI.Controllers
|
||||
[HttpGet("{id}")]
|
||||
public async Task<PlantDTO> Get(int id)
|
||||
{
|
||||
//Log.Debug($"Chiamata Get | {id}");
|
||||
Log.Debug($"PlantData: Chiamata Get | id: {id}");
|
||||
// serializzo i dati di PlantDTO dell'impianto richiesto
|
||||
var ListRecords = await _DataService.PlantsGetAll();
|
||||
var ListRecords = await _DataService.PlantDtoGetAll();
|
||||
//seleziono plant...
|
||||
var SelRecords = ListRecords.Where(X => X.PlantId == id).FirstOrDefault();
|
||||
return SelRecords;
|
||||
@@ -76,14 +76,14 @@ namespace GWMS.UI.Controllers
|
||||
[HttpPost]
|
||||
public void Post([FromBody] string value)
|
||||
{
|
||||
//Log.Debug("Chiamata Post");
|
||||
Log.Debug("PlantData: Chiamata Post | nothing 2 do");
|
||||
}
|
||||
|
||||
// PUT api/PlantData/5
|
||||
[HttpPut("{id}")]
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
//Log.Debug($"Chiamata Put | {id}");
|
||||
Log.Debug("PlantData: Chiamata Put | nothing 2 do");
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
+605
-311
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2406.0417</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Services\**" />
|
||||
<Content Remove="Services\**" />
|
||||
<EmbeddedResource Remove="Services\**" />
|
||||
<None Remove="Services\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="QuartzHostedService.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="bundleconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="NLog.config.dev" />
|
||||
<None Remove="NLog.config.disabled" />
|
||||
<None Remove="NLog.config.rel" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfileLinux.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfileWin.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\W2019-IIS-DEV.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="NLog.config.rel">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="NLog.config.dev">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GWMS.Data\GWMS.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AspNetCore.HealthChecks.MySql" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" ExcludeAssets="All" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.11" />
|
||||
<PackageReference Include="ZXingBlazor" Version="0.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="bundleconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Components\ParamEditor - Copy.razor.cs">
|
||||
<DependentUpon>ParamEditor.razor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Pages\Transporters - Copy - Copy.razor.cs">
|
||||
<DependentUpon>Transporters - Copy.razor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Pages\Transporters - Copy.razor.cs">
|
||||
<DependentUpon>Transporters.razor.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Target Name="PreBuild" AfterTargets="PreBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath) -Config $(Configuration)" />
|
||||
</Target>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath) -Config $(Configuration)" />
|
||||
</Target>
|
||||
</Project>
|
||||
+38
-13
@@ -2,22 +2,34 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2309.0513</Version>
|
||||
<Version>1.0.2407.3013</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Services\**" />
|
||||
<Content Remove="Services\**" />
|
||||
<EmbeddedResource Remove="Services\**" />
|
||||
<None Remove="Services\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="QuartzHostedService.cs" />
|
||||
<Compile Remove="Services\BlazorTimer.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="bundleconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="NLog.config.dev" />
|
||||
<None Remove="NLog.config.disabled" />
|
||||
<None Remove="NLog.config.rel" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
|
||||
@@ -26,17 +38,26 @@
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\W2019-IIS-DEV.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="NLog.config.rel">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="NLog.config.dev">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GWMS.Data\GWMS.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AspNetCore.HealthChecks.MySql" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.2" />
|
||||
@@ -46,16 +67,12 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" ExcludeAssets="All" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="NLog" Version="5.3.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
|
||||
<PackageReference Include="ZXingBlazor" Version="0.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="bundleconfig.json" />
|
||||
</ItemGroup>
|
||||
@@ -72,7 +89,15 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Target Name="PreBuild" AfterTargets="PreBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath) -Config $(Configuration)" />
|
||||
</Target>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath) -Config $(Configuration)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
+17
-11
@@ -110,20 +110,26 @@ namespace GWMS.UI.Health
|
||||
|
||||
public static async Task<HealthCheckResult> PingCheck(string hostName)
|
||||
{
|
||||
using (var thePing = new Ping())
|
||||
if (hostName.Contains("::") || hostName.Contains("0.0.0.0"))
|
||||
{
|
||||
var pingResult = await thePing.SendPingAsync(hostName);
|
||||
var description = $"Ping to {hostName}";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime);
|
||||
healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString());
|
||||
if (pingResult.Status == IPStatus.Success)
|
||||
return HealthCheckResult.Unhealthy($"Wrong Hostname: {hostName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var thePing = new Ping())
|
||||
{
|
||||
description += $" - {pingResult.RoundtripTime}ms";
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
var pingResult = await thePing.SendPingAsync(hostName);
|
||||
var description = $"Ping to {hostName}";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime);
|
||||
healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString());
|
||||
if (pingResult.Status == IPStatus.Success)
|
||||
{
|
||||
description += $" - {pingResult.RoundtripTime}ms";
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
|
||||
}
|
||||
|
||||
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -29,7 +29,7 @@
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true}| ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
@@ -39,8 +39,16 @@
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
|
||||
|
||||
<logger name="System.*" finalMinLevel="Warn" />
|
||||
<logger name="Microsoft.*" finalMinLevel="Warn" />
|
||||
<!--<logger name="Microsoft.AspNetCore.SignalR" finalMinLevel="Debug" />
|
||||
<logger name="Microsoft.AspNetCore.Http.Connections" finalMinLevel="Debug" />-->
|
||||
<logger name="Microsoft.AspNetCore.*" finalMinLevel="Warn" />
|
||||
<logger name="Microsoft.Hosting.Lifetime*" finalMinLevel="Info" />
|
||||
|
||||
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Trace" writeTo="fileTarget" />
|
||||
<logger name="*" minlevel="Debug" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="myvar" value="myvalue" />
|
||||
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
|
||||
<!--
|
||||
add your targets here
|
||||
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
||||
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Write events to a file with the date in the filename.
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
|
||||
<logger name="System.*" finalMinLevel="Warn" />
|
||||
<logger name="Microsoft.*" finalMinLevel="Warn" />
|
||||
<!--<logger name="Microsoft.AspNetCore.SignalR" finalMinLevel="Debug" />
|
||||
<logger name="Microsoft.AspNetCore.Http.Connections" finalMinLevel="Debug" />-->
|
||||
<logger name="Microsoft.AspNetCore.*" finalMinLevel="Warn" />
|
||||
<logger name="Microsoft.Hosting.Lifetime*" finalMinLevel="Info" />
|
||||
|
||||
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Debug" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="myvar" value="myvalue" />
|
||||
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
|
||||
<!--
|
||||
add your targets here
|
||||
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
||||
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Write events to a file with the date in the filename.
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="System.*" finalMinLevel="Warn" />
|
||||
<logger name="Microsoft.*" finalMinLevel="Warn" />
|
||||
<!--<logger name="Microsoft.AspNetCore.SignalR" finalMinLevel="Debug" />-->
|
||||
<!--<logger name="Microsoft.AspNetCore.Http.Connections" finalMinLevel="Debug" />-->
|
||||
<logger name="Microsoft.AspNetCore.*" finalMinLevel="Info" />
|
||||
<logger name="Microsoft.Hosting.Lifetime*" finalMinLevel="Info" />
|
||||
|
||||
<logger name="*" minlevel="Info" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -229,11 +229,11 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantDtoGetAll();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantDtoGetAll();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
|
||||
/* ((e) => { BarCode = e; ShowScanBarcode = !ShowScanBarcode; }) */
|
||||
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
|
||||
ShowScanBarcode="ShowScanBarcode"
|
||||
Close="() => ResetScanner()"
|
||||
ShowScanBarcode="ShowScanBarcode"
|
||||
ScanBtnTitle="Scan"
|
||||
ResetBtnTitle="Reset"
|
||||
CloseBtnTitle="Close"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BlazorBarcodeScanner.ZXing.JS;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -18,7 +19,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -278,17 +279,17 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantsList();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BlazorBarcodeScanner.ZXing.JS;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -19,7 +20,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -135,7 +136,8 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
MessageService.SelPlantId = "0";
|
||||
MessageService.SelOrderCode = "";
|
||||
NavManager.NavigateTo($"{Configuration["BaseUrl"]}GasStation");
|
||||
string fullUrl = $"{Configuration["RuntimeOpt:BaseUrl"]}{Configuration["RuntimeOpt:BaseAppPath"]}";
|
||||
NavManager.NavigateTo($"{fullUrl}GasStation", true);
|
||||
}
|
||||
|
||||
protected void OrderCompleted()
|
||||
@@ -177,17 +179,17 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantsList();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace GWMS.UI.Pages
|
||||
private OrderModel currRecord = null;
|
||||
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
private List<SupplierModel> SuppliersList;
|
||||
|
||||
@@ -339,17 +339,17 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantsList();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
await ReloadData();
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
protected DateTime DateEnd
|
||||
private DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime DateStart
|
||||
private DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -251,6 +251,7 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
{
|
||||
DateEnd = (DateTime)date;
|
||||
@@ -259,7 +260,8 @@ namespace GWMS.UI.Pages
|
||||
private void OnDateStartChanged(DateTime? date)
|
||||
{
|
||||
DateStart = (DateTime)date;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
@@ -267,7 +269,7 @@ namespace GWMS.UI.Pages
|
||||
ListRecords = null;
|
||||
try
|
||||
{
|
||||
SearchRecords = await DataService.PlantsAnalisysGetByCode(AppMService.Order_Filter);
|
||||
SearchRecords = await DataService.PlantsAnalisysByFilt(AppMService.Order_Filter);
|
||||
SearchRecords = SearchRecords.Where(x => x.HasRefill || !_ShowOnlyRefill).ToList();
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
}
|
||||
@@ -292,6 +294,8 @@ namespace GWMS.UI.Pages
|
||||
if (currPlant != null && currSuppl != null)
|
||||
{
|
||||
DateTime ordDate = currItem.DataRif.AddDays(-1);
|
||||
// calcolo il delta crescita come il delta min * num ore durata fillup...
|
||||
var minIncr = currItem.DeltaMin * (currItem.FillEnd.Subtract(currItem.FillStart).TotalHours);
|
||||
// creo un nuovo record
|
||||
currRecord = new OrderModel()
|
||||
{
|
||||
@@ -301,15 +305,13 @@ namespace GWMS.UI.Pages
|
||||
OrderDesc = $"Ord Man {currPlant.PlantDesc} - {ordDate}",
|
||||
TransporterId = 1,
|
||||
OrderCode = $"O{currPlant.PlantCode}{ordDate:yyMMddHHmm}",
|
||||
LevelStart = Math.Round(currItem.LevelMin),
|
||||
LevelEnd = Math.Round(currItem.LevelMax),
|
||||
DtExecStart = currItem.FillStart,
|
||||
DtExecEnd = currItem.FillEnd,
|
||||
ExecutionQty = Math.Ceiling((currItem.LevelMax - currItem.LevelMin) / currItem.DeltaMin) * currItem.DeltaMin,
|
||||
OrderQty = Math.Ceiling((currItem.LevelMax - currItem.LevelMin) / 2000) * 2000
|
||||
LevelStart = Math.Floor(currItem.LevelMin),
|
||||
LevelEnd = Math.Ceiling(currItem.LevelMax),
|
||||
DtExecStart = currItem.FillStart.AddMinutes(-1),
|
||||
DtExecEnd = currItem.FillEnd.AddMinutes(1),
|
||||
ExecutionQty = Math.Ceiling((currItem.LevelMax - currItem.LevelMin + minIncr) / currItem.DeltaMin) * currItem.DeltaMin,
|
||||
OrderQty = Math.Ceiling((currItem.LevelMax - currItem.LevelMin + minIncr) / 2000) * 2000
|
||||
};
|
||||
//// aggiorno filtro
|
||||
//AppMService.Order_Filter = SelectOrderData.Init(5, 10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,11 +353,11 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantDtoGetAll();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantDtoGetAll();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
@@ -23,7 +24,7 @@ namespace GWMS.UI.Pages
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private objItem currRecord = null;
|
||||
private List<objItem> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -255,17 +256,17 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantsList();
|
||||
PlantsList = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
SelPlantId = ClaimPlantId;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
await ReloadData();
|
||||
|
||||
@@ -14,13 +14,28 @@ namespace GWMS.UI.Pages
|
||||
[Authorize(Roles = "SuperAdmin, Admin")]
|
||||
public partial class PlantSetup : ComponentBase, IDisposable
|
||||
{
|
||||
#region Private Fields
|
||||
#region Public Methods
|
||||
|
||||
private PlantDTO currRecord = null;
|
||||
public string checkSelect(int PlantId)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.PlantId == PlantId) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private List<PlantDTO> ListRecords;
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Private Fields
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
@@ -64,6 +79,46 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Edit(PlantDTO selRecord)
|
||||
{
|
||||
// rileggo dal DB il record corrente...
|
||||
var pUpd = Task.Run(async () => currRecord = await DataService.PlantDtoGetByCode(selRecord.PlantCode));
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Setup Impianti";
|
||||
AppMService.PageIcon = "fas fa-wrench pr-2";
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
DataService.rollBackEdit(currRecord);
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
await DataService.FlushRedisCache();
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private PlantDTO currRecord = null;
|
||||
|
||||
private List<PlantDTO> ListRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -97,11 +152,11 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
ListRecords = await DataService.PlantsGetAll();
|
||||
ListRecords = await DataService.PlantDtoGetAll();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantDtoGetAll();
|
||||
ListRecords = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
}
|
||||
else
|
||||
@@ -111,60 +166,5 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Edit(PlantDTO selRecord)
|
||||
{
|
||||
// rileggo dal DB il record corrente...
|
||||
var pUpd = Task.Run(async () => currRecord = await DataService.PlantsGetByCode(selRecord.PlantCode));
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Setup Impianti";
|
||||
AppMService.PageIcon = "fas fa-wrench pr-2";
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
DataService.rollBackEdit(currRecord);
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
await DataService.InvalidateAllCache();
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string checkSelect(int PlantId)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.PlantId == PlantId) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -110,11 +110,11 @@ namespace GWMS.UI.Pages
|
||||
// se ho un plantId valido --> altrimenti non abilitato
|
||||
if (ClaimPlantId == 0)
|
||||
{
|
||||
ListRecords = await DataService.PlantsGetAll();
|
||||
ListRecords = await DataService.PlantDtoGetAll();
|
||||
}
|
||||
else if (ClaimPlantId > 0)
|
||||
{
|
||||
var rawData = await DataService.PlantsGetAll();
|
||||
var rawData = await DataService.PlantDtoGetAll();
|
||||
ListRecords = rawData.Where(x => x.PlantId == ClaimPlantId).ToList();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await DataService.InvalidateAllCache();
|
||||
await DataService.FlushRedisCache();
|
||||
|
||||
NavManager.NavigateTo("Index");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="~/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="~/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="~/favicon-16x16.png">
|
||||
<link rel="manifest" href="~/site.webmanifest">
|
||||
<link rel="mask-icon" href="~/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
@@ -20,7 +20,7 @@ namespace GWMS.UI.Pages
|
||||
private OrderModel currRecord = null;
|
||||
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
private List<SupplierModel> SuppliersList;
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace GWMS.UI.Pages
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
isLoading = true;
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
SelSupplierId = 0;
|
||||
SuppliersList = null;
|
||||
await GetClaimsData();
|
||||
@@ -294,7 +294,7 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
await ReloadData();
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace GWMS.UI.Pages
|
||||
private OrderModel currRecord = null;
|
||||
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
private List<TransporterModel> TransportersList;
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace GWMS.UI.Pages
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
isLoading = true;
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
SelTranspId = 0;
|
||||
TransportersList = null;
|
||||
await GetClaimsData();
|
||||
@@ -323,7 +323,7 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
PlantsList = new List<PlantDTO>();
|
||||
PlantsList = new List<PlantDetailModel>();
|
||||
}
|
||||
isLoading = false;
|
||||
await ReloadData();
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
protected List<GWMS.Data.DTO.PlantDTO>? plantList { get; set; } = null;
|
||||
protected List<GWMS.Data.DatabaseModels.PlantDetailModel>? plantList { get; set; } = null;
|
||||
|
||||
protected List<GWMS.Data.DatabaseModels.SupplierModel>? suppList { get; set; } = null;
|
||||
|
||||
@@ -496,9 +496,9 @@ namespace GWMS.UI.Pages
|
||||
CurrentUserClaimVal = "0";
|
||||
}
|
||||
|
||||
string baseUrl = Configuration["BaseUrl"];
|
||||
string baseAppPath = Configuration["BaseAppPath"];
|
||||
string redirPage = Configuration["QrRedirPage"];
|
||||
string baseUrl = Configuration["RuntimeOpt:BaseUrl"];
|
||||
string baseAppPath = Configuration["RuntimeOpt:BaseAppPath"];
|
||||
string redirPage = Configuration["RuntimeOpt:QrRedirPage"];
|
||||
if (!string.IsNullOrEmpty(baseAppPath))
|
||||
{
|
||||
if (baseUrl.EndsWith("/"))
|
||||
@@ -524,7 +524,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
case "PlantId":
|
||||
// elenco plant --> to dictionary!
|
||||
var plantList = await DataService.PlantsGetAll();
|
||||
var plantList = await DataService.PlantsList();
|
||||
if (plantList != null)
|
||||
{
|
||||
ClaimValList = plantList
|
||||
@@ -563,7 +563,7 @@ namespace GWMS.UI.Pages
|
||||
// effettuo refresh valori cache plants/suppliers/transp
|
||||
if (plantList == null)
|
||||
{
|
||||
plantList = await DataService.PlantsGetAll();
|
||||
plantList = await DataService.PlantsList();
|
||||
}
|
||||
if (suppList == null)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace GWMS.UI.Pages
|
||||
private int _startHour = 8;
|
||||
private WeekPlanModel currRecord = null;
|
||||
private List<WeekPlanModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
private List<SupplierModel> SuppliersList;
|
||||
private List<TransporterModel> TransportersList;
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
PlantsList = await DataService.PlantsList();
|
||||
SuppliersList = await DataService.SuppliersGetAll();
|
||||
TransportersList = await DataService.TransportersGetAll();
|
||||
await ReloadData();
|
||||
|
||||
@@ -40,13 +40,6 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
@* Riconnessione server app: https://www.syncfusion.com/faq/how-do-i-reconnect-blazor-server-side-automatically *@
|
||||
@* <script>
|
||||
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
document.location.reload();
|
||||
}
|
||||
</script>*@
|
||||
|
||||
<!-- inside of body section and after the div/app tag -->
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<script src="lib/Chart.js/chart.min.js"></script>
|
||||
@@ -61,7 +54,35 @@
|
||||
<script src="_content/ZXingBlazor/lib/barcodereader/barcode.js"></script>
|
||||
|
||||
<script src="lib/font-awesome/js/all.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
|
||||
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
|
||||
<script>
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: 600,
|
||||
retryIntervalMilliseconds: 1000
|
||||
},
|
||||
reconnectionHandler: {
|
||||
onConnectionDown: (options, error) => console.error(error),
|
||||
onConnectionUp: () => console.log("Client reconnected!")
|
||||
}
|
||||
}).then(() => {
|
||||
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
|
||||
get() {
|
||||
return this.__reconnectionDisplay;
|
||||
},
|
||||
set(value) {
|
||||
this.__reconnectionDisplay = {
|
||||
show: () => value.show(),
|
||||
update: (d) => value.update(d),
|
||||
rejected: (d) => document.location.reload()
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="lib/qrcode.js"></script>
|
||||
<script type="text/javascript" src="lib/dispQr.js"></script>
|
||||
|
||||
+12
-11
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog.Web;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -23,29 +23,30 @@ namespace GWMS.UI
|
||||
.ConfigureLogging(logging =>
|
||||
{
|
||||
logging.ClearProviders();
|
||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
})
|
||||
.UseNLog();
|
||||
#if DEBUG
|
||||
//logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Debug);
|
||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Information);
|
||||
#else
|
||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Warning);
|
||||
#endif
|
||||
});
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// inclusione NLog:
|
||||
// https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5
|
||||
// https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/
|
||||
var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
|
||||
var Log = LogManager.GetCurrentClassLogger();
|
||||
try
|
||||
{
|
||||
logger.Info("GMWS.UI Application Starting Up");
|
||||
Log.Info("GMWS.UI Application Starting Up");
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.Error(exception, "Stopped GMWS.UI program because of exception");
|
||||
Log.Error(exception, "Stopped GMWS.UI program because of exception");
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
NLog.LogManager.Shutdown();
|
||||
LogManager.Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+34
-45
@@ -2,16 +2,12 @@ using GWMS.Data;
|
||||
using GWMS.UI.Areas.Identity;
|
||||
using GWMS.UI.Data;
|
||||
using HealthChecks.UI.Client;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.UI;
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -19,11 +15,10 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.UI
|
||||
{
|
||||
@@ -49,6 +44,10 @@ namespace GWMS.UI
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
|
||||
// aggiunt base URL x routing corretto
|
||||
app.UsePathBase(Configuration["RuntimeOpt:BaseAppPath"]);
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
@@ -113,6 +112,18 @@ namespace GWMS.UI
|
||||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// REDIS setup
|
||||
string connStringRedis = Configuration.GetConnectionString("Redis");
|
||||
string redisSrvAddr = "127.0.0.1";
|
||||
if (connStringRedis.Contains(":"))
|
||||
{
|
||||
redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
}
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
// Add services x accesso dati
|
||||
services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
|
||||
// init info x DB
|
||||
string dbServerAddr = Configuration["DbConfig:Server"];
|
||||
string nKey = Configuration["DbConfig:nKey"];
|
||||
@@ -126,8 +137,6 @@ namespace GWMS.UI
|
||||
|
||||
// altri parametri per check vari
|
||||
string connStringDB = DbConfig.CONNECTION_STRING;
|
||||
string connStringRedis = Configuration.GetConnectionString("Redis");
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
|
||||
// healthchecks
|
||||
services.AddHealthChecks()
|
||||
@@ -146,13 +155,23 @@ namespace GWMS.UI
|
||||
{
|
||||
s.AddHealthCheckEndpoint("GWMS_Services", "health");
|
||||
s.SetEvaluationTimeInSeconds(60);
|
||||
//s.SetEvaluationTimeInSeconds(60);
|
||||
s.SetMinimumSecondsBetweenFailureNotifications(120);
|
||||
s.SetApiMaxActiveRequests(5);
|
||||
s.SetHeaderText("GWMS Health Check Status");
|
||||
})
|
||||
})
|
||||
.AddInMemoryStorage();
|
||||
|
||||
|
||||
// cookie applicazione da 14 gg (defaul) a 30
|
||||
services.ConfigureApplicationCookie(o =>
|
||||
{
|
||||
o.ExpireTimeSpan = TimeSpan.FromDays(30);
|
||||
o.SlidingExpiration = true;
|
||||
});
|
||||
// token di sicurezza dati a 3h
|
||||
services.Configure<DataProtectionTokenProviderOptions>(o =>
|
||||
o.TokenLifespan = TimeSpan.FromHours(3));
|
||||
|
||||
// abilitazione x email management con MailKit
|
||||
services.AddTransient<IEmailSender, MailKitEmailSender>();
|
||||
services.Configure<MailKitEmailSenderOptions>(options =>
|
||||
@@ -165,40 +184,17 @@ namespace GWMS.UI
|
||||
options.Sender_Name = Configuration["ExternalProviders:MailKit:SMTP:SenderName"];
|
||||
});
|
||||
|
||||
// cookie applicazione da 14 gg (defaul) a 30
|
||||
services.ConfigureApplicationCookie(o =>
|
||||
{
|
||||
o.ExpireTimeSpan = TimeSpan.FromDays(30);
|
||||
o.SlidingExpiration = true;
|
||||
});
|
||||
// token di sicurezza dati a 3h
|
||||
services.Configure<DataProtectionTokenProviderOptions>(o =>
|
||||
o.TokenLifespan = TimeSpan.FromHours(3));
|
||||
|
||||
// setup MySql
|
||||
//string connString = Configuration.GetConnectionString("AdminConnection");
|
||||
var serverVersion = DbConfig.MysqlServerVersion(connStringDB);
|
||||
services.AddDbContext<UserIdentityDbContext>(options =>
|
||||
options.UseMySql(connStringDB, serverVersion));
|
||||
options.UseMySql(connStringDB, serverVersion));
|
||||
|
||||
// identity management
|
||||
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
|
||||
.AddRoles<IdentityRole>()
|
||||
.AddEntityFrameworkStores<UserIdentityDbContext>();
|
||||
// rif auth
|
||||
// https://stackoverflow.com/questions/60687879/require-authorization-on-all-blazor-pages/60688109#60688109
|
||||
// https://www.c-sharpcorner.com/article/understand-basic-of-authorization-in-blazor-server-app/#:~:text=Authentication%20is%20a%20process%20of%20validating%20a%20user,UI%20option%20can%20be%20accessible%20by%20the%20user.
|
||||
.AddRoles<IdentityRole>()
|
||||
.AddEntityFrameworkStores<UserIdentityDbContext>();
|
||||
|
||||
// non funziona --> messo attributo in _Imports.razor e esclusione in Index page
|
||||
#if false
|
||||
// richiesta esplicita autorizzazione
|
||||
services.AddAuthorization(options =>
|
||||
{
|
||||
options.FallbackPolicy = new AuthorizationPolicyBuilder()
|
||||
.RequireAuthenticatedUser()
|
||||
.Build();
|
||||
});
|
||||
#endif
|
||||
|
||||
|
||||
//// Elmah
|
||||
@@ -209,22 +205,15 @@ namespace GWMS.UI
|
||||
// options.ConnectionString = elmaConn;
|
||||
//});
|
||||
|
||||
services.AddStackExchangeRedisCache(options =>
|
||||
{
|
||||
//options.Configuration = "localhost:6379";
|
||||
options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = 12, EndPoints = { { "localhost", 6379 } } };
|
||||
options.InstanceName = "GWMS:";
|
||||
});
|
||||
|
||||
services.AddLocalization();
|
||||
|
||||
services.AddRazorPages();
|
||||
services.AddServerSideBlazor();
|
||||
|
||||
services.AddScoped<AuthenticationStateProvider, RevalidatingIdentityAuthenticationStateProvider<IdentityUser>>();
|
||||
services.AddDatabaseDeveloperPageExceptionFilter();
|
||||
services.AddSingleton<IConfiguration>(Configuration);
|
||||
//services.AddSingleton<GWMSDataService>();
|
||||
//services.AddTransient<GWMSDataService>();
|
||||
|
||||
services.AddScoped<GWMSDataService>();
|
||||
services.AddScoped<MessageService>();
|
||||
}
|
||||
|
||||
@@ -7,20 +7,21 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
"Redis": "localhost:26379, serviceName=prod-ovh, DefaultDatabase=13, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, allowAdmin=true",
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
"Server": "localhost",
|
||||
"Server": "mdb.ovh",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
},
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"BaseUrl": "https://gwms.egalware.com/",
|
||||
"BaseAppPath": "/pizzaferri/",
|
||||
"QrRedirPage": "pizzaferri/",
|
||||
"jumpRedir": "~/../"
|
||||
"RuntimeOpt": {
|
||||
"BaseUrl": "https://gwms.egalware.com",
|
||||
"BaseAppPath": "/pizzaferri/",
|
||||
"QrRedirPage": ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
"Server": "localhost",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
},
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"RuntimeOpt": {
|
||||
"BaseUrl": "https://gwms.egalware.com",
|
||||
"BaseAppPath": "/pizzaferri/",
|
||||
"QrRedirPage": ""
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Trace",
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"BaseUrl": "https://corelocal.egalware.com/",
|
||||
"BaseAppPath": "/pizzaferri/"
|
||||
"RuntimeOpt": {
|
||||
"BaseUrl": "https://corelocal.egalware.com",
|
||||
"BaseAppPath": "/pizzaferri/"
|
||||
}
|
||||
}
|
||||
@@ -5,28 +5,16 @@
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
//"LogLevel": {
|
||||
// "Default": "Debug",
|
||||
// "System": "Information",
|
||||
// "Microsoft": "Information",
|
||||
// "Microsoft.AspNetCore.SignalR": "Debug",
|
||||
// "Microsoft.AspNetCore.Http.Connections": "Debug"
|
||||
//}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
//"AuthConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"DefaultConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"AdminConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
//"GWMS.Data": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
"Redis": "localhost:26379, serviceName=devel, DefaultDatabase=13, connectTimeout=3000, syncTimeout=3000, asyncTimeout=3000, abortConnect=false, ssl=false, allowAdmin=true",
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
//"Server": "10.74.83.97",
|
||||
"Server": "localhost",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
@@ -36,13 +24,16 @@
|
||||
"MaxLogRecord": 360,
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"ChartWaitDelay": 10,
|
||||
"BaseUrl": "https://localhost:44339/",
|
||||
"BaseAppPath": "",
|
||||
"QrRedirPage": "",
|
||||
"jumpRedir": "~/../../",
|
||||
"logo": "img/LogoPizzaferri.jpg",
|
||||
"ReloadParamTimer": 15000,
|
||||
"ReloadStatusTimer": 30000,
|
||||
"ReloadStatusTimer": 20000,
|
||||
"RuntimeOpt": {
|
||||
"CodApp": "GWMS",
|
||||
"NumPar": 4,
|
||||
"BaseUrl": "https://localhost:5003",
|
||||
"BaseAppPath": "/pizzaferri/",
|
||||
"QrRedirPage": ""
|
||||
},
|
||||
"ExternalProviders": {
|
||||
"MailKit": {
|
||||
"SMTP": {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
param([string]$ProjectDir, [string]$ProjectPath, [string]$Config);
|
||||
|
||||
# rif esempi parametri: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-specify-build-events-csharp?view=vs-2022
|
||||
|
||||
|
||||
$FileVers="..\Resources\VersNum.txt"
|
||||
$FileManIn="..\Resources\manifest-original.xml"
|
||||
@@ -29,3 +32,4 @@ Set-Content -Path $FileManOut -Value $manData
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath, [string]$Config);
|
||||
|
||||
# rif esempi parametri: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-specify-build-events-csharp?view=vs-2022
|
||||
|
||||
# selezione corretto NLof.config secondo config corrente
|
||||
cd $ProjectDir
|
||||
if ( $Config -eq "Debug" )
|
||||
{
|
||||
Copy-Item "NLog.config.dev" -Destination "NLog.config" -Force
|
||||
}
|
||||
else
|
||||
{
|
||||
Copy-Item "NLog.config.rel" -Destination "NLog.config" -Force
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2309.0513</h4>
|
||||
<h4>Versione: 1.0.2407.3013</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2309.0513
|
||||
1.0.2407.3013
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2309.0513</version>
|
||||
<version>1.0.2407.3013</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user