Compare commits
37 Commits
PageAuthManRC
...
RC4
| Author | SHA1 | Date | |
|---|---|---|---|
| 85944da9ed | |||
| a598c6793a | |||
| bf30e006c3 | |||
| e799fdf10a | |||
| 34ce093ca9 | |||
| c1d39b73e9 | |||
| 567b966157 | |||
| e076bc3f6b | |||
| fd027e424f | |||
| 3bd8ee233b | |||
| bb9e9ce7d5 | |||
| a5f5a55e34 | |||
| 2ecc7338e6 | |||
| 66c069fb35 | |||
| 361d4338a6 | |||
| 9a964330e3 | |||
| 0e65410340 | |||
| b0e5d54061 | |||
| 9c979582d4 | |||
| 11cae94995 | |||
| 05ca047b5c | |||
| cd533c190b | |||
| efd84437b5 | |||
| 1c36305304 | |||
| f1f1e784da | |||
| 512d25f513 | |||
| f1628818f3 | |||
| b57d20420b | |||
| cbf97a2eb6 | |||
| 284f7ff241 | |||
| 888c7398f7 | |||
| 4926cb4715 | |||
| e2c7615826 | |||
| dc8ce10b51 | |||
| ffb4c9872d | |||
| a415d175d9 | |||
| 60b069cd28 |
+3
-1
@@ -118,7 +118,9 @@ installer:
|
||||
# - *nuget-fix
|
||||
# - dotnet restore
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release GWMS.UI/GWMS.UI.csproj -o:publish
|
||||
# - 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/
|
||||
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release GWMS.UI/GWMS.UI.csproj -o:publish -r linux-x64 --self-contained false
|
||||
# qui il deploy su nexus...
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
@@ -469,6 +469,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "Level" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawMainPressData = dbCtxMult
|
||||
@@ -476,6 +477,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawBHPressData = dbCtxMult
|
||||
@@ -483,6 +485,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawBLPressData = dbCtxMult
|
||||
@@ -490,6 +493,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawOrderData = dbCtxMult
|
||||
@@ -497,6 +501,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty == 0)
|
||||
.OrderByDescending(x => x.DtOrder)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtOrder)
|
||||
.ToList();
|
||||
|
||||
LevelTS = rawLevelData
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="row px-1 text-light">
|
||||
<div class="form-row text-light">
|
||||
<div class="col-5 pr-0 text-left">
|
||||
GWMS <span class="small">v.@version</span>
|
||||
</div>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
@inject MessageService AppMessages
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
|
||||
<div class="row pt-3">
|
||||
<div class="col-6 col-sm-6 col-lg-4 col-xl-3">
|
||||
<div class="form-row pt-3">
|
||||
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
|
||||
<LoginDisplay></LoginDisplay>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 col-xl-6 d-none d-lg-block text-center h4 text-truncate">
|
||||
<span class="@PageIcon" aria-hidden="true"></span> @PageName
|
||||
</div>
|
||||
<div class="col-6 col-sm-6 col-lg-4 col-xl-3 text-right">
|
||||
<div class="col-5 col-md-6 col-lg-4 col-xl-3 text-right">
|
||||
@if (ShowSearch)
|
||||
{
|
||||
<SearchMod></SearchMod>
|
||||
|
||||
@@ -8,8 +8,13 @@
|
||||
<div class="input-group-prepend">
|
||||
<a title="LogOut" href="Identity/Account/LogOut" class="btn btn-sm btn-danger"><i class="fas fa-sign-out-alt"></i></a>
|
||||
</div>
|
||||
<a title="Manage" href="Identity/Account/Manage" class="btn btn-sm btn-outline-dark mx-0 px-1">
|
||||
<i class="fas fa-user-alt"></i> @userName.Substring(0, 10) ...
|
||||
<a title="Gestione account @userName" href="Identity/Account/Manage" class="btn btn-sm btn-outline-dark mx-0 px-1">
|
||||
<div class="d-none d-sm-block">
|
||||
<i class="fas fa-user-alt"></i> @StringLim(userName, 30)
|
||||
</div>
|
||||
<div class="d-block d-sm-none">
|
||||
<i class="fas fa-user-alt"></i> @StringLim(userName, 15)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</Authorized>
|
||||
@@ -48,4 +53,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
protected string StringLim(string original, int maxLen)
|
||||
{
|
||||
return original.Length <= maxLen ? original : $"{original.Substring(0, maxLen - 3)}...";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -4,63 +4,67 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using GWMS.UI.Data
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject IConfiguration Configuration
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<div class="card">
|
||||
@*<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>*@
|
||||
<div class="card-body small p-1">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<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>
|
||||
@if (_currItem != null)
|
||||
{
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2 text-center">
|
||||
<div id="qrCodeImg"></div>
|
||||
@_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>
|
||||
<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 class="col-12 col-lg-2">
|
||||
<div class="row">
|
||||
@*<div class="col">
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>*@
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
</EditForm>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +80,7 @@
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem = null;
|
||||
return _currItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -84,6 +88,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
public async void refreshQr()
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("refreshQr", rawCode);
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
@@ -122,9 +131,23 @@
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
protected string rawCode
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (_currItem != null)
|
||||
{
|
||||
answ = _currItem.OrderCode;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
await JSRuntime.InvokeVoidAsync("displayQr", "qrCodeImg", rawCode);
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
@@ -132,17 +155,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,25 +49,28 @@
|
||||
<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-12 px-0">
|
||||
<LineChart @ref="LevelVal" TItem="double" OptionsObject="lineChartOptions" />
|
||||
@*<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-6 small">
|
||||
@currItem.LevelAct.ToString("N0")
|
||||
</div>
|
||||
<div class="col-6 text-right small">
|
||||
@currItem.LevelMax.ToString("N0")
|
||||
</div>
|
||||
<div class="col-12">
|
||||
@*<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" />
|
||||
</Progress>
|
||||
</div>
|
||||
<div class="col-12 px-0 mt-2">
|
||||
<LineChart @ref="LevelVal" TItem="double" OptionsObject="lineChartOptions" />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</li>
|
||||
@*<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</li>*@
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Pressione</span> <span style="font-size:1.2em;"><b>@currItem.PressAct["Main"].ToString("N1")</b> <span class="small"> <sub>bar</sub></span></span>
|
||||
</li>
|
||||
|
||||
@@ -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
|
||||
{
|
||||
@@ -24,23 +25,25 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
XAxes = new object[]
|
||||
{
|
||||
new {
|
||||
Display = true,
|
||||
//type = "timeseries",
|
||||
//type = "time",
|
||||
//Time = new {
|
||||
// unit="day"
|
||||
//}
|
||||
}
|
||||
},
|
||||
new {
|
||||
display = true,
|
||||
//type = "timeseries",
|
||||
//type = "time",
|
||||
//Time = new {
|
||||
// unit="day"
|
||||
//}
|
||||
}
|
||||
},
|
||||
YAxes = new object[]
|
||||
{
|
||||
new {
|
||||
Display = true,
|
||||
ticks= new {
|
||||
suggestedMin = 0,
|
||||
suggestedMax = 10000
|
||||
}
|
||||
display = true,
|
||||
position = "right",
|
||||
//text = "Kg",
|
||||
ticks = new {
|
||||
suggestedMin = 0,
|
||||
suggestedMax = 10000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -54,8 +57,14 @@ namespace GWMS.UI.Components
|
||||
Mode = "nearest",
|
||||
Intersect = false
|
||||
},
|
||||
Animation = false,
|
||||
AspectRatio = 2
|
||||
Animation = true,
|
||||
Responsive = true,
|
||||
AspectRatio = 2,
|
||||
type = "line",
|
||||
Legend = new
|
||||
{
|
||||
display = false
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -67,6 +76,9 @@ namespace GWMS.UI.Components
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; }
|
||||
|
||||
@@ -119,7 +131,9 @@ namespace GWMS.UI.Components
|
||||
var dataReload = Task.Run(async () =>
|
||||
{
|
||||
// aggiunta delay o non riesce a disegnare
|
||||
Thread.Sleep(50);
|
||||
int ChartWaitDelay = 150;
|
||||
int.TryParse(Configuration["ChartWaitDelay"], out ChartWaitDelay);
|
||||
Thread.Sleep(ChartWaitDelay);
|
||||
await HandleRedraw();
|
||||
});
|
||||
}
|
||||
@@ -134,12 +148,15 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
// passo a 2h se > 5 gg
|
||||
if (numCount > 120)
|
||||
// passo a 2h se > 3 gg
|
||||
if (numCount > 72)
|
||||
answ = 2;
|
||||
// passo a 3h se > 10 gg
|
||||
else if (numCount > 240)
|
||||
// passo a 3h se > 5 gg
|
||||
else if (numCount > 120)
|
||||
answ = 3;
|
||||
// passo a 4h se > 10 gg
|
||||
else if (numCount > 240)
|
||||
answ = 4;
|
||||
redFact = answ;
|
||||
}
|
||||
|
||||
|
||||
+21
-16
@@ -2,10 +2,17 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2108.2613</Version>
|
||||
<Version>1.0.2108.2713</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="QuartzHostedService.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="bundleconfig.json" />
|
||||
</ItemGroup>
|
||||
@@ -13,6 +20,8 @@
|
||||
<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>
|
||||
|
||||
@@ -29,25 +38,21 @@
|
||||
<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="ElmahCore" Version="2.0.6" />
|
||||
<PackageReference Include="ElmahCore.Common" Version="2.0.6" />
|
||||
<PackageReference Include="ElmahCore.Sql" Version="2.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.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" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.12.0" />
|
||||
<PackageReference Include="Quartz" Version="3.3.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" ExcludeAssets="All" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.13.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,18 +8,15 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-6 pr-0 col-lg-8 h3">
|
||||
<div class="col-6 pr-0 col-lg-8 h3 mb-0">
|
||||
Consegne
|
||||
</div>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="row">
|
||||
<div class="col-6 px-1">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltPeriod()"><i class="far fa-calendar-alt"></i> <i class="@icnFiltTime"></i></button>
|
||||
</div>
|
||||
@*<div class="col-4 px-1">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltTransp()"><i class="fas fa-truck-moving"></i> <i class="@icnFiltTran"></i></button>
|
||||
</div>*@
|
||||
<div class="col-6 px-1">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltDest()"><i class="fas fa-gas-pump"></i> <i class="@icnFiltDest"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="card-body">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<OrderTranspEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" SupplierId="@currRecord.SupplierId"></OrderTranspEditor>
|
||||
@@ -107,6 +104,7 @@
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@*<div id="qrCodeImg"></div>*@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -119,7 +117,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-magnifying-glass"></span></button></td>
|
||||
<td class="text-nowrap">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary disabled">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<div><b>@record.Plant.PlantCode</b> | @record.Plant.PlantDesc</div>
|
||||
<div class="small"><span class="fas fa-comment-alt" aria-hidden="true"></span> @record.OrderDesc</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@page "/UserAdmin"
|
||||
|
||||
@using GWMS.UI.Pages
|
||||
@using GWMS.UI.Components
|
||||
|
||||
@if (ShowPopup)
|
||||
{
|
||||
@@ -168,6 +169,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-footer p-1">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,6 +27,11 @@ namespace GWMS.UI.Pages
|
||||
/// </summary>
|
||||
private IdentityUser objUser = new IdentityUser();
|
||||
|
||||
/// <summary>
|
||||
/// Collezione utenti
|
||||
/// </summary>
|
||||
private List<IdentityUser> RawList = new List<IdentityUser>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ROLES da mostrare in dropdown durante editing (1 solo? usare DB?!?)
|
||||
/// </summary>
|
||||
@@ -55,6 +60,10 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int _currPage { get; set; } = 1;
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
[CascadingParameter]
|
||||
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
||||
|
||||
@@ -78,6 +87,39 @@ namespace GWMS.UI.Pages
|
||||
/// </summary>
|
||||
private string CurrentUserRole { get; set; } = "User";
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => _currPage;
|
||||
set
|
||||
{
|
||||
if (_currPage != value)
|
||||
{
|
||||
_currPage = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
private MessageService MessageService { get; set; }
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => _numRecord;
|
||||
set
|
||||
{
|
||||
if (_numRecord != value)
|
||||
{
|
||||
_numRecord = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -97,8 +139,33 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (RawList != null)
|
||||
{
|
||||
answ = RawList.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string searchVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return MessageService.SearchVal;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void AddNewUser()
|
||||
@@ -220,6 +287,13 @@ namespace GWMS.UI.Pages
|
||||
ShowPopup = true;
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
await GetUsers();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task SaveUser()
|
||||
{
|
||||
try
|
||||
@@ -353,11 +427,22 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
}
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = true;
|
||||
AppMService.PageName = "Gestione Utenti";
|
||||
AppMService.PageIcon = "fas fa-users pr-2";
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
// lettura dati
|
||||
await GetUsers();
|
||||
await CheckSuperAdmin();
|
||||
@@ -374,6 +459,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -386,7 +472,16 @@ namespace GWMS.UI.Pages
|
||||
// Collection to hold users
|
||||
UsersList = new List<UserData>();
|
||||
// get users from _UserManager
|
||||
var user = _UserManager.Users.Select(x => new IdentityUser
|
||||
var allData = _UserManager.Users.ToList();
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
{
|
||||
RawList = allData.Where(x => x.NormalizedEmail.Contains(searchVal.ToUpper()) || x.NormalizedUserName.Contains(searchVal.ToUpper())).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
RawList = allData;
|
||||
}
|
||||
var user = RawList.Skip(numRecord * (currPage - 1)).Take(numRecord).Select(x => new IdentityUser
|
||||
{
|
||||
Id = x.Id,
|
||||
UserName = x.UserName,
|
||||
@@ -411,6 +506,15 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
{
|
||||
await GetUsers();
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
public string ShowClaims(List<System.Security.Claims.Claim> ClaimList)
|
||||
{
|
||||
string answ = string.Join(",", ClaimList);
|
||||
|
||||
@@ -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>
|
||||
@@ -55,5 +56,27 @@
|
||||
|
||||
<script src="font-awesome/js/all.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
<script type="text/javascript" src="~/lib/qrcode.js"></script>
|
||||
<script type="text/javascript">
|
||||
// gestione qrcode... da https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-enable-qrcodes?view=aspnetcore-5.0
|
||||
//var qrcode = new QRCode("qrCodeImg");
|
||||
function displayQr(elementName, rawData) {
|
||||
try {
|
||||
if (elementName != "" && rawData != "") {
|
||||
//qrcode = new QRCode(document.getElementById(elementName));
|
||||
new QRCode(document.getElementById(elementName),
|
||||
{
|
||||
text: rawData,
|
||||
width: 400,
|
||||
height: 400
|
||||
});
|
||||
//qrcode.makeCode(rawData);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAxNUOeyL5oUSNi/ISzvJtLgAAAAACAAAAAAADZgAAwAAAABAAAAD+ZfytfJJzf+XzD0ShcSagAAAAAASAAACgAAAAEAAAAAhSlOT4SIk7WdUrN1YS1qMYAAAAGI+89iBgQqaMJeEi4KxlVpTh9PMYTidkFAAAAO7so25722o8lxnn313D6J0eV2MV</EncryptedPassword>
|
||||
<History>False|2021-06-23T12:54:39.3412623Z;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAxNUOeyL5oUSNi/ISzvJtLgAAAAACAAAAAAADZgAAwAAAABAAAAAwZbVLPZ+eVCZgVc7GoE8CAAAAAASAAACgAAAAEAAAAEmDwlS8G30J/kR5K+eX8B4YAAAAZ14uy/TVGN4ui4QHWpgdmwaMob7VeTSiFAAAAC/61bXCe/Mgyo7S2QBvJRJ2GUiZ</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<History>True|2021-06-23T13:11:40.1591388Z;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>Package</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<ProjectGuid>5f0dbab0-122f-4a81-be73-161bbefeef59</ProjectGuid>
|
||||
<DesktopBuildPackageLocation>bin\publish\GWMS.UI.zip</DesktopBuildPackageLocation>
|
||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||
<DeployIisAppPath>Default Web Site/GWMS</DeployIisAppPath>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>Package</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<ProjectGuid>5f0dbab0-122f-4a81-be73-161bbefeef59</ProjectGuid>
|
||||
<DesktopBuildPackageLocation>bin\publish\GWMS.UI.zip</DesktopBuildPackageLocation>
|
||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||
<DeployIisAppPath>Default Web Site/GWMS</DeployIisAppPath>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAxNUOeyL5oUSNi/ISzvJtLgAAAAACAAAAAAADZgAAwAAAABAAAADTQmYF8PrkLa4Xb9E/zxuXAAAAAASAAACgAAAAEAAAADLKIlcnZuaCFkaVmfe382YYAAAADxGWDujdGKLnZ+ycw0Vb2K2g5K0dRHB8FAAAAHB9B2k06W3L+M48vPfUvedJRpJX</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,42 +0,0 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Quartz;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.UI
|
||||
{
|
||||
public class QuartzHostedService : IHostedService
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private readonly IScheduler _scheduler;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public QuartzHostedService(IScheduler scheduler)
|
||||
{
|
||||
_scheduler = scheduler;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _scheduler?.Start(cancellationToken);
|
||||
}
|
||||
|
||||
public async Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _scheduler?.Shutdown(cancellationToken);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,11 @@
|
||||
</div>
|
||||
|
||||
<CascadingValue Name="ShowSearch" Value=@ShowSearch>
|
||||
<div class="main">
|
||||
<div class="top-row px-0">
|
||||
<div class="main mr-1">
|
||||
<div class="top-row">
|
||||
<CmpTop></CmpTop>
|
||||
</div>
|
||||
<div class="content pt-1 pt-lg-2 px-2 mb-5">
|
||||
<div class="content pt-1 pt-lg-2 mb-5">
|
||||
@Body
|
||||
</div>
|
||||
<div class="fixed-bottom bottom-row">
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
height: 3.5rem;
|
||||
align-items: center;
|
||||
/*justify-content: space-evenly;
|
||||
display: flex;*/
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row .btn-link {
|
||||
@@ -34,37 +34,10 @@
|
||||
.bottom-row {
|
||||
color: #dedede;
|
||||
background-color: #000000;
|
||||
/*border-bottom: 1px solid #313131;*/
|
||||
/*justify-content: flex-end;*/
|
||||
height: 2rem;
|
||||
/*display: flex;*/
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bottom-row ::deep a, .top-row .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.bottom-row a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
/*
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row:not(.auth) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-row.auth {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row a, .top-row .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
|
||||
+9
-12
@@ -1,7 +1,6 @@
|
||||
using Blazorise;
|
||||
using Blazorise.Bootstrap;
|
||||
using Blazorise.Icons.FontAwesome;
|
||||
using ElmahCore.Mvc;
|
||||
using GWMS.Data;
|
||||
using GWMS.UI.Areas.Identity;
|
||||
using GWMS.UI.Data;
|
||||
@@ -23,8 +22,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Quartz;
|
||||
using Quartz.Impl;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -79,9 +76,9 @@ namespace GWMS.UI
|
||||
});
|
||||
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
|
||||
|
||||
// Registrazione Elmah:
|
||||
// https://github.com/ElmahCore/ElmahCore
|
||||
app.UseElmah();
|
||||
//// Registrazione Elmah:
|
||||
//// https://github.com/ElmahCore/ElmahCore
|
||||
//app.UseElmah();
|
||||
|
||||
// fix forwarders
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
@@ -132,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))
|
||||
@@ -218,8 +215,8 @@ namespace GWMS.UI
|
||||
.AddBootstrapProviders()
|
||||
.AddFontAwesomeIcons();
|
||||
|
||||
// Elmah
|
||||
services.AddElmah();
|
||||
//// Elmah
|
||||
//services.AddElmah();
|
||||
//string elmaConn = "Data Source=SQL2016DEV;Initial Catalog=Elmah;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=SHERPA.BBM;";
|
||||
//services.AddElmah<SqlErrorLog>(options =>
|
||||
//{
|
||||
|
||||
@@ -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
+637
-549
File diff suppressed because it is too large
Load Diff
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
@@ -98,4 +98,19 @@ link da approfondire
|
||||
- https://github.com/parallelbgls/Modbus.Net
|
||||
- http://easymodbustcp.net/en/
|
||||
- https://sourceforge.net/p/easymodbustcp/wiki/Home/
|
||||
- https://techitmore.com/dotnet/modbus-tcp-communication-in-net-c/
|
||||
- https://techitmore.com/dotnet/modbus-tcp-communication-in-net-c/
|
||||
|
||||
|
||||
## Appunti
|
||||
|
||||
### Linux debug
|
||||
|
||||
Questa applicazione viene distribuita (localmente in ufficio ed in ovh x cliente finale) su macchina Linux, tramite dotnetcore.
|
||||
|
||||
In particolare su linux x debug dei messaggi di log usare il comando
|
||||
|
||||
|
||||
journalctl -fu kestrel-app-gwms.service
|
||||
|
||||
|
||||
## Versioni
|
||||
BIN
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2108.2613</h4>
|
||||
<h4>Versione: 1.0.2108.2713</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2108.2613
|
||||
1.0.2108.2713
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2108.2613</version>
|
||||
<version>1.0.2108.2713</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