Merge tag 'UpdateDisplayStatus01' into develop
Aggiornamento calcolo visualizzazione status css
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -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;
|
||||
@@ -15,9 +16,9 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string checkRTime
|
||||
protected string checkRTime
|
||||
{
|
||||
get => DateTime.Now.Subtract(_currItem.LastUpdate).TotalMinutes > 2 ? $"Mancata ricezione: ultimo aggiornamento {_currItem.LastUpdate}" : $"Dati Realtime aggiornati al {_currItem.LastUpdate}";
|
||||
get => dataIsRT ? $"Dati Realtime aggiornati al {_currItem.LastUpdate}" : $"Mancata ricezione: ultimo aggiornamento {_currItem.LastUpdate}";
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
@@ -55,29 +56,22 @@ namespace GWMS.UI.Components
|
||||
}
|
||||
}
|
||||
|
||||
public string headerStatus
|
||||
protected 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;
|
||||
}
|
||||
get => deviceOnline ? "list-group-item-info" : "text-secondary";
|
||||
}
|
||||
|
||||
|
||||
public string playStatus
|
||||
protected string playStatus
|
||||
{
|
||||
get => DateTime.Now.Subtract(_currItem.LastUpdate).TotalMinutes > 2 ? "text-danger" : "text-success";
|
||||
get => dataIsRT ? "text-success" : "text-danger";
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string getPressData(string valore, string formato)
|
||||
protected string getPressData(string valore, string formato)
|
||||
{
|
||||
string answ = "";
|
||||
if (currItem.PressAct.ContainsKey(valore))
|
||||
@@ -152,9 +146,23 @@ namespace GWMS.UI.Components
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private bool dataIsRT { get; set; } = false;
|
||||
private bool deviceOnline { get; set; } = false;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2406.0519</Version>
|
||||
<Version>1.0.2406.0608</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2406.0519</h4>
|
||||
<h4>Versione: 1.0.2406.0608</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2406.0519
|
||||
1.0.2406.0608
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2406.0519</version>
|
||||
<version>1.0.2406.0608</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