155 Commits

Author SHA1 Message Date
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
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
Samuele Locatelli f612613977 Merge branch 'release/Add3dPreview02' 2024-06-20 16:23:19 +02:00
Samuele Locatelli 96366e26e7 Fix icone HW 2024-06-20 16:22:36 +02:00
Samuele Locatelli 2ac91927dc Merge tag 'Add3dPreview01' into develop
Aggiunta disabilitazione pulsante 3D viewer
2024-06-20 15:35:54 +02:00
Samuele Locatelli 6400e37944 Merge branch 'release/Add3dPreview01' 2024-06-20 15:35:36 +02:00
Samuele Locatelli 1d9f550a02 Fix btn visibility x 3D 2024-06-20 15:35:15 +02:00
Samuele Locatelli db7d0466f2 Merge tag 'AddCompoMgmtDelete05' into develop
Fix selezione generic + fix gestione pulizia folder
2024-06-20 13:15:41 +02:00
Samuele Locatelli 3fd9ef8383 Merge branch 'release/AddCompoMgmtDelete05' 2024-06-20 13:15:31 +02:00
Samuele Locatelli 795b60ee86 Fix pulizia folder + fix selezione cartelle generic 2024-06-20 13:15:12 +02:00
Samuele Locatelli f7182715e5 Merge tag 'AddCompoMgmtDelete04' into develop
Aggiunto svuotamento cache dopo rilettura componenti x evitare
riscrittura dati eliminati
2024-06-20 12:04:29 +02:00
Samuele Locatelli 7547cc7035 Merge branch 'release/AddCompoMgmtDelete04' 2024-06-20 12:02:58 +02:00
Samuele Locatelli 99ee856340 Forza svuotamento cache dopo update componenti 2024-06-20 12:02:43 +02:00
Samuele Locatelli b02b9ccbf7 Merge tag 'AddCompoMgmtDelete03' into develop
Aggiunto caso gestione dir inesistente in file missing
2024-06-20 09:37:30 +02:00
Samuele Locatelli 71e5fa0674 Merge branch 'release/AddCompoMgmtDelete03' 2024-06-20 09:37:16 +02:00
Samuele Locatelli ad772b8160 Aggiunta verifica e creazione directory non esistente alla creazione missing files 2024-06-20 09:37:01 +02:00
Samuele Locatelli 8737eefd31 Merge tag 'AddCompoMgmtDelete02' into develop
Completata gestione Compo: missing, delete, log
2024-06-20 09:12:29 +02:00
Samuele Locatelli 9d0c29358d Merge branch 'release/AddCompoMgmtDelete02' 2024-06-20 09:12:09 +02:00
Samuele Locatelli 49f6114b67 Clean & update compo completed 2024-06-20 09:11:51 +02:00
Samuele Locatelli b723109f4e update gestione dizionario (da completare) 2024-06-19 18:29:18 +02:00
Samuele Locatelli 852d17ed0e Preparata procedura fix missing (da testare) 2024-06-19 18:24:04 +02:00
Samuele Locatelli 4329ab8552 Merge tag 'AddCompoMgmtDelete01' into develop
Primo step gestione componenti in modalità delete
2024-06-19 16:57:50 +02:00
Samuele Locatelli ecb40ab66f Merge branch 'release/AddCompoMgmtDelete01' 2024-06-19 16:57:39 +02:00
Samuele Locatelli 1d82e2ba05 Aggiunto conteggio componenti missing tra DB e FS 2024-06-19 16:57:18 +02:00
Samuele Locatelli e1dc3215a1 Merge tag 'AddDebugMode' into develop
Aggiunta debug mode + check delete componenti
2024-06-19 09:26:17 +02:00
Samuele Locatelli e7665ff1e0 Merge branch 'release/AddDebugMode' 2024-06-19 09:26:00 +02:00
Samuele Locatelli e1addcf11b Aggiunta possibilità "autoapprovazione" pdf SE
- superadmin
-url con ?config=debug
2024-06-19 09:25:24 +02:00
Samuele Locatelli 85259f334c Fix gfestione eliminazione componenti 2024-06-19 09:24:51 +02:00
Samuele Locatelli 7bda460b7b Update conf in prod x WDC su aree nextcloud 2024-05-10 18:10:09 +02:00
Samuele Locatelli 56aea1cc2c Merge tag 'FixHealthCheckIIs01' into develop
Update gestione check health
2024-05-09 19:07:04 +02:00
Samuele Locatelli 716cdc4a61 Merge branch 'release/FixHealthCheckIIs01' 2024-05-09 19:06:33 +02:00
Samuele Locatelli 69c02fdb8a typo 2024-05-09 19:06:02 +02:00
Samuele Locatelli 613339b662 nota auth check health 2024-05-09 19:05:50 +02:00
Samuele Locatelli 4f4a0ec2b4 Test commento sezione startup.cs 2024-05-09 17:22:10 +02:00
Samuele Locatelli f273aaaf5a Update conf start HealthCheck serv 2024-05-09 16:41:57 +02:00
Samuele Locatelli a0bbf356a9 Merge tag 'FixTypoHeathSrvName' into develop
Sistemazione nomi servizi health
2024-05-09 13:10:44 +02:00
Samuele Locatelli facd44c6f5 Merge branch 'release/FixTypoHeathSrvName' 2024-05-09 13:10:34 +02:00
Samuele Locatelli e534651bf3 Fix nome servizi healthcheck 2024-05-09 13:10:06 +02:00
Samuele Locatelli 74b08ceefc Merge tag 'FixPdfReviewAndClose01' into develop
Fix auto close + messaggi
2024-04-26 12:08:21 +02:00
Samuele Locatelli e798a764de Merge branch 'release/FixPdfReviewAndClose01' 2024-04-26 12:08:15 +02:00
Samuele Locatelli 30529d0825 Fix chiusura preview PDF + colore pdf preview 2024-04-26 12:07:28 +02:00
Samuele Locatelli 7bebc6e8ea Fix confirm solo ove necessario 2024-04-26 10:00:25 +02:00
Samuele Locatelli 6b82975b9d Fix auto-close on confirm 2024-04-26 09:54:07 +02:00
Samuele Locatelli f5298172e6 Merge tag 'AddHealthCheck04' into develop
Update con aggiunta health x SRV/API
2024-04-24 18:21:52 +02:00
Samuele Locatelli 2a9a1f4882 Merge branch 'release/AddHealthCheck04' 2024-04-24 18:21:42 +02:00
Samuele Locatelli 6f513809de Add API health services 2024-04-24 18:21:13 +02:00
Samuele Locatelli 9ef952de54 Merge tag 'AddHealthCheck03' into develop
Completato check su DB x num rec tabelle
2024-04-23 17:06:33 +02:00
Samuele Locatelli 67b8464c5f Merge branch 'release/AddHealthCheck03' 2024-04-23 17:06:23 +02:00
Samuele Locatelli fbdddc0eee Completato check conteggio record DB 2024-04-23 17:06:09 +02:00
Samuele Locatelli 88b4e8686d Merge tag 'AddHealthCheck02' into develop
Fix ping a DB con instance + fix SqlSelect
2024-04-23 16:13:03 +02:00
Samuele Locatelli cedbd9931e Merge branch 'release/AddHealthCheck02' 2024-04-23 16:12:51 +02:00
Samuele Locatelli 43187d8d29 Update x stato healthy con ping a db con instance 2024-04-23 16:12:35 +02:00
Samuele Locatelli d0f8a94d36 Merge tag 'AddHealthCheck01' into develop
Test aggiunta health check page (base, incompleta)
2024-04-23 15:52:27 +02:00
Samuele Locatelli fd91e8fe19 Merge branch 'release/AddHealthCheck01' 2024-04-23 15:52:05 +02:00
Samuele Locatelli df73a17126 Prima bozza pagina health check x WDC 2024-04-23 15:50:16 +02:00
Samuele Locatelli a38b0aa9cb Update pèer pubblicazione WebAPI su IIS01/02 2024-04-23 11:36:30 +02:00
Samuele Locatelli 316c028c86 Merge tag 'FixDeployIIS01-IIS02' into develop
Update per test deploy IIS01/IIS02
2024-04-23 11:32:13 +02:00
Samuele Locatelli dcb51b7763 Merge branch 'release/FixDeployIIS01-IIS02' 2024-04-23 11:31:24 +02:00
Samuele Locatelli aeb52a3576 Update conf x deploy IIS01 + IIS02 in OVH 2024-04-23 11:29:43 +02:00
Samuele Locatelli 452e316851 Fix update e delete door in display 2024-04-23 11:19:03 +02:00
Samuele Locatelli a45a7390c3 Refresh 2024-04-23 09:24:22 +02:00
Samuele Locatelli c020e5fff3 Aggiunta gestione file statici esterni x PDF (ccon folders!) 2024-04-23 09:23:59 +02:00
Samuele Locatelli 366ed08fb4 Aggiunto componente view PDF viewer con doc calcolato 2024-04-23 09:23:30 +02:00
Samuele Locatelli 9465c859f9 - Aggiunta apertura PDF anche quando approvato
- fix colori pdf in less file
2024-04-23 09:23:02 +02:00
Samuele Locatelli f4b6112a77 aggiunto deploy test su prod WDC 2024-04-23 09:20:53 +02:00
Samuele Locatelli 474f480198 Merge tag 'FixDcaAdminAuth02' into develop
Fix gestione loadDataSmall --> nuovo componente
2024-04-19 09:39:16 +02:00
Samuele Locatelli 931abece6f Merge branch 'release/FixDcaAdminAuth02' 2024-04-19 09:39:01 +02:00
Samuele Locatelli 5b5d04cd5f Fix riferimenti loadData (vecchio) 2024-04-19 09:38:36 +02:00
Samuele Locatelli c202b7d387 Merge tag 'FixDcaAdminAuth' into develop
Fix auth x DcaAdmin in prod
2024-04-19 09:32:57 +02:00
Samuele Locatelli 69179e4af0 Merge branch 'release/FixDcaAdminAuth' 2024-04-19 09:32:48 +02:00
Samuele Locatelli 7b28b543e8 Update permessi DcaAdmin x mostrare componenti UI 2024-04-19 09:32:05 +02:00
Samuele Locatelli 71f1cb1246 Merge tag 'FixSentinelLocalhost' into develop
Fix release sentinel on localhost
2024-03-16 12:15:43 +01:00
Samuele Locatelli 01a50dbfec Merge branch 'release/FixSentinelLocalhost' 2024-03-16 12:15:31 +01:00
Samuele Locatelli bff4251fbe Sentinel on localhost 2024-03-16 12:14:10 +01:00
Samuele Locatelli 7b6443e4d4 fix conf x API su nuovo redis sentinel 2024-03-15 15:37:08 +01:00
Samuele Locatelli ce122ba296 Test conf IIS01 x nuovo cluster redis 2024-03-15 15:29:03 +01:00
Samuele Locatelli 101429cf11 Merge tag 'FixPagination03' into develop
Fix reset numero pagina in cambio numrec 2 displ
2024-03-11 14:32:05 +01:00
Samuele Locatelli 7cad7d00e7 Merge branch 'release/FixPagination03' 2024-03-11 14:31:54 +01:00
Samuele Locatelli ba447558d4 Fix reset numPage 2024-03-11 14:31:40 +01:00
Samuele Locatelli 337a4252f9 Merge tag 'FixPagination02' into develop
Fix favicon
2024-03-11 14:27:18 +01:00
Samuele Locatelli c8098edb97 Merge branch 'release/FixPagination02' 2024-03-11 14:27:13 +01:00
Samuele Locatelli cc9a1a8342 Fix favicon 2024-03-11 14:26:53 +01:00
Samuele Locatelli d860bbbed5 Merge tag 'FixPagination01' into develop
Fix paginazione
2024-03-11 14:16:03 +01:00
Samuele Locatelli a5b134e32b Merge branch 'release/FixPagination01' 2024-03-11 14:15:57 +01:00
Samuele Locatelli da742620b0 Fix paginazione 2024-03-11 14:15:38 +01:00
Samuele Locatelli 7bc955365f Merge tag 'FixRecalcOnMissing03' into develop
Update e fix x ricalcolo
2024-03-11 12:51:32 +01:00
Samuele Locatelli 706a9bce17 Merge branch 'release/FixRecalcOnMissing03' 2024-03-11 12:51:23 +01:00
Samuele Locatelli ab5757d0bd Completo fix x reload e calcolo corretto DDF in caso di sovrapposizione richieste 2024-03-11 12:51:04 +01:00
Samuele Locatelli 2fa5a0df16 Update serializzatore DDF x evitare race conditions 2024-03-11 10:47:39 +01:00
Samuele Locatelli cba8ceb688 Merge tag 'FixRecalcOnMissing02' into develop
Fix ricalcolo immagini (sperabilmente)
2024-03-09 11:55:33 +01:00
Samuele Locatelli 7b007f6ca5 Merge branch 'release/FixRecalcOnMissing02' 2024-03-09 11:55:21 +01:00
Samuele Locatelli a67691278b Update gestione filtraggio x ricalcolo SVG 2024-03-09 11:54:32 +01:00
Samuele Locatelli 7d3e1533fd Merge tag 'FixRecalcOnMissing01' into develop
Fix recalc su missing svg con semaforo
2024-03-09 09:27:31 +01:00
Samuele Locatelli 084973df66 Merge branch 'release/FixRecalcOnMissing01' 2024-03-09 09:27:13 +01:00
Samuele Locatelli 179565d47d fix staging conf 2024-03-09 09:26:38 +01:00
Samuele Locatelli c35eb00002 Semaforo (maybe) x evitare doppio ricalcolo 2024-03-08 19:10:19 +01:00
Samuele Locatelli 16248e2346 update conf x ricalcolo SVG 2024-03-08 19:01:18 +01:00
Samuele Locatelli 9bf93c4996 reorg config vari 2024-03-04 11:34:13 +01:00
Samuele Locatelli 82248f1068 fix calcolo url logout 2024-03-04 11:34:06 +01:00
Samuele Locatelli b0c37aa79f Merge tag 'BasePathIdentityFix02' into develop
Fix logout (spero...)
2024-03-04 11:22:31 +01:00
Samuele Locatelli 967a4e0e2f Merge branch 'release/BasePathIdentityFix02' 2024-03-04 11:22:23 +01:00
Samuele Locatelli 361854f5b5 Try fix action x logout 2024-03-04 11:22:10 +01:00
Samuele Locatelli 52d65add22 Update x login partial 2024-03-04 11:16:41 +01:00
Samuele Locatelli b868660ed9 Merge tag 'BasePathIdentityFix01' into develop
Fix base path (da testare)
2024-03-04 11:08:41 +01:00
Samuele Locatelli 2bbfa4b6bf Merge branch 'release/BasePathIdentityFix01' 2024-03-04 11:08:32 +01:00
Samuele Locatelli 118e43f0c2 Fix base URL 2024-03-04 11:07:54 +01:00
Samuele Locatelli 726df4d36c Merge branch 'main' into develop 2024-03-04 10:56:38 +01:00
Samuele Locatelli 68204acddd Merge branch 'develop' 2024-03-04 10:56:24 +01:00
Samuele Locatelli 2b2e258020 Update nuget EFCore a 6.0.27 2024-03-04 10:51:52 +01:00
Samuele Locatelli 17bbaf2136 Update login page 2024-03-04 10:48:46 +01:00
Samuele Locatelli b2fd3a39fa Update email settings 2024-03-04 10:47:16 +01:00
Samuele Locatelli f843aff337 Fix user menu nav 2024-03-04 10:44:38 +01:00
Samuele Locatelli 13afc6464f Merge branch 'release/UpdateLoginLogoutPage01' 2024-02-21 11:30:03 +01:00
Samuele Locatelli eb64db41da Update pagine login/logout 2024-02-21 11:29:15 +01:00
Samuele Locatelli 65e54aefbe Merge tag 'FixreloadLayout01' into develop
Fix modifiche reload page x javascript di base blazor
2024-02-19 19:29:11 +01:00
Samuele Locatelli e44d1e04a2 Merge branch 'release/FixreloadLayout01' 2024-02-19 19:28:40 +01:00
Samuele Locatelli fa948fd5d0 Fix gestione reload page 2024-02-19 19:28:11 +01:00
Samuele Locatelli 30fa3b8444 Merge tag 'TestForceRecalcSvg01' into develop
Gestione ricalcolo porte quando missing: inserita, testata
2024-02-16 18:07:15 +01:00
Samuele Locatelli 35815c3a56 Merge branch 'release/TestForceRecalcSvg01' 2024-02-16 18:06:56 +01:00
Samuele Locatelli 4585ac4bf8 Aggiunta e testata rilettura DDF + SVG da missing 2024-02-16 18:05:43 +01:00
Samuele Locatelli 70cd621f80 Bozza modifiche x richeista ricalcolo porta (se missing) 2024-02-16 17:09:58 +01:00
Samuele Locatelli 145a0f5c7e Merge tag 'FixLogVerboseSrv01' into develop
Fix log verboso su SRV
2024-02-16 16:03:19 +01:00
Samuele Locatelli 9bac691032 Merge branch 'release/FixLogVerboseSrv01' 2024-02-16 16:03:03 +01:00
Samuele Locatelli ba7d395d20 Review livelli out info x richieste + frequenti 2024-02-16 15:55:33 +01:00
Samuele Locatelli 3c07a3ae26 Update logging x SRV e WebDoorCreatorService 2024-02-16 15:50:13 +01:00
Samuele Locatelli ca5731d2e6 Deduplica log avvio QueueController 2024-02-16 15:40:17 +01:00
Samuele Locatelli f8426f304a Update log... 2024-02-16 15:21:17 +01:00
Samuele Locatelli b9414c7a48 fix loog statistiche e log 2024-02-16 14:51:31 +01:00
Samuele Locatelli 6c9c3d8d85 Riscrittura metodi log QueueController e QueueDataService 2024-02-16 14:38:01 +01:00
Samuele Locatelli 5df108a979 Merge tag 'TestOvhDeploy04' into develop
completo merge con update json conf
2024-02-16 08:35:31 +01:00
Samuele Locatelli f15b1694f7 Merge branch 'release/TestOvhDeploy04' 2024-02-16 08:35:23 +01:00
Samuele Locatelli 30e37531a2 update conf 2024-02-16 08:34:23 +01:00
Samuele Locatelli 215383c630 Merge tag 'TestOvhDeploy04' into develop
Test deploy post fix DB num (11 --> 12)
2024-02-16 08:34:07 +01:00
Samuele Locatelli 5df5391030 Merge branch 'release/TestOvhDeploy04' 2024-02-16 08:33:44 +01:00
Samuele Locatelli 530faf053f Nuovo test deploy OVH 2024-02-16 08:33:26 +01:00
Samuele Locatelli 592034c9d4 Merge tag 'TestOvhDeploy03' into develop
mancava modifica utente deploy oltre a pwd...
2024-02-15 18:42:10 +01:00
Samuele Locatelli 2a2e31d087 Merge branch 'release/TestOvhDeploy03' 2024-02-15 18:42:00 +01:00
Samuele Locatelli 419150a41f modifica user deploy WDC 2024-02-15 18:41:46 +01:00
Samuele Locatelli fc4be10caa Merge tag 'TestOvhDeploy02' into develop
fix variabile x upload su OVH/WDC
2024-02-15 18:39:12 +01:00
Samuele Locatelli 2413b27678 Merge branch 'release/TestOvhDeploy02' 2024-02-15 18:39:01 +01:00
Samuele Locatelli 95ff88ac11 modifica variabile x pwd OVH 2024-02-15 18:38:39 +01:00
Samuele Locatelli 54d7e594f1 Merge tag 'TestOvhDeploy01' into develop
primo test deploy su OVH da CI/CD
2024-02-15 18:36:31 +01:00
Samuele Locatelli 7900141bda Merge branch 'release/TestOvhDeploy01' 2024-02-15 18:36:19 +01:00
Samuele Locatelli 13953a86d6 Merge commit '06b06db04dea2f591ca4c75c7b763a2e7d540876' into develop 2024-02-15 18:31:14 +01:00
Samuele Locatelli 7f0ee8ad7f Test CI/CD verso prod da testare 2024-02-15 18:30:40 +01:00
Samuele Locatelli 788112e54e impostata modifica x ricalcolo file svg missing 2024-02-15 18:26:19 +01:00
Samuele Locatelli 0e8ec13e68 refresh conf UI x nuovo prod json 2024-02-15 17:40:26 +01:00
Samuele Locatelli 67fe028cb6 Pulizia conf utenti 2024-02-15 17:40:05 +01:00
Samuele Locatelli 55f4ee077d Update x API SRV su WDC-OVH 2024-02-15 17:33:59 +01:00
Samuele Locatelli cc6b195aa3 Aggiunta conf x deploy su WDC-OVH 2024-02-15 17:33:21 +01:00
115 changed files with 3584 additions and 1379 deletions
+21 -10
View File
@@ -99,6 +99,9 @@ WDC.Api:staging:
stage: staging
tags:
- win
environment:
name: staging
url: https://iis01.egalware.com/WDC/SRV/
variables:
APP_NAME: WebDoorCreator.API
SOL_NAME: WebDoorCreator.UI
@@ -111,6 +114,8 @@ WDC.Api:staging:
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
## IIS 02
#- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
WDC.UI:staging:
stage: staging
@@ -118,7 +123,7 @@ WDC.UI:staging:
- win
environment:
name: staging
url: https://iis01.egalware.com/GPW/WDC.UI
url: https://iis01.egalware.com/WDC/UI/
variables:
APP_NAME: WebDoorCreator.UI
SOL_NAME: WebDoorCreator.UI
@@ -139,7 +144,7 @@ WDC.Api:deploy:
- win
environment:
name: production
url: https://seriate.egalware.com/GPW/WDC.UI
url: https://wdc.egalware.com/SRV/
variables:
APP_NAME: WebDoorCreator.API
SOL_NAME: WebDoorCreator.UI
@@ -151,15 +156,18 @@ WDC.Api:deploy:
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# IIS 02
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS PROD
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS OVH IIS01
- dotnet publish -p:PublishProfile=IIS-OVH-IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS OVH IIS02
- dotnet publish -p:PublishProfile=IIS-OVH-IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
WDC.UI:deploy:
stage: deploy
tags:
- win
environment:
name: production
url: https://wdc.egalware.com/UI/
variables:
APP_NAME: WebDoorCreator.UI
SOL_NAME: WebDoorCreator.UI
@@ -171,10 +179,13 @@ WDC.UI:deploy:
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# IIS EXT
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS INT
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS OVH IIS01
- dotnet publish -p:PublishProfile=IIS-OVH-IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS OVH IIS02
- dotnet publish -p:PublishProfile=IIS-OVH-IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
## IIS PROD
#- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ---------- RELEASE ----------
WDC.Api:release:
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>WebDoorCreator - Egalware</i>
<h4>Version: 0.9.2401.0415</h4>
<h4>Version: 0.9.2406.2716</h4>
<br /> Release note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2401.0415
0.9.2406.2716
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2401.0415</version>
<version>0.9.2406.2716</version>
<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>
<mandatory>false</mandatory>
@@ -5,9 +5,10 @@ using Svg;
using Svg.Skia;
using System.Drawing;
using WebDoorCreator.Data.Services;
#if false
using SkiaSharp;
using Svg.Skia;
using Svg.Skia;
#endif
namespace WebDoorCreator.API.Controllers
@@ -18,11 +19,13 @@ namespace WebDoorCreator.API.Controllers
{
#region Public Constructors
public DoorImageController(IConfiguration configuration, QueueDataService DataService)
public DoorImageController(IConfiguration configuration, QueueDataService cQDService, WebDoorCreatorService cWDCService)
{
Log.Info("Starting DoorImageController");
_configuration = configuration;
QDataServ = DataService;
WaitReloadSvg = _configuration.GetValue<int>("RuntimeOpt:WaitReloadSvg");
QDService = cQDService;
WDService = cWDCService;
Log.Info("Avviato DoorImageController");
}
@@ -37,12 +40,24 @@ namespace WebDoorCreator.API.Controllers
return "OK";
}
[HttpGet("GetImage.png")]
public async Task<IActionResult> GetImagePng(int DoorId)
{
byte[] result = new byte[0];
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
string svgContent = await QDService.DoorGetLastSvg(DoorId);
// se fosse vuoto...
if (string.IsNullOrEmpty(svgContent))
{
// richiede ricalcolo img
svgContent = await SendRecalcReq(DoorId);
}
// se fosse vuoto...
if (string.IsNullOrEmpty(svgContent))
{
// legge img vuota
svgContent = QDService.DoorGetMissingSvg();
}
// ora prosegue con conversione...
if (!string.IsNullOrEmpty(svgContent))
{
using (var svg = new SKSvg())
@@ -56,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");
}
@@ -73,7 +78,15 @@ namespace WebDoorCreator.API.Controllers
[HttpGet("GetImage.svg")]
public async Task<IActionResult> GetImageSvg(int DoorId)
{
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
string svgContent = await QDService.DoorGetLastSvg(DoorId);
// se fosse vuoto...
if (string.IsNullOrEmpty(svgContent))
{
// richiede ricalcolo img
await SendRecalcReq(DoorId);
// legge img vuota
svgContent = QDService.DoorGetMissingSvg();
}
var result = System.Text.Encoding.UTF8.GetBytes(svgContent);
return File(result, "image/svg+xml");
}
@@ -86,18 +99,48 @@ namespace WebDoorCreator.API.Controllers
private static Logger Log = LogManager.GetCurrentClassLogger();
private int WaitReloadSvg = 100;
#endregion Private Fields
#region Private Properties
private QueueDataService QDataServ { get; set; } = null!;
private QueueDataService QDService { get; set; } = null!;
private WebDoorCreatorService WDService { get; set; } = null!;
#endregion Private Properties
#region Private Methods
/// <summary>
/// Invio richiesta ricalcolo porta
/// </summary>
/// <param name="DoorId"></param>
/// <returns></returns>
private async Task<string> SendRecalcReq(int DoorId)
{
string answ = "";
// richiede ricalcolo img
List<string> doorIdList = new List<string>() { $"{DoorId}" };
// chiamo reset richieste
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
// recupero DDF ed invio x processing
if (DoorId > 0)
{
string currDDF = await WDService.DoorOpGetDDF(DoorId);
// versione corrente del DDF generato
int currVers = await QDService.SendCalcReq(DoorId, currDDF);
}
// attende ...
await Task.Delay(WaitReloadSvg);
// riprova lettura
answ = await QDService.DoorGetLastSvg(DoorId);
return answ;
}
#endregion Private Methods
}
}
@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using NLog;
using System.Diagnostics;
using WebDoorCreator.Core;
using WebDoorCreator.Data.DTO;
using WebDoorCreator.Data.Services;
@@ -13,11 +15,20 @@ namespace WebDoorCreator.API.Controllers
public QueueController(IConfiguration configuration, QueueDataService DataService, WebDoorCreatorService _WDService)
{
Log.Info("Starting QueueController");
_configuration = configuration;
logTimingEnable = configuration.GetValue<bool>("RuntimeOpt:LogTimingEnable");
QDataServ = DataService;
WDService = _WDService;
Log.Info("Avviato QueueController");
// aggiungo..
string statName = "QueueController";
bool doWrite = QDataServ.StatUpsert(statName, new TimeSpan(), 5).Result;
// se campione "pieno"...
if (doWrite)
{
// recupero e resetto
ExecStats statRec = QDataServ.StatReset(statName).Result;
Log.Trace($"Avviato QueueController x {statRec.NumCall}");
}
}
#endregion Public Constructors
@@ -133,6 +144,7 @@ namespace WebDoorCreator.API.Controllers
string answ = "NA";
bool fatto = await QDataServ.SaveProcessingResult(calcResults);
answ = fatto ? "OK" : "NO";
Log.Debug("Eseguito SaveProcResult");
return answ;
}
@@ -143,6 +155,11 @@ namespace WebDoorCreator.API.Controllers
[HttpGet("StatusList")]
public async Task<Dictionary<string, Dictionary<string, string>>> StatusList()
{
Stopwatch sw = new Stopwatch();
if (logTimingEnable)
{
sw.Start();
}
Dictionary<string, Dictionary<string, string>> answ = new Dictionary<string, Dictionary<string, string>>();
var actPend = await QDataServ.RequestPending();
answ.Add("pending", actPend);
@@ -155,6 +172,20 @@ namespace WebDoorCreator.API.Controllers
var actDone = await QDataServ.RequestDone();
answ.Add("done", actDone);
if (logTimingEnable)
{
sw.Stop();
// aggiungo..
string statName = "StatusList";
bool doWrite = await QDataServ.StatUpsert(statName, sw.Elapsed, 5);
// se campione "pieno"...
if (doWrite)
{
// recupero e resetto
ExecStats statRec = await QDataServ.StatReset(statName);
Log.Info($"Eseguito {statName} x {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms");
}
}
return answ;
}
@@ -165,9 +196,10 @@ namespace WebDoorCreator.API.Controllers
/// </summary>
/// <returns></returns>
[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);
Log.Debug($"Eseguito TakeProcessingItems per {numItems} items");
return actQueue;
}
@@ -175,9 +207,10 @@ namespace WebDoorCreator.API.Controllers
#region Private Fields
private static IConfiguration _configuration = null!;
private static Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration = null!;
private bool logTimingEnable = false;
#endregion Private Fields
+95
View File
@@ -0,0 +1,95 @@
using Microsoft.Extensions.Diagnostics.HealthChecks;
using NLog;
using System.Net.NetworkInformation;
using WebDoorCreator.Data;
namespace WebDoorCreator.API.Health
{
public class Checks
{
#region Public Methods
public static async Task<HealthCheckResult> ConfigCount(IConfiguration _config)
{
string description = "Try check Config table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetConfig
.Count();
if (dbCount > 0)
{
description = $"Check Config table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> DoorsCount(IConfiguration _config)
{
string description = "Try check DOOR table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetDoor
.Count();
if (dbCount > 0)
{
description = $"Check DOOR table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> OrdersCount(IConfiguration _config)
{
string description = "Try check ORDER table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetOrders
.Count();
if (dbCount > 0)
{
description = $"Check ORDER table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> PingCheck(string hostName)
{
var description = $"Ping to {hostName}";
var healthCheckData = new Dictionary<string, object>();
using (var thePing = new Ping())
{
var pingResult = await thePing.SendPingAsync(hostName);
healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime);
healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString());
if (pingResult.Status == IPStatus.Success)
{
description += $" - {pingResult.RoundtripTime}ms";
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
}
#endregion Public Methods
}
}
+80 -14
View File
@@ -1,5 +1,9 @@
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Localization;
using Microsoft.CodeAnalysis.FlowAnalysis;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using StackExchange.Redis;
using StackExchange.Redis.Extensions.Core.Configuration;
using StackExchange.Redis.Extensions.Newtonsoft;
@@ -14,6 +18,7 @@ var builder = WebApplication.CreateBuilder(args);
// configuration setup
ConfigurationManager configuration = builder.Configuration;
// Redis
var connStringRedis = configuration.GetConnectionString("Redis");
if (string.IsNullOrEmpty(connStringRedis))
@@ -30,6 +35,67 @@ builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
// APP MAIN setup
string connectionString = configuration.GetConnectionString("WDC.DB") ?? "";
string dbServerAddr = "127.0.0.1";
if (string.IsNullOrEmpty(connectionString))
{
connectionString = "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;";
}
else
{
if (connectionString.Contains("Server"))
{
bool trovato = false;
var dbTokens = connectionString.Split(";");
int numTok = dbTokens.Count();
int idx = 0;
while (!trovato && idx < numTok)
{
if (dbTokens[idx].StartsWith("Server="))
{
// rimuovo la chaive Server...
dbServerAddr = dbTokens[idx].Replace("Server=", "");
// se ci fosse un nome (tipo \\sqlexpress) rimuovo...
if (dbServerAddr.Contains("\\"))
{
int sIdx = dbServerAddr.IndexOf("\\");
dbServerAddr = dbServerAddr.Substring(0, sIdx);
}
trovato = true;
}
idx++;
}
}
}
// healthchecks
builder.Services.AddHealthChecks()
.AddSqlServer(connectionString, healthQuery: "SELECT 1;", name: "SqlServer", failureStatus: HealthStatus.Degraded, tags: new string[] { "DB", "MsSql" })
.AddAsyncCheck($"DB PING ({dbServerAddr})", () => WebDoorCreator.API.Health.Checks.PingCheck(dbServerAddr))
.AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => WebDoorCreator.API.Health.Checks.PingCheck(redisSrvAddr))
// 512 MB max allocated memory
.AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded)
.AddRedis(connStringRedis, "Redis", failureStatus: HealthStatus.Degraded)
.AddAsyncCheck($"Config Table", () => WebDoorCreator.API.Health.Checks.ConfigCount(configuration))
.AddAsyncCheck($"Orders Table", () => WebDoorCreator.API.Health.Checks.OrdersCount(configuration))
.AddAsyncCheck($"Doors Table", () => WebDoorCreator.API.Health.Checks.DoorsCount(configuration))
;
#if false
builder.Services
.AddHealthChecksUI(s =>
{
s.AddHealthCheckEndpoint("WDC_API_HC", "health");
s.SetEvaluationTimeInSeconds(60);
s.SetMinimumSecondsBetweenFailureNotifications(120);
s.SetApiMaxActiveRequests(5);
s.SetHeaderText("WDC.API Health Check Status");
})
.AddInMemoryStorage();
#endif
// abilitazione x email management con MailKit
//builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
builder.Services.AddSingleton<IEmailSender, MailKitEmailSender>();
@@ -74,24 +140,24 @@ if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
app.UseSwaggerUI();
}
//// cultura IT...
//var supportedCultures = new[]{
// new CultureInfo("it-IT")
// };
//app.UseRequestLocalization(new RequestLocalizationOptions
//{
// DefaultRequestCulture = new RequestCulture("it-IT"),
// SupportedCultures = supportedCultures,
// FallBackToParentCultures = false
//});
//CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
// config healthcheck: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks
// prende tutti i predicati
app.MapHealthChecks("/health", new HealthCheckOptions
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
// nasconde tutti i dettagli
app.MapHealthChecks("/health/live", new HealthCheckOptions
{
Predicate = _ => false
});
app.Run();
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://wdc-w-iis-01.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>wdc.egalware.com/SRV</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>steamware</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,13 @@
<?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+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACWZ0w5h84UFtYYB4xT+4rFAAAAAASAAACgAAAAEAAAAIcwjcdAiCDZN1OwNWoZSfQYAAAAiyiNcp/zeuC6Vt16+OALvsaO0rbkiVMVFAAAAHS264wElPIM4sYvPHMhW0YsXNe9</EncryptedPassword>
<History>True|2024-04-19T17:27:31.3742108Z;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;True|2023-05-11T17:35:09.5858697+02:00;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://wdc-w-iis-02.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>wdc.egalware.com/SRV</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>steamware</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,13 @@
<?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+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACWZ0w5h84UFtYYB4xT+4rFAAAAAASAAACgAAAAEAAAAIcwjcdAiCDZN1OwNWoZSfQYAAAAiyiNcp/zeuC6Vt16+OALvsaO0rbkiVMVFAAAAHS264wElPIM4sYvPHMhW0YsXNe9</EncryptedPassword>
<History>True|2024-04-19T17:27:31.3742108Z;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;True|2023-05-11T17:35:09.5858697+02:00;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://wdc-w-iis-01.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/WDC/SRV</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>steamware</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,13 @@
<?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+sBAAAANAh+Q4GwYESjv9I3Vz/gKgAAAAACAAAAAAADZgAAwAAAABAAAAAZCj4Je1goQrORLePgnlVVAAAAAASAAACgAAAAEAAAAGZfY+EFaA+HwqpXWVf0/JgYAAAAz5wRfMtrjB7GbijGZUlW6g9q8ulJwQecFAAAADgQDtnMlYLrSQDGZI7Dg2OKfUhu</EncryptedPassword>
<History>True|2024-04-19T17:25:01.4640398Z;False|2024-04-19T19:21:34.3241722+02:00;False|2024-04-19T19:15:31.0848527+02:00;False|2024-04-19T19:11:09.2511710+02:00;False|2024-04-19T19:09:49.4254115+02:00;False|2024-04-19T19:08:44.7222054+02:00;False|2024-04-19T19:01:26.7064709+02:00;False|2024-04-19T18:59:58.4177224+02:00;False|2024-04-19T18:59:10.9459272+02:00;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;True|2023-05-11T17:35:09.5858697+02:00;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
+20 -1
View File
@@ -8,6 +8,9 @@
</PropertyGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-PROD-test.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
@@ -15,13 +18,26 @@
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-OVH-PROD-test.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-PROD.pubxml.user" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="6.0.4" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.29" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="6.0.29" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="SkiaSharp" Version="2.88.3" />
<PackageReference Include="SkiaSharp" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="9.1.0" />
@@ -38,6 +54,9 @@
</ItemGroup>
<ItemGroup>
<None Update="logs\.placeholder.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Reports\Report.rdlc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"WDC.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
"Redis": "wdc-u-redis-01.ovh:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"WDC.DB": "Server=WDC-W-SQL-01\\SQLEXPRESS;Database=DCA_WebDoorCreator; User ID=steamware;Password=viadante16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
}
}
+8 -5
View File
@@ -7,8 +7,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
"Redis": "localhost: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;"
},
"ExternalProviders": {
"MailKit": {
@@ -24,10 +24,13 @@
},
"MailDest": {
"Admin": "samuele@steamware.net",
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
"ProjCheck": "samuele.locatelli@egalware.com",
"TimbCheck": "samuele.locatelli@egalware.com"
},
"RuntimeOpt": {
"VetoRemoveProcessing": 5
"WaitReloadSvg": 200,
"VetoRemoveProcessing": 5,
"StatSampleSize": 30,
"LogTimingEnable": true
}
}
+20 -3
View File
@@ -921,10 +921,23 @@ Public Class ProcMan
End If
End If
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
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 bOk As Boolean = Not IsNothing(Item)
If bOk Then
@@ -984,12 +997,16 @@ Public Class ProcMan
MyThreadData.SetThreadOperation(ThreadOperations.ReadingSvg)
' verifico esistenza file svg e lo carico
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "svg"), fContent)
' !!! ToDo: inserire TIPO di richiesta secondo quanto ricevuto....
' invio risposta
currRes.Validated = MyThreadData.nProcResult = 0 AndAlso bOk
currRes.DoorIdVers = Item.Key
' per ora cablato a svg, prendere da MimeType richiesta...
currRes.MimeType = "svg"
' se NON fosse validato --> messo il messaggio...
If (currRes.Validated) Then
currRes.SvgGen = fContent
currRes.RawContent = fContent
Else
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "txt"), fContent)
currRes.ErrorMsg = fContent
+5 -1
View File
@@ -24,10 +24,14 @@ namespace WebDoorCreator.Core
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_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_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
public static readonly string CALC_REQ_VETO_REC = $"{BASE_HASH}:CalcRequests:VetoRecalc";
public static readonly string DOOR_TPL_LIST = $"{BASE_HASH}:Template:DoorList";
// REDIS KEY dati x registrazione statistiche esecuzione
public static readonly string STATS_DATA = $"{BASE_HASH}:CallStats";
// REDIS Channels messaggi x QueueMan (verso UI/srv)
public static readonly string CALC_REQ_QUEUE = $"CalcRequest";
+50
View File
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebDoorCreator.Core
{
public class ExecStats
{
/// <summary>
/// Numero chiamate registrate
/// </summary>
public int NumCall { get; set; } = 0;
/// <summary>
/// Durata totale chiamate
/// </summary>
public TimeSpan TotalTime { get; set; } = new TimeSpan(0, 0, 0);
/// <summary>
/// Tempo medio (calcolato)
/// </summary>
[NotMapped]
public TimeSpan AvgTime
{
get
{
TimeSpan answ = TotalTime;
if (NumCall > 1)
{
answ = TotalTime / NumCall;
}
return answ;
}
}
/// <summary>
/// Init classe
/// </summary>
/// <param name="numCall"></param>
/// <param name="duration"></param>
public ExecStats(int numCall, TimeSpan duration)
{
this.NumCall = numCall;
this.TotalTime = duration;
}
}
}
@@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.27" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
<PackageReference Include="ToDataTable" Version="0.1.2" />
@@ -158,7 +158,6 @@ namespace WebDoorCreator.Data.Controllers
public void Dispose()
{
// Clear database context
//Log.Info("Dispose di GWMSController");
}
/// <summary>
@@ -930,6 +929,11 @@ namespace WebDoorCreator.Data.Controllers
.Database
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
// stored x pulizia folder rimaste in giro
storedRes = localDbCtx
.Database
.ExecuteSqlRaw("exec dbo.stp_ListVal_FixDix");
fatto = true;
}
catch (Exception exc)
+6 -6
View File
@@ -37,7 +37,7 @@ namespace WebDoorCreator.Data.DDF
{
string outDdf = "";
try
{
{
DoorOpsDTO CurrentDoorOp = new DoorOpsDTO();
EdgesDto CurrentEdges = new EdgesDto();
SizeDto CurrentSize = new SizeDto();
@@ -46,10 +46,13 @@ namespace WebDoorCreator.Data.DDF
FinishingDto CurrentFinishing = new FinishingDto();
DDFDto CurrentConf = new DDFDto();
ListValuesModel CurrentCompoOrder = new ListValuesModel();
Dictionary<string, List<Dictionary<string, string>>> dictDoorOP = new Dictionary<string, List<Dictionary<string, string>>>();
Dictionary<string, Dictionary<string, string>> dictBaseDoorOp = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, Dictionary<string, string>> dictBaseSwing = new Dictionary<string, Dictionary<string, string>>();
// per prima cosa popolo gli oggetti di appoggio...
dictDoorOP = new Dictionary<string, List<Dictionary<string, string>>>();
var i = 0;
foreach (var item in listOp.Where(x=>x.ObjectId != "Size" && x.ObjectId != "Profiles" && x.ObjectId != "Swing" && x.ObjectId != "Properties" && x.ObjectId != "Finishing"))
foreach (var item in listOp.Where(x => x.ObjectId != "Size" && x.ObjectId != "Profiles" && x.ObjectId != "Swing" && x.ObjectId != "Properties" && x.ObjectId != "Finishing"))
{
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, string>>(item.JsoncActVal!);
if (deserialized != null)
@@ -122,7 +125,7 @@ namespace WebDoorCreator.Data.DDF
}
i++;
}
CurrentSize.size = dictBaseDoorOp;
CurrentSize.size = dictBaseDoorOp;
string sizeSer = CurrentSize.GetSerialized(RemDoorOp);
//dictBaseDoorOp.Clear();
foreach (var item in listOp.Where(x => x.ObjectId == "Swing"))
@@ -148,9 +151,6 @@ namespace WebDoorCreator.Data.DDF
#region Protected Properties
protected Dictionary<string, List<Dictionary<string, string>>> dictDoorOP { get; set; } = new Dictionary<string, List<Dictionary<string, string>>>();
protected Dictionary<string, Dictionary<string, string>> dictBaseDoorOp { get; set; } = new Dictionary<string, Dictionary<string, string>>();
protected Dictionary<string, Dictionary<string, string>> dictBaseSwing { get; set; } = new Dictionary<string, Dictionary<string, string>>();
protected List<string> FootRows { get; set; } = new List<string>();
protected string FormatVers { get; set; } = "0";
protected List<string> HeadRows { get; set; } = new List<string>();
+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>
public string ErrorMsg { get; set; } = "";
/// <summary>
/// SVG generated
/// Object RAW generated output ( was SvgGen )
/// </summary>
public string SvgGen { get; set; } = "";
public string RawContent { get; set; } = "";
/// <summary>
/// MimeType: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
/// <summary>
/// Artifats path (ex 3d zip/pack)
/// </summary>
-1
View File
@@ -35,7 +35,6 @@ namespace WebDoorCreator.Data.DTO
}
if (item.Contains("Separator"))
{
//sb.Remove(item);
sb.AppendLine(" ");
}
}
+5 -6
View File
@@ -28,6 +28,11 @@ namespace WebDoorCreator.Data
#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)
{
bool answ = false;
@@ -119,12 +124,6 @@ namespace WebDoorCreator.Data
}
#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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -15,11 +15,11 @@ namespace WebDoorCreator.Data
// Default seeded users
builder.HasData(
// SuperAdmins
getNewTestRec("zaccaria.majid@egalware.com", "th1sIsTh3R1vrOfThNgt98"),
getNewTestRec("samuele.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt96"),
getNewTestRec("emmanuele.sassi@egalware.com", "th1sIsTh3R1vrOfThNgt98!"),
// Admin
getNewTestRec("zaccaria.majid01@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
getNewTestRec("zaccaria.majid02@egalware.com", "th1sIsTh3R1vrOfThNgt92")
getNewTestRec("marco.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
getNewTestRec("samuele@steamware.net", "th1sIsTh3R1vrOfThNgt92")
);
}
+4 -8
View File
@@ -15,15 +15,10 @@ namespace WebDoorCreator.Data
{
#region Public Constructors
#if false
public WDCDataContext()
{
}
#endif
public WDCDataContext(IConfiguration configuration)
{
Log.Info("WDCDataContext starting 01A");
Log.Trace("WDCDataContext starting 01A");
_configuration = configuration;
try
{
@@ -38,7 +33,7 @@ namespace WebDoorCreator.Data
public WDCDataContext(DbContextOptions<WDCDataContext> options, IConfiguration configuration) : base(options)
{
Log.Info("WDCDataContext starting 01B");
Log.Trace("WDCDataContext starting 01B");
_configuration = configuration;
// verifico SE devo eseguire la migration del DB IDENT...
bool disableMigrate = _configuration.GetValue<bool>("SetupOpt:DisableWDCMigrate");
@@ -113,7 +108,7 @@ namespace WebDoorCreator.Data
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
Log.Info("WDCDataContext starting 02");
Log.Trace("WDCDataContext starting 02");
if (!optionsBuilder.IsConfigured)
{
string connString = _configuration.GetConnectionString("WDC.DB");
@@ -134,6 +129,7 @@ namespace WebDoorCreator.Data
// hierarchId eliminato
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=WebDoorCreator;Trusted_Connection=True;");
}
Log.Trace("WDCDataContext starting 03");
}
}
@@ -13,13 +13,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.3111" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="MailKit" Version="3.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.27" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.27" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.27" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.27" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.27">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
+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>
public string ErrorMsg { get; set; } = "";
/// <summary>
/// SVG generated
/// Object RAW generated output ( was SvgGen )
/// </summary>
public string SvgGen { get; set; } = "";
public string RawContent { get; set; } = "";
/// <summary>
/// MimeType: svg / 3dm...
/// </summary>
public string MimeType { get; set; } = "";
/// <summary>
/// Articat path (ex 3d zip/pack)
/// </summary>
+3 -3
View File
@@ -125,9 +125,9 @@ namespace WebDoorCreator.SDK
/// <summary>
/// Elenco degli item da processare, nel formato DoorId, Vers
/// </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>()
{
{ "numItems", $"{maxNum}" }
@@ -135,7 +135,7 @@ namespace WebDoorCreator.SDK
var rawData = callUrlGet(urlTakeNextItems, parList);
if (!string.IsNullOrEmpty(rawData) && rawData != "ERR")
{
returnData = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
returnData = JsonConvert.DeserializeObject<Dictionary<string, CalcReqtDTO>>(rawData);
}
return returnData;
}
@@ -76,6 +76,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CalcReqDTO.cs" />
<Compile Include="CalcResultDTO.cs" />
<Compile Include="ProcStats.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -3,13 +3,14 @@
@attribute [IgnoreAntiforgeryToken]
@inject SignInManager<IdentityUser> SignInManager
@functions {
public async Task<IActionResult> OnPost()
public async Task<IActionResult> OnPost(string returnUrl = null)
{
returnUrl ??= Url.Content("~/");
if (SignInManager.IsSignedIn(User))
{
await SignInManager.SignOutAsync();
}
return Redirect("~/");
return Redirect(returnUrl);
}
}
@@ -93,7 +93,10 @@ namespace WebDoorCreator.UI.Areas.Identity.Pages.Account
public async Task OnGetAsync(string returnUrl = null)
{
await CheckSuperAdmin();
if (_configuration.GetValue<bool>("SetupOpt:CheckAdmUser"))
{
await CheckSuperAdmin();
}
if (!string.IsNullOrEmpty(ErrorMessage))
{
ModelState.AddModelError(string.Empty, ErrorMessage);
@@ -111,7 +114,7 @@ namespace WebDoorCreator.UI.Areas.Identity.Pages.Account
private async Task CheckSuperAdmin()
{
//se non ci fosse --> creo samuele come superadmin
string superUser = "zaccaria.majid01@egalware.com";
string superUser = "samuele.locatelli@egalware.com";
string superPwd = "viaDante16!";
string ADMIN_ROLE = "SuperAdmin";
var user = await _userManager.FindByEmailAsync(superUser);
@@ -164,7 +167,7 @@ namespace WebDoorCreator.UI.Areas.Identity.Pages.Account
var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
if (result.Succeeded)
{
_logger.LogInformation("User logged in.");
_logger.LogInformation($"{Input.Email} | User logged in.");
return LocalRedirect(returnUrl);
}
if (result.RequiresTwoFactor)
@@ -12,5 +12,8 @@
}
<li class="nav-item"><a class="nav-link @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)" id="two-factor" asp-page="./TwoFactorAuthentication">Two-factor authentication</a></li>
<li class="nav-item"><a class="nav-link @ManageNavPages.PersonalDataNavClass(ViewContext)" id="personal-data" asp-page="./PersonalData">Personal data</a></li>
<li class="nav-item bg-dark rounded p-2"><a class="text-light text-decoration-none" id="personal-data" href="/WDC/UI/"><i class="fa-solid fa-arrow-left-long"></i> &nbsp; Back to Main page</a></li>
@{
string baseUrl = Url.Content("~/");
<li class="nav-item bg-dark rounded p-2"><a class="text-light text-decoration-none" id="personal-data" href="@baseUrl"><i class="fa-solid fa-arrow-left-long"></i> &nbsp; Back to Main page</a></li>
}
</ul>
@@ -2,9 +2,6 @@
@model RegisterModel
@inject WebDoorCreator.UI.Data.WDCVocabularyService WDCVService
@inject WebDoorCreator.UI.Data.WDCUserService WDCUService
@*@{
ViewData["Title"] = traduci("UI_10");
}*@
<div class="d-flex justify-content-center">
@@ -4,24 +4,26 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
<ul class="navbar-nav">
@if (SignInManager.IsSignedIn(User))
{
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity?.Name!</a>
</li>
<li class="nav-item">
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post">
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
</form>
</li>
}
else
{
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a>
</li>
}
@if (SignInManager.IsSignedIn(User))
{
string baseUrl = Url.Content("~/");
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="@($"{baseUrl}/Account/Manage/Index")" title="Manage">Hello @User.Identity?.Name!</a>
</li>
<li class="nav-item">
<form class="form-inline" asp-area="Identity" asp-page="@($"{baseUrl}/Account/Logout")" asp-route-returnUrl="/" method="post">
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
</form>
</li>
}
else
{
string baseUrl = Url.Content("~/");
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="@($"{baseUrl}/Account/Register")">Register</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="Identity" asp-page="@($"{baseUrl}/Account/Login")">Login</a>
</li>
}
</ul>
@@ -1,17 +1,25 @@
<div>
@if (B_doorOpUpd || true)
@if (B_doorOpUpd)
{
<button class="btn btn-success" @onclick="() => refreshSVG()"><i class="fa-solid fa-rotate-right"></i></button>
<a 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></a>
<button class="btn btn-success mx-1" @onclick="() => refreshSVG()"><i class="fa-solid fa-rotate-right"></i></button>
@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
{
<button class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i></button>
<button class="btn btn-secondary"><i class="fa-solid fa-cube"></i></button>
<button class="btn btn-secondary mx-1"><i class="fa-solid fa-rotate-right"></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>
@@ -4,6 +4,7 @@ using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.DTO;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
using static WebDoorCreator.UI.Components.SvgComp.DoorSvgObj;
namespace WebDoorCreator.UI.Components.Buttons
{
@@ -26,6 +27,10 @@ namespace WebDoorCreator.UI.Components.Buttons
[CascadingParameter]
public bool IsErr { get; set; } = false;
[Parameter]
public EventCallback<bool> EC_CalcRunning { get; set; }
#endregion Public Properties
#region Protected Properties
@@ -83,15 +88,6 @@ namespace WebDoorCreator.UI.Components.Buttons
await refreshSVG();
}
/// <summary>
/// Effettua Richiesta visione porta 3D
/// </summary>
/// <returns></returns>
protected async Task doReq3D()
{
await Task.Delay(1);
}
protected override void OnInitialized()
{
base.OnInitialized();
@@ -99,6 +95,7 @@ namespace WebDoorCreator.UI.Components.Buttons
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
var headRows = config.GetSection("ConfDDF:Header").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);
WDCRService.EA_UpdDoorOp += WDCRService_EA_UpdDoorOp;
}
@@ -109,11 +106,71 @@ namespace WebDoorCreator.UI.Components.Buttons
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>
/// Effettua generazione DDF + refresh SVG
/// </summary>
/// <returns></returns>
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);
if (listOpAll != null)
@@ -135,7 +192,7 @@ namespace WebDoorCreator.UI.Components.Buttons
string currDdf = currDdfConv.GetSerialized(listOp);
// versione corrente del DDF generato
int currVers = await QDataServ.SendCalcReq(idDoor, currDdf);
int currVers = await QDataServ.SendCalcReq(idDoor, currDdf, mType);
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()
{
await InvokeAsync(() =>
@@ -1,6 +1,6 @@
@if (currVal == null)
{
<EgwCoreLib.Razor.LoadingDataSmall></EgwCoreLib.Razor.LoadingDataSmall>
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
}
else
{
@@ -20,15 +20,15 @@
background: #FFF;
transform: translate(1.6rem, -1rem);
}
.btnPDFSuccess {
.btnPdfSuccess {
border-radius: 50%;
width: 3.5rem;
height: 3.5rem;
border: 5px solid #00838F;
background: #8E44AD;
background: #44AD8E;
transform: translate(25px, 12px);
}
.btnPDFPending {
.btnPdfPending {
border-radius: 50%;
width: 3.5rem;
height: 3.5rem;
@@ -20,13 +20,13 @@
transform: translate(1.6rem, -1rem);
}
.btnPDFSuccess {
.btnPdfSuccess {
.btnGen;
background: #8E44AD;
background: #44AD8E;
transform: translate(@xDelta, @yDelta);
}
.btnPDFPending {
.btnPdfPending {
.btnGen;
background: #F1C40F;
transform: translate(@xDelta, @yDelta);
@@ -1 +1 @@
.btnGen{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;}.btnDelete{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#b71c1c;transform:translate(25px,-12px);}.btnClone{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#fff;transform:translate(1.6rem,-1rem);}.btnPDFSuccess{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#8e44ad;transform:translate(25px,12px);}.btnPDFPending{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#f1c40f;transform:translate(25px,12px);}.btnHighlight{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#03a9f4;transform:translate(1.6rem,1rem);}.btnHeadTail{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.btnConfirm{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;border-bottom:3px solid #000;}.btnHead{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.borderTop{border-top:7px solid #00838f;}.borderBottom{border-bottom:7px solid #00838f;width:100%;}.modal-dialog{overflow-y:initial!important;}.modal-body{height:18.75rem;overflow-y:auto;}.testata{width:100%;}select,input{border:0;border-bottom:2px solid #000;background:none;height:2rem;}i{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-size:1.1rem;}
.btnGen{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;}.btnDelete{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#b71c1c;transform:translate(25px,-12px);}.btnClone{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#fff;transform:translate(1.6rem,-1rem);}.btnPdfSuccess{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#44ad8e;transform:translate(25px,12px);}.btnPdfPending{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#f1c40f;transform:translate(25px,12px);}.btnHighlight{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;background:#03a9f4;transform:translate(1.6rem,1rem);}.btnHeadTail{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.btnConfirm{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;border-bottom:3px solid #000;}.btnHead{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.borderTop{border-top:7px solid #00838f;}.borderBottom{border-bottom:7px solid #00838f;width:100%;}.modal-dialog{overflow-y:initial!important;}.modal-body{height:18.75rem;overflow-y:auto;}.testata{width:100%;}select,input{border:0;border-bottom:2px solid #000;background:none;height:2rem;}i{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-size:1.1rem;}
@@ -11,6 +11,16 @@ namespace WebDoorCreator.UI.Components.DoorDef
{
public partial class DoorDefinition : IDisposable
{
#region Public Properties
[Parameter]
public int idDoor { get; set; } = 0;
[Parameter]
public int idOrd { get; set; } = 0;
#endregion Public Properties
#region Public Methods
public void Dispose()
@@ -18,7 +28,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
ListBaseDoorOp = null;
currOrder = null;
WDCUService.EA_CurrLanguage -= WDUService_EA_CurrLanguage;
QDataServ.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
QDService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
}
#endregion Public Methods
@@ -26,14 +36,14 @@ namespace WebDoorCreator.UI.Components.DoorDef
#region Protected Properties
protected bool B_doorOpUpd { get; set; } = false;
[Inject]
protected IConfiguration configuration { get; set; } = null!;
protected OrderStatusViewModel? currOrder { get; set; } = null;
protected string DoorSvgContent { get; set; } = "";
protected string ErrCode { get; set; } = "ERRORE";
[Parameter]
public int idDoor { get; set; } = 0;
[Parameter]
public int idOrd { get; set; } = 0;
protected bool isDoorOpConf { get; set; } = false;
protected bool IsErr { get; set; } = false;
@@ -43,12 +53,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
protected OrderStatusViewModel? currOrder { get; set; } = null;
protected int orderStat { get; set; } = 10;
protected bool paramChanged { get; set; } = false;
[Inject]
protected QueueDataService QDataServ { get; set; } = null!;
protected QueueDataService QDService { get; set; } = null!;
protected string userLang { get; set; } = "EN";
@@ -65,8 +74,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
#region Protected Methods
protected int orderStat { get; set; } = 10;
protected async Task catchParamChange(bool ParamChanged)
{
await Task.Delay(1);
@@ -92,7 +99,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
WaitReloadSvg = configuration.GetValue<int>("RuntimeOpt:WaitReloadSvg");
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
//if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOrd", out var _idOrd) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idDoor", out var _idDoor))
//{
@@ -101,7 +108,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
//}
await ReloadData();
WDCUService.EA_CurrLanguage += WDUService_EA_CurrLanguage;
QDataServ.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
QDService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
WDCRService.EA_UpdDoorOp += WDService_EA_DoorOpUpdated;
}
@@ -112,7 +119,20 @@ namespace WebDoorCreator.UI.Components.DoorDef
currOrder = null;
await Task.Delay(1);
// cerco img porta...
DoorSvgContent = await QDataServ.DoorGetLastSvg(idDoor);
DoorSvgContent = await QDService.DoorGetLastSvg(idDoor);
// se fosse vuoto...
if (string.IsNullOrEmpty(DoorSvgContent))
{
// richiede ricalcolo img
DoorSvgContent = await SendRecalcReq(idDoor);
}
// se fosse vuoto...
if (string.IsNullOrEmpty(DoorSvgContent))
{
// legge img vuota
DoorSvgContent = QDService.DoorGetMissingSvg();
}
// recupero altri dati
var ListRecordDoorOp = await WDService.DoorOpGetByDoorId(idDoor);
if (ListRecordDoorOp != null)
@@ -132,7 +152,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
if (ListOrdersStatus != null)
{
currOrder = ListOrdersStatus.Where(x => x.OrderId == idOrd).FirstOrDefault();
if(currOrder != null)
if (currOrder != null)
{
orderStat = currOrder.OrderStatus;
}
@@ -162,6 +182,8 @@ namespace WebDoorCreator.UI.Components.DoorDef
private static Logger Log = LogManager.GetCurrentClassLogger();
private int WaitReloadSvg = 100;
#endregion Private Fields
#region Private Properties
@@ -197,16 +219,16 @@ namespace WebDoorCreator.UI.Components.DoorDef
doorSvgVers = doorSvgVers.Replace(".", ":");
}
// fix ./:
var hasErr = await QDataServ.DoorErrExists(doorSvgVers);
var hasErr = await QDService.DoorErrExists(doorSvgVers);
if (hasErr)
{
var messErr = await QDataServ.DoorErrGet(doorSvgVers);
var messErr = await QDService.DoorErrGet(doorSvgVers);
IsErr = true;
ErrCode = messErr;
}
else
{
DoorSvgContent = await QDataServ.DoorSvgGet(doorSvgVers);
DoorSvgContent = await QDService.DoorSvgGet(doorSvgVers);
}
await Task.Run(async () => await InvokeAsync(StateHasChanged));
@@ -214,6 +236,34 @@ namespace WebDoorCreator.UI.Components.DoorDef
}
}
/// <summary>
/// Invio richiesta ricalcolo porta
/// </summary>
/// <param name="DoorId"></param>
/// <returns></returns>
private async Task<string> SendRecalcReq(int DoorId)
{
string answ = "";
// richiede ricalcolo img
List<string> doorIdList = new List<string>() { $"{DoorId}" };
// chiamo reset richieste
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
// recupero DDF ed invio x processing
if (DoorId > 0)
{
string currDDF = await WDService.DoorOpGetDDF(DoorId);
// versione corrente del DDF generato
int currVers = await QDService.SendCalcReq(DoorId, currDDF);
}
// attende ...
await Task.Delay(WaitReloadSvg);
// riprova lettura
answ = await QDService.DoorGetLastSvg(DoorId);
return answ;
}
private void WDService_EA_DoorOpUpdated()
{
B_doorOpUpd = WDCRService.isDoorOpUpd;
@@ -1,11 +1,18 @@
<div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
<ButtonsDoorDef></ButtonsDoorDef>
@if (!string.IsNullOrEmpty(@SvgContent))
<ButtonsDoorDef EC_CalcRunning="SetCalcRunning"></ButtonsDoorDef>
@if (isRecalc)
{
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
<div style="width: @doorW; max-height: 30rem;">
@svgPreview
<LoadingData DisplayMode="LoadingData.SpinMode.Growl" DisplaySize="LoadingData.CtrlSize.Large" Title="Render 3DM"></LoadingData>
}
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>
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Components;
using NLog;
using WebDoorCreator.Data.DbModels;
namespace WebDoorCreator.UI.Components.DoorDef
{
@@ -7,8 +8,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
{
#region Public Properties
private static Logger Log = LogManager.GetCurrentClassLogger();
[Parameter]
public string doorW { get; set; } = "";
@@ -16,22 +15,41 @@ namespace WebDoorCreator.UI.Components.DoorDef
public string SvgContent
{
get => _svgContent;
set
{
_svgContent = value;
}
set { _svgContent = value; }
}
protected string _svgContent { get; set; } = "";
#endregion Public Properties
#region Protected Properties
protected string _svgContent { get; set; } = "";
protected MarkupString svgPreview
{
get => (MarkupString)SvgContent;
}
#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
}
}
@@ -34,7 +34,7 @@
<div class="d-flex justify-content-between">
<div class=" py-1">
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="()=> RecalcSVGs()" ObjId="Svg" ItemName="Recalc all the SVGs" ItemCount="0" ShowPlus="true" PlusOpacity="0%" BgColorFrom='@hexConverter("#2ECC71", 5)' BgColorTo="#2ECC71" ImagePath="images/icons/arrows-rotate-solid.svg"></HwSvgObj>
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="()=> RecalcSVGs(false)" ObjId="Svg" ItemName="Recalc all the SVGs" ItemCount="0" ShowPlus="true" PlusOpacity="0%" BgColorFrom='@hexConverter("#2ECC71", 5)' BgColorTo="#2ECC71" ImagePath="images/icons/arrows-rotate-solid.svg"></HwSvgObj>
</div>
@if (isAddNew)
{
@@ -124,7 +124,7 @@
<div class="row">
@if (DoorsList == null || DoorsList.Count == 0)
{
<LoadingDataSmall></LoadingDataSmall>
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
}
else
{
@@ -7,10 +7,11 @@ using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Components.SvgComp;
using WebDoorCreator.UI.Data;
using static WebDoorCreator.UI.Data.WDCRefreshService;
namespace WebDoorCreator.UI.Components.DoorMan
{
public partial class DoorList
public partial class DoorList:IDisposable
{
#region Public Properties
@@ -55,6 +56,8 @@ namespace WebDoorCreator.UI.Components.DoorMan
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
protected string[] hexVals = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
#endregion Protected Fields
#region Protected Properties
@@ -149,6 +152,7 @@ namespace WebDoorCreator.UI.Components.DoorMan
var door = DoorsList?.Where(x => x.DoorId == doorId).FirstOrDefault();
await InvokeAsync(StateHasChanged);
await E_CurrDoor.InvokeAsync(door);
NavManager.NavigateTo(NavManager.Uri, true);
}
}
@@ -253,6 +257,25 @@ namespace WebDoorCreator.UI.Components.DoorMan
return answ;
}
protected string hexConverter(string hexColor, int delta)
{
string answ = "";
if (hexColor != "" && hexColor != null)
{
var noHash = hexColor.Substring(1, hexColor.Length - 1);
StringBuilder sb = new StringBuilder();
foreach (var val in noHash)
{
sb.Append(newHexVal(val, delta));
}
answ = $"#{sb.ToString()}";
}
return answ;
}
protected async Task modalClose(bool isClose)
{
await Task.Delay(1);
@@ -260,15 +283,62 @@ namespace WebDoorCreator.UI.Components.DoorMan
await ReloadData();
}
protected string newHexVal(char str2Check, int delta)
{
string answ = "";
int runIdx = 0;
foreach (var item in hexVals)
{
if (item.ToLower() == str2Check.ToString().ToLower())
{
int currValIndex = Array.IndexOf(hexVals, item);
runIdx = currValIndex + delta;
runIdx = runIdx <= 15 ? runIdx : 15;
answ = hexVals[runIdx];
}
}
return answ;
}
protected override void OnInitialized()
{
WaitReloadSvg = Configuration.GetValue<int>("RuntimeOpt:WaitReloadSvg");
WDCRService.EA_OrderChanged += WDCRService_EA_OrderChanged;
}
protected override async Task OnParametersSetAsync()
{
await ReloadData();
if (!actFilter.Equals(lastFilt))
{
lastFilt = actFilter.clone();
await ReloadData();
}
}
[Inject]
protected WDCRefreshService WDCRService { get; set; } = null!;
public void Dispose()
{
WDCRService.EA_OrderChanged -= WDCRService_EA_OrderChanged;
}
private async void WDCRService_EA_OrderChanged(object? sender, EventArgs e)
{
// recupero dati
OrdEventArgs currArgs = (OrdEventArgs)e;
// se ordine corrente --> rileggo pagina...
if ( currArgs != null && currArgs.OrderId == currOrderId)
{
await ReloadData();
#if false
// ricarico...
NavManager.NavigateTo(NavManager.Uri, true);
#endif
}
}
/// <summary>
/// Esecuzione ricalcolo SVG
/// </summary>
protected async void RecalcSVGs()
protected async void RecalcSVGs(bool force)
{
isRecalc = true;
// recupero elenco porte come list interi...
@@ -278,26 +348,40 @@ namespace WebDoorCreator.UI.Components.DoorMan
.Select(x => $"{x.DoorId}")
.ToList();
// faccio upsert porte nell'elenco door tipo template...
var numTplDoor = await QDService.DoorTplListUpsert(doorIdList);
// chiamo reset
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
// se ho porte da processare --> chiamo save...
string currDDF = "";
int currDoorId = 0;
int currVers = 0;
foreach (var item in list2Proc)
// solo se è template salvo nell'elenco...
if (isTplPage)
{
currDoorId = 0;
currVers = 0;
int.TryParse(item, out currDoorId);
if (currDoorId > 0)
// faccio upsert porte nell'elenco door tipo template...
var numTplDoor = await QDService.DoorTplListUpsert(doorIdList);
}
// chiamo reset richieste
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
if (force)
{
// se ho porte da processare --> chiamo save...
string currDDF = "";
int currDoorId = 0;
int currVers = 0;
foreach (var item in list2Proc)
{
currDDF = await WDService.DoorOpGetDDF(currDoorId);
// versione corrente del DDF generato
currVers = await QDService.SendCalcReq(currDoorId, currDDF);
currDoorId = 0;
currVers = 0;
int.TryParse(item, out currDoorId);
if (currDoorId > 0)
{
currDDF = await WDService.DoorOpGetDDF(currDoorId);
// versione corrente del DDF generato
currVers = await QDService.SendCalcReq(currDoorId, currDDF);
}
}
}
else
{
// attesa prima di ricaricare 200/500 ms...
await Task.Delay(DoorsList.Count * (WaitReloadSvg / 3) * rnd.Next(900, 1200) / 1000);
}
}
isRecalc = false;
NavManager.NavigateTo(NavManager.Uri, true);
@@ -367,17 +451,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
}
}
}
#if false
if (DoorsList != null)
{
var currDoor = DoorsList.FirstOrDefault();
if (currDoor?.OrderNav != null)
{
//orderStatus = currDoor.OrderNav.Status;
}
}
#endif
}
}
}
@@ -404,7 +477,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
var door = DoorsList.Where(x => x.DoorId == doorId).FirstOrDefault();
if (door != null)
{
//currDoor = door;
await E_CurrDoorModal.InvokeAsync(door);
}
}
@@ -438,6 +510,14 @@ namespace WebDoorCreator.UI.Components.DoorMan
#endregion Protected Methods
#region Private Fields
private DoorsSelectFilter lastFilt = new DoorsSelectFilter() { CurrPage = -1 };
private Random rnd = new Random();
private int WaitReloadSvg = 100;
#endregion Private Fields
#region Private Properties
private int _totalCount { get; set; } = 0;
@@ -474,44 +554,5 @@ namespace WebDoorCreator.UI.Components.DoorMan
}
#endregion Private Properties
protected string[] hexVals = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
protected string newHexVal(char str2Check, int delta)
{
string answ = "";
int runIdx = 0;
foreach (var item in hexVals)
{
if (item.ToLower() == str2Check.ToString().ToLower())
{
int currValIndex = Array.IndexOf(hexVals, item);
runIdx = currValIndex + delta;
runIdx = runIdx <= 15 ? runIdx : 15;
answ = hexVals[runIdx];
}
}
return answ;
}
protected string hexConverter(string hexColor, int delta)
{
string answ = "";
if (hexColor != "" && hexColor != null)
{
var noHash = hexColor.Substring(1, hexColor.Length - 1);
StringBuilder sb = new StringBuilder();
foreach (var val in noHash)
{
sb.Append(newHexVal(val, delta));
}
answ = $"#{sb.ToString()}";
}
return answ;
}
}
}
@@ -9,7 +9,7 @@
@if (!CurrDoor.Equals(CurrDoorClone))
{
<button class="btn btn-secondary" type="button" @onclick="()=>ReloadData()">Cancel <i class="fa-solid fa-rotate-left"></i></button>
<button class="btn btn-success" type="button" @onclick="()=>UpdateDoor(true)">Update <i class="fa-solid fa-check"></i></button>
<button class="btn btn-success" type="button" @onclick="()=>UpdateDoor()">Update <i class="fa-solid fa-check"></i></button>
}
</div>
<div>
@@ -11,9 +11,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
{
#region Public Properties
protected DoorModel CurrDoor { get; set; } = new DoorModel();
protected DoorModel CurrDoorClone { get; set; } = new DoorModel();
[Parameter]
public int CurrDoorId { get; set; } = 0;
@@ -25,41 +22,19 @@ namespace WebDoorCreator.UI.Components.DoorMan
[Parameter]
public EventCallback<bool> E_isChange { get; set; }
[Parameter]
public bool isTplPage { get; set; } = false;
[Parameter]
public int OrderId { get; set; } = 0;
public List<OrderModel> OrdersCompList { get; set; } = new List<OrderModel>();
[Parameter]
public string UserName { get; set; } = "";
[Parameter]
public int OrderStatus { get; set; } = 10;
[Parameter]
public bool isTplPage { get; set; } = false;
protected int DoorQty
{
get => CurrDoor.Quantity;
set
{
if (value >= 0)
{
CurrDoor.Quantity = value;
}
}
}
protected decimal DoorUnitCost
{
get => CurrDoor.UnitCost;
set
{
if (value >= 0)
{
CurrDoor.UnitCost = value;
}
}
}
[Parameter]
public string UserName { get; set; } = "";
#endregion Public Properties
@@ -76,7 +51,8 @@ namespace WebDoorCreator.UI.Components.DoorMan
protected IConfiguration config { get; set; } = null!;
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
protected DoorModel CurrDoor { get; set; } = new DoorModel();
protected DoorModel CurrDoorClone { get; set; } = new DoorModel();
protected DDFDto CurrentConf { get; set; } = new DDFDto();
protected int doorQty
@@ -85,8 +61,32 @@ namespace WebDoorCreator.UI.Components.DoorMan
set => CurrDoor.Quantity = value;
}
protected int DoorQty
{
get => CurrDoor.Quantity;
set
{
if (value >= 0)
{
CurrDoor.Quantity = value;
}
}
}
protected string DoorSvgContent { get; set; } = "";
protected decimal DoorUnitCost
{
get => CurrDoor.UnitCost;
set
{
if (value >= 0)
{
CurrDoor.UnitCost = value;
}
}
}
protected bool IsErr { get; set; } = false;
[Inject]
@@ -108,6 +108,9 @@ namespace WebDoorCreator.UI.Components.DoorMan
get => WDCUService.userRole;
}
[Inject]
protected WDCRefreshService WDCRService { get; set; } = null!;
[Inject]
protected WDCUserService WDCUService { get; set; } = null!;
@@ -118,28 +121,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
#region Protected Methods
protected void modDoorQty(bool isAdd)
{
if (isAdd)
{
DoorQty++;
}
else
{
DoorQty--;
}
}
protected async Task UpdateDoor(bool isAdd)
{
//var done = await WDService.DoorModQty(doorQty, CurrDoor.OrderId, CurrDoor.DoorId, isAdd);
var done = await WDService.DoorUpsert(CurrDoor);
if (done)
{
await ReloadData();
}
}
/// <summary>
/// Clona la porta selezionata con annesse door operations
/// </summary>
@@ -178,11 +159,27 @@ namespace WebDoorCreator.UI.Components.DoorMan
var done = await WDService.DoorUpsert(CurrDoor);
if (done)
{
// chiamo update ordine...
WDCRService.ReportOrderChanged(OrderId);
await ReloadData();
// chiudo modale
await closeModal();
}
}
}
protected void modDoorQty(bool isAdd)
{
if (isAdd)
{
DoorQty++;
}
else
{
DoorQty--;
}
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
@@ -309,6 +306,17 @@ namespace WebDoorCreator.UI.Components.DoorMan
}
}
protected async Task UpdateDoor()
{
var done = await WDService.DoorUpsert(CurrDoor);
if (done)
{
// chiamo update ordine...
WDCRService.ReportOrderChanged(OrderId);
await ReloadData();
}
}
#endregion Protected Methods
}
}
@@ -51,7 +51,7 @@
{
<select @bind="@TypeSel" class="form-select">
<option value="*">-- All Types --</option>
@foreach (var item in ListType)
@foreach (var item in ListType.OrderBy(x => x))
{
<option value="@item">@item</option>
}
@@ -65,23 +65,33 @@
@if (files2Chk.Where(x => x.Value.action).ToList().Count > 0)
{
<div class="w-100 text-center">
<button @onclick="()=>doSave()" class="btn btn-success btn-lg">Save</button>
<button @onclick="()=>doSave()" class="btn btn-success btn-lg px-3">Apply Changes</button>
</div>
}
}
</div>
<div class="col-4 text-end">
@if (searchRecords != null && searchRecords.Count() > 0)
{
<div class="text-nowrap">
<div class="btn-group w-50" role="group">
<button type="button" class="btn btn-sm col-3 btn-secondary" disabled>FILTER BY: </button>
<button type="button" class="btn btn-sm col-3 @filtBtnAddCss()" @onclick="()=>filtBtnSet(Core.Enum.fileStatus.add)">Add</button>
<button type="button" class="btn btn-sm col-3 @filtBtnUpdCss()" @onclick="()=>filtBtnSet(Core.Enum.fileStatus.mod)">Update</button>
<button type="button" class="btn btn-sm col-3 @filtBtnRemCss()" @onclick="()=>filtBtnSet(Core.Enum.fileStatus.rem)">Delete</button>
</div>
<div class="d-flex justify-content-between">
<div>
@if (numTplMissing > 0)
{
<button type="button" class="btn btn-sm btn-success" @onclick="()=>fixMissing()" title="Fix missing components template file">FIX @tplMissing missing</button>
}
else
{
<button type="button" class="btn btn-sm btn-outline-success" @onclick="()=>updateNumMissing()" title="Check missing template">@tplMissing missing</button>
}
</div>
}
@if (searchRecords != null && searchRecords.Count() > 0 && !isLoading)
{
<div class="text-nowrap btn-group w-75" role="group">
<button type="button" class="btn btn-sm col-3 btn-outline-dark" disabled>Show:</button>
<button type="button" class="btn btn-sm col-3 @filtBtnCssAdd" @onclick="()=>filtBtnToggle(Core.Enum.fileStatus.add)">Add</button>
<button type="button" class="btn btn-sm col-3 @filtBtnCssUpd" @onclick="()=>filtBtnToggle(Core.Enum.fileStatus.mod)">Update</button>
<button type="button" class="btn btn-sm col-3 @filtBtnCssRem" @onclick="()=>filtBtnToggle(Core.Enum.fileStatus.rem)">Delete</button>
</div>
}
</div>
</div>
</div>
@@ -137,7 +147,8 @@ else if (files2Chk != null && files2Chk.Count() > 0)
<td class="col-5" colspan="4" data-bs-toggle="modal" data-bs-target="#fileDiffModal" @onclick="()=>showDiff(item, item.Value.status)"></td>
}
<td class="col-2 text-center">
<button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)" disabled="@(item.Value.status== Core.Enum.fileStatus.rem)">@btnTxt(item.Value.status) &nbsp; <i class="@btnIcon(item.Value.status)"></i></button>
<button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)">@btnTxt(item.Value.status) &nbsp; <i class="@btnIcon(item.Value.status)"></i></button>
@* <button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)" disabled="@(item.Value.status== Core.Enum.fileStatus.rem)">@btnTxt(item.Value.status) &nbsp; <i class="@btnIcon(item.Value.status)"></i></button> *@
</td>
@if (item.Value.status == Core.Enum.fileStatus.rem || item.Value.status == Core.Enum.fileStatus.mod)
{
@@ -164,7 +175,7 @@ else if (files2Chk != null && files2Chk.Count() > 0)
}
</tbody>
</table>
}
else if (files2Chk == null || files2Chk.Count() == 0)
@@ -1,3 +1,4 @@
using k8s.Models;
using Microsoft.AspNetCore.Components;
using NLog;
using WebDoorCreator.Data.DbModels;
@@ -19,6 +20,30 @@ namespace WebDoorCreator.UI.Components.FilesMan
#endregion Public Properties
#region Public Methods
public static string getFolder(string key)
{
string answ = "";
if (key.Contains("\\"))
{
answ = key.Split("\\")[1];
}
return answ;
}
public static string getType(string key)
{
string answ = "";
if (key.Contains("\\"))
{
answ = key.Split("\\")[0];
}
return answ;
}
#endregion Public Methods
#region Protected Fields
protected static Logger Log = LogManager.GetCurrentClassLogger();
@@ -31,7 +56,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
protected bool _showAdd { get; set; } = true;
protected bool _showDel { get; set; } = false;
protected bool _showRem { get; set; } = true;
protected bool _showUpd { get; set; } = true;
@@ -42,9 +67,24 @@ namespace WebDoorCreator.UI.Components.FilesMan
protected double expTime { get; set; } = 6;
protected bool isLoading { get; set; } = false;
protected bool isDrawing { get; set; } = false;
protected string filtBtnCssAdd
{
get => showAdd ? "btn-primary" : "btn-secondary";
}
protected string filtBtnCssRem
{
get => showRem ? "btn-danger" : "btn-secondary";
}
protected string filtBtnCssUpd
{
get => showUpd ? "btn-warning" : "btn-secondary";
}
protected bool isDrawing { get; set; } = false;
protected bool isLoading { get; set; } = false;
protected List<string> ListType { get; set; } = new List<string>();
protected int numSteps { get; set; } = 4;
protected bool show { get; set; } = false;
@@ -65,10 +105,10 @@ namespace WebDoorCreator.UI.Components.FilesMan
get => NumFileNew > 0;
}
protected bool showDel
protected bool showRem
{
get => _showDel;
set => _showDel = value;
get => _showRem;
set => _showRem = value;
}
protected bool showUpd
@@ -77,10 +117,33 @@ namespace WebDoorCreator.UI.Components.FilesMan
set => _showUpd = value;
}
protected string tplMissing
{
get => numTplMissing >= 0 ? $"{numTplMissing}" : "???";
}
protected string txtDx { get; set; } = "";
protected string txtSx { get; set; } = "";
protected string TypeSel
{
get => _typeSel;
set
{
if (_typeSel != value)
{
_typeSel = value;
ReloadData().ConfigureAwait(false);
//var pUpd = Task.Run(async () =>
//{
// await InvokeAsync(ReloadData);
//});
//pUpd.Wait();
}
}
}
[Inject]
protected WebDoorCreatorService WDCService { get; set; } = null!;
@@ -153,10 +216,10 @@ namespace WebDoorCreator.UI.Components.FilesMan
protected async Task doSave()
{
await Task.Delay(1);
//var sb = new StringBuilder();
sendDataVal = 0;
isDrawing = true;
isLoading = true;
sendDataVal = 0;
await Task.Delay(1);
var updTask1 = Task.Run(() =>
{
files2Save = searchRecords.Where(x => x.Value.action).ToDictionary(x => x.Key, x => x.Value);
@@ -177,14 +240,17 @@ namespace WebDoorCreator.UI.Components.FilesMan
if (item.Value.status == Core.Enum.fileStatus.add)
{
File.Copy($"{rootPathNew}\\{item.Key}", $"{rootPathCur}\\{item.Key}");
Log.Info($"Add new Compo: {rootPathNew}\\{item.Key}");
}
else if (item.Value.status == Core.Enum.fileStatus.mod)
{
ReplaceFile($"{rootPathNew}\\{item.Key}", $"{rootPathCur}\\{item.Key}");
Log.Info($"Updated Compo: {rootPathNew}\\{item.Key}");
}
else if (item.Value.status == Core.Enum.fileStatus.rem)
{
File.Delete($"{rootPathCur}\\{item.Key}");
Log.Info($"Removed Compo: {rootPathNew}\\{item.Key}");
}
}
}
@@ -196,6 +262,11 @@ namespace WebDoorCreator.UI.Components.FilesMan
await WDCService.ListValuesLuaNgeInsert(rootPathCur);
});
await updTask2;
Log.Info($"DB Updated for Compo changes!");
sendDataVal = 45;
// svuoto cache!
await WDCService.FlushCustomPattern("Cache");
sendDataVal = 50;
await doScan(true, true);
sendDataVal = 90;
}
@@ -208,12 +279,16 @@ namespace WebDoorCreator.UI.Components.FilesMan
/// <returns></returns>
protected async Task doScan(bool scanCur, bool scanNew)
{
files2Chk.Clear();
searchRecords.Clear();
ListType = new List<string>();
Log.Info($"Component scan started by user {WDCUService.userId}");
isDrawing = true;
isLoading = true;
files2Chk.Clear();
searchRecords.Clear();
stats2show.Clear();
stats2show.Add(Core.Enum.fileStatus.add);
stats2show.Add(Core.Enum.fileStatus.mod);
stats2show.Add(Core.Enum.fileStatus.rem);
ListType = new List<string>();
Log.Info($"Component scan started by user {WDCUService.userId}");
sendDataVal = 0;
var updTask1 = Task.Run(async () =>
await WDCService.populateHws()
@@ -256,11 +331,10 @@ namespace WebDoorCreator.UI.Components.FilesMan
{
item.Value.status = Core.Enum.fileStatus.rem;
searchRecords.Add(item.Key, item.Value);
checkItemType(item);
}
searchRecords = searchRecords.Where(x => x.Value.status > 0).ToDictionary(x => x.Key, x => x.Value);
stats2show.Add(Core.Enum.fileStatus.add);
stats2show.Add(Core.Enum.fileStatus.mod);
searchRecords = searchRecords.Where(x => x.Value.status != Core.Enum.fileStatus.none).ToDictionary(x => x.Key, x => x.Value);
await ReloadData();
sendDataVal = 100;
isLoading = false;
@@ -272,63 +346,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
Log.Info($"Component scan COMPLETED");
}
private void checkItemType(KeyValuePair<string, FileDTO> item)
{
string type = getType(item.Key);
if (!ListType.Contains(type))
{
ListType.Add(type);
}
}
public static string getType(string key)
{
string answ = "";
if (key.Contains("\\"))
{
answ = key.Split("\\")[0];
}
return answ;
}
public static string getFolder(string key)
{
string answ = "";
if (key.Contains("\\"))
{
answ = key.Split("\\")[1];
}
return answ;
}
protected string filtBtnAddCss()
{
string answ = "";
if (showAdd)
{
answ = "btn-primary";
}
else
{
answ = "btn-secondary";
}
return answ;
}
protected string filtBtnRemCss()
{
string answ = "";
if (showDel)
{
answ = "btn-danger";
}
else
{
answ = "btn-secondary";
}
return answ;
}
protected async Task filtBtnSet(Core.Enum.fileStatus fileStat)
protected async Task filtBtnToggle(Core.Enum.fileStatus fileStat)
{
switch (fileStat)
{
@@ -357,12 +375,12 @@ namespace WebDoorCreator.UI.Components.FilesMan
break;
case Core.Enum.fileStatus.rem:
showDel = !showDel;
if (showDel && !stats2show.Contains(Core.Enum.fileStatus.rem))
showRem = !showRem;
if (showRem && !stats2show.Contains(Core.Enum.fileStatus.rem))
{
stats2show.Add(Core.Enum.fileStatus.rem);
}
else if (!showDel && stats2show.Contains(Core.Enum.fileStatus.rem))
else if (!showRem && stats2show.Contains(Core.Enum.fileStatus.rem))
{
stats2show.Remove(Core.Enum.fileStatus.rem);
}
@@ -371,18 +389,16 @@ namespace WebDoorCreator.UI.Components.FilesMan
await ReloadData();
}
protected string filtBtnUpdCss()
/// <summary>
/// Sistema i componenti missing creando file (vuoti) corrispondenti a quanto trovato sul DB
/// </summary>
/// <returns></returns>
protected async Task fixMissing()
{
string answ = "";
if (showUpd)
{
answ = "btn-warning";
}
else
{
answ = "btn-secondary";
}
return answ;
isLoading = true;
bool done = await WDCService.CompoFixMissing(rootPathCur);
numTplMissing = await WDCService.CompoCountMissing(rootPathCur);
isLoading = false;
}
protected override async Task OnParametersSetAsync()
@@ -390,22 +406,6 @@ namespace WebDoorCreator.UI.Components.FilesMan
await ReloadData();
}
protected string TypeSel
{
get => _typeSel;
set
{
if (_typeSel != value)
{
_typeSel = value;
ReloadData().ConfigureAwait(false);
}
}
}
private string _typeSel { get; set; } = "*";
protected List<string> ListType { get; set; } = new List<string>();
protected async Task ReloadData()
{
isDrawing = true;
@@ -465,24 +465,28 @@ namespace WebDoorCreator.UI.Components.FilesMan
}
}
/// <summary>
/// verifica numero template missing x eventuale fix con creazione nuovi file vuoti
/// </summary>
/// <returns></returns>
protected async Task updateNumMissing()
{
isLoading = true;
numTplMissing = await WDCService.CompoCountMissing(rootPathCur);
isLoading = false;
}
#endregion Protected Methods
#region Private Fields
private Dictionary<string, FileDTO> files2Chk = new Dictionary<string, FileDTO>();
private Dictionary<string, FileDTO> files2Save = new Dictionary<string, FileDTO>();
private string scanMsg = "CLICK TO SCAN";
private Dictionary<string, FileDTO> searchRecords = new Dictionary<string, FileDTO>();
private int sendDataMaxVal = 100;
private int sendDataVal = 0;
private List<Core.Enum.fileStatus> stats2show = new List<Core.Enum.fileStatus>();
private string titleMsg = "Scanning directories";
#endregion Private Fields
@@ -490,8 +494,8 @@ namespace WebDoorCreator.UI.Components.FilesMan
#region Private Properties
private bool _selUns { get; set; } = false;
private int _totalCount { get; set; } = -1;
private string _typeSel { get; set; } = "*";
private int currPage
{
@@ -519,6 +523,8 @@ namespace WebDoorCreator.UI.Components.FilesMan
set => actFilter.NumRec = value;
}
private int numTplMissing { get; set; } = -1;
private string rootPathCur
{
get => configuration.GetValue<string>("CompoBaseDirs:CurrCompoDir");
@@ -556,6 +562,15 @@ namespace WebDoorCreator.UI.Components.FilesMan
#region Private Methods
private void checkItemType(KeyValuePair<string, FileDTO> item)
{
string type = getType(item.Key);
if (!ListType.Contains(type))
{
ListType.Add(type);
}
}
/// <summary>
/// Recupera i dati files current,
/// </summary>
@@ -15,7 +15,7 @@
</div>
@if (isLoading)
{
<LoadingDataSmall></LoadingDataSmall>
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
}
else
{
@@ -18,7 +18,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
protected Dictionary<string, Dictionary<string, string>>? vocLemmasTEMP { get; set; } = null;
protected Dictionary<string, string> vocLemmasTEMP2Dict { get; set; } = new Dictionary<string, string>();
protected bool showList { get; set; } = false;
protected bool showList { get; set; } = true;//false;
protected bool isLoading { get; set; } = false;
protected async override Task OnParametersSetAsync()
{
@@ -22,17 +22,13 @@
</Authorized>
</AuthorizeView>
<!--Hiding to non-SuperAdmin users the option to manage the application -->
<AuthorizeView Roles="SuperAdmin, Admin, CompAdmin" Context="MenuHide">
<AuthorizeView Roles="SuperAdmin, DcaAdmin, CompAdmin" Context="MenuHide">
<Authorized>
<div class="nav-item px-1 align-items-center">
<NavLink class="nav-link text-nowrap" href="UserAdmin">
<span class="bi bi-people pe-2" aria-hidden="true"></span> @translate("UI_02")
</NavLink>
</div>
</Authorized>
</AuthorizeView>
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
<Authorized>
<div class="nav-item px-1 align-items-center">
<NavLink class="nav-link text-nowrap" href="TemplateMan">
<span class="fa-solid fa-paint-roller pe-2" aria-hidden="true"></span> Template Management
@@ -45,8 +41,7 @@
</div>
</Authorized>
</AuthorizeView>
<!--help finale-->
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
<AuthorizeView Roles="SuperAdmin, DcaAdmin" Context="MenuHide">
<Authorized>
<div class="nav-item px-1 align-items-center">
<NavLink class="nav-link text-nowrap" href="SuperAdmin">
@@ -55,6 +50,7 @@
</div>
</Authorized>
</AuthorizeView>
<!--help finale-->
<AuthorizeView Context="MenuHide">
<Authorized>
<div class="nav-item px-1 align-items-center">
@@ -121,22 +117,16 @@
<option>IT</option>
</select>
</div>
<hr />
</li>
<li class="list-group-item">
<div class="">
<NavLink class="nav-link text-nowrap" href=@($"{baseUrl}/Identity/Account/Manage")>
<button class="btn btn-sm btn-success w-100 fw-bold text-light text-decoration-none text-dark" style="">@translate("UI_06")</button>
</NavLink>
</div>
<NavLink href=@($"{baseUrl}/Identity/Account/Manage")>
<button class="btn btn-sm btn-success w-100 fw-bold text-light text-decoration-none" style="">@translate("UI_06")</button>
</NavLink>
</li>
<li class="list-group-item">
<div class="text-end">
<form method="post" action="@actionUrl">
<button type="submit" class="btnLogout">Log out <i class="fa-solid fa-arrow-right-from-bracket"></i></button>
</form>
</div>
<form method="post" action="@logoutUrl">
<button type="submit" class="btn btn-sm btn-danger text-light w-100 fw-bold">Log out <i class="fa-solid fa-arrow-right-from-bracket"></i></button>
</form>
</li>
</ul>
</div>
@@ -158,7 +148,7 @@
</div>
<div class="text-end text-nowrap px-3 py-2 d-flex justify-content-between">
@*<a href="Identity/Account/Register" class="text-decoration-none text-dark">@translate("UI_08") &nbsp; &nbsp;</a>*@
<a href="Identity/Account/Login" class="text-decoration-none text-dark">@translate("UI_09") </a>
<a href="@($"{baseUrl}/Identity/Account/Login")" class="text-decoration-none text-dark">@translate("UI_09") </a>
</div>
</nav>
</NotAuthorized>
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using System.Security.Policy;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
@@ -28,6 +29,7 @@ namespace WebDoorCreator.UI.Components.Gen
protected string baseUrl
{
// string baseUrl = Url.Content("~/");
get => configuration.GetValue<string>("RuntimeOpt:BaseUrl");
}
@@ -235,20 +237,11 @@ namespace WebDoorCreator.UI.Components.Gen
return answ;
}
protected string actionUrl
protected string logoutUrl
{
get
{
string answ = "";
if (NavManager.Uri.Contains("/WDC/UI"))
{
answ = $"{baseUrl}/Identity/Account/LogOut";
}
else
{
answ = "/Identity/Account/LogOut";
}
return answ;
return $"{baseUrl}/Identity/Account/LogOut";
}
}
@@ -1,6 +1,6 @@
@if (isLoading)
{
<EgwCoreLib.Razor.LoadingDataSmall></EgwCoreLib.Razor.LoadingDataSmall>
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
}
else
{
@@ -101,6 +101,11 @@ namespace WebDoorCreator.UI.Components.Hardware
[Inject]
protected WDCVocabularyService WDVService { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
[Inject]
protected WDCUserService WDCUService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
@@ -225,6 +230,14 @@ namespace WebDoorCreator.UI.Components.Hardware
JsoncConfigVal = jsonDef,
JsoncActVal = jsonAct
};
// se debug + superadmin --> auto confirm
if (autoApprove)
{
doorOpToAdd.userConfirm = UserId;
doorOpToAdd.DtConfirm = DateTime.Now;
}
listOp.Add(doorOpToAdd);
// salvo Door OP associate
bool fatto = await WDCService.DoorOpInsert(DoorId, listOp);
@@ -239,6 +252,7 @@ namespace WebDoorCreator.UI.Components.Hardware
}
}
}
private bool autoApprove = false;
/// <summary>
/// Gestione update da oggetto sottostante
@@ -261,12 +275,26 @@ namespace WebDoorCreator.UI.Components.Hardware
DoorOp2ModList.Add(currItem);
}
}
/// <summary>
/// Blazor: get query parm from the URL
/// </summary>
/// <param name="parmName"></param>
/// <returns></returns>
protected string GetQueryParm(string parmName)
{
var uriBuilder = new UriBuilder(NavMan.Uri);
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
return q[parmName] ?? "";
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
var currMode = GetQueryParm("currMode");
if (!string.IsNullOrEmpty(currMode) && WDCUService.userRole == "SuperAdmin")
{
autoApprove = currMode.Equals("debug");
}
WDCRefresh.EA_ConfDoorOp += WDCRefresh_EA_ConfDoorOp;
//return base.OnInitializedAsync();
}
protected override async Task OnParametersSetAsync()
@@ -9,9 +9,11 @@ else
<div class="text-center d-flex justify-content-between px-2 mb-3">
@if (DoorOpInst.userConfirm != "" && DoorOpInst.DtConfirm != null)
{
<button class="btnPDFSuccess">
<i class="fa-solid fa-file-pdf"></i>
</button>
<NavLink href="@pathFinder(DoorOpInst.DoorOpId, false)" target="_blank" title="Review PDF">
<button class="btnPdfSuccess">
<i class="fa-solid fa-file-pdf"></i>
</button>
</NavLink>
}
<div>
<h5>@($"{@getTrad(DoorOpInst.ObjectId)} #{instanceN}")</h5>
@@ -158,8 +160,8 @@ else
}
else
{
<NavLink href="@pathFinder(DoorOpInst.DoorOpId)" target="_blank">
<button class="btnPDFPending">
<NavLink href="@pathFinder(DoorOpInst.DoorOpId, true)" target="_blank">
<button class="btnPdfPending">
<i class="fa-solid fa-file-pdf"></i>
</button>
</NavLink>
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using Newtonsoft.Json;
using NLog;
using System;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
@@ -90,6 +91,10 @@ namespace WebDoorCreator.UI.Components.Hardware
protected List<ListValuesModel>? listValuesFiles { get; set; } = null!;
protected List<ListValuesModel>? listValuesFname { get; set; } = null!;
protected List<ListValuesModel>? listValuesHW { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
protected List<string> ordListVal { get; set; } = new List<string>();
[Inject]
@@ -142,6 +147,9 @@ namespace WebDoorCreator.UI.Components.Hardware
[Inject]
protected WebDoorCreatorService WDCService { get; set; } = null!;
[Inject]
protected WDCUserService WDCUService { get; set; } = null!;
[Inject]
protected WDCVocabularyService WDVService { get; set; } = null!;
@@ -199,6 +207,12 @@ namespace WebDoorCreator.UI.Components.Hardware
// salvo i NUOVI valori...
DoorOpInst.CurrVals = dictValCurr;
DoorOpInst.GraphicParams = graphicParams;
// se debug + superadmin --> auto confirm
if (autoApprove && string.IsNullOrEmpty(DoorOpInst.userConfirm))
{
DoorOpInst.userConfirm = WDCUService.userId;
DoorOpInst.DtConfirm = DateTime.Now;
}
// salvo!
List<DoorOpModel> doorOpUpd = new List<DoorOpModel>() { DoorOpInst };
await WDCService.DoorOpUpdate(doorOpUpd);
@@ -211,6 +225,18 @@ namespace WebDoorCreator.UI.Components.Hardware
}
}
/// <summary>
/// Blazor: get query parm from the URL
/// </summary>
/// <param name="parmName"></param>
/// <returns></returns>
protected string GetQueryParm(string parmName)
{
var uriBuilder = new UriBuilder(NavMan.Uri);
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
return q[parmName] ?? "";
}
protected string getTrad(string objId)
{
string answ = "";
@@ -235,6 +261,12 @@ namespace WebDoorCreator.UI.Components.Hardware
hasChanged = currSer != origSer;
if (hasChanged)
{
// se debug + superadmin --> auto confirm
if (autoApprove && string.IsNullOrEmpty(DoorOpInst.userConfirm))
{
DoorOpInst.userConfirm = WDCUService.userId;
DoorOpInst.DtConfirm = DateTime.Now;
}
DoorOpInst.JsoncActVal = JsonConvert.SerializeObject(dictValCurr);
Task.Run(async () =>
{
@@ -256,6 +288,11 @@ namespace WebDoorCreator.UI.Components.Hardware
protected override void OnInitialized()
{
base.OnInitialized();
var currMode = GetQueryParm("currMode");
if (!string.IsNullOrEmpty(currMode) && WDCUService.userRole == "SuperAdmin")
{
autoApprove = currMode.Equals("debug");
}
string vers = config.GetValue<string>("ConfDDF:VersNumber");
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
@@ -328,6 +365,7 @@ namespace WebDoorCreator.UI.Components.Hardware
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private bool autoApprove = false;
#endregion Private Fields
@@ -350,9 +388,9 @@ namespace WebDoorCreator.UI.Components.Hardware
await SetSelectedData();
}
private string pathFinder(int id)
private string pathFinder(int id, bool reqConf)
{
string answ = $"HwPdfConfirm?doorOpId={id}&doorId={DoorOpInst.DoorId}&objectId={DoorOpInst.ObjectId}";
string answ = $"HwPdfConfirm?doorOpId={id}&doorId={DoorOpInst.DoorId}&objectId={DoorOpInst.ObjectId}&reqConf={reqConf}";
return answ;
}
@@ -385,11 +423,11 @@ namespace WebDoorCreator.UI.Components.Hardware
if (tempListFilesTempl!.Count != 0)
{
listValuesFiles = tempListFilesTempl.Where(x => x.Value.Contains(folderName)).ToList();
listValuesFiles = tempListFilesTempl.Where(x => x.Value.Contains($"{folderName}\\")).ToList();
}
else if (tempListFilesSh!.Count != 0)
{
listValuesFiles = tempListFilesSh!.Where(x => x.Value.Contains(folderName)).ToList();
listValuesFiles = tempListFilesSh!.Where(x => x.Value.Contains($"{folderName}\\")).ToList();
}
try
{
@@ -1,7 +1,7 @@
.btnPDF {
border-radius: 50%;
width: 1.5rem;
height: 1.5rem;
width: 1.6rem;
height: 1.6rem;
border: 2px solid #00838F;
z-index: 99999;
}
@@ -30,15 +30,16 @@
background: #FFF;
/*transform: translate(1.6rem, -1rem);*/
}
.btnPDFSuccess {
.btnPdfSuccess {
border-radius: 50%;
width: 1.5rem;
height: 1.5rem;
width: 1.6rem;
height: 1.6rem;
border: 2px solid #00838F;
z-index: 99999;
background: #8E44AD;
background: #44AD8E;
color: #FFFFFF;
}
.btnPDFPending {
.btnPdfPending {
border-radius: 50%;
width: 3.5rem;
height: 3.5rem;
@@ -46,7 +47,7 @@
z-index: 99999;
background: #F1C40F;
}
.btnPDFSuccess > i {
.btnPdfSuccess > i {
font-size: 0.8rem;
}
.btnHighlight {
@@ -3,8 +3,8 @@
.btnPDF {
border-radius: 50%;
width: 1.5rem;
height: 1.5rem;
width: 1.6rem;
height: 1.6rem;
border: 2px solid #00838F;
z-index: 99999;
}
@@ -29,18 +29,19 @@
/*transform: translate(1.6rem, -1rem);*/
}
.btnPDFSuccess {
.btnPdfSuccess {
.btnPDF;
background: #8E44AD;
background: #44AD8E;
color: #FFFFFF;
}
.btnPDFPending {
.btnPdfPending {
.btnGen;
background: #F1C40F;
//transform: translate(20.3rem, 1rem);
}
.btnPDFSuccess > i {
.btnPdfSuccess > i {
font-size: 0.8rem;
}
@@ -1 +1 @@
.btnPDF{border-radius:50%;width:1.5rem;height:1.5rem;border:2px solid #00838f;z-index:99999;}.btnGen{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;}.btnDelete{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#b71c1c;}.btnClone{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#fff;}.btnPDFSuccess{border-radius:50%;width:1.5rem;height:1.5rem;border:2px solid #00838f;z-index:99999;background:#8e44ad;}.btnPDFPending{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#f1c40f;}.btnPDFSuccess>i{font-size:.8rem;}.btnHighlight{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#03a9f4;transform:translate(10.3rem,-8rem);}.btnCancel{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:var(--colorCode);}.btnSave{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:var(--colorCode);}.btnHeadTail{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.btnConfirm{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;border-bottom:3px solid #000;}.btnHead{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.borderTop{border-top:7px solid #00838f;}.borderBottom{border-bottom:7px solid #00838f;width:100%;}.modal-dialog{overflow-y:initial!important;}.modal-body{height:18.75rem;overflow-y:auto;}.testata{width:100%;}select,input{border:0;border-bottom:2px solid #000;background:none;height:2rem;}i{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-size:1.1rem;}.blue{background:#3652d9;}.grey{background:#7f8c8d;opacity:50%;}.circle{width:1rem;height:1rem;border-radius:50%;box-shadow:0 0 1px 1px #0000001a;}.pulse{animation:pulse-animation 2s infinite;}@keyframes pulse-animation{0%{box-shadow:0 0 0 0 rgba(0,0,0,.2);}100%{box-shadow:0 0 0 20px rgba(0,0,0,0);}}
.btnPDF{border-radius:50%;width:1.6rem;height:1.6rem;border:2px solid #00838f;z-index:99999;}.btnGen{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;}.btnDelete{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#b71c1c;}.btnClone{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#fff;}.btnPdfSuccess{border-radius:50%;width:1.6rem;height:1.6rem;border:2px solid #00838f;z-index:99999;background:#44ad8e;color:#fff;}.btnPdfPending{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#f1c40f;}.btnPdfSuccess>i{font-size:.8rem;}.btnHighlight{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:#03a9f4;transform:translate(10.3rem,-8rem);}.btnCancel{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:var(--colorCode);}.btnSave{border-radius:50%;width:3.5rem;height:3.5rem;border:5px solid #00838f;z-index:99999;background:var(--colorCode);}.btnHeadTail{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.btnConfirm{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;border-bottom:3px solid #000;}.btnHead{width:100%;padding:.8rem 0 .8rem 0;background:none;border:0;}.borderTop{border-top:7px solid #00838f;}.borderBottom{border-bottom:7px solid #00838f;width:100%;}.modal-dialog{overflow-y:initial!important;}.modal-body{height:18.75rem;overflow-y:auto;}.testata{width:100%;}select,input{border:0;border-bottom:2px solid #000;background:none;height:2rem;}i{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-size:1.1rem;}.blue{background:#3652d9;}.grey{background:#7f8c8d;opacity:50%;}.circle{width:1rem;height:1rem;border-radius:50%;box-shadow:0 0 1px 1px #0000001a;}.pulse{animation:pulse-animation 2s infinite;}@keyframes pulse-animation{0%{box-shadow:0 0 0 0 rgba(0,0,0,.2);}100%{box-shadow:0 0 0 20px rgba(0,0,0,0);}}
@@ -1,5 +1,5 @@
<div class="p-5">
<DoorList currOrderId="@OrderView!.OrderId" orderTotCost="@OrderView!.TotCost" E_CurrDoor="SetCurrDoor" E_CurrDoorModal="SetCurrDoorModal" updateRecordCount="UpdateTotCount" actFilter="@currFilter"></DoorList>
<DoorList currOrderId="@CurrOrdId" orderTotCost="@OrderView!.TotCost" E_CurrDoor="SetCurrDoor" E_CurrDoorModal="SetCurrDoorModal" updateRecordCount="UpdateTotCount" actFilter="@currFilter"></DoorList>
<div class="mt-4">
<EgwCoreLib.Razor.DataPager @ref="pagerDoors" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" showLoading="@isLoading" PageSizeList="@pageSizeList" />
</div>
@@ -1,9 +1,11 @@
using EgwCoreLib.Razor;
using Blazored.SessionStorage;
using EgwCoreLib.Razor;
using Microsoft.AspNetCore.Components;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.DTO;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
using static WebDoorCreator.UI.Data.WDCRefreshService;
namespace WebDoorCreator.UI.Components.Order
{
@@ -23,6 +25,16 @@ namespace WebDoorCreator.UI.Components.Order
[Parameter]
public OrderStatusViewModel? OrderView { get; set; }
protected int CurrOrdId { get; set; } = 0;
protected override void OnParametersSet()
{
if (OrderView != null)
{
CurrOrdId = OrderView.OrderId;
}
}
public string userId
{
get
@@ -33,6 +45,12 @@ namespace WebDoorCreator.UI.Components.Order
#endregion Public Properties
#region Protected Fields
protected DataPager? pagerDoors = null!;
@@ -47,7 +65,7 @@ namespace WebDoorCreator.UI.Components.Order
protected DoorsSelectFilter currFilter { get; set; } = new DoorsSelectFilter();
/// <summary>
/// Unit di misura selezionata
/// Unita' di misura selezionata
/// </summary>
protected string currMeaUnit { get; set; } = "mm";
@@ -103,9 +121,17 @@ namespace WebDoorCreator.UI.Components.Order
currPage = newNum;
}
protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
numRecord = 16;
string rawVal = await sessStorage.GetItemAsStringAsync("doorsSelFilt");
if (!string.IsNullOrEmpty(rawVal))
{
currFilter = await sessStorage.GetItemAsync<DoorsSelectFilter>("doorsSelFilt");
}
else
{
numRecord = 16;
}
}
protected async Task SetCurrDoor(DoorModel door)
@@ -144,7 +170,10 @@ namespace WebDoorCreator.UI.Components.Order
private int currPage
{
get => currFilter.CurrPage;
set => currFilter.CurrPage = value;
set
{
currFilter.CurrPage = value;
}
}
private bool isLoading { get; set; } = false;
@@ -152,7 +181,15 @@ namespace WebDoorCreator.UI.Components.Order
private int numRecord
{
get => currFilter.NumRec;
set => currFilter.NumRec = value;
set
{
if (currFilter.NumRec != value)
{
currFilter.NumRec = value;
currPage = 1;
InvokeAsync(() => sessStorage.SetItemAsync<DoorsSelectFilter>("doorsSelFilt", currFilter));
}
}
}
private string searchValue
@@ -161,6 +198,9 @@ namespace WebDoorCreator.UI.Components.Order
set => currFilter.searchValue = value;
}
[Inject]
private ISessionStorageService sessStorage { get; set; } = null!;
#endregion Private Properties
}
}
@@ -39,11 +39,11 @@ else
@if (isEdit && item.OrderId == currOrderId)
{
<button class="btn btn-sm btn-success" @onclick="()=>editConfirm()" title="Save Order"><i class="fa-regular fa-floppy-disk"></i> Save</button>
<button class="btn btn-sm btn-secondary" @onclick="()=>editCancel()" title="Save Order"><i class="fa-solid fa-rotate-left"></i> Cancel</button>
<button class="btn btn-sm btn-secondary" @onclick="()=>editCancel()" title="Cancel Order"><i class="fa-solid fa-rotate-left"></i> Cancel</button>
}
else
{
<button class="btn btn-sm btn-primary me-1" @onclick="()=>setOrd2Show(item.OrderId)" title="Order detail"><i class="fa-solid fa-magnifying-glass"></i></button>
<button class="btn btn-sm btn-primary me-1" @onclick="()=>setOrd2Show(item.OrderId, true)" title="Order detail"><i class="fa-solid fa-magnifying-glass"></i></button>
<AuthorizeView Roles="SuperAdmin, DcaAdmin, DcaOrdMan, DcaProj" Context="OrderEdit">
<Authorized>
@if (item.OrderStatus < 30 || WDCUService.userRole == "DcaAdmin" || WDCUService.userRole == "SuperAdmin")
@@ -7,6 +7,7 @@ using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
using static WebDoorCreator.Core.Enum;
using static WebDoorCreator.UI.Data.WDCRefreshService;
namespace WebDoorCreator.UI.Components.Order
{
@@ -76,7 +77,9 @@ namespace WebDoorCreator.UI.Components.Order
}
protected string currUser { get; set; } = "";
protected bool isEdit { get; set; } = false;
protected bool isModRole { get; set; } = false;
[Inject]
@@ -89,8 +92,11 @@ namespace WebDoorCreator.UI.Components.Order
protected NavigationManager NavManager { get; set; } = null!;
protected bool ordByCode { get; set; } = false;
protected bool ordByDate { get; set; } = false;
protected int screenX { get; set; } = 0;
protected int screenY { get; set; } = 0;
protected List<string>? userClaims
@@ -185,21 +191,6 @@ namespace WebDoorCreator.UI.Components.Order
return answ;
}
protected string getOrderStatusLabel(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.Label;
}
}
return answ;
}
protected string getOrderStatusColor(int orderStat)
{
string answ = "";
@@ -216,6 +207,22 @@ namespace WebDoorCreator.UI.Components.Order
return answ;
}
protected string getOrderStatusLabel(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.Label;
}
}
return answ;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
@@ -224,7 +231,7 @@ namespace WebDoorCreator.UI.Components.Order
if (localOrdId != 0)
{
await setOrd2Show(localOrdId);
await setOrd2Show(localOrdId, false);
}
}
}
@@ -267,16 +274,27 @@ namespace WebDoorCreator.UI.Components.Order
return $"api/Report/GetOrderReport?OrderId={orderId}&Format=PDF";
}
protected async Task setOrd2Show(int orderId)
protected async Task setOrd2Show(int orderId, bool doSave)
{
await Task.Delay(1);
if (ListOrdersStatus == null && !isLoading)
{
await ReloadData();
}
else
{
await Task.Delay(200);
}
if (ListOrdersStatus != null)
{
var chosenOrd = ListOrdersStatus.Where(x => x.OrderId == orderId).FirstOrDefault();
if (chosenOrd != null)
{
Ord2Show = chosenOrd;
await localStorage.SetItemAsync("OrderId", orderId);
if (doSave)
{
await localStorage.SetItemAsync("OrderId", orderId);
}
await E_SetOrd2Show.InvokeAsync(chosenOrd);
}
}
@@ -321,10 +339,15 @@ namespace WebDoorCreator.UI.Components.Order
#region Private Fields
private DateTime dateLimit = new DateTime(2000, 1, 1);
private bool isLoading = false;
private Dictionary<int, string> ListCompany = new Dictionary<int, string>();
private List<OrderStatusViewModel>? ListOrdersStatus = null;
private List<ListValuesModel>? ListValuesAll = null;
private List<OrderStatusViewModel>? SearchRecords = null;
private bool sortAsc = true;
private string sortField = "";
@@ -406,6 +429,7 @@ namespace WebDoorCreator.UI.Components.Order
private async Task ReloadData()
{
isLoading = true;
ListOrdersStatus = null;
var domani = DateTime.Today.AddDays(1);
@@ -502,7 +526,6 @@ namespace WebDoorCreator.UI.Components.Order
}
break;
case "OrdStatus":
if (sortAsc)
{
@@ -514,7 +537,6 @@ namespace WebDoorCreator.UI.Components.Order
}
break;
case "Qty":
if (sortAsc)
{
@@ -533,8 +555,7 @@ namespace WebDoorCreator.UI.Components.Order
}
}
}
await Task.Delay(1);
isLoading = false;
await InvokeAsync(StateHasChanged);
}
@@ -25,7 +25,7 @@
</div>
<div class="mt-2">
<EgwCoreLib.Razor.DataPager @ref="pagerOrderHP" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" showLoading="@isLoading" />
<EgwCoreLib.Razor.DataPager @ref="pagerOrderHP" PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading" />
</div>
</div>
}
@@ -1,10 +1,12 @@
using Blazored.LocalStorage;
using Blazored.SessionStorage;
using EgwCoreLib.Razor;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
using static WebDoorCreator.UI.Data.WDCRefreshService;
namespace WebDoorCreator.UI.Components.Order
{
@@ -12,12 +14,12 @@ namespace WebDoorCreator.UI.Components.Order
{
#region Public Properties
[CascadingParameter]
public bool isTplPage { get; set; } = false;
[Parameter]
public EventCallback<AspNetUsers> E_currUser { get; set; }
[CascadingParameter]
public bool isTplPage { get; set; } = false;
public string userId
{
get
@@ -26,8 +28,6 @@ namespace WebDoorCreator.UI.Components.Order
}
}
[Inject]
protected WDCVocabularyService WDCVService { get; set; } = null!;
#endregion Public Properties
@@ -38,6 +38,7 @@ namespace WebDoorCreator.UI.Components.Order
WDCUService.EA_UserCurrCompany -= OnNewUserCurrComp;
}
public async void OnNewUserCurrComp()
{
await Task.Delay(1);
@@ -52,12 +53,21 @@ namespace WebDoorCreator.UI.Components.Order
#region Protected Fields
protected string _doorExtCode = "";
protected int _doorQuantity = 0;
protected string _orderCodExt = "";
protected string _orderDescr = "";
protected bool cloneReq = false;
protected string Lingua = "EN";
protected bool newOrdReq = false;
protected int ordIdOrig = 0;
protected DataPager? pagerOrderHP = null!;
#endregion Protected Fields
@@ -65,12 +75,19 @@ namespace WebDoorCreator.UI.Components.Order
#region Protected Properties
protected DoorModel? currDoor { get; set; } = null;
protected DoorModel? currDoorModal { get; set; } = null;
protected int currParentId { get; set; } = 0;
protected OrderSelectFilter currFilter { get; set; } = new OrderSelectFilter();
protected int CurrLevel { get; set; } = 1;
protected int currOrderId { get; set; } = 0;
protected int currParentId { get; set; } = 0;
protected AspNetUsers? currUser { get; set; } = null;
protected bool doorChange { get; set; } = false;
protected string doorExtCode
@@ -86,7 +103,9 @@ namespace WebDoorCreator.UI.Components.Order
}
protected List<DoorModel>? DoorsList { get; set; } = null;
protected string goToDefPage { get; set; } = "";
protected bool isModRole { get; set; } = false;
[Inject]
@@ -125,47 +144,21 @@ namespace WebDoorCreator.UI.Components.Order
protected List<UsersViewModel>? UsersList { get; set; } = null;
[Inject]
protected WDCVocabularyService VocService { get; set; } = null!;
[Inject]
protected WDCUserService WDCUService { get; set; } = null!;
[Inject]
protected WebDoorCreatorService WDService { get; set; } = null!;
protected WDCVocabularyService WDCVService { get; set; } = null!;
[Inject]
protected WDCVocabularyService VocService { get; set; } = null!;
protected WebDoorCreatorService WDService { get; set; } = null!;
#endregion Protected Properties
private List<ListValuesModel>? ListValuesAll = null;
#region Protected Methods
protected string translate(string lemma)
{
return VocService.Traduci(WDCUService.currLanguage ?? "EN", lemma);
}
/// <summary>
/// Traduzione condizionale
/// </summary>
/// <param name="condition">valore condizione</param>
/// <param name="lemmaCF">lemma caso FALSE</param>
/// <param name="lemmaCT">lemma caso TRUE</param>
/// <returns></returns>
protected string translOpt(bool condition, string lemmaCF, string lemmaCT)
{
string answ = "";
if (condition)
{
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCT);
}
else
{
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCF);
}
return answ;
}
protected string Lingua = "EN";
protected async Task addNewOrder(string userName, bool saveAsTemplate)
{
@@ -282,16 +275,61 @@ namespace WebDoorCreator.UI.Components.Order
currDoor = null;
}
protected void ForceReload(int newNum)
protected void SetNumRec(int newNum)
{
currPage = 1;
numRecord = newNum;
}
protected void ForceReloadPage(int newNum)
protected void SetPage(int newNum)
{
currPage = newNum;
}
protected string getOrderStatusColor(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.DefaultVal;
}
}
return answ;
}
protected string getOrderStatusLabel(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.Label;
}
}
return answ.ToUpper();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
string rawVal = await sessStorage.GetItemAsStringAsync("ordSelFilt");
if (!string.IsNullOrEmpty(rawVal))
{
currFilter = await sessStorage.GetItemAsync<OrderSelectFilter>("ordSelFilt");
}
}
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
@@ -300,6 +338,7 @@ namespace WebDoorCreator.UI.Components.Order
WDCUService.EA_UserCurrCompany += OnNewUserCurrComp;
}
protected async Task ReloadData()
{
DoorsList = await WDService.DoorGetByOrderId(currOrderId);
@@ -388,6 +427,32 @@ namespace WebDoorCreator.UI.Components.Order
StateHasChanged();
}
protected string translate(string lemma)
{
return VocService.Traduci(WDCUService.currLanguage ?? "EN", lemma);
}
/// <summary>
/// Traduzione condizionale
/// </summary>
/// <param name="condition">valore condizione</param>
/// <param name="lemmaCF">lemma caso FALSE</param>
/// <param name="lemmaCT">lemma caso TRUE</param>
/// <returns></returns>
protected string translOpt(bool condition, string lemmaCF, string lemmaCT)
{
string answ = "";
if (condition)
{
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCT);
}
else
{
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCF);
}
return answ;
}
protected void UpdateTotCount(int newTotCount)
{
totalCount = newTotCount;
@@ -395,6 +460,12 @@ namespace WebDoorCreator.UI.Components.Order
#endregion Protected Methods
#region Private Fields
private List<ListValuesModel>? ListValuesAll = null;
#endregion Private Fields
#region Private Properties
private int currPage
@@ -423,7 +494,14 @@ namespace WebDoorCreator.UI.Components.Order
private int numRecord
{
get => currFilter.NumRec;
set => currFilter.NumRec = value;
set
{
if (currFilter.NumRec != value)
{
currFilter.NumRec = value;
InvokeAsync(() => sessStorage.SetItemAsync<OrderSelectFilter>("ordSelFilt", currFilter));
}
}
}
private int orderStatus
@@ -438,39 +516,11 @@ namespace WebDoorCreator.UI.Components.Order
set => currFilter.searchValue = value;
}
[Inject]
private ISessionStorageService sessStorage { get; set; } = null!;
#endregion Private Properties
protected string getOrderStatusLabel(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.Label;
}
}
return answ.ToUpper();
}
protected string getOrderStatusColor(int orderStat)
{
string answ = "";
if (ListValuesAll != null)
{
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
if (currOrdStat != null)
{
answ = currOrdStat.DefaultVal;
}
}
return answ;
}
#region Private Methods
private async Task doCalcSVG(int orderId)
@@ -515,6 +565,7 @@ namespace WebDoorCreator.UI.Components.Order
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
currFilter = newParams;
await sessStorage.SetItemAsync<OrderSelectFilter>("ordSelFilt", newParams);
isLoading = false;
}
@@ -24,7 +24,7 @@
</div>
@if (DoorsList == null || DoorsList.Count == 0)
{
<LoadingDataSmall></LoadingDataSmall>
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
}
else
{
@@ -11,14 +11,113 @@ namespace WebDoorCreator.UI.Controllers
[ApiController]
public class DoorImageController : ControllerBase
{
#region Public Constructors
public DoorImageController(IConfiguration configuration, QueueDataService cQDService, WebDoorCreatorService cWDCService)
{
Log.Trace("Starting DoorImageController");
_configuration = configuration;
WaitReloadSvg = _configuration.GetValue<int>("RuntimeOpt:WaitReloadSvg");
QDService = cQDService;
WDService = cWDCService;
Log.Trace("Avviato DoorImageController");
}
#endregion Public Constructors
private Random rnd = new Random();
#region Public Methods
// GET: api/DoorImage
[HttpGet]
public string Get()
{
return "OK";
}
[HttpGet("GetImage.svg")]
public async Task<IActionResult> GetImage(int DoorId)
{
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
string svgContent = await QDService.DoorGetLastSvg(DoorId);
// se fosse vuoto...
if (string.IsNullOrEmpty(svgContent))
{
string vetoReq = await QDService.DoorProcVetoGetAsync(DoorId);
if (string.IsNullOrEmpty(vetoReq))
{
await QDService.DoorProcVetoSetAsync(DoorId, WaitReloadSvg * 20);
// richiede ricalcolo img
await SendRecalcReq(DoorId);
// attende ...
await Task.Delay(WaitReloadSvg);
// riprova lettura
svgContent = await QDService.DoorGetLastSvg(DoorId);
}
else
{
// attesa causale per vedere SE riesce a leggere ugualmente...faccio rand (4..10)*wait reload...
await Task.Delay(WaitReloadSvg * rnd.Next(4, 10));
// riprovo lettura
svgContent = await QDService.DoorGetLastSvg(DoorId);
}
}
// se fosse vuoto...
if (string.IsNullOrEmpty(svgContent))
{
// legge img vuota
svgContent = QDService.DoorGetMissingSvg();
}
var result = System.Text.Encoding.UTF8.GetBytes(svgContent);
return File(result, "image/svg+xml");
}
#endregion Public Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration = null!;
private int WaitReloadSvg = 100;
#endregion Private Fields
#region Private Properties
private QueueDataService QDService { get; set; } = null!;
private WebDoorCreatorService WDService { get; set; } = null!;
#endregion Private Properties
#region Private Methods
/// <summary>
/// Invio richiesta ricalcolo porta
/// </summary>
/// <param name="DoorId"></param>
/// <returns></returns>
private async Task SendRecalcReq(int DoorId)
{
if (DoorId > 0)
{
// richiede ricalcolo img
List<string> doorIdList = new List<string>() { $"{DoorId}" };
// chiamo reset richieste
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
await Task.Delay(WaitReloadSvg);
// recupero DDF ed invio x processing
string currDDF = await WDService.DoorOpGetDDF(DoorId);
// versione corrente del DDF generato
int currVers = await QDService.SendCalcReq(DoorId, currDDF);
await Task.Delay(WaitReloadSvg);
}
}
#endregion Private Methods
#if false
[HttpGet("GetImage.png")]
public async Task<IActionResult> GetImagePng(int DoorId)
@@ -33,37 +132,7 @@ namespace WebDoorCreator.UI.Controllers
result = Utils.ImageToByte2(myBmp);
}
return File(result, "image/png");
}
}
#endif
// GET: api/DoorImage
[HttpGet]
public string Get()
{
return "OK";
}
public DoorImageController(IConfiguration configuration, QueueDataService DataService)
{
Log.Info("Starting DoorImageController");
_configuration = configuration;
QDataServ = DataService;
Log.Info("Avviato DoorImageController");
}
#region Private Fields
private static IConfiguration _configuration = null!;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Properties
private QueueDataService QDataServ { get; set; } = null!;
#endregion Private Properties
}
}
}
+62 -20
View File
@@ -1,5 +1,8 @@
using Microsoft.AspNetCore.Components;
using WebDoorCreator.Data;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using static Org.BouncyCastle.Math.EC.ECCurve;
namespace WebDoorCreator.UI.Data
{
@@ -7,35 +10,30 @@ namespace WebDoorCreator.UI.Data
{
#region Public Events
public event Action EA_UpdDoorOp = null!;
public event EventHandler EA_ConfDoorOp = delegate { };
public event EventHandler EA_OrderChanged = delegate { };
public event Action EA_UpdDoorOp = null!;
#endregion Public Events
#region Public Properties
public bool isDoorOpUpd
{
get => _isDoorOpUpd;
set
{
_isDoorOpUpd = value;
reportDoorOpUpd();
_isDoorOpUpd = value;
reportDoorOpUpd();
}
}
#endregion Public Properties
#region Protected Methods
#region Public Methods
protected void reportDoorOpUpd()
{
if (EA_UpdDoorOp != null)
{
EA_UpdDoorOp?.Invoke();
}
}
public void ReportDoorOpConf(int doorId, int doorOpId, string objId)
{
DOPEventArgs currOpr = new DOPEventArgs()
@@ -50,19 +48,63 @@ namespace WebDoorCreator.UI.Data
EA_ConfDoorOp(this, currOpr);
}
}
public void ReportOrderChanged(int orderId)
{
OrdEventArgs currOpr = new OrdEventArgs()
{
OrderId = orderId
};
// se qualcuno ascolta sollevo evento nuovo valore...
if (EA_OrderChanged != null)
{
EA_OrderChanged(this, currOpr);
}
}
#endregion Public Methods
#region Public Classes
public class DOPEventArgs : EventArgs
{
#region Public Properties
public int DoorId { get; set; } = 0;
public int DoorOpId { get; set; } = 0;
public string ObjectId { get; set; } = "";
#endregion Public Properties
}
public class OrdEventArgs : EventArgs
{
#region Public Properties
public int OrderId { get; set; } = 0;
#endregion Public Properties
}
#endregion Public Classes
#region Protected Methods
protected void reportDoorOpUpd()
{
if (EA_UpdDoorOp != null)
{
EA_UpdDoorOp?.Invoke();
}
}
#endregion Protected Methods
#region Private Properties
private bool _isDoorOpUpd { get; set; } = false;
private bool _isDoorOpConf { get; set; } = false;
#endregion Private Properties
private bool _isDoorOpUpd { get; set; } = false;
public class DOPEventArgs : EventArgs
{
public int DoorId { get; set; } = 0;
public int DoorOpId { get; set; } = 0;
public string ObjectId { get; set; } = "";
}
#endregion Private Properties
}
}
+102
View File
@@ -0,0 +1,102 @@
using Microsoft.Extensions.Diagnostics.HealthChecks;
using NLog;
using System.Net.NetworkInformation;
using WebDoorCreator.Data;
using WebDoorCreator.UI.Components.Users;
namespace WebDoorCreator.UI.Health
{
public class Checks
{
#region Public Methods
public static async Task<HealthCheckResult> ConfigCount(IConfiguration _config)
{
string description = "Try check Config table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetConfig
.Count();
if (dbCount > 0)
{
description = $"Check Config table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> DoorsCount(IConfiguration _config)
{
string description = "Try check DOOR table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetDoor
.Count();
if (dbCount > 0)
{
description = $"Check DOOR table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> OrdersCount(IConfiguration _config)
{
string description = "Try check ORDER table";
var healthCheckData = new Dictionary<string, object>();
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
{
var dbCount = localDbCtx
.DbSetOrders
.Count();
if (dbCount > 0)
{
description = $"Check ORDER table, found {dbCount} records";
healthCheckData.Add("Count", dbCount);
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
await Task.Delay(1);
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
}
public static async Task<HealthCheckResult> PingCheck(string hostName)
{
var description = $"Ping to {hostName}";
var healthCheckData = new Dictionary<string, object>();
using (var thePing = new Ping())
{
var pingResult = await thePing.SendPingAsync(hostName);
healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime);
healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString());
if (pingResult.Status == IPStatus.Success)
{
description += $" - {pingResult.RoundtripTime}ms";
return HealthCheckResult.Healthy(description, healthCheckData);
}
}
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
}
#endregion Public Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
+3 -2
View File
@@ -1,5 +1,6 @@
@page "/ForceReload"
<h3>Refreshing Data</h3>
<LoadingData Title="Reloading Data" DisplayMode="LoadingData.SpinMode.Growl" DisplaySize="LoadingData.CtrlSize.Large"></LoadingData>
<LoadingData></LoadingData>
<ProgressDisplay Title="@titleMsg" CurrVal="@currVal" NextVal="@nextVal" MaxVal="@maxVal" ExpTimeMSec="100"></ProgressDisplay>
+20 -1
View File
@@ -23,12 +23,31 @@ namespace WebDoorCreator.UI.Pages
protected override async Task OnInitializedAsync()
{
currVal = 0;
nextVal = 1;
await Task.Delay(100);
currVal++;
nextVal++;
await WDService.FlushCustomPattern("Cache");
await Task.Delay(1);
currVal++;
nextVal++;
await Task.Delay(200);
currVal++;
nextVal++;
await WDCVService.ReloadVoc();
currVal++;
nextVal++;
await Task.Delay(200);
currVal++;
nextVal++;
NavManager.NavigateTo("OrdersHomePage", true);
}
private int currVal = 0;
private int nextVal = 1;
private int maxVal = 6;
private string titleMsg = "Clearing cache...";
#endregion Protected Methods
}
}
+18 -7
View File
@@ -3,13 +3,24 @@
@if (currDoorOp != null)
{
<div>
<div class="col-10 text-center mb-2">
Please press
<button class="btn btn-outline-dark" style="cursor: pointer;" @onclick="()=>doConfirm()">
CONFIRM
</button>
after reading the whole Document
<div class="col-12 text-center mb-2">
@if (reqConf)
{
<button class="btn btn-outline-dark" style="cursor: pointer;" @onclick="()=>doConfirm()">
Press <b>HERE to CONFIRM</b> after reading the whole Document
</button>
}
else
{
<button class="btn btn-outline-primary" style="cursor: pointer;" @onclick="()=>doClose()">
Press <b>here</b> to close the Document
</button>
}
</div>
<div class="bg-light p-1">
@* <b>@docUrl</b> *@
<PdfDisplay Width="100%" PdfUrl="@docUrl" HeightList="@heightList"></PdfDisplay>
</div>
<embed src="Docs/1001.pdf" width="100%" height="800px" />
</div>
}
+111 -1
View File
@@ -1,27 +1,48 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.JSInterop;
using Newtonsoft.Json;
using System.Text;
using WebDoorCreator.Data.DbModels;
using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Data;
using static Org.BouncyCastle.Math.EC.ECCurve;
namespace WebDoorCreator.UI.Pages
{
public partial class HwPdfConfirm
{
#region Protected Fields
protected int doorId = 0;
protected string objectId = "";
#endregion Protected Fields
#region Protected Properties
protected List<DoorOpModel> allDoorOps { get; set; } = new List<DoorOpModel>();
[Inject]
protected IConfiguration config { get; set; } = null!;
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
protected DoorOpModel currDoorOp { get; set; } = new DoorOpModel();
protected int doorOpId { get; set; } = 0;
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
[Inject]
protected QueueDataService QDataServ { get; set; } = null!;
protected bool reqConf { get; set; } = false;
protected string userLang
{
get => WDCUService.currLanguage ?? "EN";
@@ -33,12 +54,17 @@ namespace WebDoorCreator.UI.Pages
[Inject]
protected WDCUserService WDCUService { get; set; } = null!;
[Inject]
protected WDCRefreshService WDRService { get; set; } = null!;
[Inject]
protected WebDoorCreatorService WDService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected bool checkIfConf()
{
bool answ = false;
@@ -63,6 +89,14 @@ namespace WebDoorCreator.UI.Pages
return answ;
}
protected async Task doClose()
{
// ora chiudo!
await Task.Delay(50);
await JSRuntime.InvokeVoidAsync("window.close");
await Task.Delay(50);
}
protected async Task doConfirm()
{
currDoorOp.userConfirm = WDCUService.userId;
@@ -71,12 +105,32 @@ namespace WebDoorCreator.UI.Pages
var doorOps2Save = new List<DoorOpModel>() { currDoorOp };
var done = await WDService.DoorOpUpdate(doorOps2Save);
if (done)
{
// ricalcola!
await refreshSVG();
// piccola attesa..
await Task.Delay(50);
// riporto update...
WDRService.ReportDoorOpConf(doorId, doorOpId, objectId);
// ora chiudo!
await Task.Delay(50);
await JSRuntime.InvokeVoidAsync("window.close");
await Task.Delay(50);
}
}
protected override void OnInitialized()
{
base.OnInitialized();
string vers = config.GetValue<string>("ConfDDF:VersNumber");
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
@@ -91,6 +145,10 @@ namespace WebDoorCreator.UI.Pages
{
int.TryParse(sDoorId, out doorId);
}
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("reqConf", out var sReqConf))
{
reqConf = bool.Parse(sReqConf);
}
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("doorOpId", out var sDoorOpId))
{
doorOpId = int.Parse(sDoorOpId);
@@ -98,14 +156,66 @@ namespace WebDoorCreator.UI.Pages
}
}
/// <summary>
/// Effettua generazione DDF + refresh SVG
/// </summary>
/// <returns></returns>
protected async Task refreshSVG()
{
List<DoorOpModel>? listOpAll = await WDService.DoorOpGetByDoorId(doorId);
if (listOpAll != null)
{
List<string> ordListVal = new List<string>();
List<DoorOpModel> listOp = listOpAll.Where(x => x.userConfirm != "" && x.DtConfirm != null).ToList();
if (listOp != null)
{
// chiamo metodo x avere DDF serializzato
var CurrentCompoOrder = await WDService.ListValuesGetAll("*", "Hardware");
if (CurrentCompoOrder != null)
{
foreach (var item in CurrentCompoOrder.OrderBy(x => x.Ordinal).ToList())
{
ordListVal.Add(item.TableName);
}
}
listOp = listOp.OrderBy(d => ordListVal.IndexOf(d.ObjectId)).ToList();
string currDdf = currDdfConv.GetSerialized(listOp);
// versione corrente del DDF generato
int currVers = await QDataServ.SendCalcReq(doorId, currDdf);
}
}
}
protected async Task ReloadData()
{
currDoorOp = await WDService.DoorOpGetById(doorOpId);
docUrl = "Docs/1001.pdf";
if (currDoorOp != null)
{
allDoorOps = await WDService.DoorOpGetByDoorId(currDoorOp.DoorId);
if (currDoorOp.CurrVals.ContainsKey("template"))
{
docUrl = $"docs/{objectId}/{currDoorOp.CurrVals["template"]}.pdf";
}
}
await Task.Delay(1);
// fin finale caratteri! space Stripe: " " --> "_"
docUrl = docUrl.Replace(" ", "_").Replace(@"\", "/");
}
#endregion Protected Methods
#region Private Fields
private string docUrl = "";
#endregion Private Fields
#region Private Properties
private Dictionary<string, string> heightList { get; set; } = new Dictionary<string, string>() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" }, { "1200", "1200px" }, { "1400", "1400px" } };
#endregion Private Properties
}
}
+39 -35
View File
@@ -1,48 +1,54 @@
@page "/SuperAdmin"
@using WebDoorCreator.UI.Components
<AuthorizeView Roles="SuperAdmin, DcaAdmin">
<Authorized>
<div class="d-flex justify-content-around">
<div class="btn-group">
<button @onclick="() => SetMode(AdminMode.Company)" class="btn px-5 @cssMode(AdminMode.Company)">Company</button>
@*<button @onclick="() => SetMode(AdminMode.Interface)" class="btn px-5 @cssMode(AdminMode.Interface)">Interface</button>*@
<button @onclick="() => SetMode(AdminMode.Component)" class="btn px-5 @cssMode(AdminMode.Component)">Components</button>
</div>
</div>
<div class="d-flex justify-content-around">
<div class="btn-group">
<button @onclick="() => SetMode(AdminMode.Company)" class="btn px-5 @cssMode(AdminMode.Company)">Company</button>
<AuthorizeView Roles="SuperAdmin">
<Authorized>
<button @onclick="() => SetMode(AdminMode.Interface)" class="btn px-5 @cssMode(AdminMode.Interface)">Interface</button>
</Authorized>
</AuthorizeView>
<button @onclick="() => SetMode(AdminMode.Component)" class="btn px-5 @cssMode(AdminMode.Component)">Components</button>
</div>
</div>
<div class="cardShadow mt-2 p-2">
<div class="cardShadow mt-2 p-2">
@if (CurrMode == AdminMode.Company)
{
<div class="p-2">
@if (CurrMode == AdminMode.Company)
{
<div class="p-2">
<AuthorizeView Roles="SuperAdmin">
<Authorized>
<div class="mb-3 text-end">
<button type="button" class="btn btn-sm btn-success" @onclick="()=>clearFields()" data-bs-toggle="modal" data-bs-target="#newCompModal">
<i class="fa-solid fa-plus"></i> Add new company
</button>
</div>
<CompanyList E_currCompany="catchCurrComp"></CompanyList>
</div>
}
else if (CurrMode == AdminMode.Interface)
{
<div class="p-2">
<VocRefresh lang="EN"></VocRefresh>
</div>
}
else if (CurrMode == AdminMode.Component)
{
@*<HwMan></HwMan>*@
<div class="p-2">
<CompoCompare updateRecordCount="UpdateTotCount" actFilter="@currFilter"></CompoCompare>
<div>
<EgwCoreLib.Razor.DataPager @ref="pagerCompoFiles" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" showLoading="@isLoading" />
</div>
</div>
}
</Authorized>
</AuthorizeView>
<CompanyList E_currCompany="catchCurrComp"></CompanyList>
</div>
}
else if (CurrMode == AdminMode.Interface)
{
<div class="p-2">
<VocRefresh lang="EN"></VocRefresh>
</div>
}
else if (CurrMode == AdminMode.Component)
{
@*<HwMan></HwMan>*@
<div class="p-2">
<CompoCompare updateRecordCount="UpdateTotCount" actFilter="@currFilter"></CompoCompare>
<div>
<EgwCoreLib.Razor.DataPager @ref="pagerCompoFiles" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" showLoading="@isLoading" />
</div>
</div>
}
</div>
@*
@*
<div class="">
<div class="d-flex justify-content-between">
<div class="pb-0 d-flex justify-content-start">
@@ -87,8 +93,6 @@
}
</div>
</div>*@
</Authorized>
</AuthorizeView>
<!-- Modal Company -->
+1 -1
View File
@@ -9,7 +9,7 @@ using WebDoorCreator.UI.Data;
namespace WebDoorCreator.UI.Pages
{
[Authorize(Roles = "SuperAdmin")]
[Authorize(Roles = "SuperAdmin, DcaAdmin")]
public partial class SuperAdmin
{
#region Protected Fields
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/TemplateMan"
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
<AuthorizeView Roles="SuperAdmin, DcaAdmin, CompAdmin" Context="MenuHide">
<Authorized>
<CascadingValue Value="true">
<OrdersDoorsDoorDef></OrdersDoorsDoorDef>
+2 -2
View File
@@ -120,7 +120,7 @@ else
<button class="input-group-text" @onclick="resetSearch"><i class="fa-solid fa-xmark"></i></button>
</div>
<div class="input-group">
<AuthorizeView Roles="SuperAdmin, Admin, CompAdmin">
<AuthorizeView Roles="SuperAdmin, DcaAdmin, CompAdmin">
<Authorized>
<span class="input-group-text"><i class="fas fa-user-tag"></i></span>
<select class="form-select" @bind="@FiltUserRole">
@@ -136,7 +136,7 @@ else
</AuthorizeView>
</div>
<div class="input-group">
<AuthorizeView Roles="SuperAdmin, Admin, CompAdmin">
<AuthorizeView Roles="SuperAdmin, DcaAdmin, CompAdmin">
<Authorized>
<span class="input-group-text"><i class="fa-solid fa-building"></i></span>
@if (@context.User.IsInRole("SuperAdmin") || @context.User.IsInRole("DcaAdmin"))
+1 -1
View File
@@ -12,7 +12,7 @@ using NLog;
namespace WebDoorCreator.UI.Pages
{
[Authorize(Roles = "SuperAdmin, Admin, CompAdmin")]
[Authorize(Roles = "SuperAdmin, DcaAdmin, CompAdmin")]
public partial class UserAdmin : ComponentBase, IDisposable
{
#region Public Fields
+29 -62
View File
@@ -11,16 +11,14 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - WebDoorCreator.UI</title>
@*<link rel="stylesheet" href="~/css/bootstrap/bootstrap.min.css" />*@
<link rel="stylesheet" href="~/lib/bootstrap-icons/font/bootstrap-icons.min.css" />
<link rel="stylesheet" href="~/lib/font-awesome/css/all.min.css" />
@*<link rel="stylesheet" href="~/css/site.css" />*@
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="~/css/site.min.css" />
<link rel="stylesheet" href="~/WebDoorCreator.UI.styles.css" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
<environment include="Development">
<link rel="stylesheet" href="~/Identity/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/Identity/css/site.css" />
@@ -34,25 +32,6 @@
</environment>
</head>
<body>
@*<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow">
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
@{
var result = Engine.FindView(ViewContext, "_LoginPartial", isMainPage: false);
}
@if (result.Success)
{
await Html.RenderPartialAsync("_LoginPartial");
}
else
{
throw new InvalidOperationException("The default Identity UI layout requires a partial view '_LoginPartial' " +
"usually located at '/Pages/_LoginPartial' or at '/Views/Shared/_LoginPartial' to work. Based on your configuration " +
$"we have looked at it in the following locations: {System.Environment.NewLine}{string.Join(System.Environment.NewLine, result.SearchedLocations)}.");
}
</div>
</nav>
</header>*@
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
@@ -67,50 +46,38 @@
@RenderBody()
</div>
@*<div class="fixed-bottom bottom-row px-2">
<div class="row bg-dark text-light">
<div class="col-5 pe-0 text-left">
<b>Web Door Creator @(DateTime.Today.Year)</b>
</div>
<div class="col-7 ps-0 text-end">
<span class="small">@($"{DateTime.Now:HH:mm:ss}")</span> | Powered by: <a class="text-light" href="https://www.egalware.com/" target="_blank"><img class="img-fluid" width="16" src="~/images/LogoEgw.png" /> Egalware </a>
</div>
</div>
</div>*@
@*<footer class="footer border-top pl-3 text-muted">
<div class="d-flex justify-content-between w-100 px-4">
&copy; 2023 - WebDoorCreator.UI
</div>
</footer>*@
@*<environment include="Development">
<script src="/lib/jquery/dist/jquery.js"></script>
<script src="~/Identity/lib/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script src="~/Identity/js/site.js" asp-append-version="true"></script>
</environment>
<environment exclude="Development">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
asp-fallback-src="~/Identity/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery"
crossorigin="anonymous"
integrity="sha384-ZvpUoO/+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn/6Z/hRTt8+pR6L4N2">
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
asp-fallback-src="~/Identity/lib/bootstrap/dist/js/bootstrap.bundle.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
crossorigin="anonymous"
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj">
</script>
<script src="~/Identity/js/site.js" asp-append-version="true"></script>
</environment>*@
<script src="~/Identity/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/js/bootstrap.bundle.js"></script>
<script src="~/Identity/js/site.js" asp-append-version="true"></script>
<script src="~/lib/SiteHelper.js" asp-append-version="true"></script>
<script src="_framework/blazor.server.js"></script>
<script src="_framework/blazor.server.js" autostart="false"></script>
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
<script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => console.error(error),
onConnectionUp: () => console.log("Client reconnected!")
}
}).then(() => {
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
get() {
return this.__reconnectionDisplay;
},
set(value) {
this.__reconnectionDisplay = {
show: () => value.show(),
update: (d) => value.update(d),
rejected: (d) => document.location.reload()
}
}
});
});
</script>
@await RenderSectionAsync("Scripts", required: false)
</body>
+102 -7
View File
@@ -1,13 +1,14 @@
using Blazored.LocalStorage;
using Blazored.SessionStorage;
using Microsoft.AspNetCore.Components;
using HealthChecks.UI.Client;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Localization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.FileProviders;
using StackExchange.Redis;
using System.Globalization;
using System.Text.Json.Serialization;
@@ -16,19 +17,80 @@ using WebDoorCreator.Data.Services;
using WebDoorCreator.UI.Areas.Identity;
using WebDoorCreator.UI.Data;
var builder = WebApplication.CreateBuilder(args);
var builder = WebApplication.CreateBuilder(args);
// configuration setup
ConfigurationManager configuration = builder.Configuration;
Microsoft.Extensions.Configuration.ConfigurationManager configuration = builder.Configuration;
// AspNetCore Identity setup
var connectionString = builder.Configuration.GetConnectionString("Identity.DB");
// REDIS setup
string connStringRedis = configuration.GetConnectionString("Redis");
if (string.IsNullOrEmpty(connStringRedis))
{
connStringRedis = "localhost:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
}
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
// avvio oggetto shared x redis...
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
// AspNetCore Identity setup
var connectionString = configuration.GetConnectionString("Identity.DB");
string dbServerAddr = "127.0.0.1";
if (string.IsNullOrEmpty(connectionString))
{
connectionString = "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;";
}
else
{
if (connectionString.Contains("Server"))
{
bool trovato = false;
var dbTokens = connectionString.Split(";");
int numTok = dbTokens.Count();
int idx = 0;
while (!trovato && idx < numTok)
{
if (dbTokens[idx].StartsWith("Server="))
{
// rimuovo la chaive Server...
dbServerAddr = dbTokens[idx].Replace("Server=", "");
// se ci fosse un nome (tipo \\sqlexpress) rimuovo...
if (dbServerAddr.Contains("\\"))
{
int sIdx = dbServerAddr.IndexOf("\\");
dbServerAddr = dbServerAddr.Substring(0, sIdx);
}
trovato = true;
}
idx++;
}
}
}
// healthchecks
builder.Services.AddHealthChecks()
.AddSqlServer(connectionString, healthQuery: "SELECT 1;", name: "SqlServer", failureStatus: HealthStatus.Degraded, tags: new string[] { "DB", "MsSql" })
.AddAsyncCheck($"DB PING ({dbServerAddr})", () => WebDoorCreator.UI.Health.Checks.PingCheck(dbServerAddr))
.AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => WebDoorCreator.UI.Health.Checks.PingCheck(redisSrvAddr))
// 512 MB max allocated memory
.AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded)
.AddRedis(connStringRedis, "Redis", failureStatus: HealthStatus.Degraded)
.AddAsyncCheck($"Config Table", () => WebDoorCreator.UI.Health.Checks.ConfigCount(configuration))
.AddAsyncCheck($"Orders Table", () => WebDoorCreator.UI.Health.Checks.OrdersCount(configuration))
.AddAsyncCheck($"Doors Table", () => WebDoorCreator.UI.Health.Checks.DoorsCount(configuration))
;
#if false
builder.Services
.AddHealthChecksUI(s =>
{
s.AddHealthCheckEndpoint("WDC_UI_HC", "health");
s.SetEvaluationTimeInSeconds(60);
s.SetMinimumSecondsBetweenFailureNotifications(120);
s.SetApiMaxActiveRequests(5);
s.SetHeaderText("WDC.UI Health Check Status");
})
.AddInMemoryStorage();
#endif
// abilitazione x email management con MailKit
builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
builder.Services.Configure<MailKitEmailSenderOptions>(options =>
@@ -102,6 +164,22 @@ app.UseHttpsRedirection();
app.UseStaticFiles();
// gestione static files: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
string BasePathPdf = configuration.GetValue<string>("ServerConf:BasePathPdf") ?? configuration.GetValue<string>("OptConf:BasePathPdf") ?? "";
if (!string.IsNullOrEmpty(BasePathPdf))
{
// verifico esista folder disegni
if (Directory.Exists(BasePathPdf))
{
// gestione cartella x PDF
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(BasePathPdf),
RequestPath = "/docs",
});
}
}
app.UseRouting();
app.UseAuthentication();
@@ -109,6 +187,23 @@ app.UseAuthorization();
app.MapControllers();
app.MapBlazorHub();
// config healthcheck: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks
// prende tutti i predicati
app.MapHealthChecks("/health", new HealthCheckOptions
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
// opzionalmente si puo' aggiungere richiesta AUTH
//.RequireAuthorization();
// nasconde tutti i dettagli
app.MapHealthChecks("/health/live", new HealthCheckOptions
{
Predicate = _ => false
});
app.MapFallbackToPage("/_Host");
app.Run();
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://wdc.egalware.com/UI/</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://wdc-w-iis-01.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>wdc.egalware.com/UI</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>steamware</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-02-13T16:56:27.4654255Z;True|2023-05-22T15:35:59.9735292+02:00;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00;</History>
<LastFailureDetails />
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACQhhKbsfp+UTciHhrQH0GzAAAAAASAAACgAAAAEAAAAIwsEsbaK2BLsVBpap3Pa0oYAAAAyYg8C03gbwQgvT7iGggH24UdM5ET0UN8FAAAAHqaLNjIe/Ai9A1quKtegfN5FxtH</EncryptedPassword>
</PropertyGroup>
</Project>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://wdc.egalware.com/UI/</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://wdc-w-iis-02.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>wdc.egalware.com/UI</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>steamware</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-02-13T16:56:27.4654255Z;True|2023-05-22T15:35:59.9735292+02:00;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00;</History>
<LastFailureDetails />
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACQhhKbsfp+UTciHhrQH0GzAAAAAASAAACgAAAAEAAAAIwsEsbaK2BLsVBpap3Pa0oYAAAAyYg8C03gbwQgvT7iGggH24UdM5ET0UN8FAAAAHqaLNjIe/Ai9A1quKtegfN5FxtH</EncryptedPassword>
</PropertyGroup>
</Project>
+123 -109
View File
@@ -3,125 +3,139 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>0.9.2401.0415</Version>
<Version>0.9.2406.2716</Version>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
</ItemGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
</ItemGroup>
<ItemGroup>
<Content Include="temp\Logo00.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo01.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo02.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo03.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="temp\Logo00.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo01.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo02.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="temp\Logo03.svg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2308.216" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.3111" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.14" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Redis" Version="6.0.4" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.5" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2402.2411" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.27" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.27" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.27" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.27" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.27">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.29" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="6.0.29" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.14" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebDoorCreator.Core\WebDoorCreator.Core.csproj" />
<ProjectReference Include="..\WebDoorCreator.Data\WebDoorCreator.Data.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebDoorCreator.Core\WebDoorCreator.Core.csproj" />
<ProjectReference Include="..\WebDoorCreator.Data\WebDoorCreator.Data.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\Identity\Data\" />
<Folder Include="Reports\" />
<Folder Include="wwwroot\DoorOpTypeImg\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\Identity\Data\" />
<Folder Include="Reports\" />
<Folder Include="wwwroot\DoorOpTypeImg\" />
</ItemGroup>
<ItemGroup>
<None Include="compilerconfig.json" />
<None Include="Properties\PublishProfiles\IIS-PROD.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\IISProfile.pubxml.user" />
</ItemGroup>
<ItemGroup>
<None Include="compilerconfig.json" />
<None Include="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-PROD.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\IISProfile.pubxml.user" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\images\icons\angles-left-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\angles-right-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\arrows-rotate-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\calculator-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\clipboard-regular.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\clone.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\Exit.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\ExitWhite.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\file-pdf-regular.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\file.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\Plus.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\PlusWhite.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\images\icons\angles-left-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\angles-right-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\arrows-rotate-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\calculator-solid.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\clipboard-regular.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\clone.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\Exit.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\ExitWhite.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\file-pdf-regular.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\file.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\Plus.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\images\icons\PlusWhite.svg">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Update="logs\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Reports\ReportOrder.rdlc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
<ItemGroup>
<None Update="logs\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Reports\ReportOrder.rdlc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>
+16 -9
View File
@@ -6,17 +6,24 @@
"Microsoft.AspNetCore": "Warning"
}
},
"RuntimeOpt": {
"MaxDayCalcCache": 7,
"BaseUrl": "/WDC/UI"
},
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Identity.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;",
"WDC.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
"Redis": "wdc-u-redis-01.ovh:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Identity.DB": "Server=WDC-W-SQL-01\\SQLEXPRESS;Database=DCA_WebDoorCreator; User ID=steamware;Password=viadante16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;",
"WDC.DB": "Server=WDC-W-SQL-01\\SQLEXPRESS;Database=DCA_WebDoorCreator; User ID=steamware;Password=viadante16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
},
"RuntimeOpt": {
"MaxDayCalcCache": 28,
"BaseUrl": "/UI"
},
"ServerConf": {
//"BasePathPdf": "U:\\WebDoorSync\\WdcPdf",
"BasePathPdf": "U:\\nextcloud.egalware\\ABH\\WdcPdf",
"WaitOpen3d": 1000
},
"CompoBaseDirs": {
"CurrCompoDir": "J:\\WebDoorSync\\CurrentComp\\Compo",
"NewCompoDir": "J:\\WebDoorSync\\NewComp\\Compo"
//"CurrCompoDir": "U:\\WebDoorSync\\CurrentComp\\Compo",
//"NewCompoDir": "U:\\WebDoorSync\\NewComp\\Compo",
"CurrCompoDir": "U:\\nextcloud.egalware\\CalcData\\CurrentComp\\Compo",
"NewCompoDir": "U:\\nextcloud.egalware\\CalcData\\NewComp\\Compo"
}
}
@@ -6,6 +6,9 @@
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"Redis": "localhost:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false"
},
"RuntimeOpt": {
"MaxDayCalcCache": 7,
"BaseUrl": "/WDC/UI"
+10 -5
View File
@@ -7,12 +7,9 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "localhost: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;",
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
//"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
//"Identity.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;",
//"WDC.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
},
"ExternalProviders": {
"MailKit": {
@@ -20,17 +17,23 @@
"Address": "smtp-mail.outlook.com",
"Port": "587",
"Account": "steamwarebot@outlook.it",
"Password": "siamoInViaNazionale93",
"Password": "siamoInViaNazionale93!",
"SenderEmail": "steamwarebot@outlook.it",
"SenderName": "Steamware Email BOT"
}
}
},
"SetupOpt": {
"CheckAdmUser": false,
"DisableIdentMigrate": true,
"DisableWDCMigrate": true
},
"ServerConf": {
"BasePathPdf": "\\\\IIS04\\WebDoorSync\\WdcPdf",
"WaitOpen3d": 800
},
"RuntimeOpt": {
"WaitReloadSvg": 100,
"VetoRemoveProcessing": 5,
"MaxDayCalcCache": 7,
"BaseUrl": "/WDC/UI",
@@ -53,5 +56,7 @@
"CompoBaseDirs": {
"CurrCompoDir": "\\\\IIS04\\WebDoorSync\\CurrentComp\\Compo",
"NewCompoDir": "\\\\IIS04\\WebDoorSync\\NewComp\\Compo"
//"CurrCompoDir": "J:\\WebDoorSync\\CurrentComp\\Compo",
//"NewCompoDir": "J:\\WebDoorSync\\NewComp\\Compo"
}
}
+4
View File
@@ -130,5 +130,9 @@
{
"outputFile": "Components/FilesMan/CompoCompare.razor.css",
"inputFile": "Components/FilesMan/CompoCompare.razor.less"
},
{
"outputFile": "Components/DoorDef/DoorDefSizingSI.razor.css",
"inputFile": "Components/DoorDef/DoorDefSizingSI.razor.less"
}
]
@@ -4,7 +4,7 @@
<title>{WINDOW_TITLE} {PAGETITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="{LOCATION_STYLESHEET}" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
</head>
<frameset cols="{WIDTH_LEFT},{WIDTH_RIGHT}">
<frame src="{SRC_LEFT}" title="{TITLE_LEFT}" name="{NAME_LEFT}" id="{NAME_LEFT}" marginwidth="0" marginheight="0" scrolling="auto" />

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Some files were not shown because too many files have changed in this diff Show More