Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8107ba51b9 | |||
| b3062b04fc | |||
| 3739225a28 | |||
| 2db1fbc8d6 | |||
| 85944da9ed | |||
| a598c6793a | |||
| bf30e006c3 | |||
| e799fdf10a | |||
| 34ce093ca9 | |||
| c1d39b73e9 | |||
| 567b966157 | |||
| e076bc3f6b | |||
| fd027e424f | |||
| 3bd8ee233b | |||
| bb9e9ce7d5 | |||
| a5f5a55e34 | |||
| 2ecc7338e6 |
@@ -31,112 +31,6 @@ namespace GWMS.Data.Controllers
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void CreateSimData(int numDays, int stepMin, int maxHourRate)
|
||||
{
|
||||
// disattivazione per sicurezza
|
||||
#if false
|
||||
ResetController();
|
||||
// generazione dati casuale
|
||||
Random rnd = new Random();
|
||||
foreach (var plant in GetPlants())
|
||||
{
|
||||
var currPlant = GetPlant(plant.PlantId);
|
||||
// imposto limiti e valori attuali...
|
||||
//currPlant.LevelMax = rnd.Next(24, 28) * 1000;
|
||||
int simLevel = rnd.Next(1, (int)currPlant.LevelMax);
|
||||
double simPress = (double)rnd.Next((int)(currPlant.PressMax - 50) * 10, (int)currPlant.PressMax * 10) / 10;
|
||||
double simPressH = (double)rnd.Next((int)(currPlant.PressBHMax - 70) * 10, (int)currPlant.PressBHMax * 10) / 10;
|
||||
double simPressL = (double)rnd.Next((int)(currPlant.PressBLMax - 70) * 10, (int)currPlant.PressBLMax * 10) / 10;
|
||||
currPlant.LevelAct = simLevel;
|
||||
currPlant.PressAct = simPress;
|
||||
currPlant.PressBHAct = simPressH;
|
||||
currPlant.PressBLAct = simPressL;
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
// genero random le soglie x simulare rilievi e ordini
|
||||
int soglia01 = rnd.Next((int)currPlant.LevelMax * 60 / 100, (int)currPlant.LevelMax * 75 / 100);
|
||||
int soglia02 = rnd.Next((int)currPlant.LevelMax * 5 / 100, (int)currPlant.LevelMax * 35 / 100);
|
||||
|
||||
List<PlantLogModel> LogLevels = new List<PlantLogModel>();
|
||||
List<PlantLogModel> LogPressures = new List<PlantLogModel>();
|
||||
List<OrderModel> LogOrders = new List<OrderModel>();
|
||||
|
||||
DateTime adesso = DateTime.Now;
|
||||
int lastLevel = simLevel;
|
||||
int lastOrder = 0;
|
||||
int anticipo = 0;
|
||||
double lastPress = simPress;
|
||||
double lastPressH = simPressH;
|
||||
double lastPressL = simPressL;
|
||||
// simulo numDays gg...
|
||||
for (int i = numDays * 24 * (60 / stepMin); i > 0; i--)
|
||||
{
|
||||
anticipo = i * stepMin;
|
||||
lastLevel = lastLevel - rnd.Next(0, maxHourRate / (60 / stepMin));
|
||||
// se inferiore a soglia 1 --> ordine
|
||||
if (lastLevel + lastOrder < soglia01)
|
||||
{
|
||||
lastOrder = rnd.Next((int)currPlant.LevelMax - soglia01, (int)currPlant.LevelMax - soglia02);
|
||||
LogOrders.Add(new OrderModel() { DtOrder = adesso.AddMinutes(-anticipo), OrderQty = lastOrder, PlantId = plant.PlantId, OrderCode = $"ORD{i:000000}", OrderDesc = "SIM Order", SupplierId = 1, TransporterId = 1 });
|
||||
}
|
||||
|
||||
// se inferiore a soglia 2 --> refill
|
||||
if (lastLevel < soglia02)
|
||||
{
|
||||
lastLevel += lastOrder;
|
||||
lastOrder = 0;
|
||||
}
|
||||
LogLevels.Add(new PlantLogModel() { DtEvent = adesso.AddMinutes(-anticipo), FluxType = "Level", PlantId = plant.PlantId, ValNumber = lastLevel });
|
||||
|
||||
// pressioni!
|
||||
lastPress = lastPress - (double)rnd.Next(-30, 25) / 10;
|
||||
lastPressH = lastPressH - (double)rnd.Next(-25, 20) / 10;
|
||||
lastPressL = lastPressL - (double)rnd.Next(-25, 20) / 10;
|
||||
LogPressures.Add(new PlantLogModel() { DtEvent = adesso.AddMinutes(-anticipo), FluxType = "MainPress", PlantId = plant.PlantId, ValNumber = lastPress });
|
||||
LogPressures.Add(new PlantLogModel() { DtEvent = adesso.AddMinutes(-anticipo), FluxType = "PressBH", PlantId = plant.PlantId, ValNumber = lastPressH });
|
||||
LogPressures.Add(new PlantLogModel() { DtEvent = adesso.AddMinutes(-anticipo), FluxType = "PressBL", PlantId = plant.PlantId, ValNumber = lastPressL });
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
dbCtx
|
||||
.DbSetPlantLog
|
||||
.AddRange(LogLevels);
|
||||
|
||||
dbCtx
|
||||
.DbSetPlantLog
|
||||
.AddRange(LogPressures);
|
||||
|
||||
// salvo sul DB!
|
||||
dbCtx.SaveChanges();
|
||||
Log.Info($"Effettuato inserimento {LogLevels.Count} record PlantLog");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in salvataggio PlantLog{Environment.NewLine}{exc}");
|
||||
}
|
||||
try
|
||||
{
|
||||
dbCtx
|
||||
.DbSetOrders
|
||||
.AddRange(LogOrders);
|
||||
|
||||
// salvo sul DB!
|
||||
dbCtx.SaveChanges();
|
||||
Log.Info($"Effettuato inserimento {LogOrders.Count} record Orders");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in salvataggio Orders{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -156,6 +50,7 @@ namespace GWMS.Data.Controllers
|
||||
{
|
||||
// Clear database context
|
||||
dbCtx.Dispose();
|
||||
Log.Info("Dispose di GWMSController");
|
||||
}
|
||||
|
||||
public List<ConfigModel> GetConfig()
|
||||
@@ -609,30 +504,6 @@ namespace GWMS.Data.Controllers
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rigenera intero DB se riceve ID di un plant SIM...
|
||||
/// </summary>
|
||||
/// <param name="PlantId"></param>
|
||||
public bool RegenDB(int PlantId, int numDays, int stepMin, int maxHourRate)
|
||||
{
|
||||
bool answ = false;
|
||||
var currPlant = GetPlant(PlantId);
|
||||
if (currPlant.PlantCode.StartsWith("PIZ"))
|
||||
{
|
||||
Log.Info("Inizio RegenDB");
|
||||
|
||||
DbAdmin.resetPlantLogTable();
|
||||
|
||||
ResetController();
|
||||
|
||||
CreateSimData(numDays, stepMin, maxHourRate);
|
||||
Log.Info("Dati SIM generati");
|
||||
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void ResetController()
|
||||
{
|
||||
dbCtx = new GWMSContext(_configuration);
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-1">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />
|
||||
<div id="qrCodeImg"></div>
|
||||
@*<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />*@
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 align-items-center">
|
||||
<div class="row">
|
||||
@@ -266,6 +267,20 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
await JSRuntime.InvokeVoidAsync("displayQr", "qrCodeImg", rawCode);
|
||||
}
|
||||
|
||||
protected string rawCode
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (_currItem != null)
|
||||
{
|
||||
answ = _currItem.OrderCode;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
@@ -290,17 +305,17 @@
|
||||
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;
|
||||
}
|
||||
///// <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;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject IConfiguration Configuration
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
@@ -17,10 +18,11 @@
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />
|
||||
<div class="col-12 col-lg-1">
|
||||
<div id="qrCodeImg"></div>
|
||||
@*<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />*@
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="col-12 col-lg-9 align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="input-group">
|
||||
@@ -138,6 +140,20 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
await JSRuntime.InvokeVoidAsync("displayQr", "qrCodeImg", rawCode);
|
||||
}
|
||||
|
||||
protected string rawCode
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (_currItem != null)
|
||||
{
|
||||
answ = _currItem.OrderCode;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
@@ -145,17 +161,17 @@
|
||||
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;
|
||||
}
|
||||
///// <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;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -23,35 +23,6 @@
|
||||
@_currItem.OrderCode
|
||||
@*<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" />*@
|
||||
</div>
|
||||
@*<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-truck" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<DateEdit @bind-Date="_currItem.DtETA" InputMode="DateInputMode.DateTime" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="row">
|
||||
@*<div class="col">
|
||||
@@ -155,17 +126,17 @@
|
||||
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;
|
||||
}
|
||||
///// <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;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -49,15 +49,9 @@
|
||||
<li class="list-group-item active d-flex justify-content-between align-items-center">SERBATOIO Principale</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="row">
|
||||
@*<div class="col-4 small">
|
||||
@currItem.LevelAct.ToString("N0")
|
||||
</div>*@
|
||||
<div class="col-12 text-center small">
|
||||
<span><i class="fas fa-database"></i> Livello: </span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span> <span>(@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0"))</span>
|
||||
</div>
|
||||
@*<div class="col-4 text-right small">
|
||||
@currItem.LevelMax.ToString("N0")
|
||||
</div>*@
|
||||
<div class="col-12 small">
|
||||
<Progress>
|
||||
<ProgressBar Value="@currItem.LevelRatio" Striped="false" Animated="false" />
|
||||
|
||||
@@ -7,6 +7,7 @@ using GWMS.Data.DTO;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Blazorise.Charts;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GWMS.UI.Components
|
||||
{
|
||||
@@ -75,6 +76,9 @@ namespace GWMS.UI.Components
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; }
|
||||
|
||||
@@ -127,7 +131,9 @@ namespace GWMS.UI.Components
|
||||
var dataReload = Task.Run(async () =>
|
||||
{
|
||||
// aggiunta delay o non riesce a disegnare
|
||||
Thread.Sleep(150);
|
||||
int ChartWaitDelay = 150;
|
||||
int.TryParse(Configuration["ChartWaitDelay"], out ChartWaitDelay);
|
||||
Thread.Sleep(ChartWaitDelay);
|
||||
await HandleRedraw();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return;
|
||||
|
||||
reportProcess();
|
||||
await DataService.RegenDB(numDays, stepMin, maxHourRate);
|
||||
//await DataService.RegenDB(numDays, stepMin, maxHourRate);
|
||||
reportChange();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ using System.Globalization;
|
||||
|
||||
namespace GWMS.UI.Data
|
||||
{
|
||||
public class GWMSDataService
|
||||
public class GWMSDataService : IDisposable
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
@@ -73,9 +73,9 @@ namespace GWMS.UI.Data
|
||||
else
|
||||
{
|
||||
dbController = new GWMS.Data.Controllers.GWMSController(configuration);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine($"DbController OK");
|
||||
_logger.LogInformation(sb.ToString());
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
//sb.AppendLine($"DbController OK");
|
||||
//_logger.LogInformation(sb.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,6 +394,12 @@ namespace GWMS.UI.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database controller
|
||||
dbController.Dispose();
|
||||
}
|
||||
|
||||
public async Task<bool> HasPlantLog()
|
||||
{
|
||||
return await Task.FromResult(dbController.HasPlantLog());
|
||||
@@ -662,11 +668,6 @@ namespace GWMS.UI.Data
|
||||
{ }
|
||||
}
|
||||
|
||||
public async Task<bool> RegenDB(int numDays, int stepMin = 30, int maxHourRate = 800)
|
||||
{
|
||||
return await Task.FromResult(dbController.RegenDB(1, numDays, stepMin, maxHourRate));
|
||||
}
|
||||
|
||||
public void ResetController()
|
||||
{
|
||||
dbController.ResetController();
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2108.2711</Version>
|
||||
<Version>1.0.2108.3009</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
<ServerGarbageCollection>false</ServerGarbageCollection>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -38,11 +38,11 @@
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="5.0.1" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="5.0.1" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.4" />
|
||||
<PackageReference Include="Blazorise" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Charts" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Components" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise" Version="0.9.4.3" />
|
||||
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.4.3" />
|
||||
<PackageReference Include="Blazorise.Charts" Version="0.9.4.3" />
|
||||
<PackageReference Include="Blazorise.Components" Version="0.9.4.3" />
|
||||
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.4.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.9" />
|
||||
|
||||
@@ -132,7 +132,20 @@
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.OrderId)">
|
||||
<td class="text-nowrap"><button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="oi oi-pencil"></span></button></td>
|
||||
<td class="text-nowrap">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)">
|
||||
<span class="oi oi-pencil"></span>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary disabled">
|
||||
<i class="oi oi-pencil"></i>
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.Plant.PlantCode</div>
|
||||
<div class="small">@record.Plant.PlantDesc</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
return;
|
||||
|
||||
processRunning = true;
|
||||
DataService.RegenDB(numDays, stepMin, maxHourRate);
|
||||
//DataService.RegenDB(numDays, stepMin, maxHourRate);
|
||||
processRunning = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,20 @@
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.OrderId)">
|
||||
<td class="text-nowrap"><button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="oi oi-pencil"></span></button></td>
|
||||
<td class="text-nowrap">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)">
|
||||
<span class="oi oi-pencil"></span>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary disabled">
|
||||
<i class="oi oi-pencil"></i>
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.Plant.PlantCode</div>
|
||||
<div class="small">@record.Plant.PlantDesc</div>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="font-awesome/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="Chart.js/Chart.min.css" />
|
||||
<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
|
||||
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
|
||||
|
||||
@@ -41,9 +42,9 @@
|
||||
</div>
|
||||
|
||||
<!-- inside of body section and after the div/app tag -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<script src="Chart.js/Chart.min.js"></script>
|
||||
<script src="popper.js/umd/popper.min.js"></script>
|
||||
<script src="bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="_content/Blazorise/blazorise.js"></script>
|
||||
@@ -67,8 +68,8 @@
|
||||
new QRCode(document.getElementById(elementName),
|
||||
{
|
||||
text: rawData,
|
||||
width: 400,
|
||||
height: 400
|
||||
width: 300,
|
||||
height: 300
|
||||
});
|
||||
//qrcode.makeCode(rawData);
|
||||
}
|
||||
|
||||
+4
-4
@@ -129,18 +129,18 @@ namespace GWMS.UI
|
||||
string connStringDB = DbConfig.CONNECTION_STRING;
|
||||
string connStringRedis = Configuration.GetConnectionString("Redis");
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
var qrCodeUri = new Uri(Configuration["ZCodeUrl"]);
|
||||
string qrCodeAddr = qrCodeUri.Host;
|
||||
//var qrCodeUri = new Uri(Configuration["ZCodeUrl"]);
|
||||
//string qrCodeAddr = qrCodeUri.Host;
|
||||
|
||||
// healthchecks
|
||||
services.AddHealthChecks()
|
||||
.AddMySql(connStringDB, "MySql instance")
|
||||
.AddAsyncCheck($"DB PING ({dbServerAddr})", () => Health.Checks.PingCheck(dbServerAddr))
|
||||
.AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => Health.Checks.PingCheck(redisSrvAddr))
|
||||
.AddAsyncCheck($"QrCode PING ({qrCodeAddr})", () => Health.Checks.PingCheck(qrCodeAddr))
|
||||
//.AddAsyncCheck($"QrCode PING ({qrCodeAddr})", () => Health.Checks.PingCheck(qrCodeAddr))
|
||||
.AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded) // 512 MB max allocated memory
|
||||
.AddRedis(Configuration.GetConnectionString("Redis"), "Redis", failureStatus: HealthStatus.Degraded)
|
||||
.AddUrlGroup(new Uri(Configuration["ZCodeUrl"]), name: $"QrCode Gen ({Configuration["ZCodeUrl"]})", failureStatus: HealthStatus.Degraded)
|
||||
//.AddUrlGroup(new Uri(Configuration["ZCodeUrl"]), name: $"QrCode Gen ({Configuration["ZCodeUrl"]})", failureStatus: HealthStatus.Degraded)
|
||||
.AddAsyncCheck($"MySql Root User", () => Health.Checks.DbUserRoot("MySql"))
|
||||
.AddAsyncCheck($"MySql App Users", () => Health.Checks.DbUserApp(DbConfig.DATABASE_NAME))
|
||||
.AddAsyncCheck($"MySql Identity", () => Health.Checks.DbIdentity(DbConfig.DATABASE_NAME))
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
"IntervalMin": 60,
|
||||
"MaxLogRecord": 360,
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"ChartWaitDelay": 10,
|
||||
"logo": "img/LogoPizzaferri.jpg",
|
||||
"ExternalProviders": {
|
||||
"MailKit": {
|
||||
|
||||
+24
-12
@@ -1,14 +1,26 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "font-awesome@5.15.4",
|
||||
"destination": "wwwroot/font-awesome/"
|
||||
},
|
||||
{
|
||||
"library": "bootstrap@4.6.0",
|
||||
"destination": "wwwroot/bootstrap/"
|
||||
}
|
||||
]
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "font-awesome@5.15.4",
|
||||
"destination": "wwwroot/font-awesome/"
|
||||
},
|
||||
{
|
||||
"library": "bootstrap@4.6.0",
|
||||
"destination": "wwwroot/bootstrap/"
|
||||
},
|
||||
{
|
||||
"library": "Chart.js@2.8.0",
|
||||
"destination": "wwwroot/Chart.js/"
|
||||
},
|
||||
{
|
||||
"library": "popper.js@1.16.1",
|
||||
"destination": "wwwroot/popper.js/"
|
||||
},
|
||||
{
|
||||
"library": "jquery@3.5.1",
|
||||
"destination": "wwwroot/jquery/"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* DOM element rendering detection
|
||||
* https://davidwalsh.name/detect-node-insertion
|
||||
*/
|
||||
@keyframes chartjs-render-animation {
|
||||
from { opacity: 0.99; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.chartjs-render-monitor {
|
||||
animation: chartjs-render-animation 0.001s;
|
||||
}
|
||||
|
||||
/*
|
||||
* DOM element resizing detection
|
||||
* https://github.com/marcj/css-element-queries
|
||||
*/
|
||||
.chartjs-size-monitor,
|
||||
.chartjs-size-monitor-expand,
|
||||
.chartjs-size-monitor-shrink {
|
||||
position: absolute;
|
||||
direction: ltr;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
visibility: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-expand > div {
|
||||
position: absolute;
|
||||
width: 1000000px;
|
||||
height: 1000000px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-shrink > div {
|
||||
position: absolute;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
Vendored
+14680
File diff suppressed because it is too large
Load Diff
+1
@@ -0,0 +1 @@
|
||||
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
||||
+7
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+10872
File diff suppressed because it is too large
Load Diff
Vendored
+2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2108.2711</h4>
|
||||
<h4>Versione: 1.0.2108.3009</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2108.2711
|
||||
1.0.2108.3009
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2108.2711</version>
|
||||
<version>1.0.2108.3009</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