10 Commits

Author SHA1 Message Date
Samuele Locatelli 2cae5693e7 Update display x mostrare buttons x import ordini (solo segnaposto) 2025-05-13 16:30:00 +02:00
Samuele Locatelli ea1e37055b Update conf redis sentinel 2025-05-13 16:28:52 +02:00
Samuele Locatelli 221f7c03fd Merge commit '37986b0bcba62ef5e87e21438892c8fc21e15c07' into develop 2024-08-05 16:23:38 +02:00
Samuele Locatelli 885b4b78b2 fix commento 2024-08-05 16:23:23 +02:00
Emmanuele Sassi 37986b0bcb - eliminato controllo chiave
- aggiunto try su cancellazione file
2024-08-05 16:22:17 +02:00
Samuele Locatelli 670b71841d inserito riferimento x dove restituire tipo elaborazione svg/3dm... 2024-06-27 16:33:00 +02:00
Samuele Locatelli 225ee35143 Aggiunta commentata in CameraSrv x recuperare DDF fisso... 2024-06-27 16:30:39 +02:00
Samuele Locatelli 93906b747e Update struttura display btn/preview 2024-06-27 16:11:27 +02:00
Samuele Locatelli 4cde37cd5f Inserita gestione tipo richiesta (svg/3dm)
Rimesso bottone x export 3d con timeout x risposta calcolo
2024-06-27 15:34:15 +02:00
Samuele Locatelli 1ed9ab4af9 Merge tag 'Add3dPreview02' into develop
Fix icone HW
2024-06-20 16:23:29 +02:00
31 changed files with 539 additions and 136 deletions
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
<body> <body>
<i>WebDoorCreator - Egalware</i> <i>WebDoorCreator - Egalware</i>
<h4>Version: 0.9.2406.2015</h4> <h4>Version: 0.9.2505.1316</h4>
<br /> Release note: <br /> Release note:
<ul> <ul>
<li> <li>
+1 -1
View File
@@ -1 +1 @@
0.9.2406.2015 0.9.2505.1316
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<item> <item>
<version>0.9.2406.2015</version> <version>0.9.2505.1316</version>
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url> <url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog> <changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory> <mandatory>false</mandatory>
@@ -71,16 +71,6 @@ namespace WebDoorCreator.API.Controllers
} }
} }
} }
#if false
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
var myBmp = mySvg.Draw();
using (var stream = new MemoryStream())
{
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
result= stream.ToArray();
}
#endif
} }
return File(result, "image/png"); return File(result, "image/png");
} }
@@ -196,7 +196,7 @@ namespace WebDoorCreator.API.Controllers
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet("TakeNextItems")] [HttpGet("TakeNextItems")]
public async Task<Dictionary<string, string>> TakeProcessingItems(int numItems = 10) public async Task<Dictionary<string, CalcReqtDTO>> TakeProcessingItems(int numItems = 10)
{ {
var actQueue = await QDataServ.TakeProcessingItems(numItems); var actQueue = await QDataServ.TakeProcessingItems(numItems);
Log.Debug($"Eseguito TakeProcessingItems per {numItems} items"); Log.Debug($"Eseguito TakeProcessingItems per {numItems} items");
+1 -1
View File
@@ -7,7 +7,7 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ConnectionStrings": { "ConnectionStrings": {
"Redis": "localhost:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false", "Redis": "redis.ufficio:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false",
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;" "WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;"
}, },
"ExternalProviders": { "ExternalProviders": {
+1
View File
@@ -19,6 +19,7 @@ Public Module ConstIni
' File con dati di licenza ' File con dati di licenza
Public Const LIC_FILE_NAME As String = "WebDoorCreator.CamSrv.lic" Public Const LIC_FILE_NAME As String = "WebDoorCreator.CamSrv.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
' File di log generale ' File di log generale
+49 -24
View File
@@ -921,10 +921,23 @@ Public Class ProcMan
End If End If
End If End If
If m_bCheckOrder Then If m_bCheckOrder Then
Dim LastRequest As Dictionary(Of String, String) = currWDC.queueList(1) Dim LastRequest As Dictionary(Of String, CalcReqtDTO) = currWDC.queueList(1)
If LastRequest.Count > 0 Then If LastRequest.Count > 0 Then
MyThreadData.SetThreadOperation(ThreadOperations.FoundRequest) MyThreadData.SetThreadOperation(ThreadOperations.FoundRequest)
MyThreadData.SetCurrRequest(LastRequest.First())
' ToDo !!!
' gestione cablata x soli svg...
' da qui implementazione svg/3dm...
If LastRequest.First().Value.MimeType = "3dm" Then
End If
Dim ConvItem As KeyValuePair(Of String, String)
ConvItem = New KeyValuePair(Of String, String)(LastRequest.First().Key, LastRequest.First().Value.DDF)
MyThreadData.SetCurrRequest(ConvItem)
' vecchia versione
'MyThreadData.SetCurrRequest(LastRequest.First())
Dim Item As KeyValuePair(Of String, String) = MyThreadData.CurrRequest Dim Item As KeyValuePair(Of String, String) = MyThreadData.CurrRequest
Dim bOk As Boolean = Not IsNothing(Item) Dim bOk As Boolean = Not IsNothing(Item)
If bOk Then If bOk Then
@@ -937,7 +950,10 @@ Public Class ProcMan
' elimino vecchi ' elimino vecchi
If Not IsNothing(fileList) Then If Not IsNothing(fileList) Then
For Each sFile In fileList For Each sFile In fileList
File.Delete(sFile) Try
File.Delete(sFile)
Catch ex As Exception
End Try
Next Next
End If End If
@@ -981,12 +997,16 @@ Public Class ProcMan
MyThreadData.SetThreadOperation(ThreadOperations.ReadingSvg) MyThreadData.SetThreadOperation(ThreadOperations.ReadingSvg)
' verifico esistenza file svg e lo carico ' verifico esistenza file svg e lo carico
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "svg"), fContent) bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "svg"), fContent)
' !!! ToDo: inserire TIPO di richiesta secondo quanto ricevuto....
' invio risposta ' invio risposta
currRes.Validated = MyThreadData.nProcResult = 0 AndAlso bOk currRes.Validated = MyThreadData.nProcResult = 0 AndAlso bOk
currRes.DoorIdVers = Item.Key currRes.DoorIdVers = Item.Key
' per ora cablato a svg, prendere da MimeType richiesta...
currRes.MimeType = "svg"
' se NON fosse validato --> messo il messaggio... ' se NON fosse validato --> messo il messaggio...
If (currRes.Validated) Then If (currRes.Validated) Then
currRes.SvgGen = fContent currRes.RawContent = fContent
Else Else
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "txt"), fContent) bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "txt"), fContent)
currRes.ErrorMsg = fContent currRes.ErrorMsg = fContent
@@ -1297,22 +1317,27 @@ Public Class ProcMan
Private Sub ProcMan_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub ProcMan_Load(sender As Object, e As EventArgs) Handles MyBase.Load
m_IniFilePath = AppDomain.CurrentDomain.BaseDirectory & INI_FILE_NAME m_IniFilePath = AppDomain.CurrentDomain.BaseDirectory & INI_FILE_NAME
ManageInstance() ManageInstance()
' Imposto tipo di chiave '' Imposto tipo di chiave
EgtSetLockType(KEY_TYPE.HW) 'EgtSetLockType(KEY_TYPE.HW)
' Leggo e imposto chiave di protezione '' Leggo e imposto chiave di protezione
Dim sLicFileName As String = String.Empty 'Dim sLicFileName As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_IniFilePath) 'GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_IniFilePath)
Dim sLicFile As String = AppDomain.CurrentDomain.BaseDirectory & sLicFileName 'Dim sLicFile As String = AppDomain.CurrentDomain.BaseDirectory & sLicFileName
Dim sKey As String = String.Empty 'Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) 'EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey) 'EgtSetKey(sKey)
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_IniFilePath) = 1) 'Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_IniFilePath) = 1)
EgtSetNetHwKey(bNetHwKey) 'EgtSetNetHwKey(bNetHwKey)
' Recupero livello e opzioni della chiave 'Dim sLockId As String = ""
Dim nKeyLevel As Integer = 0 'EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
Dim nKeyOptions As Integer = 0 'If Not String.IsNullOrEmpty(sLockId) Then
Dim bKey As Boolean = EgtGetKeyLevel(9935, 2505, 1, nKeyLevel) And ' Dim x = EgtSetLockId(sLockId)
EgtGetKeyOptions(9935, 2505, 1, nKeyOptions) 'End If
'' Recupero livello e opzioni della chiave
'Dim nKeyLevel As Integer = 0
'Dim nKeyOptions As Integer = 0
'Dim bKey As Boolean = EgtGetKeyLevel(9935, 2505, 1, nKeyLevel) And
' EgtGetKeyOptions(9935, 2505, 1, nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_sLogFile = AppDomain.CurrentDomain.BaseDirectory & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = AppDomain.CurrentDomain.BaseDirectory & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf & Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
@@ -1322,10 +1347,10 @@ Public Class ProcMan
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() & (ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString() My.Application.Info.Version.Revision.ToString()
EgtInit(0, m_sLogFile, sLogMsg) EgtInit(0, m_sLogFile, sLogMsg)
If Not bKey Then 'If Not bKey Then
MessageBox.Show("No licences available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) ' MessageBox.Show("No licences available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End ' End
End If 'End If
' leggo sorgente richieste rest da ini ' leggo sorgente richieste rest da ini
GetPrivateProfileString(S_GENERAL, K_BASEIP, "", baseIp, m_IniFilePath) GetPrivateProfileString(S_GENERAL, K_BASEIP, "", baseIp, m_IniFilePath)
+1
View File
@@ -24,6 +24,7 @@ namespace WebDoorCreator.Core
public static readonly string CALC_REQ_ERRS = $"{BASE_HASH}:CalcRequests:Errors"; public static readonly string CALC_REQ_ERRS = $"{BASE_HASH}:CalcRequests:Errors";
public static readonly string CALC_REQ_PEND = $"{BASE_HASH}:CalcRequests:Pending"; public static readonly string CALC_REQ_PEND = $"{BASE_HASH}:CalcRequests:Pending";
public static readonly string CALC_REQ_PROC = $"{BASE_HASH}:CalcRequests:Processing"; public static readonly string CALC_REQ_PROC = $"{BASE_HASH}:CalcRequests:Processing";
public static readonly string CALC_REQ_TYPE = $"{BASE_HASH}:CalcRequests:Type";
public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF"; public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF";
public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG"; public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
public static readonly string CALC_REQ_VETO_REC = $"{BASE_HASH}:CalcRequests:VetoRecalc"; public static readonly string CALC_REQ_VETO_REC = $"{BASE_HASH}:CalcRequests:VetoRecalc";
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebDoorCreator.Data.DTO
{
/// <summary>
/// Oggetto contenitore richiesta calcolo
/// </summary>
public class CalcReqtDTO
{
/// <summary>
/// DDF file content (origin)
/// </summary>
public string DDF { get; set; } = "";
/// <summary>
/// MimeType (out) requested: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
}
}
+6 -2
View File
@@ -24,9 +24,13 @@ namespace WebDoorCreator.Data.DTO
/// </summary> /// </summary>
public string ErrorMsg { get; set; } = ""; public string ErrorMsg { get; set; } = "";
/// <summary> /// <summary>
/// SVG generated /// Object RAW generated output ( was SvgGen )
/// </summary> /// </summary>
public string SvgGen { get; set; } = ""; public string RawContent { get; set; } = "";
/// <summary>
/// MimeType: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
/// <summary> /// <summary>
/// Artifats path (ex 3d zip/pack) /// Artifats path (ex 3d zip/pack)
/// </summary> /// </summary>
+5 -6
View File
@@ -28,6 +28,11 @@ namespace WebDoorCreator.Data
#region Public Methods #region Public Methods
/// <summary>
/// Invio messaggio sul canale + salvataggio in cache REDIS
/// </summary>
/// <param name="memKey">Chiave REDIS x salvare valore</param>
/// <param name="message"></param>
public bool saveAndSendMessage(string memKey, string message) public bool saveAndSendMessage(string memKey, string message)
{ {
bool answ = false; bool answ = false;
@@ -119,12 +124,6 @@ namespace WebDoorCreator.Data
} }
#endregion Private Methods #endregion Private Methods
/// <summary>
/// Invio messaggio sul canale + salvataggio in cache REDIS
/// </summary>
/// <param name="memKey">Chiave REDIS x salvare valore</param>
/// <param name="message"></param>
} }
public class PubSubEventArgs : EventArgs public class PubSubEventArgs : EventArgs
+114 -23
View File
@@ -356,7 +356,6 @@ namespace WebDoorCreator.Data.Services
public async Task<long> NumRequestDone() public async Task<long> NumRequestDone()
{ {
long numReq = 0; long numReq = 0;
string source = "REDIS";
Dictionary<string, string> dictResult = new Dictionary<string, string>(); Dictionary<string, string> dictResult = new Dictionary<string, string>();
// cerco da cache // cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_DONE); RedisKey currKey = new RedisKey(Constants.CALC_REQ_DONE);
@@ -381,7 +380,6 @@ namespace WebDoorCreator.Data.Services
public async Task<long> NumRequestErrors() public async Task<long> NumRequestErrors()
{ {
long numReq = 0; long numReq = 0;
string source = "REDIS";
Dictionary<string, string> dictResult = new Dictionary<string, string>(); Dictionary<string, string> dictResult = new Dictionary<string, string>();
// cerco da cache // cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_ERRS); RedisKey currKey = new RedisKey(Constants.CALC_REQ_ERRS);
@@ -406,7 +404,6 @@ namespace WebDoorCreator.Data.Services
public async Task<long> NumRequestPending() public async Task<long> NumRequestPending()
{ {
long numReq = 0; long numReq = 0;
string source = "REDIS";
Dictionary<string, string> dictResult = new Dictionary<string, string>(); Dictionary<string, string> dictResult = new Dictionary<string, string>();
// cerco da cache // cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PEND); RedisKey currKey = new RedisKey(Constants.CALC_REQ_PEND);
@@ -431,7 +428,6 @@ namespace WebDoorCreator.Data.Services
public async Task<long> NumRequestProcessing() public async Task<long> NumRequestProcessing()
{ {
long numReq = 0; long numReq = 0;
string source = "REDIS";
Dictionary<string, string> dictResult = new Dictionary<string, string>(); Dictionary<string, string> dictResult = new Dictionary<string, string>();
// cerco da cache // cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC); RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
@@ -567,7 +563,7 @@ namespace WebDoorCreator.Data.Services
} }
/// <summary> /// <summary>
/// Restitusice gli errori della porta in oggetto /// Rimuove info della porta in oggetto
/// </summary> /// </summary>
/// <param name="doorIdVers">formato DoorId:Versione</param> /// <param name="doorIdVers">formato DoorId:Versione</param>
/// <returns></returns> /// <returns></returns>
@@ -576,6 +572,7 @@ namespace WebDoorCreator.Data.Services
await DoorRefreshRemove($"{doorId}"); await DoorRefreshRemove($"{doorId}");
await RequestDoneRemove($"{doorId}"); await RequestDoneRemove($"{doorId}");
await RequestErrRemove($"{doorId}"); await RequestErrRemove($"{doorId}");
await RequestTypeRemove($"{doorId}");
await RequestPendingRemove($"{doorId}"); await RequestPendingRemove($"{doorId}");
await RequestProcessingRemove($"{doorId}"); await RequestProcessingRemove($"{doorId}");
@@ -771,7 +768,7 @@ namespace WebDoorCreator.Data.Services
} }
/// <summary> /// <summary>
/// Upsert for single hash record /// Upsert for single hash record of req pending
/// </summary> /// </summary>
/// <returns>Dictionary of DoorId, saveVersNumb</returns> /// <returns>Dictionary of DoorId, saveVersNumb</returns>
public async Task<long> RequestPendingUpsert(string doorId, string vers) public async Task<long> RequestPendingUpsert(string doorId, string vers)
@@ -839,6 +836,73 @@ namespace WebDoorCreator.Data.Services
return numReq; return numReq;
} }
/// <summary>
/// Get list of request type
/// </summary>
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
public async Task<Dictionary<string, string>> RequestType()
{
long numReq = 0;
Dictionary<string, string> dictResult = new Dictionary<string, string>();
// cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_TYPE);
Stopwatch sw = new Stopwatch();
if (logTimingEnable)
{
sw.Start();
}
numReq = redisDb.HashLength(currKey);
if (numReq > 0)
{
var rawData = await redisDb.HashGetAllAsync(currKey);
foreach (var item in rawData)
{
dictResult.Add($"{item.Name}", $"{item.Value}");
}
}
if (logTimingEnable)
{
sw.Stop();
// gestione statistiche
await ProcStatLog("RequestType", sw.Elapsed, 1, 10);
}
return dictResult;
}
/// <summary>
/// Remove for single hash record from TYPE hash table
/// </summary>
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
public async Task<bool> RequestTypeRemove(string doorId)
{
RedisKey currKey = new RedisKey(Constants.CALC_REQ_TYPE);
bool fatto = await RedHashRemove(currKey, doorId);
return fatto;
}
/// <summary>
/// Upsert for single hash record of TYPE
/// </summary>
/// <returns>Dictionary of DoorId, Type proc requested</returns>
public async Task<bool> RequestTypeUpsert(string doorId, string type)
{
RedisKey currKey = new RedisKey(Constants.CALC_REQ_TYPE);
long numReq = 0;
bool answ = false;
if (!string.IsNullOrEmpty(type))
{
numReq = await RedHashUpsert(currKey, doorId, type);
answ = numReq > 0;
}
// se vuoto --> rimuovo!
else
{
await RedHashRemove(currKey, doorId);
answ = true;
}
return answ;
}
/// <summary> /// <summary>
/// Reset to queue request all processing/processed data /// Reset to queue request all processing/processed data
/// </summary> /// </summary>
@@ -878,6 +942,14 @@ namespace WebDoorCreator.Data.Services
await RequestDoneRemove(item.Name!); await RequestDoneRemove(item.Name!);
fatto = true; fatto = true;
} }
// svuoto in blocco hashatble tipo richieste...
currKey = new RedisKey(Constants.CALC_REQ_TYPE);
rawData = await redisDb.HashGetAllAsync(currKey);
foreach (var item in rawData)
{
await RequestTypeRemove(item.Name!);
fatto = true;
}
if (logTimingEnable) if (logTimingEnable)
{ {
sw.Stop(); sw.Stop();
@@ -906,11 +978,11 @@ namespace WebDoorCreator.Data.Services
foreach (var item in rawData) foreach (var item in rawData)
{ {
// se è nell'elenco... // se è nell'elenco...
if (DoorIdList.Contains(item.Name.ToString())) if (DoorIdList.Contains($"{item.Name}"))
{ {
await RequestPendingUpsert(item.Name!, item.Value!); await RequestPendingUpsert(item.Name!, item.Value!);
await RequestProcessingRemove(item.Name!); await RequestProcessingRemove(item.Name!);
listDone.Add(item.Name.ToString()); listDone.Add($"{item.Name}");
} }
} }
// cerco le richieste con errori // cerco le richieste con errori
@@ -919,11 +991,11 @@ namespace WebDoorCreator.Data.Services
foreach (var item in rawData) foreach (var item in rawData)
{ {
// se è nell'elenco... // se è nell'elenco...
if (DoorIdList.Contains(item.Name.ToString())) if (DoorIdList.Contains($"{item.Name}"))
{ {
await RequestPendingUpsert(item.Name!, item.Value!); await RequestPendingUpsert(item.Name!, item.Value!);
await RequestErrRemove(item.Name!); await RequestErrRemove(item.Name!);
listDone.Add(item.Name.ToString()); listDone.Add($"{item.Name}");
} }
} }
// cerco le richieste processed // cerco le richieste processed
@@ -932,20 +1004,25 @@ namespace WebDoorCreator.Data.Services
foreach (var item in rawData) foreach (var item in rawData)
{ {
// se è nell'elenco... // se è nell'elenco...
if (DoorIdList.Contains(item.Name.ToString())) if (DoorIdList.Contains($"{item.Name}"))
{ {
await RequestPendingUpsert(item.Name!, item.Value!); await RequestPendingUpsert(item.Name!, item.Value!);
await RequestDoneRemove(item.Name!); await RequestDoneRemove(item.Name!);
listDone.Add(item.Name.ToString()); listDone.Add($"{item.Name}");
} }
} }
#if false // svuoto hashatble tipo richieste...
// calcolo eventuali porte NON ancora richieste... currKey = new RedisKey(Constants.CALC_REQ_TYPE);
foreach (var item in listDone) rawData = await redisDb.HashGetAllAsync(currKey);
foreach (var item in rawData)
{ {
DoorIdList.Remove(item); // se è nell'elenco...
if (DoorIdList.Contains($"{item.Name}"))
{
await RequestTypeRemove(item.Name!);
listDone.Add($"{item.Name}");
}
} }
#endif
if (logTimingEnable) if (logTimingEnable)
{ {
sw.Stop(); sw.Stop();
@@ -1021,12 +1098,12 @@ namespace WebDoorCreator.Data.Services
// se template --> no scadenza // se template --> no scadenza
if (doorIsTpl) if (doorIsTpl)
{ {
await redisDb.StringSetAsync(currSvgKey, calcTask.SvgGen); await redisDb.StringSetAsync(currSvgKey, calcTask.RawContent);
} }
else else
{ {
// 2024.02.15 salvo in cache x 2 settimane, fare 1+ mesi?!? // 2024.02.15 salvo in cache x 2 settimane, fare 1+ mesi?!?
await redisDb.StringSetAsync(currSvgKey, calcTask.SvgGen, DblWeekLongCache); await redisDb.StringSetAsync(currSvgKey, calcTask.RawContent, DblWeekLongCache);
} }
// elimino dalle code proc/err // elimino dalle code proc/err
await RequestProcessingRemove(sDoorId); await RequestProcessingRemove(sDoorId);
@@ -1069,8 +1146,9 @@ namespace WebDoorCreator.Data.Services
/// </summary> /// </summary>
/// <param name="DoorId"></param> /// <param name="DoorId"></param>
/// <param name="FullDDF">Contenuto completo del DDF</param> /// <param name="FullDDF">Contenuto completo del DDF</param>
/// <param name="MimeType">Tipo di file richeisto in OUT: svg / 3dm...</param>
/// <returns>indice/versione del calcolo DDF</returns> /// <returns>indice/versione del calcolo DDF</returns>
public async Task<int> SendCalcReq(int DoorId, string FullDDF) public async Task<int> SendCalcReq(int DoorId, string FullDDF, string? MimeType = "")
{ {
Stopwatch sw = new Stopwatch(); Stopwatch sw = new Stopwatch();
if (logTimingEnable) if (logTimingEnable)
@@ -1080,6 +1158,9 @@ namespace WebDoorCreator.Data.Services
string sDoorId = $"{DoorId}"; string sDoorId = $"{DoorId}";
int currVers = await DoorCalcRev(sDoorId); int currVers = await DoorCalcRev(sDoorId);
string sCurrVers = $"{currVers}"; string sCurrVers = $"{currVers}";
// salvo il mimeType (se nullo è "svg")
string mimeType = MimeType ?? "";
await RequestTypeUpsert(sDoorId, mimeType);
// elimino da code errori (SE fosse presente) // elimino da code errori (SE fosse presente)
await RequestErrRemove(sDoorId); await RequestErrRemove(sDoorId);
@@ -1175,11 +1256,11 @@ namespace WebDoorCreator.Data.Services
/// Get Queue request pending, removing from queue and putting on processing queue /// Get Queue request pending, removing from queue and putting on processing queue
/// </summary> /// </summary>
/// <returns>Dictionary of DoorId, saveVersNumb</returns> /// <returns>Dictionary of DoorId, saveVersNumb</returns>
public async Task<Dictionary<string, string>> TakeProcessingItems(int numItems) public async Task<Dictionary<string, CalcReqtDTO>> TakeProcessingItems(int numItems)
{ {
int maxTake = Math.Min(10, numItems); int maxTake = Math.Min(10, numItems);
long numReq = 0; long numReq = 0;
Dictionary<string, string> dictResult = new Dictionary<string, string>(); Dictionary<string, CalcReqtDTO> dictResult = new Dictionary<string, CalcReqtDTO>();
// cerco da cache // cerco da cache
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PEND); RedisKey currKey = new RedisKey(Constants.CALC_REQ_PEND);
Stopwatch sw = new Stopwatch(); Stopwatch sw = new Stopwatch();
@@ -1209,7 +1290,17 @@ namespace WebDoorCreator.Data.Services
// recupero il DDF... // recupero il DDF...
RedisKey currDdfKey = new RedisKey($"{Constants.CALC_REQ_DDF_CACHE}:{item.Name}:{item.Value}"); RedisKey currDdfKey = new RedisKey($"{Constants.CALC_REQ_DDF_CACHE}:{item.Name}:{item.Value}");
var rawDDF = await redisDb.StringGetAsync(currDdfKey); var rawDDF = await redisDb.StringGetAsync(currDdfKey);
dictResult.Add($"{item.Name}.{item.Value}", $"{rawDDF}"); // verifico il tpo richiesta, se non trovassi prendo "svg" default...
var curTypeKey = new RedisKey(Constants.CALC_REQ_TYPE);
var rawType = await RedHashGetString(curTypeKey, item.Name!, true);
string mimeType = string.IsNullOrEmpty(rawType) ? "svg" : $"{rawType}";
// preparo DTO
CalcReqtDTO currReq = new CalcReqtDTO()
{
MimeType = mimeType,
DDF = $"{rawDDF}"
};
dictResult.Add($"{item.Name}.{item.Value}", currReq);
if (maxTake <= 0) if (maxTake <= 0)
{ {
break; break;
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebDoorCreator.SDK
{
/// Oggetto contenitore richiesta calcolo
/// </summary>
public class CalcReqtDTO
{
/// <summary>
/// DDF file content (origin)
/// </summary>
public string DDF { get; set; } = "";
/// <summary>
/// MimeType (out) requested: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
}
}
+6 -2
View File
@@ -24,9 +24,13 @@ namespace WebDoorCreator.SDK
/// </summary> /// </summary>
public string ErrorMsg { get; set; } = ""; public string ErrorMsg { get; set; } = "";
/// <summary> /// <summary>
/// SVG generated /// Object RAW generated output ( was SvgGen )
/// </summary> /// </summary>
public string SvgGen { get; set; } = ""; public string RawContent { get; set; } = "";
/// <summary>
/// MimeType: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
/// <summary> /// <summary>
/// Articat path (ex 3d zip/pack) /// Articat path (ex 3d zip/pack)
/// </summary> /// </summary>
+3 -3
View File
@@ -125,9 +125,9 @@ namespace WebDoorCreator.SDK
/// <summary> /// <summary>
/// Elenco degli item da processare, nel formato DoorId, Vers /// Elenco degli item da processare, nel formato DoorId, Vers
/// </summary> /// </summary>
public Dictionary<string, string> queueList(int maxNum) public Dictionary<string, CalcReqtDTO> queueList(int maxNum)
{ {
Dictionary<string, string> returnData = new Dictionary<string, string>(); Dictionary<string, CalcReqtDTO> returnData = new Dictionary<string, CalcReqtDTO>();
Dictionary<string, string> parList = new Dictionary<string, string>() Dictionary<string, string> parList = new Dictionary<string, string>()
{ {
{ "numItems", $"{maxNum}" } { "numItems", $"{maxNum}" }
@@ -135,7 +135,7 @@ namespace WebDoorCreator.SDK
var rawData = callUrlGet(urlTakeNextItems, parList); var rawData = callUrlGet(urlTakeNextItems, parList);
if (!string.IsNullOrEmpty(rawData) && rawData != "ERR") if (!string.IsNullOrEmpty(rawData) && rawData != "ERR")
{ {
returnData = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData); returnData = JsonConvert.DeserializeObject<Dictionary<string, CalcReqtDTO>>(rawData);
} }
return returnData; return returnData;
} }
@@ -76,6 +76,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CalcReqDTO.cs" />
<Compile Include="CalcResultDTO.cs" /> <Compile Include="CalcResultDTO.cs" />
<Compile Include="ProcStats.cs" /> <Compile Include="ProcStats.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
@@ -1,18 +1,25 @@
<div> <div>
@if (B_doorOpUpd) @if (B_doorOpUpd)
{ {
<button class="btn btn-success" @onclick="() => refreshSVG()"><i class="fa-solid fa-rotate-right"></i></button> <button class="btn btn-success mx-1" @onclick="() => refreshSVG()"><i class="fa-solid fa-rotate-right"></i></button>
<button class="btn btn-warning" href="https://iis01.egalware.com/Test3D/Doors041122/EXB_0267100040/EXB_0267100040.html" target="_blank"><i class="fa-solid fa-cube"></i></button>
@if (IsErr) @if (IsErr)
{ {
<button class="btn btn-danger" @onclick="() => toggleErrors(true)"><i class="fa-solid fa-triangle-exclamation"></i></button> <button class="btn btn-danger mx-1" @onclick="() => toggleErrors(true)"><i class="fa-solid fa-triangle-exclamation"></i></button>
} }
} }
else else
{ {
<button class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i></button> <button class="btn btn-secondary mx-1"><i class="fa-solid fa-rotate-right"></i></button>
<button class="btn btn-secondary" disabled><i class="fa-solid fa-cube"></i></button> }
@if (IsErr)
{
<button class="btn btn-secondary mx-1" disabled><i class="fa-solid fa-cube"></i></button>
}
else
{
@* <button class="btn btn-warning" href="https://iis01.egalware.com/Test3D/Doors041122/EXB_0267100040/EXB_0267100040.html" target="_blank"><i class="fa-solid fa-cube"></i></button> *@
<button class="btn btn-warning mx-1" @onclick="() => open3D()"><i class="fa-solid fa-cube"></i></button>
} }
</div> </div>
@@ -4,6 +4,7 @@ using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.DTO; using WebDoorCreator.Data.DTO;
using WebDoorCreator.Data.Services; using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data; using WebDoorCreator.UI.Data;
using static WebDoorCreator.UI.Components.SvgComp.DoorSvgObj;
namespace WebDoorCreator.UI.Components.Buttons namespace WebDoorCreator.UI.Components.Buttons
{ {
@@ -26,6 +27,10 @@ namespace WebDoorCreator.UI.Components.Buttons
[CascadingParameter] [CascadingParameter]
public bool IsErr { get; set; } = false; public bool IsErr { get; set; } = false;
[Parameter]
public EventCallback<bool> EC_CalcRunning { get; set; }
#endregion Public Properties #endregion Public Properties
#region Protected Properties #region Protected Properties
@@ -83,15 +88,6 @@ namespace WebDoorCreator.UI.Components.Buttons
await refreshSVG(); await refreshSVG();
} }
/// <summary>
/// Effettua Richiesta visione porta 3D
/// </summary>
/// <returns></returns>
protected async Task doReq3D()
{
await Task.Delay(1);
}
protected override void OnInitialized() protected override void OnInitialized()
{ {
base.OnInitialized(); base.OnInitialized();
@@ -99,6 +95,7 @@ namespace WebDoorCreator.UI.Components.Buttons
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps"); bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>(); var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>(); var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
WaitOpen3d = config.GetValue<int>("ServerConf:WaitOpen3d");
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows); currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
WDCRService.EA_UpdDoorOp += WDCRService_EA_UpdDoorOp; WDCRService.EA_UpdDoorOp += WDCRService_EA_UpdDoorOp;
} }
@@ -109,11 +106,71 @@ namespace WebDoorCreator.UI.Components.Buttons
await Task.Delay(1); await Task.Delay(1);
} }
/// <summary>
/// Apertura visualizzatore 3D della porta in oggetto
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
protected async Task open3D()
{
await EC_CalcRunning.InvokeAsync(true);
// inserisco richiesta calcolo
await sendCalcReqForType("3dm");
// apro link in nuova pagina...
//var url = $"api/Report/GetOrderReport?OrderId={orderId}&Format=PDF";
var url = $"https://iis01.egalware.com/Test3D/TJSD/index_2.html?src=Door2.3dm";
//var url = $"https://iis01.egalware.com/Test3D/TJSD/index_2.html?src=D{idDoor:000000000000}.3dm";
// chiamo apertura via jscript in target _blank
// attendo per apertura WaitOpen3d ms
await Task.Delay(WaitOpen3d);
await EC_CalcRunning.InvokeAsync(false);
await Task.Delay(50);
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
}
/// <summary> /// <summary>
/// Effettua generazione DDF + refresh SVG /// Effettua generazione DDF + refresh SVG
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
protected async Task refreshSVG() protected async Task refreshSVG()
{
// vuoto = svg
await sendCalcReqForType("");
}
protected async Task toggleErrors(bool show)
{
showModal = show;
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Fields
/// <summary>
/// tempo attesa apertura pagina 3d x tempo calcolo e ritorno
/// </summary>
private int WaitOpen3d = 500;
#endregion Private Fields
#region Private Properties
private bool showModal { get; set; } = false;
#endregion Private Properties
#region Private Methods
/// <summary>
/// salva ddf serializzato ed invia richiesta calcolo specifica
/// </summary>
/// <param name="mType"></param>
/// <returns></returns>
private async Task sendCalcReqForType(string mType)
{ {
List<DoorOpModel>? listOpAll = await WDCService.DoorOpGetByDoorId(idDoor); List<DoorOpModel>? listOpAll = await WDCService.DoorOpGetByDoorId(idDoor);
if (listOpAll != null) if (listOpAll != null)
@@ -135,7 +192,7 @@ namespace WebDoorCreator.UI.Components.Buttons
string currDdf = currDdfConv.GetSerialized(listOp); string currDdf = currDdfConv.GetSerialized(listOp);
// versione corrente del DDF generato // versione corrente del DDF generato
int currVers = await QDataServ.SendCalcReq(idDoor, currDdf); int currVers = await QDataServ.SendCalcReq(idDoor, currDdf, mType);
if (currVers > 0) if (currVers > 0)
{ {
@@ -145,22 +202,6 @@ namespace WebDoorCreator.UI.Components.Buttons
} }
} }
protected async Task toggleErrors(bool show)
{
showModal = show;
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Properties
private bool showModal { get; set; } = false;
#endregion Private Properties
#region Private Methods
private async void WDCRService_EA_UpdDoorOp() private async void WDCRService_EA_UpdDoorOp()
{ {
await InvokeAsync(() => await InvokeAsync(() =>
@@ -1,11 +1,18 @@
<div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;"> <div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
<ButtonsDoorDef></ButtonsDoorDef> <ButtonsDoorDef EC_CalcRunning="SetCalcRunning"></ButtonsDoorDef>
@if (!string.IsNullOrEmpty(@SvgContent)) @if (isRecalc)
{ {
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;"> <LoadingData DisplayMode="LoadingData.SpinMode.Growl" DisplaySize="LoadingData.CtrlSize.Large" Title="Render 3DM"></LoadingData>
<div style="width: @doorW; max-height: 30rem;"> }
@svgPreview else
{
if (!string.IsNullOrEmpty(@SvgContent))
{
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
<div style="width: @doorW; max-height: 30rem;">
@svgPreview
</div>
</div> </div>
</div> }
} }
</div> </div>
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using NLog; using NLog;
using WebDoorCreator.Data.DbModels;
namespace WebDoorCreator.UI.Components.DoorDef namespace WebDoorCreator.UI.Components.DoorDef
{ {
@@ -7,8 +8,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
{ {
#region Public Properties #region Public Properties
private static Logger Log = LogManager.GetCurrentClassLogger();
[Parameter] [Parameter]
public string doorW { get; set; } = ""; public string doorW { get; set; } = "";
@@ -16,22 +15,41 @@ namespace WebDoorCreator.UI.Components.DoorDef
public string SvgContent public string SvgContent
{ {
get => _svgContent; get => _svgContent;
set set { _svgContent = value; }
{
_svgContent = value;
}
} }
protected string _svgContent { get; set; } = "";
#endregion Public Properties #endregion Public Properties
#region Protected Properties #region Protected Properties
protected string _svgContent { get; set; } = "";
protected MarkupString svgPreview protected MarkupString svgPreview
{ {
get => (MarkupString)SvgContent; get => (MarkupString)SvgContent;
} }
#endregion Protected Properties #endregion Protected Properties
#region Protected Methods
protected async Task SetCalcRunning(bool isRunning)
{
isRecalc = isRunning;
await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Variabile stato recalc x mostrare attesa..
/// </summary>
private bool isRecalc = false;
#endregion Private Fields
} }
} }
@@ -7,7 +7,7 @@
<rect x="0" y="0" width="100%" height="100%" fill="#34495E"></rect> <rect x="0" y="0" width="100%" height="100%" fill="#34495E"></rect>
<image href="@ImagePath" height="100%" width="100%" clip-path="url(#theClippingPath)"></image> <image href="@ImagePath" height="100%" width="100%" clip-path="url(#theClippingPath)"></image>
<path d="@PathLineData" stroke="@LineColor" stroke-width="@LineWidth" fill="none" /> <path d="@PathLineData" stroke="@LineColor" stroke-width="@LineWidth" fill="none" />
<g transform="translate(0,@(ObjH/4))"> <g transform="translate(0,@(ObjH/8))">
<foreignObject width="@(ObjW/2)" height="@(ObjH/2)"> <foreignObject width="@(ObjW/2)" height="@(ObjH/2)">
<div class="row text-white text-center"> <div class="row text-white text-center">
<div style="@TitleStyle" class="text-uppercase"> <div style="@TitleStyle" class="text-uppercase">
@@ -18,11 +18,23 @@
</div> </div>
@if (isLogged) @if (isLogged)
{ {
<div class="mt-5"> <div class="mt-5" style="font-size: 30px;">
<button class="btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase" @onclick="() => raiseEvent()"> @* <button class="btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase" @onclick="() => raiseEvent(null)">
@ButtonText @ButtonText
</button> </button> *@
</div> @if (ButtonsList != null && ButtonsList.Count > 0)
{
foreach (var item in ButtonsList)
{
<button class="mx-2 my-3 @item.Css" @onclick="() => raiseEvent(item.RetPage)" title="@item.Title">
@item.Text&nbsp; <i class="@item.Icon"></i>
@* <div class="small">
@item.BtnDescript
</div> *@
</button>
}
}
</div>
} }
</div> </div>
</foreignObject> </foreignObject>
@@ -19,7 +19,10 @@ namespace WebDoorCreator.UI.Components.SvgComp
public string ButtonText { get; set; } = "Button Text"; public string ButtonText { get; set; } = "Button Text";
[Parameter] [Parameter]
public EventCallback<bool> EC_ExeFunct { get; set; } public List<ButtonData> ButtonsList { get; set; } = new List<ButtonData>();
[Parameter]
public EventCallback<string> EC_ExeFunct { get; set; }
[Parameter] [Parameter]
public string ImagePath { get; set; } = "images/DOORBG.png"; public string ImagePath { get; set; } = "images/DOORBG.png";
@@ -72,6 +75,18 @@ namespace WebDoorCreator.UI.Components.SvgComp
} }
} }
public class ButtonData
{
public string Css { get; set; } = "btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase";
public string Text { get; set; } = "Button";
public string Title { get; set; } = "Button Suggestion";
public string Descript { get; set; } = "...";
public string Icon { get; set; } = "fa fa-home";
public string RetPage { get; set; } = "home";
}
protected List<PointData> PathLine { get; set; } = null!; protected List<PointData> PathLine { get; set; } = null!;
protected string PathLineData protected string PathLineData
@@ -97,7 +112,7 @@ namespace WebDoorCreator.UI.Components.SvgComp
protected void execFunc() protected void execFunc()
{ {
EC_ExeFunct.InvokeAsync(true); EC_ExeFunct.InvokeAsync("");
} }
protected override void OnParametersSet() protected override void OnParametersSet()
@@ -157,9 +172,10 @@ namespace WebDoorCreator.UI.Components.SvgComp
#endregion Public Properties #endregion Public Properties
} }
protected async Task raiseEvent() protected async Task raiseEvent(string? retPage)
{ {
await EC_ExeFunct.InvokeAsync(true); retPage = retPage ?? "Home";
await EC_ExeFunct.InvokeAsync(retPage);
} }
#endregion Protected Classes #endregion Protected Classes
+1 -1
View File
@@ -8,7 +8,7 @@
<div class="shadow-lg"> <div class="shadow-lg">
<AuthorizeView> <AuthorizeView>
<Authorized> <Authorized>
<HomeCard ObjH="1080" ObjW="1920" StartPoint="850" LineWidth="18" TitleText="Web Door Creator" BodyText="The new way to create doors" ImagePath="images/HeroSecDoor.png" EC_ExeFunct="changePage" ButtonText="@translate("UI_00")" isLogged="true"></HomeCard> <HomeCard ObjH="1080" ObjW="1920" StartPoint="850" LineWidth="18" TitleText="Web Door Creator" BodyText="The new way to create doors" ImagePath="images/HeroSecDoor.png" EC_ExeFunct="changePage" ButtonText="@translate("UI_00")" isLogged="true" ButtonsList="@BtnList"></HomeCard>
</Authorized> </Authorized>
<NotAuthorized> <NotAuthorized>
<HomeCard ObjH="1080" ObjW="1920" StartPoint="850" LineWidth="18" TitleText="Web Door Creator" BodyText="The new way to create doors" ImagePath="images/HeroSecDoor.png" EC_ExeFunct="changePage" ButtonText="@translate("UI_00")" isLogged="false"></HomeCard> <HomeCard ObjH="1080" ObjW="1920" StartPoint="850" LineWidth="18" TitleText="Web Door Creator" BodyText="The new way to create doors" ImagePath="images/HeroSecDoor.png" EC_ExeFunct="changePage" ButtonText="@translate("UI_00")" isLogged="false"></HomeCard>
+41 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using WebDoorCreator.UI.Components.SvgComp;
using WebDoorCreator.UI.Data; using WebDoorCreator.UI.Data;
namespace WebDoorCreator.UI.Pages namespace WebDoorCreator.UI.Pages
@@ -21,7 +22,46 @@ namespace WebDoorCreator.UI.Pages
return answ; return answ;
} }
protected async Task changePage(bool newPage) protected List<HomeCard.ButtonData> BtnList { get; set; } = new List<HomeCard.ButtonData>();
protected override void OnInitialized()
{
BtnList = new List<HomeCard.ButtonData>();
BtnList.Add(new HomeCard.ButtonData
{
Text = "Import Orders",
Css = "btn btn-lg btn-primary rounded-pill py-3 px-5 text-uppercase fs-3",
Icon = "fa-regular fa-file-code",
Title = "Go To Import page for third-party order import",
Descript = "Import from CSV, XML, Json",
RetPage = "ImportOrders"
});
BtnList.Add(new HomeCard.ButtonData
{
Text = "Manage Orders",
Css = "btn btn-lg btn-primary rounded-pill py-3 px-5 text-uppercase fs-3",
Icon = "fa-solid fa-cart-shopping",
Title = "Go To Order Management page",
Descript = "",
RetPage = "OrdersHomePage"
});
BtnList.Add(new HomeCard.ButtonData
{
Text = "Design Doors",
Css = "btn btn-lg btn-primary rounded-pill py-3 px-5 text-uppercase fs-3",
Icon = "fa-solid fa-door-open",
Title = "Go To Door Design Page",
Descript = "",
RetPage = "DoorDesignPage"
});
}
/// <summary>
/// Route to desider page
/// </summary>
/// <param name="newPage"></param>
/// <returns></returns>
protected async Task changePage(string newPage)
{ {
await Task.Delay(1); await Task.Delay(1);
NavManager.NavigateTo("OrdersHomePage"); NavManager.NavigateTo("OrdersHomePage");
@@ -0,0 +1,99 @@
@page "/ModeSelector"
<div class="d-flex justify-content-between">
<div class="px-2">
<div class="card shadow" style="width: 20rem; height:22rem;">
<div class="card-header d-flex py-3 fs-1 justify-content-evenly">
<div class="px-2">
<i class="fa-regular fa-file-excel"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-file-csv"></i>
</div>
<div class="px-2">
<i class="fa-regular fa-file-code"></i>
</div>
</div>
<div class="card-body">
<h5 class="card-title">Order Import</h5>
<p class="card-text">Order import from external third party programs for standard-featured doors.</p>
<p>Format recognized: CSV, XML and Json.</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-primary">Go To Order Import</a>
</div>
</div>
</div>
<div class="px-2">
<div class="card shadow" style="width: 20rem; height:22rem;">
<div class="card-header d-flex py-3 fs-1 justify-content-evenly">
<div class="px-2">
<i class="fa-solid fa-cart-shopping"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-cart-plus"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-cart-arrow-down"></i>
</div>
</div>
<div class="card-body">
<h5 class="card-title">Order Manage</h5>
<p class="card-text">Create and manage orders choosing from door models and template available on the platform or already defined.</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-primary">Go To Order Manager</a>
</div>
</div>
</div>
<div class="px-2">
<div class="card shadow" style="width: 20rem; height:22rem;">
<div class="card-header d-flex py-3 fs-1 justify-content-evenly">
<div class="px-2">
<i class="fa-solid fa-door-open"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-dungeon"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-door-closed"></i>
</div>
</div>
<div class="card-body">
<h5 class="card-title">Door Modeling</h5>
<p class="card-text">Create your unique door model, validate the design and get 2D and 3D preview.</p>
<p>Choose materials, hardware, special working, ...</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-primary">Go To Door Modeler</a>
</div>
</div>
</div>
<div class="px-2">
<div class="card shadow" style="width: 20rem; height:22rem;">
<div class="card-header d-flex py-3 fs-1 justify-content-evenly">
<div class="px-2">
<i class="fa-solid fa-gears"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-users-gear"></i>
</div>
<div class="px-2">
<i class="fa-solid fa-gear"></i>
</div>
</div>
<div class="card-body">
<h5 class="card-title">Advanced Tasks</h5>
<p class="card-text">Manage advanced task like template and catalog management, advanced search, ....</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-primary">Go To Advanced.</a>
</div>
</div>
</div>
</div>
@code {
}
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Version>0.9.2406.2015</Version> <Version>0.9.2505.1316</Version>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId> <UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
</PropertyGroup> </PropertyGroup>
@@ -17,7 +17,8 @@
}, },
"ServerConf": { "ServerConf": {
//"BasePathPdf": "U:\\WebDoorSync\\WdcPdf", //"BasePathPdf": "U:\\WebDoorSync\\WdcPdf",
"BasePathPdf": "U:\\nextcloud.egalware\\ABH\\WdcPdf" "BasePathPdf": "U:\\nextcloud.egalware\\ABH\\WdcPdf",
"WaitOpen3d": 1000
}, },
"CompoBaseDirs": { "CompoBaseDirs": {
//"CurrCompoDir": "U:\\WebDoorSync\\CurrentComp\\Compo", //"CurrCompoDir": "U:\\WebDoorSync\\CurrentComp\\Compo",
+1 -1
View File
@@ -7,7 +7,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Redis": "localhost:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false" "Redis": "redis.ufficio:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false"
}, },
"RuntimeOpt": { "RuntimeOpt": {
"MaxDayCalcCache": 7, "MaxDayCalcCache": 7,
+3 -2
View File
@@ -7,7 +7,7 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ConnectionStrings": { "ConnectionStrings": {
"Redis": "localhost:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false", "Redis": "redis.ufficio:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false",
"Identity.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;", "Identity.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;",
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;" "WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
}, },
@@ -29,7 +29,8 @@
"DisableWDCMigrate": true "DisableWDCMigrate": true
}, },
"ServerConf": { "ServerConf": {
"BasePathPdf": "\\\\IIS04\\WebDoorSync\\WdcPdf" "BasePathPdf": "\\\\IIS04\\WebDoorSync\\WdcPdf",
"WaitOpen3d": 800
}, },
"RuntimeOpt": { "RuntimeOpt": {
"WaitReloadSvg": 100, "WaitReloadSvg": 100,